Commit Graph

23231 Commits

Author SHA1 Message Date
Eduard Burtescu
7ab0b0cd41 Handle inline asm outputs as write-only in liveness, borrowck and trans. 2013-10-18 08:02:56 +03:00
Alex Crichton
82f5f65076 Move sys::refcount to managed::refcount
More progress on #2240
2013-10-17 21:14:38 -07:00
bors
737413d72a auto merge of #9921 : sp3d/rust/master, r=alexcrichton
Refactors parsing of numerical literals to make it more readable.
Removes 'float'/the 'f' literal suffix and invalid character literals ''' and '\'.
Also makes attribute highlighting more robust and allows urls in attributes to be recognized.
2013-10-17 20:56:18 -07:00
sp3d
58b336d90b track language changes, improve attr handling in GtkSourceView language-spec
Refactors parsing of numerical literals to make it more readable.
Removes 'float'/the 'f' literal suffix and invalid character literals ''' and '\'.
Also makes attribute highlighting more robust and allows urls in attributes to be recognized.
2013-10-18 03:35:26 +00:00
bors
d8d1b8f8be auto merge of #9896 : brson/rust/stdmem, r=alexcrichton
This is progress toward removing std::sys.
2013-10-17 19:11:19 -07:00
bors
51709fcedc auto merge of #9916 : alexcrichton/rust/issue-9861, r=brson
This was just incorrectly handled before, the path component shouldn't be looked
at at all (we used absolute paths everywhere instead of relative to the current
module location).

Closes #9861
2013-10-17 18:01:22 -07:00
Brian Anderson
34d376f3cf std: Move size/align functions to std::mem. #2240 2013-10-17 17:31:35 -07:00
Alex Crichton
cf844abced rustdoc: Don't treat "super" specially for urls
This was just incorrectly handled before, the path component shouldn't be looked
at at all (we used absolute paths everywhere instead of relative to the current
module location).

Closes #9861
2013-10-17 17:15:42 -07:00
bors
532ab94c4b auto merge of #9915 : thestinger/rust/rusti, r=thestinger 2013-10-17 16:51:20 -07:00
Daniel Micay
28a6498dbf rm rusti from Makefile.in 2013-10-17 19:47:24 -04:00
bors
3fd0e3a77b auto merge of #9902 : thestinger/rust/immediate, r=nikomatsakis
The code generation previously assumed a reference could not alter the
value in a way the destructor would notice. This is an incorrect
assumption for `&mut`, and is also incorrect for an `&` pointer to a
non-`Freeze` type.

Closes #7972
2013-10-17 13:56:23 -07:00
Daniel Micay
34ae5d70ac partially fix immediate rvalues
The code generation previously assumed a reference could not alter the
value in a way the destructor would notice. This is an incorrect
assumption for `&mut`, and is also incorrect for an `&` pointer to a
non-`Freeze` type.

Closes #7972
2013-10-17 16:50:07 -04:00
bors
d773a024a2 auto merge of #9908 : alexcrichton/rust/snapshots, r=thestinger 2013-10-17 11:06:31 -07:00
Alex Crichton
0adb41d0eb Register new snapshots 2013-10-17 10:12:23 -07:00
bors
d4a32386f3 auto merge of #9907 : kballard/rust/vec_ends_with, r=alexcrichton 2013-10-17 09:56:27 -07:00
bors
2cb96a4eaf auto merge of #9900 : hatahet/rust/master, r=alexcrichton
Closes #9870
2013-10-17 02:46:24 -07:00
bors
386fa1d818 auto merge of #9897 : thestinger/rust/rusti, r=alexcrichton
Closes #9818
Closes #9567
Closes #8924
Closes #8910
Closes #8392
Closes #7692
Closes #7499
Closes #7220
Closes #5038
2013-10-17 01:36:33 -07:00
bors
00adcf0bdd auto merge of #9863 : csainty/rust/issue-9755-once-fns-feature-directive, r=alexcrichton
Hello,

First time rust contributor here, please let me know if I need to sort out the contribution agreement for this.

I picked issue #9755 to dip my toe in the water, this pull request isn't quite complete though as I have not updated the documentation. The reason for this is that I haven't tracked down why this feature is gated so I don't feel I can write a justification of the same quality as the other features have been documented.
If someone would like to explain or point me at a mail thread I am happy to update with this change.

