Commit Graph

31890 Commits

Author SHA1 Message Date
Chase Southwood
341cf405e5 Use wrapper structs for HashSet's iterators.
Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the iterators of `HashSet` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
2014-12-15 19:31:07 -06:00
Chase Southwood
85fe141fb7 Use wrapper structs for HashMap's iterators.
Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the keys and values iterators of `HashMap` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
2014-12-15 19:28:45 -06:00
Chase Southwood
a81c3ab468 Use wrapper structs for BTreeSet's iterators.
Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the iterators of `BTreeSet` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
2014-12-15 19:28:24 -06:00
Chase Southwood
765806ef1e Use wrapper structs for BTreeMap's iterators.
Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the keys and values iterators of `BTreeMap` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
2014-12-15 19:26:28 -06:00
Nick Cameron
743d6a4132 Review changes 2014-12-16 13:50:24 +13:00
Nick Cameron
65616644af Path types to associated types with form T::A
Closes #18433
2014-12-16 13:50:24 +13:00
jbranchaud
a9dbb7908d Add a doctest for the string Add function. 2014-12-15 16:40:27 -06:00
bors
0669a432a2 auto merge of #19448 : japaric/rust/binops-by-value, r=nikomatsakis
- The following operator traits now take their arguments by value: `Add`, `Sub`, `Mul`, `Div`, `Rem`, `BitAnd`, `BitOr`, `BitXor`, `Shl`, `Shr`. This breaks all existing implementations of these traits.

- The binary operation `a OP b` now "desugars" to `OpTrait::op_method(a, b)` and consumes both arguments.

- `String` and `Vec` addition have been changed to reuse the LHS owned value, and to avoid internal cloning. Only the following asymmetric operations are available: `String + &str` and `Vec<T> + &[T]`, which are now a short-hand for the "append" operation.

[breaking-change]

---

This passes `make check` locally. I haven't touch the unary operators in this PR, but converting them to by value should be very similar to this PR. I can work on them after this gets the thumbs up.

@nikomatsakis r? the compiler changes
@aturon r? the library changes. I think the only controversial bit is the semantic change of the `Vec`/`String` `Add` implementation.
cc #19148
2014-12-15 22:11:44 +00:00
Jacob Edelman
72608eba43 Fixed a small spelling mistake 2014-12-15 17:07:49 -05:00
Felix S. Klock II
d6d0bb2030 Added -Z print-region-graph debugging option; produces graphviz
visualization of region inference constraint graph.

Optionally uses environment variables `RUST_REGION_GRAPH=<path_template>`
and `RUST_REGION_GRAPH_NODE=<node-id>` to select which file to output
to and which AST node to print.

Note that in some cases of method AST's, the identification of AST
node is based on the id for the *body* of the method; this is largely
due to having the body node-id already available at the relevant point
in the control-flow of rustc in its current incarnation. Ideally we
would handle identifying AST's by name in addition to node-id,
e.g. the same way that the pretty-printer supports path suffixes as
well as node-ids for identifying subtrees to print.
2014-12-15 22:43:09 +01:00
Felix S. Klock II
a5e0624a32 libgraphviz: extend API with flags to indicate options like "do not include labels". 2014-12-15 22:34:09 +01:00
Felix S. Klock II
c500b63e71 libgraphviz: add label and escaped ctors taking any str::IntoMaybeOwned. 2014-12-15 22:34:05 +01:00
Jorge Aparicio
c3778fae6f libstd: add a dummy field to OsRng to avoid out of module construction 2014-12-15 15:35:34 -05:00
Jorge Aparicio
556d971f83 Remove internal uses of marker::NoCopy 2014-12-15 15:33:37 -05:00
Alex Crichton
c9ea7c9a58 serialize: Change some FnOnce bounds to FnMut
Relax some of the bounds on the decoder methods back to FnMut to help accomodate
some more flavorful variants of decoders which may need to run the closure more
than once when it, for example, attempts to find the first successful enum to
decode.

This a breaking change due to the bounds for the trait switching, and clients
will need to update from `FnOnce` to `FnMut` as well as likely making the local
function binding mutable in order to call the function.

