diff options
| author | bors <bors@rust-lang.org> | 2022-03-28 16:15:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-28 16:15:17 +0000 |
| commit | 600ec284838c52d1f6657c2cf0097b58970b133b (patch) | |
| tree | 2ddd324782e9effabde72c5c2dcfb36f3bd807ec /src | |
| parent | 2d37f38f872859b2b096772765a7987199c852c4 (diff) | |
| parent | e5afe2b107810bcabf9f8b2ceeb4577b2ea9c5dc (diff) | |
Auto merge of #95403 - Dylan-DPC:rollup-9on30mg, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #95301 (Remove `Nonterminal::NtTT`.) - #95314 (Tell users that `||` operators are not currently supported in let chain expressions) - #95350 (resolve: Simplify some diagnostic code to avoid an ICE) - #95370 ([bootstrap] Don't print `Suite not skipped` unless `--verbose` is set) - #95390 (Ignore doc comments in a declarative macro matcher.) - #95401 (Remove duplicated and unused test files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
27 files changed, 50 insertions, 216 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 32ccca8bcdd..e7511888114 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -231,10 +231,10 @@ impl StepDescription { } if !builder.config.exclude.is_empty() { - eprintln!( + builder.verbose(&format!( "{:?} not skipped for {:?} -- not in {:?}", pathset, self.name, builder.config.exclude - ); + )); } false } diff --git a/src/test/ui/auxiliary/empty-struct.rs b/src/test/ui/auxiliary/empty-struct.rs deleted file mode 100644 index 3fb40f6bfa9..00000000000 --- a/src/test/ui/auxiliary/empty-struct.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub struct XEmpty1 {} -pub struct XEmpty2; -pub struct XEmpty6(); - -pub enum XE { - XEmpty3 {}, - XEmpty4, - XEmpty5(), -} diff --git a/src/test/ui/auxiliary/stability-cfg2.rs b/src/test/ui/auxiliary/stability-cfg2.rs deleted file mode 100644 index c995038e5a8..00000000000 --- a/src/test/ui/auxiliary/stability-cfg2.rs +++ /dev/null @@ -1,5 +0,0 @@ -// compile-flags:--cfg foo - -#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))] -#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))] -#![feature(staged_api)] diff --git a/src/test/ui/auxiliary/weak-lang-items.rs b/src/test/ui/auxiliary/weak-lang-items.rs deleted file mode 100644 index 7a698cf76ae..00000000000 --- a/src/test/ui/auxiliary/weak-lang-items.rs +++ /dev/null @@ -1,22 +0,0 @@ -// no-prefer-dynamic - -// This aux-file will require the eh_personality function to be codegen'd, but -// it hasn't been defined just yet. Make sure we don't explode. - -#![no_std] -#![crate_type = "rlib"] - -struct A; - -impl core::ops::Drop for A { - fn drop(&mut self) {} -} - -pub fn foo() { - let _a = A; - panic!("wut"); -} - -mod std { - pub use core::{option, fmt}; -} diff --git a/src/test/ui/cross-crate/auxiliary/anon_trait_static_method_lib.rs b/src/test/ui/cross-crate/auxiliary/anon_trait_static_method_lib.rs deleted file mode 100644 index dceec7e3ec1..00000000000 --- a/src/test/ui/cross-crate/auxiliary/anon_trait_static_method_lib.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub struct Foo { - pub x: isize -} - -impl Foo { - pub fn new() -> Foo { - Foo { x: 3 } - } -} diff --git a/src/test/ui/cross-crate/auxiliary/newtype_struct_xc.rs b/src/test/ui/cross-crate/auxiliary/newtype_struct_xc.rs deleted file mode 100644 index 9d1e0742e3c..00000000000 --- a/src/test/ui/cross-crate/auxiliary/newtype_struct_xc.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![crate_type="lib"] - -pub struct Au(pub isize); diff --git a/src/test/ui/cross-crate/auxiliary/xcrate_unit_struct.rs b/src/test/ui/cross-crate/auxiliary/xcrate_unit_struct.rs deleted file mode 100644 index 69ed498e7e1..00000000000 --- a/src/test/ui/cross-crate/auxiliary/xcrate_unit_struct.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![crate_type = "lib"] - -// used by the rpass test - -#[derive(Copy, Clone)] -pub struct Struct; - -#[derive(Copy, Clone)] -pub enum Unit { - UnitVariant, - Argument(Struct) -} - -#[derive(Copy, Clone)] -pub struct TupleStruct(pub usize, pub &'static str); - -// used by the cfail test - -#[derive(Copy, Clone)] -pub struct StructWithFields { - foo: isize, -} - -#[derive(Copy, Clone)] -pub enum EnumWithVariants { - EnumVariant, - EnumVariantArg(isize) -} diff --git a/src/test/ui/issues/issue-37026.rs b/src/test/ui/empty/issue-37026.rs index fd678a717d0..fd678a717d0 100644 --- a/src/test/ui/issues/issue-37026.rs +++ b/src/test/ui/empty/issue-37026.rs diff --git a/src/test/ui/issues/issue-37026.stderr b/src/test/ui/empty/issue-37026.stderr index 48a4a5bcad2..48a4a5bcad2 100644 --- a/src/test/ui/issues/issue-37026.stderr +++ b/src/test/ui/empty/issue-37026.stderr diff --git a/src/test/ui/no-link.rs b/src/test/ui/empty/no-link.rs index c80e61b4511..c80e61b4511 100644 --- a/src/test/ui/no-link.rs +++ b/src/test/ui/empty/no-link.rs diff --git a/src/test/ui/issues/auxiliary/empty-struct.rs b/src/test/ui/issues/auxiliary/empty-struct.rs deleted file mode 100644 index 3fb40f6bfa9..00000000000 --- a/src/test/ui/issues/auxiliary/empty-struct.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub struct XEmpty1 {} -pub struct XEmpty2; -pub struct XEmpty6(); - -pub enum XE { - XEmpty3 {}, - XEmpty4, - XEmpty5(), -} diff --git a/src/test/ui/issues/issue-51244.rs b/src/test/ui/issues/issue-51244.rs deleted file mode 100644 index d634b8bf800..00000000000 --- a/src/test/ui/issues/issue-51244.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - let ref my_ref @ _ = 0; - *my_ref = 0; //~ ERROR cannot assign to `*my_ref`, which is behind a `&` reference [E0594] -} diff --git a/src/test/ui/issues/issue-51244.stderr b/src/test/ui/issues/issue-51244.stderr deleted file mode 100644 index 19f0223a357..00000000000 --- a/src/test/ui/issues/issue-51244.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0594]: cannot assign to `*my_ref`, which is behind a `&` reference - --> $DIR/issue-51244.rs:3:5 - | -LL | let ref my_ref @ _ = 0; - | -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _` -LL | *my_ref = 0; - | ^^^^^^^^^^^ `my_ref` is a `&` reference, so the data it refers to cannot be written - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/macros/issue-95267.rs b/src/test/ui/macros/issue-95267.rs new file mode 100644 index 00000000000..4d59c7ea5e9 --- /dev/null +++ b/src/test/ui/macros/issue-95267.rs @@ -0,0 +1,13 @@ +// check-pass + +// This is a valid macro. Commit 4 in #95159 broke things such that it failed +// with a "missing tokens in macro arguments" error, as reported in #95267. +macro_rules! f { + ( + /// ab + ) => {}; +} + +fn main() { + f!(); +} diff --git a/src/test/ui/weak-lang-item.rs b/src/test/ui/panic-handler/weak-lang-item-2.rs index a429d8fabc7..a429d8fabc7 100644 --- a/src/test/ui/weak-lang-item.rs +++ b/src/test/ui/panic-handler/weak-lang-item-2.rs diff --git a/src/test/ui/regions/regions-enum-not-wf.rs b/src/test/ui/regions/regions-enum-not-wf.rs deleted file mode 100644 index 8b491ee4e30..00000000000 --- a/src/test/ui/regions/regions-enum-not-wf.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Various examples of structs whose fields are not well-formed. - -#![allow(dead_code)] - -trait Dummy<'a> { - type Out; -} -impl<'a, T> Dummy<'a> for T -where - T: 'a, -{ - type Out = (); -} -type RequireOutlives<'a, T> = <T as Dummy<'a>>::Out; - -enum Ref1<'a, T> { - Ref1Variant1(RequireOutlives<'a, T>), //~ ERROR the parameter type `T` may not live long enough -} - -enum Ref2<'a, T> { - Ref2Variant1, - Ref2Variant2(isize, RequireOutlives<'a, T>), //~ ERROR the parameter type `T` may not live long enough -} - -enum RefOk<'a, T: 'a> { - RefOkVariant1(&'a T), -} - -// This is now well formed. RFC 2093 -enum RefIndirect<'a, T> { - RefIndirectVariant1(isize, RefOk<'a, T>), -} - -enum RefDouble<'a, 'b, T> { - RefDoubleVariant1(&'a RequireOutlives<'b, T>), - //~^ the parameter type `T` may not live long enough [E0309] -} - -fn main() {} diff --git a/src/test/ui/regions/regions-enum-not-wf.stderr b/src/test/ui/regions/regions-enum-not-wf.stderr deleted file mode 100644 index 553a3e71c16..00000000000 --- a/src/test/ui/regions/regions-enum-not-wf.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0309]: the parameter type `T` may not live long enough - --> $DIR/regions-enum-not-wf.rs:17:18 - | -LL | enum Ref1<'a, T> { - | - help: consider adding an explicit lifetime bound...: `T: 'a` -LL | Ref1Variant1(RequireOutlives<'a, T>), - | ^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds - -error[E0309]: the parameter type `T` may not live long enough - --> $DIR/regions-enum-not-wf.rs:22:25 - | -LL | enum Ref2<'a, T> { - | - help: consider adding an explicit lifetime bound...: `T: 'a` -LL | Ref2Variant1, -LL | Ref2Variant2(isize, RequireOutlives<'a, T>), - | ^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds - -error[E0309]: the parameter type `T` may not live long enough - --> $DIR/regions-enum-not-wf.rs:35:23 - | -LL | enum RefDouble<'a, 'b, T> { - | - help: consider adding an explicit lifetime bound...: `T: 'b` -LL | RefDoubleVariant1(&'a RequireOutlives<'b, T>), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0309`. diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr index dd090a3a548..34f059248b6 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr @@ -62,7 +62,7 @@ LL | if true || let 0 = 0 {} | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:47:13 | LL | if true || let 0 = 0 {} @@ -76,7 +76,7 @@ LL | if (true || let 0 = 0) {} | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:48:14 | LL | if (true || let 0 = 0) {} @@ -90,7 +90,7 @@ LL | if true && (true || let 0 = 0) {} | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:49:22 | LL | if true && (true || let 0 = 0) {} @@ -104,7 +104,7 @@ LL | if true || (true && let 0 = 0) {} | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:50:13 | LL | if true || (true && let 0 = 0) {} @@ -244,7 +244,7 @@ LL | while true || let 0 = 0 {} | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:111:16 | LL | while true || let 0 = 0 {} @@ -258,7 +258,7 @@ LL | while (true || let 0 = 0) {} | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:112:17 | LL | while (true || let 0 = 0) {} @@ -272,7 +272,7 @@ LL | while true && (true || let 0 = 0) {} | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:113:25 | LL | while true && (true || let 0 = 0) {} @@ -286,7 +286,7 @@ LL | while true || (true && let 0 = 0) {} | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:114:16 | LL | while true || (true && let 0 = 0) {} @@ -426,7 +426,7 @@ LL | true || let 0 = 0; | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:184:10 | LL | true || let 0 = 0; @@ -440,7 +440,7 @@ LL | (true || let 0 = 0); | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:185:11 | LL | (true || let 0 = 0); @@ -454,7 +454,7 @@ LL | true && (true || let 0 = 0); | = note: only supported directly in conditions of `if` and `while` expressions = note: as well as when nested within `&&` and parentheses in those conditions -note: `||` operators are not allowed in let chain expressions +note: `||` operators are not currently supported in let chain expressions --> $DIR/disallowed-positions.rs:186:19 | LL | true && (true || let 0 = 0); diff --git a/src/test/ui/span/E0057.rs b/src/test/ui/span/E0057.rs deleted file mode 100644 index 83f941f65b9..00000000000 --- a/src/test/ui/span/E0057.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - let f = |x| x * 3; - let a = f(); //~ ERROR E0057 - let b = f(4); - let c = f(2, 3); //~ ERROR E0057 -} diff --git a/src/test/ui/span/E0057.stderr b/src/test/ui/span/E0057.stderr deleted file mode 100644 index 31579e28289..00000000000 --- a/src/test/ui/span/E0057.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0057]: this function takes 1 argument but 0 arguments were supplied - --> $DIR/E0057.rs:3:13 - | -LL | let a = f(); - | ^-- supplied 0 arguments - | | - | expected 1 argument - -error[E0057]: this function takes 1 argument but 2 arguments were supplied - --> $DIR/E0057.rs:5:13 - | -LL | let c = f(2, 3); - | ^ - - supplied 2 arguments - | | - | expected 1 argument - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0057`. diff --git a/src/test/ui/cross-crate/cross-crate-newtype-struct-pat.rs b/src/test/ui/structs-enums/cross-crate-newtype-struct-pat.rs index eabffc16170..eabffc16170 100644 --- a/src/test/ui/cross-crate/cross-crate-newtype-struct-pat.rs +++ b/src/test/ui/structs-enums/cross-crate-newtype-struct-pat.rs diff --git a/src/test/ui/suggestions/suggest-private-fields.rs b/src/test/ui/structs/suggest-private-fields.rs index 8267a82fe2a..8267a82fe2a 100644 --- a/src/test/ui/suggestions/suggest-private-fields.rs +++ b/src/test/ui/structs/suggest-private-fields.rs diff --git a/src/test/ui/suggestions/suggest-private-fields.stderr b/src/test/ui/structs/suggest-private-fields.stderr index d628bd16208..d628bd16208 100644 --- a/src/test/ui/suggestions/suggest-private-fields.stderr +++ b/src/test/ui/structs/suggest-private-fields.stderr diff --git a/src/test/ui/suggestions/auxiliary/struct_field_privacy.rs b/src/test/ui/suggestions/auxiliary/struct_field_privacy.rs deleted file mode 100644 index 9765af1a7f6..00000000000 --- a/src/test/ui/suggestions/auxiliary/struct_field_privacy.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub struct A { - a: isize, - pub b: isize, -} - -pub struct B { - pub a: isize, - b: isize, -} diff --git a/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs index c66009fe24c..471a6b836b5 100644 --- a/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs +++ b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs @@ -16,4 +16,8 @@ fn foo<T: Bar>(_: T) where <T as Bar>::Baz: String { //~ ERROR expected trait, f fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: String { //~ ERROR expected trait, found } +fn issue_95327() where <u8 as Unresolved>::Assoc: String {} +//~^ ERROR expected trait, found struct +//~| ERROR use of undeclared type `Unresolved` + fn main() {} diff --git a/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr index 38b2e5ae9b9..9ca446a0a89 100644 --- a/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr +++ b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr @@ -1,3 +1,9 @@ +error[E0433]: failed to resolve: use of undeclared type `Unresolved` + --> $DIR/assoc_type_bound_with_struct.rs:19:31 + | +LL | fn issue_95327() where <u8 as Unresolved>::Assoc: String {} + | ^^^^^^^^^^ use of undeclared type `Unresolved` + error[E0404]: expected trait, found struct `String` --> $DIR/assoc_type_bound_with_struct.rs:5:46 | @@ -78,6 +84,18 @@ help: a trait with a similar name exists LL | fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: ToString { | ~~~~~~~~ -error: aborting due to 4 previous errors +error[E0404]: expected trait, found struct `String` + --> $DIR/assoc_type_bound_with_struct.rs:19:51 + | +LL | fn issue_95327() where <u8 as Unresolved>::Assoc: String {} + | ^^^^^^ help: a trait with a similar name exists: `ToString` + | + ::: $SRC_DIR/alloc/src/string.rs:LL:COL + | +LL | pub trait ToString { + | ------------------ similarly named trait `ToString` defined here + +error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0404`. +Some errors have detailed explanations: E0404, E0433. +For more information about an error, try `rustc --explain E0404`. diff --git a/src/test/ui/cross-crate/xcrate-unit-struct.rs b/src/test/ui/xcrate/xcrate-unit-struct-2.rs index 7aa3eb0d6c4..7aa3eb0d6c4 100644 --- a/src/test/ui/cross-crate/xcrate-unit-struct.rs +++ b/src/test/ui/xcrate/xcrate-unit-struct-2.rs |
