Commit Graph

35450 Commits

Author SHA1 Message Date
Aaron Turon
92ccc073e1 Stabilize clone
This patch marks `clone` stable, as well as the `Clone` trait, but
leaves `clone_from` unstable. The latter will be decided by the beta.

The patch also marks most manual implementations of `Clone` as stable,
except where the APIs are otherwise deprecated or where there is
uncertainty about providing `Clone`.
2014-12-20 00:37:44 -08:00
bors
8443b09e36 auto merge of #19995 : eddyb/rust/split-resolve, r=nikomatsakis
r? @nikomatsakis
2014-12-20 05:52:18 +00:00
Eduard Burtescu
948cc666de rustc_resolve: move export recording into its own module. 2014-12-20 07:28:47 +02:00
Eduard Burtescu
1614d92f51 rustc_resolve: move unused import checking into its own module. 2014-12-20 07:28:47 +02:00
Eduard Burtescu
c54fc980f3 Split resolve from rustc::middle into rustc_resolve. 2014-12-20 07:28:47 +02:00
Eduard Burtescu
a74a050c44 rustc: middle: move some types from resolve to privacy. 2014-12-20 07:28:47 +02:00
Eduard Burtescu
5d1257a760 rustc: middle: move TraitItemKind from resolve to def. 2014-12-20 07:28:46 +02:00
Eduard Burtescu
d9504d4a47 rustc: middle: move Export and ExportMap from resolve to def. 2014-12-20 07:28:46 +02:00
Eduard Burtescu
10a862d4f4 rustc: middle: use cheaper Name in resolve::Export instead of String. 2014-12-20 07:25:42 +02:00
Eduard Burtescu
f0276072a3 rustc: middle: move TraitMap from resolve to ty. 2014-12-20 07:25:41 +02:00
Eduard Burtescu
d8f57c3804 rustc: middle: move DefMap from resolve to def. 2014-12-20 07:25:37 +02:00
Eduard Burtescu
fb1d6f24fc middle: resolve: fix inconsistencies around ExportMap and remove the 2 suffix. 2014-12-20 07:11:03 +02:00
Eduard Burtescu
533822207f rustc: don't allow(non_camel_case_types) in resolve. 2014-12-20 07:11:03 +02:00
bors
1c2df5cc3c auto merge of #19640 : aliblong/rust/power_of_two_reform, r=Gankro
The `is_power_of_two()` method of the `UnsignedInt` trait currently returns `true` for `self == 0`. Zero is not a power of two, assuming an integral exponent `k >= 0`. I've therefore moved this functionality to the new method `is_power_of_two_or_zero()` and reformed `is_power_of_two()` to return false for `self == 0`.

To illustrate the usefulness of the existence of both functions, consider `HashMap`. Its capacity must be zero or a power of two; conversely, it also requires a (non-zero) power of two for key and val alignment.

Also, added a small amount of documentation regarding #18604.
2014-12-20 01:12:19 +00:00
Aaron Liblong
f6328b60da Reform power_of_two methods for perf increase & semantic change to consider 0 not a power of 2.
Vec panics when attempting to reserve capacity > int::MAX (uint::MAX / 2).
2014-12-19 18:21:24 -05:00
bors
cbe9fb45bc auto merge of #19463 : kali/rust/master, r=alexcrichton
parse_ty() no longer takes a boolean parameter. quote_ty! implementation has not yet been modified accordingly. 

As a matter of fact, quote_ty! was not covered by tests. One test (called qquotes) references it, but it has been ignored for nearly one year and now need heavy refactoring.