[breaking-change]
2014-12-15 12:20:47 -08:00
bors
92e9e70d15 auto merge of #19882 : steveklabnik/rust/fix_download, r=nikomatsakis
Thank you, @Ap0ph1s.
2014-12-15 19:12:44 +00:00
Niko Matsakis
1718cd6ee0 Remove all shadowed lifetimes. 2014-12-15 10:23:48 -05:00
Niko Matsakis
b60de4bfc2 Emit warning when lifetime names are shadowed.
This is not technically a [breaking-change], but it will be soon, so
you should update your code. Typically, shadowing is accidental, and
the shadowing lifetime can simply be removed. This frequently occurs
in constructor patterns:

```rust
// Old:
impl<'a> SomeStruct<'a> { fn new<'a>(..) -> SomeStruct<'a> { ... } }

// Should be:
impl<'a> SomeStruct<'a> { fn new(..) -> SomeStruct<'a> { ... } }
```

Otherwise, you should rename the inner lifetime to something
else. Note though that lifetime elision frequently applies:

```rust
// Old
impl<'a> SomeStruct<'a> {
    fn get<'a>(x: &'a self) -> &'a T { &self.field }
}

// Should be:
impl<'a> SomeStruct<'a> {
    fn get(x: &self) -> &T { &self.field }
}
``
2014-12-15 10:23:48 -05:00
Steve Klabnik
bd776b5090 Fix windows download links
Thank you, @Ap0ph1s.
2014-12-15 09:55:56 -05:00
Brian Anderson
1cb7e9fc63 rollup merge of #19814: jbranchaud/fix-a-typo-in-ownership-guide 2014-12-15 06:45:37 -08:00
Brian Anderson
f0bf34de9f rollup merge of #19812: frewsxcv/expansion-include-enum
In preparation for [removing the `std::cmp::Ordering` reexport](https://github.com/rust-lang/rust/issues/19253), this needs to be done to prevent errors like:

```
note: in expansion of #[deriving]
note: expansion site
error: unresolved name `std::cmp::Equal`
#[deriving(Clone, PartialEq, PartialOrd, Eq, Ord, Show)]
                                             ^~~
