Aaron Turon
7bf56df4c8
Revert "Put slicing syntax behind a feature gate."
...
This reverts commit 95cfc35607
.
2014-10-02 11:47:51 -07:00
bors
84a4a07bbd
auto merge of #17434 : P1start/rust/borrowck-messages, r=nikomatsakis
...
This was originally part of #17215 .
Closes #15506 .
Closes #15630 .
Closes #17263 .
This also partially implements #15838 .
2014-10-02 11:32:25 +00:00
P1start
02c6ebde7e
Change the use of moved value
error to be more accurate
...
Previously it output `partially moved` to eagerly. This updates it to be more
accurate and output `collaterally moved` for use of values that were invalidated
by moves out of different fields in the same struct.
Closes #15630 .
2014-10-02 15:51:05 +13:00
Nick Cameron
95cfc35607
Put slicing syntax behind a feature gate.
...
[breaking-change]
If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02 13:23:36 +13:00
Nick Cameron
40b9f5ded5
Use slice syntax instead of slice_to, etc.
2014-10-02 13:19:45 +13:00
P1start
35ff2def5d
Clarify some borrowck errors
...
Closes #17263 .
2014-10-02 11:21:59 +13:00
P1start
a8577be6f4
Output a note when lifetimes cannot be elided from functions
2014-10-02 11:09:29 +13:00
Florian Hahn
49e976d771
Limit recursion depth for macro expansions, closes #17628
2014-10-01 11:46:04 +02:00
bors
2f15dcd4d3
auto merge of #17584 : pcwalton/rust/range-patterns-dotdotdot, r=nick29581
...
This breaks code that looks like:
match foo {
1..3 => { ... }
}
Instead, write:
match foo {
1...3 => { ... }
}
Closes #17295 .
r? @nick29581
2014-10-01 03:17:24 +00:00
Kevin Ballard
8a60952100
Move if let
behind a feature gate
2014-09-30 18:54:03 +02:00
Kevin Ballard
976438f78f
Produce a better error for irrefutable if let
patterns
...
Modify ast::ExprMatch to include a new value of type ast::MatchSource,
making it easy to tell whether the match was written literally or
produced via desugaring. This allows us to customize error messages
appropriately.
2014-09-30 18:54:02 +02:00
Patrick Walton
416144b827
librustc: Forbid ..
in range patterns.
...
This breaks code that looks like:
match foo {
1..3 => { ... }
}
Instead, write:
match foo {
1...3 => { ... }
}
Closes #17295 .
[breaking-change]
2014-09-30 09:11:26 -07:00
Nick Cameron
1c36d1c71d
Emit an error rather than ICEing for a missing built-in bound lang item.
...
closes #17392
2014-09-30 11:30:08 +13:00
Alex Crichton
d3e171861f
Test fixes from the rollup
2014-09-29 10:13:31 -07:00
Alex Crichton
915511ec6d
rollup merge of #17614 : nick29581/slice3
2014-09-29 08:14:39 -07:00
Alex Crichton
29216b5e5c
rollup merge of #17613 : bkoropoff/issue-17593
2014-09-29 08:14:36 -07:00
Alex Crichton
0358f31127
rollup merge of #17598 : bkoropoff/issue-17441
2014-09-29 08:14:27 -07:00
Alex Crichton
7784a8d397
rollup merge of #17592 : kmcallister/inline-asm-loc
2014-09-29 08:14:23 -07:00
Alex Crichton
b7c002aac1
rollup merge of #17586 : Sawyer47/test-16465
2014-09-29 08:14:19 -07:00
Alex Crichton
655b7269c8
rollup merge of #17519 : pcwalton/unboxed-closure-move-syntax
2014-09-29 08:10:44 -07:00
bors
b9478ee251
auto merge of #17321 : apoelstra/rust/error-on-unknown-impl, r=alexcrichton
...
Followup to RFC 57.
Fixes #7607
Fixes #8767
Fixes #12729
Fixes #15060
2014-09-29 05:13:08 +00:00
Brian Koropoff
69d570fbec
Add regression test for issue #17441
2014-09-28 17:57:35 -07:00
Nick Cameron
2c589df6a2
Test for ..
in range patterns
2014-09-29 11:45:20 +13:00
Brian Koropoff
cab84be812
Correctly populate trait impl map when checking for impl overlaps
...
Also fix an existing compile-fail test which was intended to cover
this case.
This closes issue #17593
2014-09-28 14:28:48 -07:00
Andrew Poelstra
bb5807919a
Cleanup error messages for anonymous impl for types not declared in the current module
...
Followup to RFC 57.
Fixes #7607
Fixes #8767
Fixes #12729
Fixes #15060
2014-09-28 12:58:10 -05:00
bors
7eb9337dac
auto merge of #17527 : sfackler/rust/cfg-syntax, r=alexcrichton
...
We'll need a snapshot before we can convert the codebase over and turn on the deprecation warnings.
cc #17490
This is sitting on top of #17506
2014-09-28 08:57:57 +00:00
Steven Fackler
9519abecfb
Convert cfg syntax to new system
...
This removes the ability to use `foo(bar)` style cfgs. Switch them to
`foo_bar` or `foo="bar"` instead.
[breaking-change]
2014-09-27 22:59:26 -07:00
bors
9a68da7401
auto merge of #17517 : pczarn/rust/hashmap-lifetimes, r=alexcrichton
...
Fixes #17500
2014-09-27 18:57:46 +00:00
Keegan McAllister
9d60de93e2
Translate inline assembly errors back to source locations
...
Fixes #17552 .
2014-09-27 11:10:37 -07:00
Piotr Jawniak
b39921c49e
Add test for #16465
...
Closes #16465
2014-09-27 09:17:04 +02:00
Patrick Walton
2257e231a7
librustc: Eliminate the ref
syntax for unboxed closure capture clauses
...
in favor of `move`.
This breaks code that used `move` as an identifier, because it is now a
keyword. Change such identifiers to not use the keyword `move`.
Additionally, this breaks code that was counting on by-value or
by-reference capture semantics for unboxed closures (behind the feature
gate). Change `ref |:|` to `|:|` and `|:|` to `move |:|`.
Part of RFC #63 ; part of issue #12831 .
[breaking-change]
2014-09-26 09:03:19 -07:00
Niko Matsakis
3694f42b8c
Move checking of whether fields are Sized or not into wf / trait code.
2014-09-25 07:09:13 -04:00
Niko Matsakis
2ec305d1bc
Move checks for closure bounds out of kind.rs
2014-09-25 07:09:08 -04:00
Niko Matsakis
7119974f82
Move unsafe destructor check from kind.rs into wf.rs
2014-09-25 07:06:28 -04:00
Niko Matsakis
effb3636cc
Integrate builtin bounds fully into the trait checker
2014-09-25 07:06:27 -04:00
bors
9ff308137a
auto merge of #17428 : fhahn/rust/issue-16114-rename-begin-unwind-2, r=alexcrichton
...
This is a PR for #16114 and includes to following things:
* Rename `begin_unwind` lang item to `fail_fmt`
* Rename `core::failure::begin_unwind` to `fail_impl`
* Rename `fail_` lang item to `fail`
2014-09-25 05:17:31 +00:00
Florian Hahn
1c7d253ca3
Rename fail_
lang item to fail
, closes #16114
2014-09-25 01:09:09 +02:00
Florian Hahn
9a01da9460
Rename begin_unwind
lang item to fail_fmt
, refs #16114
2014-09-24 23:44:00 +02:00
Jakub Wieczorek
3530e4a647
Use more descriptive names in dead code messages
2014-09-24 21:03:55 +02:00
Jakub Wieczorek
2ec795b4f0
Add detection of unused enum variants
2014-09-24 21:03:55 +02:00
Piotr Czarnecki
0a10b9dc9c
Fix free lifetime vars in HashMap's iterators
2014-09-24 19:38:15 +01:00
bors
321785927c
auto merge of #17413 : jakub-/rust/issue-17385, r=pcwalton
...
This is to make sure it hadn't been moved if there are no bindings
in any of the arms.
Fixes #17385 .
2014-09-23 17:05:39 +00:00
bors
d80cd3d9bc
auto merge of #17028 : pcwalton/rust/higher-rank-trait-lifetimes, r=pnkfelix
...
They will ICE during typechecking if used, because they depend on trait
reform.
This is part of unboxed closures.
r? @nikomatsakis
2014-09-23 14:30:40 +00:00
Patrick Walton
5376b1c798
librustc: Parse and resolve higher-rank lifetimes in traits.
...
They will ICE during typechecking if used, because they depend on trait
reform.
This is part of unboxed closures.
2014-09-22 21:14:58 -07:00
Patrick Walton
e9ad12c0ca
librustc: Forbid private types in public APIs.
...
This breaks code like:
struct Foo {
...
}
pub fn make_foo() -> Foo {
...
}
Change this code to:
pub struct Foo { // note `pub`
...
}
pub fn make_foo() -> Foo {
...
}
The `visible_private_types` lint has been removed, since it is now an
error to attempt to expose a private type in a public API. In its place
a `#[feature(visible_private_types)]` gate has been added.
Closes #16463 .
RFC #48 .
[breaking-change]
2014-09-22 20:05:45 -07:00
bors
43fd619819
auto merge of #17286 : vberger/rust/deprecated_in_macros, r=aturon
...
Closes #17185 .
The stability lint will now check code generated by macro expansion. It will allow to detect :
- arguments passed to macros using deprecated (and others) items
- macro expansion generating code using deprecated items due to its arguments (hence the second commit, fixing such issue found in libcollections)
Checking is still done at expansion, but it will also detect a macro explicitly using a deprecated item in its definition.
2014-09-22 23:50:30 +00:00
bors
4b5f4563bf
auto merge of #17408 : bkoropoff/rust/bot-ice, r=alexcrichton
...
- Don't attempt to autoderef `!`. The `Deref`/`DerefMut` trait lookup would generate a bunch of unhelpful error spew.
- Don't allow explicit deref of `!`, since later passes just ICE. This closes issue #17373
- Don't allow explicit index of `!`, since later passes just ICE. There does not seem to be an issue associated with this
2014-09-22 22:05:33 +00:00
Victor Berger
eb58ac126e
Lint stability now checks macro arguments.
...
Closes #17185 .
2014-09-22 19:28:07 +02:00
Alex Crichton
0169218047
Fix fallout from Vec stabilization
2014-09-21 22:15:51 -07:00
Colin Davidson
a7a1bf81d7
Move -Z lto to -C lto.
...
Closes #12443
2014-09-21 02:17:31 -04:00