quote_token.rs seemed like a good place to test quote_ty!, many other quote_*! macros were asserted there.
2014-12-19 20:22:17 +00:00
bors
95c2ed31ae auto merge of #19867 : japaric/rust/deriving-copy, r=acrichto
r? @alexcrichton
2014-12-19 16:02:31 +00:00
Jorge Aparicio
f975b10310 windows: remove unused import 2014-12-19 10:51:01 -05:00
Jorge Aparicio
4c6e76b7c8 libtime: use #[deriving(Copy)] 2014-12-19 10:51:01 -05:00
Jorge Aparicio
ce92437769 libtest: use #[deriving(Copy)] 2014-12-19 10:51:01 -05:00
Jorge Aparicio
64234b3541 libterm: use #[deriving(Copy)] 2014-12-19 10:51:01 -05:00
Jorge Aparicio
86f8c127dd libsyntax: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
a77e8a63d5 libstd: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
2df30a47e2 libserialize: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
1d25271e05 librustrt: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
4c007568bf librustdoc: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
fa0383f38d librustc_typeck: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
5e2bca9e86 librustc_trans: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
463475b7fa librustc_llvm: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
db45be2616 librustc_driver: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
392ea799b8 librustc_borrowck: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
e64a0072d6 librustc: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
Jorge Aparicio
f2ef2cda52 libregex: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
Jorge Aparicio
fd4a5d9ef1 librbml: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
Jorge Aparicio
a18d090c3c librand: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
Jorge Aparicio
e0a88a78da liblog: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
Jorge Aparicio
c407785ac0 libgetopts: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
Jorge Aparicio
4c62c76ef9 libfmt_macros: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
Jorge Aparicio
30cefcbdfd libcore: use #[deriving(Copy)] 2014-12-19 10:43:23 -05:00
Jorge Aparicio
c32a48293a libcollections: use #[deriving(Copy)] 2014-12-19 10:43:23 -05:00
Mathieu Poumeyrol
8920181052 ack parser.parse_ty change in quote_ty! (+ test) 2014-12-19 15:25:02 +01:00
bors
bd90b936d7 auto merge of #19884 : nikomatsakis/rust/issue-19730-perfect-forwarding, r=pnkfelix
Rewrite how the HRTB algorithm matches impls against obligations. Instead of impls providing higher-ranked trait-references, impls now once again only have early-bound regions. The skolemization checks are thus moved out into trait matching itself. This allows to implement "perfect forwarding" impls like those described in #19730. This PR builds on a previous PR that was already reviewed by @pnkfelix.

r? @pnkfelix 

Fixes #19730
2014-12-19 13:22:10 +00:00
Niko Matsakis
ebf1e4f23a Three random test cases that seem to produce more errors now. I've
not dug deeply into what is going on here, although the errors ARE
somewhat surprising.
2014-12-19 03:29:59 -05:00
Niko Matsakis
a04ce71172 Modify the Bytes type so that it remains cloneable even
though it includes a `fn()`. This is really a more general
problem but I wanted to ensures that `bytes` in particular
remains working due to #12677.
2014-12-19 03:29:59 -05:00
Niko Matsakis
89922e52b0 Correct comment on Binder. 2014-12-19 03:29:59 -05:00
Niko Matsakis
1085012cd2 Kill some warnings about shadowed lifetimes 2014-12-19 03:29:59 -05:00
Niko Matsakis
d4f8a5abc5 Work around #19982 by rewriting test impls to not use anonymous
lifetimes. This currently causes an ICE; it should (ideally) work, but
failing that at least give a structured error. For the purposes of
this PR, though, workaround is fine.
2014-12-19 03:29:59 -05:00
Niko Matsakis
aa20e2ff36 Document new algorithm at a high-level. 2014-12-19 03:29:31 -05:00
Niko Matsakis
0b88c5d392 Remove text on method matching, which is now out of date. 2014-12-19 03:29:31 -05:00
Niko Matsakis
dab6e70e03 Convert gigantic comment away from //! form. It is annoying to
read (`//!` is intrusive) and annoying to edit (must maintain a prefix
on every line). Since the only purpose of a `doc.rs` file is to have a
bunch of text, using `/*!` and `*/` without indentations seems
appropriate.
2014-12-19 03:29:31 -05:00