```
2014-12-15 06:45:36 -08:00
Brian Anderson
e52efe262d rollup merge of #19804: kballard/vim-new-unicode-escapes 2014-12-15 06:45:36 -08:00
Brian Anderson
74fde5e10d rollup merge of #19802: jbranchaud/add-btreeset-new-doctest 2014-12-15 06:45:36 -08:00
Brian Anderson
77d2a116c4 rollup merge of #19793: tomjakubowski/metadata-const-attrs
Fix #19773

Together with #19774 (which this is rebased on):

Fix #18156, fix #19722, fix #19185

r? @alexcrichton (since this was your suggestion!)
2014-12-15 06:45:36 -08:00
Brian Anderson
53982b64f3 rollup merge of #19787: akiss77/fix-i8-c_char
On AArch64, libc::c_char is u8. There are some places in the code where i8 is assumed, which causes compilation errors.

(AArch64 is not officially supported yet, but this change does not hurt any other targets and makes the code future-proof.)
2014-12-15 06:45:35 -08:00
Brian Anderson
0b214bfee0 rollup merge of #19784: csouth3/vim-syntax-iter
Vim still incorrectly highlights just `ExactSize` as a valid trait name, but the trait has been renamed to `ExactSizeIterator`.
2014-12-15 06:45:35 -08:00
Brian Anderson
e8e8677072 rollup merge of #19779: Noctune/master
The old PartialOrd impl for raw pointers would always return Some(_), so It might as well implement Ord too.
2014-12-15 06:45:35 -08:00
Brian Anderson
5691c0f49a rollup merge of #19775: SimonSapin/gedit-new-unicode-escape 2014-12-15 06:45:35 -08:00
Brian Anderson
3673486c6d rollup merge of #19774: tomjakubowski/rustdoc-consts-statics
Build `clean::ConstantItem` values in the `inline` module and
pretty-print the AST for inlined const items.

Doc strings are still missing from inlined constants (see #19773).

Partially address #18156, #19722, #19185

Fix #15821

r? @alexcrichton
2014-12-15 06:45:34 -08:00
Brian Anderson
7afee3a1ab rollup merge of #19771: jbranchaud/add-btreeset-iter-doctests 2014-12-15 06:45:34 -08:00
Brian Anderson
e717362ce5 rollup merge of #19763: csouth3/remove-featuregates
This is a revival of #19517 (per request of @alexcrichton) now that the new snapshots have landed.  We can now remove the last feature gates for if_let, while_let, and tuple_indexing scattered throughout the test sources since these features have been added to Rust.

Closes #19473.
2014-12-15 06:45:34 -08:00
Brian Anderson
8404ea66d9 rollup merge of #19746: steveklabnik/gh9266
Fixes #9266
2014-12-15 06:45:33 -08:00
Brian Anderson
cb2119823d rollup merge of #19738: steveklabnik/gh19717
Fixes #19717
2014-12-15 06:45:33 -08:00
Brian Anderson
36f7f1e301 rollup merge of #19735: sethpollack/patch-1 2014-12-15 06:45:33 -08:00
Brian Anderson
42f4d636fa rollup merge of #19714: steveklabnik/gh16219
These should be properly annotated instead.

Fixes #16219.
2014-12-15 06:44:21 -08:00
Brian Anderson
6c4a2bc55f rollup merge of #19710: steveklabnik/gh15449
Fixes #15499.
2014-12-15 06:44:20 -08:00
Brian Anderson
34dfa7addb rollup merge of #19709: steveklabnik/po4a_fix
This line was declared twice, which causes the build of i10n docs to
fail.
2014-12-15 06:44:20 -08:00
Pedro Larroy
2e74291290 remove explicit if_let and tuple_indexing feature enables as they now trigger warnings 2014-12-15 15:01:26 +01:00
Seo Sanghyeon
4df66cd014 Resolve lifetimes in associated types 2014-12-15 22:31:38 +09:00
bors
ef0bc464af auto merge of #19778 : aochagavia/rust/ice, r=alexcrichton
Fixes #19734
2014-12-15 11:17:44 +00:00
Andrew Wagner
8fcc832198 Standardize some usages of "which" in docstrings
In US english, "that" is used in restrictive clauses in place of
"which", and often affects the meaning of sentences.

In UK english and many dialects, no distinction is
made.

While Rust devs want to avoid unproductive pedanticism, it is worth at
least being uniform in documentation such as:

http://doc.rust-lang.org/std/iter/index.html

and also in cases where correct usage of US english clarifies the
sentence.
2014-12-15 10:50:42 +01:00
bors
b677746b1e auto merge of #19750 : murarth/rust/rusti-support, r=brson
Makes a couple changes that support the implementation of a REPL:

* Implementation of wrapper code for LLVM ExecutionEngine API
* Fixing a change I made earlier to reset compiler state in `phase_1_[...]`
  instead of `compile_input` as the latter is not used in a REPL
2014-12-15 08:32:45 +00:00
Steven Fackler
8d6895a9c0 Free stdin on exit 2014-12-14 23:36:50 -08:00
Martin Pool
c270390f1b Fix Markdown syntax in docs for OsRng 2014-12-14 22:26:09 -08:00
Jorge Aparicio
f63784f4e2 impl Copy for NoSend/NoSync 2014-12-14 22:21:43 -05:00
Alex Crichton
7741516a8b std: Collapse SlicePrelude traits
This commit collapses the various prelude traits for slices into just one trait:

* SlicePrelude/SliceAllocPrelude => SliceExt
* CloneSlicePrelude/CloneSliceAllocPrelude => CloneSliceExt
* OrdSlicePrelude/OrdSliceAllocPrelude => OrdSliceExt
* PartialEqSlicePrelude => PartialEqSliceExt
2014-12-14 19:03:56 -08:00
Alex Crichton
0d38cae0b9 std: Bind port early to make a test more reliable
This test would read with a timeout and then send a UDP message, expecting the
message to be received. The receiving port, however, was bound in the child
thread so it could be the case that the timeout and send happens before the
child thread runs. To remedy this we just bind the port before the child thread
runs, moving it into the child later on.

cc #19120
2014-12-14 18:58:13 -08:00
Jorge Aparicio
0a968ef199 Add test for #19129
Closes #19129
2014-12-14 21:10:51 -05:00
bors
126db549b0 auto merge of #19742 : vhbit/rust/copy-for-bitflags, r=alexcrichton 2014-12-15 00:07:35 +00:00
Alex Crichton
1fbca8824a std: Fully stabilize Option<T>
This commit takes a second pass through the `std::option` module to fully
stabilize any lingering methods inside of it.

These items were made stable as-is

* Some
* None
* as_mut
* expect
* unwrap
* unwrap_or
* unwrap_or_else
* map
* map_or
* map_or_else
* and_then
* or_else
* unwrap_or_default
* Default implementation
* FromIterator implementation
* Copy implementation

These items were made stable with modifications

* iter - now returns a struct called Iter
* iter_mut - now returns a struct called IterMut
* into_iter - now returns a struct called IntoIter, Clone is never implemented

This is a breaking change due to the modifications to the names of the iterator
types returned. Code referencing the old names should updated to referencing the
newer names instead. This is also a breaking change due to the fact that
`IntoIter` no longer implements the `Clone` trait.

These items were explicitly not stabilized

* as_slice - waiting on indexing conventions
* as_mut_slice - waiting on conventions with as_slice as well
* cloned - the API was still just recently added
* ok_or - API remains experimental
* ok_or_else - API remains experimental

[breaking-change]
2014-12-14 11:24:49 -08:00
bors
6085a71623 auto merge of #19703 : nikomatsakis/rust/unsafe-trait, r=acrichto
This PR allows declaring traits and impls as `unsafe`. An `unsafe` trait requires an `unsafe` impl. An `unsafe` impl does not permit unsafe code within its interior (unless that code is contained within an unsafe block or unsafe fn, as normal). The commits are standalone.

r? @alexcrichton 
cc #13231
2014-12-14 19:07:29 +00:00
Nicholas Bishop
a333e013fc Fix typo: intuitive -> unintuitive 2014-12-14 13:38:46 -05:00
jbranchaud
5c29df6b28 Fix indentation in a code example in the ownership guide. 2014-12-14 12:09:42 -06:00
Niko Matsakis
7855893ac7 Add a bunch of new tests per Alex's suggestion. 2014-12-14 11:11:55 -05:00
Niko Matsakis
5fe0ad1c0f Implement unsafe trait semantics. 2014-12-14 11:11:55 -05:00
Niko Matsakis
22f777ba2e Parse unsafe impl but don't do anything particularly interesting with the results. 2014-12-14 11:11:55 -05:00
Niko Matsakis
5686a91914 Parse unsafe trait but do not do anything with it beyond parsing and integrating into rustdoc etc. 2014-12-14 11:11:55 -05:00
Niko Matsakis
092d04a40a Rename FnStyle trait to Unsafety. 2014-12-14 11:11:55 -05:00
bors
93c0610096 auto merge of #19725 : vadimcn/rust/inst-path, r=alexcrichton
Change default installation directory to %SYSTEMDRIVE%\Rust.
Modify user PATH, rather than system PATH.
2014-12-14 16:07:32 +00:00
Jorge Aparicio
2f7a5f4902 libcore: make iterator adaptors Cloneable 2014-12-14 10:47:04 -05:00
Jake Goulding
5966815abe InvariantLifetime is Copy-able
Both ContravariantLifetime and CovariantLifetime are marked as Copy,
so it makes sense for InvariantLifetime to be as well.
2014-12-14 09:49:02 -05:00
Eric Kidd
c2b0d7dd88 Modify regex::Captures::{at,name} to return Option
Closes #14602.  As discussed in that issue, the existing `at` and `name`
functions represent two different results with the empty string:

1. Matched the empty string.
2. Did not match anything.

Consider the following example.  This regex has two named matched
groups, `key` and `value`. `value` is optional:

```rust
// Matches "foo", "foo;v=bar" and "foo;v=".
regex!(r"(?P<key>[a-z]+)(;v=(?P<value>[a-z]*))?");
```

We can access `value` using `caps.name("value")`, but there's no way for
us to distinguish between the `"foo"` and `"foo;v="` cases.

Early this year, @BurntSushi recommended modifying the existing `at` and
`name` functions to return `Option`, instead of adding new functions to
the API.

This is a [breaking-change], but the fix is easy:

- `refs.at(1)` becomes `refs.at(1).unwrap_or("")`.
- `refs.name(name)` becomes `refs.name(name).unwrap_or("")`.
2014-12-14 08:56:51 -05:00
bors
52f7a4a351 auto merge of #19338 : nikomatsakis/rust/unboxed-closure-purge-the-proc, r=acrichto
They are replaced with unboxed closures.

cc @pcwalton @aturon 

This is a [breaking-change]. Mostly, uses of `proc()` simply need to be converted to `move||` (unboxed closures), but in some cases the adaptations required are more complex (particularly for library authors). A detailed write-up can be found here: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/

The commits are ordered to emphasize the more important changes, but are not truly standalone.
2014-12-14 11:37:27 +00:00
bors
3a9305ce82 auto merge of #19690 : barosl/rust/struct-variant-as-a-function-ice, r=alexcrichton
Unlike a tuple variant constructor which can be called as a function, a struct variant constructor is not a function, so cannot be called.

If the user tries to assign the constructor to a variable, an ICE occurs, because there is no way to use it later. So we should stop the constructor from being used like that.

A similar mechanism already exists for a normal struct, as it prohibits a struct from being resolved. This commit does the same for a struct variant.

This commit also includes some changes to the existing tests.

Fixes #19452.
2014-12-14 09:22:24 +00:00
Niko Matsakis
f6d60f3208 Stop using diagnostics to avoid merge conflicts. 2014-12-14 04:21:57 -05:00
Niko Matsakis
840ce00a9b Temporarily remove issue #14039; it is fixed and re-added by PR #19438 2014-12-14 04:21:57 -05:00
Niko Matsakis
9c9253e859 Add some tests for obsolete code, sugar used in appropriate ways. 2014-12-14 04:21:57 -05:00
Niko Matsakis
0fefd835f2 Update emacs and vi modes. 2014-12-14 04:21:57 -05:00
Niko Matsakis
112faabf94 Update guide/intro to take into account the removal of proc.
cc @steveklabnick
2014-12-14 04:21:57 -05:00
Niko Matsakis
27676d9aa9 Delete tests that are either no longer relevant or which have
duplicate tests around object types.
2014-12-14 04:21:56 -05:00
Niko Matsakis
5c3d398919 Mostly rote conversion of proc() to move|| (and occasionally Thunk::new) 2014-12-14 04:21:56 -05:00
Niko Matsakis
394f6846b8 Rewrite WorkItem not to use proc(). 2014-12-14 04:21:56 -05:00
Niko Matsakis
d8e51ea0e2 Patch rustdoc to include missing types, make the match exhaustive
to prevent such oversights in the future.
2014-12-14 04:21:56 -05:00
Niko Matsakis
d258d68db6 Remove proc types/expressions from the parser, compiler, and
language. Recommend `move||` instead.
2014-12-14 04:21:56 -05:00
Niko Matsakis
9cc8453a78 Adjust feature gates to allow for parenthetical notation to be used
with the fn traits
2014-12-14 04:21:56 -05:00
Niko Matsakis
698db04a8d Purge the hack that allows FnOnce to be used with a by-value self method. Besides being yucky, it will cause problems if we try to make all traits implement themselves, which would make a lot of things in life easier. Also, it was inextricably linked to Box, which was not the intention. We can work around its absence, so better to reimplement it later in a more thorough fashion. 2014-12-14 04:21:56 -05:00
Niko Matsakis
d61338172f Rewrite threading infrastructure, introducing Thunk to represent
boxed `FnOnce` closures.
2014-12-14 04:21:56 -05:00
bors
10ac5b72f1 auto merge of #19677 : japaric/rust/deprecate-tupleN, r=alexcrichton
r? @alexcrichton or anyone else
closes #18006
2014-12-14 07:07:31 +00:00
Luqman Aden
ab1bdde536 libsyntax: Output where clauses in pretty printer for structs. 2014-12-14 01:13:23 -05:00
Luqman Aden
ac7dc03a52 libsyntax: Make deriving also respect where bounds. 2014-12-14 01:13:23 -05:00
mchaput
f053f29ff5 Fix mispelling in char.rs error message
Error message has wrong spelling ("radix is to high").
2014-12-14 00:48:09 -05:00
Alex Crichton
7d1fa4ebea rustc: Start the deprecation of libserialize
The primary focus of Rust's stability story at 1.0 is the standard library.
All other libraries distributed with the Rust compiler are planned to
be #[unstable] and therfore only accessible on the nightly channel of Rust. One
of the more widely used libraries today is libserialize, Rust's current solution
for encoding and decoding types.

The current libserialize library, however, has a number of drawbacks:

* The API is not ready to be stabilize as-is and we will likely not have enough
  resources to stabilize the API for 1.0.
* The library is not necessarily the speediest implementations with alternatives
  being developed out-of-tree (e.g. serde from erickt).
* It is not clear how the API of Encodable/Decodable can evolve over time while
  maintaining backwards compatibility.

One of the major pros to the current libserialize, however, is
`deriving(Encodable, Decodable)` as short-hands for enabling serializing and
deserializing a type. This is unambiguously useful functionality, so we cannot
simply deprecate the in-tree libserialize in favor of an external crates.io
implementation.

For these reasons, this commit starts off a stability story for libserialize by
following these steps:

1. The deriving(Encodable, Decodable) modes will be deprecated in favor of a
   renamed deriving(RustcEncodable, RustcDecodable).
2. The in-tree libserialize will be deprecated in favor of an external
   rustc-serialize crate shipped on crates.io. The contents of the crate will be
   the same for now (but they can evolve separately).
3. At 1.0 serialization will be performed through
   deriving(RustcEncodable, RustcDecodable) and the rustc-serialize crate. The
   expansions for each deriving mode will change from `::serialize::foo` to
   `::rustc_serialize::foo`.

This story will require that the compiler freezes its implementation of
`RustcEncodable` deriving for all of time, but this should be a fairly minimal
maintenance burden. Otherwise the crate in crates.io must always maintain the
exact definition of its traits, but the implementation of json, for example, can
continue to evolve in the semver-sense.

The major goal for this stabilization effort is to pave the road for a new
official serialization crate which can replace the current one, solving many of
its downsides in the process. We are not assuming that this will exist for 1.0,
hence the above measures. Some possibilities for replacing libserialize include:

* If plugins have a stable API, then any crate can provide a custom `deriving`
  mode (will require some compiler work). This means that any new serialization
  crate can provide its own `deriving` with its own backing
  implementation, entirely obsoleting the current libserialize and fully
  replacing it.

* Erick is exploring the possibility of code generation via preprocessing Rust
  source files in the near term until plugins are stable. This strategy would
  provide the same ergonomic benefit that `deriving` does today in theory.

So, in summary, the current libserialize crate is being deprecated in favor of
the crates.io-based rustc-serialize crate where the `deriving` modes are
appropriately renamed. This opens up space for a later implementation of
serialization in a more official capacity while allowing alternative
implementations to be explored in the meantime.

Concretely speaking, this change adds support for the `RustcEncodable` and
`RustcDecodable` deriving modes. After a snapshot is made warnings will be
turned on for usage of `Encodable` and `Decodable` as well as deprecating the
in-tree libserialize crate to encurage users to use rustc-serialize instead.
2014-12-13 18:36:09 -08:00
Chase Southwood
81f9a31926 Change VecMap's iterators to use wrapper structs instead of typedefs.
Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the iterators of `VecMap` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
2014-12-13 20:14:42 -06:00
Jorge Aparicio
89d2061c8f libcollections: convert BTreeSet binops to by value 2014-12-13 20:16:34 -05:00
Jorge Aparicio
e00e4611a8 libcollections: convert TreeSet binops to by value 2014-12-13 20:16:34 -05:00
Jorge Aparicio
308460400b libcollections: convert TrieSet binops to by value 2014-12-13 20:16:34 -05:00
Jorge Aparicio
dff2b395d2 Test binops move semantics 2014-12-13 20:16:34 -05:00
Jorge Aparicio
949b55e58e libcollections: add commutative version of Vec/String addition 2014-12-13 20:16:34 -05:00
Jorge Aparicio
f4abb12b0c Address Niko's comments 2014-12-13 20:16:34 -05:00
Jorge Aparicio
d193bf30ce libcore: fix doctests 2014-12-13 20:15:39 -05:00
Jorge Aparicio
bc23b8ebc6 libstd: fix unit tests 2014-12-13 20:15:39 -05:00
Jorge Aparicio
1ec5650ad3 libcoretest: fix unit tests 2014-12-13 20:15:39 -05:00
Jorge Aparicio
a672b27cbc libcollections: fix unit tests 2014-12-13 20:15:39 -05:00
Jorge Aparicio
f0b65674c3 Fix compile-fail tests 2014-12-13 20:15:39 -05:00
Jorge Aparicio
971add88d8 Fix run-pass tests 2014-12-13 20:15:39 -05:00
Jorge Aparicio
2b17083988 Test that binops consume their arguments 2014-12-13 20:15:39 -05:00
Jorge Aparicio
fb1d4f1b13 librustdoc: convert Counts binops to by value 2014-12-13 20:15:39 -05:00
Jorge Aparicio
eb71976137 librustc: convert TypeContents binops to by value 2014-12-13 20:15:39 -05:00
Jorge Aparicio
c4fa2a37ae libsyntax: convert LockstepIterSize binops to by value 2014-12-13 20:15:39 -05:00
Jorge Aparicio
265b89abde libsyntax: convert BytePos/CharPos binops to by value 2014-12-13 20:15:39 -05:00
Jorge Aparicio
b5537fa838 libtime: convert Timespec binops to by value 2014-12-13 20:15:39 -05:00
Jorge Aparicio
9126a24e42 libstd: convert Duration binops to by value 2014-12-13 20:15:39 -05:00
Jorge Aparicio
32168faf9f libstd: convert BitFlags binops to by value 2014-12-13 20:15:39 -05:00
Jorge Aparicio
baf79d4a11 libcollections: make EnumSet binops by value 2014-12-13 20:15:39 -05:00
Jorge Aparicio
076e932fd5 libcollections: String + &str 2014-12-13 20:15:39 -05:00
Jorge Aparicio
dbc7e17cce libcollections: Vec<T> + &[T] 2014-12-13 20:15:39 -05:00
Jorge Aparicio
65d3a40c07 libcore: fix move semantics fallout 2014-12-13 20:15:38 -05:00
Jorge Aparicio
c73259a269 libcore: convert binop traits to by value 2014-12-13 20:15:38 -05:00
Jorge Aparicio
227435a11e Tell regionck which binops are by value 2014-12-13 20:15:38 -05:00
Jorge Aparicio
5038f5a70c Tell expr_use_visitor which binops are by value 2014-12-13 20:15:38 -05:00
Jorge Aparicio
f64e52a7f7 Tell trans which binops are by value 2014-12-13 20:15:38 -05:00
Jorge Aparicio
c3a6d2860c Tell typeck which binops are by value 2014-12-13 20:15:38 -05:00
Jorge Aparicio
14c0a708cc syntax/ast_util: add is_by_value_binop() 2014-12-13 20:11:13 -05:00
bors
f07526a999 auto merge of #19669 : alfie/rust/master, r=sanxiyn 2014-12-14 01:07:31 +00:00
Jorge Aparicio
029789b98c Get rid of all the remaining uses of refN/valN/mutN/TupleN 2014-12-13 20:04:41 -05:00
Jorge Aparicio
17a9c2764f libcore: allow deprecated valN methods on doc tests 2014-12-13 20:04:41 -05:00
Jorge Aparicio
8720174bf2 libgraphviz: use tuple indexing 2014-12-13 20:04:41 -05:00
Jorge Aparicio
778be74cbb libcoretest: use tuple indexing 2014-12-13 20:04:41 -05:00
Jorge Aparicio
e792338318 librustdoc: use tuple indexing 2014-12-13 20:04:41 -05:00
Jorge Aparicio
0c5d22c9cd librustc_trans: use tuple indexing 2014-12-13 20:04:41 -05:00
Jorge Aparicio
821b836634 librustc: use tuple indexing 2014-12-13 20:04:41 -05:00
Jorge Aparicio
c434954b27 libsyntax: use tuple indexing 2014-12-13 20:04:40 -05:00
Jorge Aparicio
4fd6a99851 libregex: use tuple indexing 2014-12-13 20:04:40 -05:00
Jorge Aparicio
fe48a65aaa libstd: use tuple indexing 2014-12-13 20:04:40 -05:00
Jorge Aparicio
4deb27e67a libcollections: use tuple indexing 2014-12-13 20:04:40 -05:00
Jorge Aparicio
2e8963debc libunicode: use tuple indexing 2014-12-13 20:04:40 -05:00
Jorge Aparicio
0c9b6ae6a8 Deprecate the TupleN traits 2014-12-13 20:04:40 -05:00
Jorge Aparicio
b8e0b81dd5 librustc_borrowck: add #![feature(unboxed_closures)] 2014-12-13 17:40:34 -05:00
Alex Crichton
8abe7846d6 Deprecate more in-tree libs for crates.io
This commit deprecates a few more in-tree libs for their crates.io counterparts.
Note that this commit does not make use of the #[deprecated] tag to prevent
warnings from being generated for in-tree usage. Once #[unstable] warnings are
turned on then all external users will be warned to move.

These crates have all been duplicated in rust-lang/$crate repositories so
development can happen independently of the in-tree copies. We can explore at a
later date replacing the in-tree copies with the external copies, but at this
time the libraries have changed very little over the past few months so it's
unlikely for changes to be sent to both repos.

cc #19260
2014-12-13 14:18:44 -08:00
Vadim Chugunov
317d91261b Windows dbghelp strips leading underscores from symbols, so let's accept "ZN...E" form too.
Also, print PC displacement from symbols.
2014-12-13 14:16:53 -08:00
Jorge Aparicio
db8300ce06 libstd: add missing imports 2014-12-13 17:03:48 -05:00
Jorge Aparicio
6f28816f87 Remove some unnecessary move keywords 2014-12-13 17:03:48 -05:00
Jorge Aparicio
745225d905 libtest: use unboxed closures 2014-12-13 17:03:48 -05:00
Jorge Aparicio
015c0fcee5 librustc_driver: use unboxed closures 2014-12-13 17:03:48 -05:00
Jorge Aparicio
521a6e62b1 librustc_typeck: use unboxed closures 2014-12-13 17:03:48 -05:00
Jorge Aparicio
888f24969f librustdoc: use unboxed closures 2014-12-13 17:03:48 -05:00
Jorge Aparicio
0676c3bf03 librustc_trans: use unboxed closures 2014-12-13 17:03:48 -05:00
Jorge Aparicio
0d4d8b9b78 librustc_trans: fix fallout 2014-12-13 17:03:47 -05:00
Jorge Aparicio
46272c18a2 librustc_typeck: fix fallout 2014-12-13 17:03:47 -05:00
Jorge Aparicio
1195708f64 librustc: use unboxed closures 2014-12-13 17:03:47 -05:00
Jorge Aparicio
933e7b4a3e librustc_llvm: use unboxed closures 2014-12-13 17:03:47 -05:00
Jorge Aparicio
3739a2427b librustc_trans: fix fallout 2014-12-13 17:03:47 -05:00
Jorge Aparicio
451eef5c40 librustc_back: use unboxed closures 2014-12-13 17:03:47 -05:00
Jorge Aparicio
d3d707c883 librustc: fix fallout 2014-12-13 17:03:47 -05:00
Jorge Aparicio
0dac05dd62 libsyntax: use unboxed closures 2014-12-13 17:03:47 -05:00
Jorge Aparicio
2160427900 Fix benches 2014-12-13 17:03:47 -05:00
Jorge Aparicio
cdbb3ca9b7 libstd: use unboxed closures 2014-12-13 17:03:47 -05:00
Jorge Aparicio
be53d619f8 librustrt: use unboxed closures 2014-12-13 17:03:47 -05:00
Jorge Aparicio
b44b5da8c2 libregex_macros: use unboxed closures 2014-12-13 17:03:47 -05:00
Jorge Aparicio
879ebce6a4 libcollections: use unboxed closures 2014-12-13 17:03:47 -05:00