Commit Graph

25472 Commits

Author SHA1 Message Date
Daniel Micay
77cc1c5107 add a strong/weak reference counted pointer type 2014-01-09 15:53:44 -05:00
Daniel Micay
b36a948831 stop treating Rc cycles as unsafe 2014-01-09 15:53:44 -05:00
bors
9d63403c1c auto merge of #11417 : eddyb/rust/desnaking, r=bstrie 2014-01-09 12:31:35 -08:00
Eduard Burtescu
72ee4a57b7 Updated librustdoc and librustpkg to use the proper UpperCase names from libsyntax. 2014-01-09 22:25:28 +02:00
Eduard Burtescu
6b221768cf libsyntax: Renamed types, traits and enum variants to CamelCase. 2014-01-09 22:25:28 +02:00
bors
63ba93f91d auto merge of #11376 : alexcrichton/rust/remove-eof, r=pcwalton
This is something I have been meaning to do for awhile, but upon inspection of the `eof` method on all of the `Reader` impls you may find some interesting surprises. The method returns a good answer for almost all wrapped I/O objects (buffered readers, mem readers, util readers, etc), but the actual return value on all I/O objects themselves is almost always useless.

Almost no I/O object other than a file actually knows when it's hit EOF or not. I think that pretending that all objects know when they've hit the end when almost none do is probably a bad idea. I can't really come up with a good answer to "is this file descriptor at eof" or "is this tcp stream at eof" much less "is this udp socket at eof". Due to being unable to answer these questions for *all* readers, I believe that it shouldn't be a part of the core `Reader` trait.
2014-01-09 09:31:36 -08:00
Alex Crichton
a18282c3d0 Remove eof() from io::Reader 2014-01-09 09:27:10 -08:00
Alex Crichton
f2a86a2da6 Register new snapshots 2014-01-09 09:18:59 -08:00
bors
dd11fe17c7 auto merge of #11414 : nick29581/rust/span, r=alexcrichton
...at the start of the path, rather than at the start of the view_path.

