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
bors
d7e1bb5ff4
auto merge of #17415 : jakub-/rust/issue-17383, r=huonw
...
Fixes #17383 .
2014-09-21 01:00:29 +00:00
Jakub Wieczorek
3514737b4c
Fix the span for discriminators in non-C-like enums
...
Fixes #17383 .
2014-09-21 01:33:57 +02:00
Jakub Wieczorek
7b08827f2d
Induce an empty loan for the value being matched in match expressions
...
This is to make sure it hadn't been moved if there are no bindings
in any of the arms.
Fixes #17385 .
2014-09-20 21:01:29 +02:00
Mike Boutin
4a767007be
libsyntax: Explicit error message for sugared doc comments.
...
Display an explicit message about items missing after sugared doc
comment attributes. References #2789 .
2014-09-20 11:50:59 -04:00
Brian Koropoff
6035222d21
Add test that !
cannot be indexed
2014-09-20 00:25:50 -07:00
Brian Koropoff
fc3bd12a79
Add regression test for issue #17373
2014-09-20 00:18:55 -07:00
bors
f7fb0f5a17
auto merge of #17319 : kmcallister/rust/method-macro-bt, r=pcwalton
...
We were leaving these on the stack, causing spurious backtraces.
2014-09-20 04:55:41 +00:00
Alex Crichton
f082416bec
Test fixes from the rollup
2014-09-19 19:58:14 -07:00
Alex Crichton
ebe9ec8074
rollup merge of #17379 : pcwalton/keywords-followed-by-double-colon
2014-09-19 10:01:01 -07:00
Alex Crichton
6fe4467188
rollup merge of #17358 : epdtry/pcg-lto
2014-09-19 10:00:38 -07:00
Alex Crichton
04f5fe5a08
rollup merge of #17338 : nick29581/variants-namespace
2014-09-19 10:00:29 -07:00
Alex Crichton
81ee3586b5
rollup merge of #17318 : nick29581/slice
2014-09-19 10:00:24 -07:00