diff options
Diffstat (limited to 'src/test/ui')
26 files changed, 203 insertions, 44 deletions
diff --git a/src/test/ui/fmt/ifmt-bad-arg.rs b/src/test/ui/fmt/ifmt-bad-arg.rs index b3e54ed32aa..84f4cc7f4cc 100644 --- a/src/test/ui/fmt/ifmt-bad-arg.rs +++ b/src/test/ui/fmt/ifmt-bad-arg.rs @@ -86,6 +86,9 @@ tenth number: {}", println!("{:foo}", 1); //~ ERROR unknown format trait `foo` println!("{5} {:4$} {6:7$}", 1); //~^ ERROR invalid reference to positional arguments 4, 5, 6 and 7 (there is 1 argument) + let foo = 1; + println!("{foo:0$}"); + //~^ ERROR invalid reference to positional argument 0 (no arguments were given) // We used to ICE here because we tried to unconditionally access the first argument, which // doesn't exist. diff --git a/src/test/ui/fmt/ifmt-bad-arg.stderr b/src/test/ui/fmt/ifmt-bad-arg.stderr index d181fe14107..5439ee17398 100644 --- a/src/test/ui/fmt/ifmt-bad-arg.stderr +++ b/src/test/ui/fmt/ifmt-bad-arg.stderr @@ -251,8 +251,19 @@ LL | println!("{5} {:4$} {6:7$}", 1); = note: positional arguments are zero-based = note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html +error: invalid reference to positional argument 0 (no arguments were given) + --> $DIR/ifmt-bad-arg.rs:90:15 + | +LL | println!("{foo:0$}"); + | ^^^^^--^ + | | + | this width flag expects an `usize` argument at position 0, but no arguments were given + | + = note: positional arguments are zero-based + = note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html + error: 2 positional arguments in format string, but no arguments were given - --> $DIR/ifmt-bad-arg.rs:92:15 + --> $DIR/ifmt-bad-arg.rs:95:15 | LL | println!("{:.*}"); | ^^--^ @@ -328,7 +339,7 @@ LL | pub fn from_usize(x: &usize) -> ArgumentV1<'_> { | ^^^^^^^^^^ = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 36 previous errors +error: aborting due to 37 previous errors Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/kindck/kindck-copy.stderr b/src/test/ui/kindck/kindck-copy.stderr index 1c61c85368b..025a5008d0f 100644 --- a/src/test/ui/kindck/kindck-copy.stderr +++ b/src/test/ui/kindck/kindck-copy.stderr @@ -91,10 +91,10 @@ LL | fn assert_copy<T:Copy>() { } | ^^^^ required by this bound in `assert_copy` error[E0277]: the trait bound `Box<dyn Dummy>: Copy` is not satisfied - --> $DIR/kindck-copy.rs:42:5 + --> $DIR/kindck-copy.rs:42:19 | LL | assert_copy::<Box<dyn Dummy>>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<dyn Dummy>` + | ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<dyn Dummy>` | note: required by a bound in `assert_copy` --> $DIR/kindck-copy.rs:5:18 @@ -103,10 +103,10 @@ LL | fn assert_copy<T:Copy>() { } | ^^^^ required by this bound in `assert_copy` error[E0277]: the trait bound `Box<dyn Dummy + Send>: Copy` is not satisfied - --> $DIR/kindck-copy.rs:43:5 + --> $DIR/kindck-copy.rs:43:19 | LL | assert_copy::<Box<dyn Dummy + Send>>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<dyn Dummy + Send>` + | ^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<dyn Dummy + Send>` | note: required by a bound in `assert_copy` --> $DIR/kindck-copy.rs:5:18 diff --git a/src/test/ui/macros/meta-variable-depth-outside-repeat.rs b/src/test/ui/macros/meta-variable-depth-outside-repeat.rs new file mode 100644 index 00000000000..b7fb947854f --- /dev/null +++ b/src/test/ui/macros/meta-variable-depth-outside-repeat.rs @@ -0,0 +1,12 @@ +#![feature(macro_metavar_expr)] + +macro_rules! metavar { + ( $i:expr ) => { + ${length(0)} + //~^ ERROR meta-variable expression `length` with depth parameter must be called inside of a macro repetition + }; +} + +const _: i32 = metavar!(0); + +fn main() {} diff --git a/src/test/ui/macros/meta-variable-depth-outside-repeat.stderr b/src/test/ui/macros/meta-variable-depth-outside-repeat.stderr new file mode 100644 index 00000000000..fad150cadfc --- /dev/null +++ b/src/test/ui/macros/meta-variable-depth-outside-repeat.stderr @@ -0,0 +1,8 @@ +error: meta-variable expression `length` with depth parameter must be called inside of a macro repetition + --> $DIR/meta-variable-depth-outside-repeat.rs:5:10 + | +LL | ${length(0)} + | ^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs b/src/test/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs index d81c8628bab..6a0d68bd6b1 100644 --- a/src/test/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs +++ b/src/test/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs @@ -5,7 +5,7 @@ macro_rules! a { ( ${count(foo, 0)}, ${count(foo, 10)}, - //~^ ERROR count depth must be less than 4 + //~^ ERROR depth parameter on meta-variable expression `count` must be less than 4 ) }; } @@ -17,7 +17,7 @@ macro_rules! b { ${ignore(foo)} ${index(0)}, ${index(10)}, - //~^ ERROR index depth must be less than 3 + //~^ ERROR depth parameter on meta-variable expression `index` must be less than 3 )* )* )* ) }; @@ -30,15 +30,14 @@ macro_rules! c { ${ignore(foo)} ${length(0)} ${length(10)} - //~^ ERROR length depth must be less than 2 + //~^ ERROR depth parameter on meta-variable expression `length` must be less than 2 )* )* ) }; } - fn main() { a!( { [ (a) ] [ (b c) ] } ); b!( { [ a b ] } ); - c!( { a } ); + c!({ a }); } diff --git a/src/test/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr b/src/test/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr index 7474c03c0f9..236122b6465 100644 --- a/src/test/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr +++ b/src/test/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr @@ -1,16 +1,16 @@ -error: count depth must be less than 4 +error: depth parameter on meta-variable expression `count` must be less than 4 --> $DIR/out-of-bounds-arguments.rs:7:14 | LL | ${count(foo, 10)}, | ^^^^^^^^^^^^^^^^ -error: index depth must be less than 3 +error: depth parameter on meta-variable expression `index` must be less than 3 --> $DIR/out-of-bounds-arguments.rs:19:18 | LL | ${index(10)}, | ^^^^^^^^^^^ -error: length depth must be less than 2 +error: depth parameter on meta-variable expression `length` must be less than 2 --> $DIR/out-of-bounds-arguments.rs:32:18 | LL | ${length(10)} diff --git a/src/test/ui/not-panic/not-panic-safe.stderr b/src/test/ui/not-panic/not-panic-safe.stderr index 3e54df12376..2cd51a43998 100644 --- a/src/test/ui/not-panic/not-panic-safe.stderr +++ b/src/test/ui/not-panic/not-panic-safe.stderr @@ -1,8 +1,11 @@ error[E0277]: the type `&mut i32` may not be safely transferred across an unwind boundary - --> $DIR/not-panic-safe.rs:8:5 + --> $DIR/not-panic-safe.rs:8:14 | LL | assert::<&mut i32>(); - | ^^^^^^^^^^^^^^^^^^ `&mut i32` may not be safely transferred across an unwind boundary + | -^^^^^^^ + | | + | `&mut i32` may not be safely transferred across an unwind boundary + | help: consider removing the leading `&`-reference | = help: the trait `UnwindSafe` is not implemented for `&mut i32` = note: `UnwindSafe` is implemented for `&i32`, but not for `&mut i32` diff --git a/src/test/ui/stability-attribute/auxiliary/stability-attribute-implies.rs b/src/test/ui/stability-attribute/auxiliary/stability-attribute-implies.rs new file mode 100644 index 00000000000..468be1bc144 --- /dev/null +++ b/src/test/ui/stability-attribute/auxiliary/stability-attribute-implies.rs @@ -0,0 +1,8 @@ +#![feature(staged_api)] +#![stable(feature = "stability_attribute_implies", since = "1.0.0")] + +#[stable(feature = "foo", since = "1.62.0")] +pub fn foo() {} + +#[unstable(feature = "foobar", issue = "1", implied_by = "foo")] +pub fn foobar() {} diff --git a/src/test/ui/stability-attribute/stability-attribute-implies-missing.rs b/src/test/ui/stability-attribute/stability-attribute-implies-missing.rs new file mode 100644 index 00000000000..61387853672 --- /dev/null +++ b/src/test/ui/stability-attribute/stability-attribute-implies-missing.rs @@ -0,0 +1,10 @@ +#![feature(staged_api)] +#![stable(feature = "stability_attribute_implies", since = "1.0.0")] + +// Tests that `implied_by = "bar"` results in an error being emitted if `bar` does not exist. + +#[unstable(feature = "foobar", issue = "1", implied_by = "bar")] +//~^ ERROR feature `bar` implying `foobar` does not exist +pub fn foobar() {} + +fn main() {} diff --git a/src/test/ui/stability-attribute/stability-attribute-implies-missing.stderr b/src/test/ui/stability-attribute/stability-attribute-implies-missing.stderr new file mode 100644 index 00000000000..ff1856f1763 --- /dev/null +++ b/src/test/ui/stability-attribute/stability-attribute-implies-missing.stderr @@ -0,0 +1,8 @@ +error: feature `bar` implying `foobar` does not exist + --> $DIR/stability-attribute-implies-missing.rs:6:1 + | +LL | #[unstable(feature = "foobar", issue = "1", implied_by = "bar")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/stability-attribute/stability-attribute-implies-no-feature.rs b/src/test/ui/stability-attribute/stability-attribute-implies-no-feature.rs new file mode 100644 index 00000000000..947f9f73eff --- /dev/null +++ b/src/test/ui/stability-attribute/stability-attribute-implies-no-feature.rs @@ -0,0 +1,13 @@ +// aux-build:stability-attribute-implies.rs + +// Tests that despite the `foobar` feature being implied by now-stable feature `foo`, if `foobar` +// isn't allowed in this crate then an error will be emitted. + +extern crate stability_attribute_implies; +use stability_attribute_implies::{foo, foobar}; +//~^ ERROR use of unstable library feature 'foobar' + +fn main() { + foo(); // no error - stable + foobar(); //~ ERROR use of unstable library feature 'foobar' +} diff --git a/src/test/ui/stability-attribute/stability-attribute-implies-no-feature.stderr b/src/test/ui/stability-attribute/stability-attribute-implies-no-feature.stderr new file mode 100644 index 00000000000..c2331f6766c --- /dev/null +++ b/src/test/ui/stability-attribute/stability-attribute-implies-no-feature.stderr @@ -0,0 +1,21 @@ +error[E0658]: use of unstable library feature 'foobar' + --> $DIR/stability-attribute-implies-no-feature.rs:7:40 + | +LL | use stability_attribute_implies::{foo, foobar}; + | ^^^^^^ + | + = note: see issue #1 <https://github.com/rust-lang/rust/issues/1> for more information + = help: add `#![feature(foobar)]` to the crate attributes to enable + +error[E0658]: use of unstable library feature 'foobar' + --> $DIR/stability-attribute-implies-no-feature.rs:12:5 + | +LL | foobar(); + | ^^^^^^ + | + = note: see issue #1 <https://github.com/rust-lang/rust/issues/1> for more information + = help: add `#![feature(foobar)]` to the crate attributes to enable + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/stability-attribute/stability-attribute-implies-using-stable.rs b/src/test/ui/stability-attribute/stability-attribute-implies-using-stable.rs new file mode 100644 index 00000000000..1a2d8e271de --- /dev/null +++ b/src/test/ui/stability-attribute/stability-attribute-implies-using-stable.rs @@ -0,0 +1,15 @@ +// aux-build:stability-attribute-implies.rs +#![deny(stable_features)] +#![feature(foo)] +//~^ ERROR the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar` + +// Tests that the use of `implied_by` in the `#[unstable]` attribute results in a diagnostic +// mentioning partial stabilization, and that given the implied unstable feature is unused (there +// is no `foobar` call), that the compiler suggests removing the flag. + +extern crate stability_attribute_implies; +use stability_attribute_implies::foo; + +fn main() { + foo(); +} diff --git a/src/test/ui/stability-attribute/stability-attribute-implies-using-stable.stderr b/src/test/ui/stability-attribute/stability-attribute-implies-using-stable.stderr new file mode 100644 index 00000000000..c9b3f07cc70 --- /dev/null +++ b/src/test/ui/stability-attribute/stability-attribute-implies-using-stable.stderr @@ -0,0 +1,22 @@ +error: the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar` + --> $DIR/stability-attribute-implies-using-stable.rs:3:12 + | +LL | #![feature(foo)] + | ^^^ + | +note: the lint level is defined here + --> $DIR/stability-attribute-implies-using-stable.rs:2:9 + | +LL | #![deny(stable_features)] + | ^^^^^^^^^^^^^^^ +help: if you are using features which are still unstable, change to using `foobar` + | +LL | #![feature(foobar)] + | ~~~~~~ +help: if you are using features which are now stable, remove this line + | +LL - #![feature(foo)] + | + +error: aborting due to previous error + diff --git a/src/test/ui/stability-attribute/stability-attribute-implies-using-unstable.rs b/src/test/ui/stability-attribute/stability-attribute-implies-using-unstable.rs new file mode 100644 index 00000000000..3c73c5abf3b --- /dev/null +++ b/src/test/ui/stability-attribute/stability-attribute-implies-using-unstable.rs @@ -0,0 +1,17 @@ +// aux-build:stability-attribute-implies.rs +#![deny(stable_features)] +#![feature(foo)] +//~^ ERROR the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar` + +// Tests that the use of `implied_by` in the `#[unstable]` attribute results in a diagnostic +// mentioning partial stabilization and that given the implied unstable feature is used (there is a +// `foobar` call), that the compiler suggests changing to that feature and doesn't error about its +// use. + +extern crate stability_attribute_implies; +use stability_attribute_implies::{foo, foobar}; + +fn main() { + foo(); + foobar(); // no error! +} diff --git a/src/test/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr b/src/test/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr new file mode 100644 index 00000000000..9a5c7ef5a47 --- /dev/null +++ b/src/test/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr @@ -0,0 +1,22 @@ +error: the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar` + --> $DIR/stability-attribute-implies-using-unstable.rs:3:12 + | +LL | #![feature(foo)] + | ^^^ + | +note: the lint level is defined here + --> $DIR/stability-attribute-implies-using-unstable.rs:2:9 + | +LL | #![deny(stable_features)] + | ^^^^^^^^^^^^^^^ +help: if you are using features which are still unstable, change to using `foobar` + | +LL | #![feature(foobar)] + | ~~~~~~ +help: if you are using features which are now stable, remove this line + | +LL - #![feature(foo)] + | + +error: aborting due to previous error + diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr index bd7b88da158..8dbcc6c97ef 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr @@ -8,7 +8,7 @@ error[E0541]: unknown meta item 'sinse' --> $DIR/stability-attribute-sanity-2.rs:10:25 | LL | #[stable(feature = "a", sinse = "1.0.0")] - | ^^^^^^^^^^^^^^^ expected one of `since`, `note` + | ^^^^^^^^^^^^^^^ expected one of `feature`, `since` error[E0545]: `issue` must be a non-zero numeric string or "none" --> $DIR/stability-attribute-sanity-2.rs:13:27 diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr index fcb1eefddbc..079230b2a31 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr @@ -14,7 +14,7 @@ error[E0541]: unknown meta item 'reason' --> $DIR/stability-attribute-sanity.rs:8:42 | LL | #[stable(feature = "a", since = "b", reason)] - | ^^^^^^ expected one of `since`, `note` + | ^^^^^^ expected one of `feature`, `since` error[E0539]: incorrect meta item --> $DIR/stability-attribute-sanity.rs:11:29 diff --git a/src/test/ui/traits/issue-32963.rs b/src/test/ui/traits/issue-32963.rs index 58055cd5456..56a68f3a231 100644 --- a/src/test/ui/traits/issue-32963.rs +++ b/src/test/ui/traits/issue-32963.rs @@ -7,6 +7,5 @@ fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() } fn main() { size_of_copy::<dyn Misc + Copy>(); //~^ ERROR only auto traits can be used as additional traits in a trait object - //~| ERROR only auto traits can be used as additional traits in a trait object //~| ERROR the trait bound `dyn Misc: Copy` is not satisfied } diff --git a/src/test/ui/traits/issue-32963.stderr b/src/test/ui/traits/issue-32963.stderr index 5e7762b3220..bad45e54d64 100644 --- a/src/test/ui/traits/issue-32963.stderr +++ b/src/test/ui/traits/issue-32963.stderr @@ -9,22 +9,11 @@ LL | size_of_copy::<dyn Misc + Copy>(); = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Misc + Copy {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits> -error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/issue-32963.rs:8:31 - | -LL | size_of_copy::<dyn Misc + Copy>(); - | ---- ^^^^ additional non-auto trait - | | - | first non-auto trait - | - = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Misc + Copy {}` - = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits> - error[E0277]: the trait bound `dyn Misc: Copy` is not satisfied - --> $DIR/issue-32963.rs:8:5 + --> $DIR/issue-32963.rs:8:20 | LL | size_of_copy::<dyn Misc + Copy>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `dyn Misc` + | ^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `dyn Misc` | note: required by a bound in `size_of_copy` --> $DIR/issue-32963.rs:5:20 @@ -32,7 +21,7 @@ note: required by a bound in `size_of_copy` LL | fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() } | ^^^^ required by this bound in `size_of_copy` -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors Some errors have detailed explanations: E0225, E0277. For more information about an error, try `rustc --explain E0225`. diff --git a/src/test/ui/traits/suggest-where-clause.stderr b/src/test/ui/traits/suggest-where-clause.stderr index 21b339d12a8..d4d9b496747 100644 --- a/src/test/ui/traits/suggest-where-clause.stderr +++ b/src/test/ui/traits/suggest-where-clause.stderr @@ -85,10 +85,10 @@ LL | pub const fn size_of<T>() -> usize { | ^ required by this bound in `std::mem::size_of` error[E0277]: the size for values of type `[&U]` cannot be known at compilation time - --> $DIR/suggest-where-clause.rs:31:5 + --> $DIR/suggest-where-clause.rs:31:20 | LL | mem::size_of::<[&U]>(); - | ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | ^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[&U]` note: required by a bound in `std::mem::size_of` diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr index 7aefa064611..468a14762c0 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr @@ -1,8 +1,8 @@ error[E0277]: `<T as Trait>::AssocType` cannot be sent between threads safely - --> $DIR/typeck-default-trait-impl-assoc-type.rs:11:5 + --> $DIR/typeck-default-trait-impl-assoc-type.rs:11:15 | LL | is_send::<T::AssocType>(); - | ^^^^^^^^^^^^^^^^^^^^^^^ `<T as Trait>::AssocType` cannot be sent between threads safely + | ^^^^^^^^^^^^ `<T as Trait>::AssocType` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `<T as Trait>::AssocType` note: required by a bound in `is_send` diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr index 09d3eec6b21..a3b32d2c1c8 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr @@ -1,8 +1,8 @@ error[E0277]: the trait bound `dyn Foo<(isize,), isize, Output = ()>: Eq<dyn Foo<(isize,), Output = ()>>` is not satisfied - --> $DIR/unboxed-closure-sugar-default.rs:21:5 + --> $DIR/unboxed-closure-sugar-default.rs:21:10 | LL | eq::<dyn Foo<(isize,), isize, Output=()>, dyn Foo(isize)>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq<dyn Foo<(isize,), Output = ()>>` is not implemented for `dyn Foo<(isize,), isize, Output = ()>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq<dyn Foo<(isize,), Output = ()>>` is not implemented for `dyn Foo<(isize,), isize, Output = ()>` | note: required by a bound in `eq` --> $DIR/unboxed-closure-sugar-default.rs:14:40 diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs index 0fc3e23ec73..acf0227a79b 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.rs @@ -42,7 +42,7 @@ fn test<'a,'b>() { // Errors expected: eq::< dyn Foo<(),Output=()>, dyn Foo(char) >(); - //~^^ ERROR E0277 + //~^ ERROR E0277 } fn main() { } diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr index a1cbf842a68..bccbf307ae1 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr @@ -1,9 +1,8 @@ error[E0277]: the trait bound `dyn Foo<(char,), Output = ()>: Eq<dyn Foo<(), Output = ()>>` is not satisfied - --> $DIR/unboxed-closure-sugar-equiv.rs:43:5 + --> $DIR/unboxed-closure-sugar-equiv.rs:44:11 | -LL | / eq::< dyn Foo<(),Output=()>, -LL | | dyn Foo(char) >(); - | |_______________________________________________________________________^ the trait `Eq<dyn Foo<(), Output = ()>>` is not implemented for `dyn Foo<(char,), Output = ()>` +LL | dyn Foo(char) >(); + | ^^^^^^^^^^^^^ the trait `Eq<dyn Foo<(), Output = ()>>` is not implemented for `dyn Foo<(char,), Output = ()>` | note: required by a bound in `eq` --> $DIR/unboxed-closure-sugar-equiv.rs:16:28 |