Fixes #11317
2014-01-09 07:41:33 -08:00
bors
1b0f5b23fc auto merge of #11412 : bjz/rust/num-cleanups, r=alexcrichton
The methods contained in `std::num::{Algebraic, Trigonometric, Exponential, Hyperbolic}` have now been moved into `std::num::Real`. This is part of an ongoing effort to simplify `std::num` (see issue #10387).

`std::num::RealExt` has also been removed from the prelude because it is not a commonly used trait.

r? @alexcrichton
2014-01-09 06:26:27 -08:00
bors
ab9ec6d59a auto merge of #11402 : bjz/rust/remove-approx, r=alexcrichton
This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases. Third party libraries should implement their own if they need something like it.

This closes #5316.

r? @alexcrichton, @pcwalton
2014-01-09 05:06:33 -08:00
bors
fb44e20f65 auto merge of #11394 : alexcrichton/rust/no-decorator, r=cmr
This is just an unnecessary trait that no one's ever going to parameterize over
and it's more useful to just define the methods directly on the types
themselves. The implementors of this type almost always don't want
inner_mut_ref() but they're forced to define it as well.
2014-01-09 03:51:27 -08:00
bors
c34fc5e33b auto merge of #11387 : pcwalton/rust/de-at-block, r=alexcrichton
r? @brson
2014-01-09 02:26:26 -08:00
bors
ebc079c787 auto merge of #11386 : rcatolino/rust/ice-10955, r=pcwalton
So, like I mentioned in issue #10955 it doesn't seem like we need to call ```ty::subst_tps``` when the method is generic. But then I realized that this function doesn't mutate any of its input, and the return value is unused. Plus the type param substitution seems to be taken care of in ```trans_fn_ref_with_vtables```, so I thought I'd just try to remove it. As far as I can tell everything works.

This closes #10955.
2014-01-09 00:16:30 -08:00
Alex Crichton
6df57ec2e2 Remove the io::Decorator trait
This is just an unnecessary trait that no one's ever going to parameterize over
and it's more useful to just define the methods directly on the types
themselves. The implementors of this type almost always don't want
inner_mut_ref() but they're forced to define it as well.
2014-01-08 23:42:28 -08:00
Nick Cameron
01f42eed80 Start the span for a path in a view_path at the correct place (at the start of the path, rather than at the start of the view_path). 2014-01-09 20:12:23 +13:00
bors
f6963e260a auto merge of #11369 : kvark/rust/master, r=huonw
-Fixed Gc::clone to not require a Clone implementation for T
-Implemented Gc::ptr_eq to match Rc::ptr_eq, added a test for that
2014-01-08 21:26:29 -08:00
Brendan Zabarauskas
ceea85a148 Remove ApproxEq and assert_approx_eq!
This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases.
2014-01-09 15:41:46 +11:00
Brendan Zabarauskas
0232fed174 Merge some numeric traits with Real and don't re-export RealExt
The methods contained in `std::num::{Algebraic, Trigonometric, Exponential, Hyperbolic}` have now been moved into `std::num::Real`. This is part of an ongoing effort to simplify `std::num` (see issue #10387).

`std::num::RealExt` has also been removed from the prelude because it is not a commonly used trait.
2014-01-09 15:29:09 +11:00
Brian Anderson
7613b15fdb Update some copyright dates 2014-01-08 18:04:43 -08:00
Brian Anderson
4e8dbabec5 Fix windows installer version to be less verbose 2014-01-08 18:03:28 -08:00
bors
9dece60391 auto merge of #11375 : alexcrichton/rust/issue-11372, r=pcwalton
Closes #11372
2014-01-08 13:36:44 -08:00
Alex Crichton
75165f78de Robustly read remaining bytes in a character
Closes #11372
2014-01-08 13:25:19 -08:00
bors
97005c0068 auto merge of #11401 : michaelwoerister/rust/issue11322, r=alexcrichton
`expand_include_str()` in libsyntax seems to have corrupted the CodeMap by always setting the BytePos of any included files to zero. It now uses `CodeMap::new_filemap()` which should set everything properly. This should fix issue #11322 but I don't want to close it before I have confirmation from the reporters that the problem is indeed fixed.
2014-01-08 11:26:30 -08:00
bors
430652c970 auto merge of #11370 : alexcrichton/rust/issue-10465, r=pwalton
Turned out to be a 2-line fix, but the compiler fallout was huge.
2014-01-08 10:06:45 -08:00
bors
f3a8baafbe auto merge of #11407 : alexcrichton/rust/fix-snap, r=brson
If we bootstrap a cross compile from a stage1 compiler, then the stage1 compiler
already knows about the rustc => rustlib change, so we need to not add the extra
flag if it's a stage0 version of a target from a stage1 of another target.
2014-01-08 08:46:33 -08:00
Alex Crichton
004dae6abd Fix the snapshot and cross compilation
If we bootstrap a cross compile from a stage1 compiler, then the stage1 compiler
already knows about the rustc => rustlib change, so we need to not add the extra
flag if it's a stage0 version of a target from a stage1 of another target.
2014-01-08 08:16:48 -08:00
Michael Woerister
ad3a179954 Fix CodeMap issue in expand_include_str() 2014-01-08 16:38:58 +01:00
bors
464d1d044e auto merge of #11405 : huonw/rust/moredocs, r=huonw
Various documentation changes, change the 'borrowed pointer' terminology to 'reference', fix a problem with 'make dist' on windows.
2014-01-08 07:26:41 -08:00
Huon Wilson
9dc44c7d86 Fix cheatsheet examples on 32-bit platforms.
0xDEADBEEF doesn't fit in an int = i32 (on 32-bit computers).
2014-01-09 02:16:36 +11:00
bors
fda71f2630 auto merge of #11358 : pcwalton/rust/typed-arenas, r=alexcrichton
A typed arena is a type of arena that can only allocate objects of one
type. It is 3x faster than the existing arena and 13x faster than malloc
on Mac.

r? @brson
2014-01-08 04:26:36 -08:00
bors
9da4eac91f auto merge of #11391 : alexcrichton/rust/rustdoc-inline, r=brson
If a reexport comes from a non-public module, then the documentation for the
reexport will be inlined into the module that exports it, but if the reexport is
targeted at a public type (like the prelude), then it is not inlined but rather
hyperlinked.
2014-01-08 00:56:35 -08:00
Alex Crichton
0547fb9cad Fixup the rest of the tests in the compiler 2014-01-07 23:51:38 -08:00
Alex Crichton
f47e4b2874 extratest: Fix all leaked trait imports 2014-01-07 23:51:38 -08:00
Alex Crichton
bcb1c381a3 stdtest: Fix all leaked trait imports 2014-01-07 23:51:38 -08:00
Alex Crichton
c4d36b85a0 Fix remaining cases of leaking imports 2014-01-07 23:51:38 -08:00
Alex Crichton
7e0443d6c4 std: Fill in all missing imports
Fallout from the previous commits
2014-01-07 23:51:38 -08:00
Alex Crichton
5350ee740e rustc: De-indent portions of middle::resolve
It's a little prettier to look at now
2014-01-07 23:51:37 -08:00
Alex Crichton
e4804acaca Fix leaking trait imports across modules
Turns out the pass in resolve was a little too eager to travel back up the
hierarchy chain when looking for trait candidates.

Closes #10465
2014-01-07 23:51:37 -08:00
Brian Anderson
fee8c1d2c7 doc: Typos 2014-01-07 21:31:37 -08:00
Clinton Ryan
1fd4c3bb40 Fixed code snippets 2014-01-07 21:30:17 -08:00
Huon Wilson
7cfce50b24 Address some minor points in the pointer guide
cc #11364.
2014-01-07 21:24:48 -08:00
Brian Anderson
2d8dd6afd4 doc: Add rustc and syntax to the index 2014-01-07 21:23:26 -08:00
Brian Anderson
da43832034 doc: Add libgreen and libnative to the index 2014-01-07 20:49:13 -08:00
Brian Anderson
d323632669 'borrowed pointer' -> 'reference' 2014-01-07 18:49:13 -08:00
Alex Crichton
3425901d93 Inline reexports in rustdoc
If a reexport comes from a non-public module, then the documentation for the
reexport will be inlined into the module that exports it, but if the reexport is
targeted at a public type (like the prelude), then it is not inlined but rather
hyperlinked.
2014-01-07 18:46:16 -08:00
bors
a121f7bab3 auto merge of #10854 : Kimundi/rust/result_compose_map_mutate_or, r=alexcrichton
This implements parts of the changes to `Option` I proposed and discussed in this thread: https://mail.mozilla.org/pipermail/rust-dev/2013-November/006254.html, and on IRC.

In short, the string "default" should not be used in any context that has nothing to do with the `std::default::Default` trait.

This PR consists of this change:
- Renamed `map_default -> map_or` and `mutate_default -> mutate_or_set`.
2014-01-07 17:56:32 -08:00
Brian Anderson
b65b4d6384 doc: Fix URL of libextra docs 2014-01-07 17:29:57 -08:00
Brian Anderson
6b7ffa4a8b doc: Title reference manual consistently 2014-01-07 17:28:15 -08:00
kvark
5da166314f Fixed Gc::clone, implemented Gc::ptr_eq 2014-01-07 20:21:25 -05:00