forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#57272 - petrochenkov:featrecov, r=estebank
Make sure feature gate errors are recoverable (take 2) Continuation of rust-lang@15cefe4. Turns out I missed the most important part - the main feature gate checking pass.
- Loading branch information
Showing
54 changed files
with
244 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// | ||
// compile-flags: --cfg broken | ||
|
||
// https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044 | ||
|
||
// compile-flags: --cfg broken | ||
|
||
#![crate_type = "lib"] | ||
#![cfg_attr(broken, no_core)] //~ ERROR no_core is experimental | ||
|
||
fn main() { } | ||
pub struct S {} |
4 changes: 2 additions & 2 deletions
4
src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// | ||
// compile-flags: --cfg broken | ||
|
||
#![feature(cfg_attr_multi)] | ||
#![crate_type = "lib"] | ||
#![cfg_attr(broken, no_core, no_std)] //~ ERROR no_core is experimental | ||
|
||
fn main() { } | ||
pub struct S {} |
4 changes: 2 additions & 2 deletions
4
src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// | ||
// compile-flags: --cfg broken | ||
|
||
#![feature(cfg_attr_multi)] | ||
#![crate_type = "lib"] | ||
#![cfg_attr(broken, no_std, no_core)] //~ ERROR no_core is experimental | ||
|
||
fn main() { } | ||
pub struct S {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ fn ok_to_fail() { | |
assert!(false); | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#[doc(keyword = "match")] //~ ERROR: #[doc(keyword = "...")] is experimental | ||
/// wonderful | ||
mod foo{} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
error[E0658]: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future (see issue #28498) | ||
--> $DIR/feature-gate-dropck-ugeh.rs:19:5 | ||
--> $DIR/feature-gate-dropck-ugeh.rs:16:5 | ||
| | ||
LL | #[unsafe_destructor_blind_to_params] // This is the UGEH attribute | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(dropck_parametricity)] to the crate attributes to enable | ||
|
||
warning: use of deprecated attribute `dropck_parametricity`: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future. See https://github.com/rust-lang/rust/issues/34761 | ||
--> $DIR/feature-gate-dropck-ugeh.rs:16:5 | ||
| | ||
LL | #[unsafe_destructor_blind_to_params] // This is the UGEH attribute | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this attribute with `#[may_dangle]` | ||
| | ||
= note: #[warn(deprecated)] on by default | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
// Check that existential types must be ungated to use the `existential` keyword | ||
|
||
|
||
|
||
existential type Foo: std::fmt::Debug; //~ ERROR existential types are unstable | ||
|
||
trait Bar { | ||
type Baa: std::fmt::Debug; | ||
fn define() -> Self::Baa; | ||
} | ||
|
||
impl Bar for () { | ||
existential type Baa: std::fmt::Debug; //~ ERROR existential types are unstable | ||
fn define() -> Self::Baa { 0 } | ||
} | ||
|
||
fn define() -> Foo { 0 } | ||
|
||
fn main() {} |
4 changes: 2 additions & 2 deletions
4
src/test/ui/feature-gates/feature-gate-existential-type.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
fn main() { | ||
yield true; //~ ERROR yield syntax is experimental | ||
//~^ ERROR yield statement outside of generator literal | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change | ||
fn bar(); | ||
fn bar(); //~ ERROR unrecognized intrinsic function: `bar` | ||
} | ||
|
||
extern "rust-intrinsic" fn baz() { //~ ERROR intrinsics are subject to change | ||
} | ||
extern "rust-intrinsic" fn baz() {} //~ ERROR intrinsics are subject to change | ||
|
||
fn main() { | ||
} | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#[lang="foo"] //~ ERROR language items are subject to change | ||
#[lang = "foo"] //~ ERROR language items are subject to change | ||
//~^ ERROR definition of an unknown language item: `foo` | ||
trait Foo {} | ||
|
||
fn main() { | ||
} | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
error[E0658]: language items are subject to change | ||
--> $DIR/feature-gate-lang-items.rs:1:1 | ||
| | ||
LL | #[lang="foo"] //~ ERROR language items are subject to change | ||
| ^^^^^^^^^^^^^ | ||
LL | #[lang = "foo"] //~ ERROR language items are subject to change | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(lang_items)] to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
error[E0522]: definition of an unknown language item: `foo` | ||
--> $DIR/feature-gate-lang-items.rs:1:1 | ||
| | ||
LL | #[lang = "foo"] //~ ERROR language items are subject to change | ||
| ^^^^^^^^^^^^^^^ definition of unknown language item `foo` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. | ||
Some errors occurred: E0522, E0658. | ||
For more information about an error, try `rustc --explain E0522`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.