Hopefully I have understood the process of converting the old flag into a directive correctly.

Also just to call out what I am sure if a known quirk when adding feature directives, you can't build this code unless you have a snapshot of the compiler which knows about the feature directive. Chicken and the egg. I split the change into two commits, the first should be able to build a snapshot that can compile the second.
2013-10-17 00:21:20 -07:00
Kevin Ballard
87a2d032ff Rewrite str.starts_with()/ends_with() to be simpler 2013-10-16 23:17:34 -07:00
Kevin Ballard
2fcb53493d Implement new methods vec.starts_with()/vec.ends_with() 2013-10-16 23:17:30 -07:00
Kevin Ballard
d8f82c8e43 Rewrite vec.contains() to be simpler 2013-10-16 23:17:26 -07:00
bors
88acb73ce5 auto merge of #9891 : alexcrichton/rust/allow-warnings, r=brson
Closes #9754
2013-10-16 22:56:17 -07:00
Ziad Hatahet
256913eb32 Fixed example comment for num::cast(). 2013-10-16 22:33:31 -07:00
bors
6c08cc2db4 auto merge of #9846 : cmr/rust/serialize_uuid, r=alexcrichton 2013-10-16 21:41:23 -07:00
Chris Sainty
88ab38cf06 Removed the -Z once_fns compiler flag and added the new feature directive of the same name to replace it.
Changed the frame_address intrinsic to no longer be a once fn.
This removes the dependency on once_fns from std.
2013-10-17 06:22:48 +02:00
bors
5d8e494a8c auto merge of #9585 : vky/rust/num-docs, r=alexcrichton
Copied existing comments from other files, and added comments to functions that did not have existing comments available. 

cc #7511
2013-10-16 20:31:23 -07:00
Vijay Korapaty
5e1ccc66e1 Added comments to public functions in num.rs.
Copied existing comments from other files, and added comments to
functions that did not have existing comments available.
2013-10-16 20:03:01 -07:00
Daniel Micay
f766acad62 drop the linenoise library
Closes #5038
2013-10-16 22:57:51 -04:00
Daniel Micay
7c92435f8f remove the rusti command
Closes #9818
Closes #9567
Closes #8924
Closes #8910
Closes #8392
Closes #7692
Closes #7499
Closes #7220
2013-10-16 22:54:38 -04:00
bors
1f279bf9ca auto merge of #9721 : klutzy/rust/uv-net-read-fix, r=alexcrichton
See #9605 for detailed information.

This also fixes two tests of #8811.
2013-10-16 19:21:25 -07:00
Corey Richardson
75cedf8e62 uuid: serialize test and documentations 2013-10-16 21:36:41 -04:00
bors
c92f2168d4 auto merge of #9833 : alexcrichton/rust/fixes, r=brson
Commits have all the fun details
2013-10-16 18:11:22 -07:00
bors
63e097d8c3 auto merge of #9634 : blake2-ppc/rust/by-ref-iter, r=thestinger
std::iter: Introduce .by_ref() adaptor

Creates a wrapper around a mutable reference to the iterator.

This is useful to allow applying iterator adaptors while still
retaining ownership of the original iterator value.

Example::

    let mut xs = range(0, 10);
    // sum the first five values
    let partial_sum = xs.by_ref().take(5).fold(0, |a, b| a + b);
    assert!(partial_sum == 10);
    // xs.next() is now `5`
    assert!(xs.next() == Some(5));

---

This adaptor requires the user to have good understanding of
iterators or what a particular adaptor does. There could be some
pitfalls here with the iterator protocol, it's mostly the same issues
as other places regarding what happens after the iterator
returns None for the first time.

There could also be other ways to achieve the same thing, for
example Implementing iterator on `&mut T` itself:
`impl <T: Iterator<..>> Iterator for &mut T`  but that would only
lead to confusion I think.
2013-10-16 17:01:30 -07:00
bors
9d6c251881 auto merge of #9885 : thestinger/rust/vector, r=brson
The goal here is to avoid requiring a division or multiplication to compare against the length. The bounds check previously used an incorrect micro-optimization to replace the division by a multiplication, but now neither is necessary *for slices*. Unique/managed vectors will have to do a division to get the length until they are reworked/replaced.
2013-10-16 15:21:35 -07:00
bors
fa03c94546 auto merge of #9892 : Kimundi/rust/ResultToStr, r=alexcrichton 2013-10-16 14:11:58 -07:00
Alex Crichton
6969e5fb58 Allow stage0 warnings 2013-10-16 11:53:05 -07:00
Marvin Löbel
abecd61a23 Added Result implementations for ToStr and fmt::Default 2013-10-16 20:36:38 +02:00
bors
40180cdbea auto merge of #9655 : kballard/rust/path-rewrite, r=alexcrichton
Rewrite the entire `std::path` module from scratch.

`PosixPath` is now based on `~[u8]`, which fixes #7225.
Unnecessary allocation has been eliminated.

There are a lot of clients of `Path` that still assume utf-8 paths.
This is covered in #9639.
2013-10-16 11:26:35 -07:00
Kevin Ballard
d108a22fd1 path2: Update for privacy changes
Remove redundant `contains_nul` definition.

Make `parse_prefix` private.
2013-10-16 11:18:06 -07:00
Kevin Ballard
6eade9e914 path2: Update for latest master
Also fix some issues that crept into earlier commits during the conflict
resoution for the rebase.
2013-10-16 11:18:06 -07:00
Kevin Ballard
40b324f0de path2: Remove Path.into_str() 2013-10-16 10:26:48 -07:00
Kevin Ballard
0c7e8f7a92 path2: Remove some API functions
Delete the following API functions:
- set_dirname()
- with_dirname()
- set_filestem()
- with_filestem()
- add_extension()
- file_path()

Also change pop() to return a boolean instead of an owned copy of the
old filename.
2013-10-16 10:26:48 -07:00
Kevin Ballard
bab7eb20df path2: Update based on more review feedback
Standardize the is_sep() functions to be the same in both posix and
windows, and re-export from path. Update extra::glob to use this.

Remove the usage of either, as it's going away.

Move the WindowsPath-specific methods out of WindowsPath and make them
top-level functions of path::windows instead. This way you cannot
accidentally write code that will fail to compile on non-windows
architectures without typing ::windows anywhere.

Remove GenericPath::from_c_str() and just impl BytesContainer for
CString instead.

Remove .join_path() and .push_path() and just implement BytesContainer
for Path instead.

Remove FilenameDisplay and add a boolean flag to Display instead.

Remove .each_parent(). It only had one caller, so just inline its
definition there.
2013-10-16 10:26:48 -07:00
Daniel Micay
bd7610f3e3 introduce base_and_len fns for element length 2013-10-16 12:28:25 -04:00
Daniel Micay
ef3ec1fe97 rename base_and_len -> base_and_byte_len 2013-10-16 12:00:31 -04:00
bors
fabec998e5 auto merge of #9857 : brson/rust/mainsched, r=alexcrichton
...al work

This is causing really awful scheduler behavior where the main thread scheduler is
continually waking up, stealing work, discovering it can't actually run the work,
and sending it off to another scheduler.

No test cases because we don't have suitable instrumentation for it.
2013-10-15 22:56:36 -07:00
Alex Crichton
fc06f7922d Build a few extra features into format! parsing
* Allow named parameters to specify width/precision
* Intepret the format string '0$' as "width is the 0th argument" instead of
  thinking the lone '0' was the sign-aware-zero-padding flag. To get both you'd
  need to put '00$' which makes more sense if you want both to happen.

Closes #9669
2013-10-15 22:27:10 -07:00
Alex Crichton
a84c2999c9 Require module documentation with missing_doc
Closes #9824
2013-10-15 22:27:10 -07:00
Kevin Ballard
c01a97b7a9 path2: Remove .with_display_str and friends
Rewrite these methods as methods on Display and FilenameDisplay. This
turns

  do path.with_display_str |s| { ... }

into

  do path.display().with_str |s| { ... }
2013-10-15 22:19:53 -07:00
Kevin Ballard
d6d9b92683 path2: Adjust the API to remove all the _str mutation methods
Add a new trait BytesContainer that is implemented for both byte vectors
and strings.

Convert Path::from_vec and ::from_str to one function, Path::new().

Remove all the _str-suffixed mutation methods (push, join, with_*,
set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15 22:18:30 -07:00