From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- .../alias-where-clause-isnt-supertrait.stderr | 2 +- .../trait-upcasting/cyclic-trait-resolution.stderr | 2 +- .../deref-upcast-behavioral-change.rs | 35 +++++++++++++++++++++ .../deref-upcast-behavioral-change.stderr | 19 ++++++++++++ .../ui/traits/trait-upcasting/fewer-associated.rs | 2 +- .../illegal-upcast-from-impl.current.stderr | 2 +- .../illegal-upcast-from-impl.next.stderr | 2 +- .../trait-upcasting/illegal-upcast-from-impl.rs | 2 +- .../inference-behavior-change-deref.rs | 36 ++++++++++++++++++++++ .../inference-behavior-change-deref.stderr | 16 ++++++++++ .../trait-upcasting/issue-11515.current.stderr | 2 +- .../traits/trait-upcasting/issue-11515.next.stderr | 2 +- tests/ui/traits/trait-upcasting/issue-11515.rs | 2 +- .../trait-upcasting/migrate-lint-deny-regions.rs | 18 +++++++++++ .../migrate-lint-deny-regions.stderr | 19 ++++++++++++ .../ui/traits/trait-upcasting/migrate-lint-deny.rs | 8 ++--- .../trait-upcasting/migrate-lint-deny.stderr | 12 ++++---- .../migrate-lint-different-substs.rs | 21 +++++++++++++ .../migrate-lint-different-substs.stderr | 15 +++++++++ .../multiple-occurrence-ambiguousity.stderr | 2 +- .../multiple_supertrait_upcastable.stderr | 2 +- tests/ui/traits/trait-upcasting/normalization.rs | 2 +- .../type-checking-test-1.current.stderr | 2 +- .../type-checking-test-1.next.stderr | 2 +- .../traits/trait-upcasting/type-checking-test-1.rs | 2 +- .../upcast-through-struct-tail.current.stderr | 2 +- .../upcast-through-struct-tail.next.stderr | 2 +- .../trait-upcasting/upcast-through-struct-tail.rs | 2 +- 28 files changed, 206 insertions(+), 29 deletions(-) create mode 100644 tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.rs create mode 100644 tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.stderr create mode 100644 tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs create mode 100644 tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr create mode 100644 tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs create mode 100644 tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr create mode 100644 tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs create mode 100644 tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr (limited to 'tests/ui/traits/trait-upcasting') diff --git a/tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr b/tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr index 5574a0320..99c82b88d 100644 --- a/tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr +++ b/tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr @@ -9,6 +9,6 @@ LL | x = note: expected reference `&dyn B` found reference `&dyn C` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr index 62c732fb1..85c05bd05 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr @@ -12,6 +12,6 @@ LL | trait A: B + A {} | ^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0391`. diff --git a/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.rs b/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.rs new file mode 100644 index 000000000..e4784fa41 --- /dev/null +++ b/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.rs @@ -0,0 +1,35 @@ +#![deny(deref_into_dyn_supertrait)] +use std::ops::Deref; + +trait Bar {} +impl Bar for T {} + +trait Foo: Bar { + fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar + 'a); +} + +impl Foo for () { + fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar + 'a) { + self + } +} + +impl<'a> Deref for dyn Foo + 'a { + //~^ ERROR this `Deref` implementation is covered by an implicit supertrait coercion + //~| WARN this will change its meaning in a future release! + type Target = dyn Bar + 'a; + + fn deref(&self) -> &Self::Target { + self.as_dyn_bar_u32() + } +} + +fn take_dyn(x: &dyn Bar) -> T { + todo!() +} + +fn main() { + let x: &dyn Foo = &(); + let y = take_dyn(x); + let z: u32 = y; +} diff --git a/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.stderr b/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.stderr new file mode 100644 index 000000000..fa93e28c7 --- /dev/null +++ b/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.stderr @@ -0,0 +1,19 @@ +error: this `Deref` implementation is covered by an implicit supertrait coercion + --> $DIR/deref-upcast-behavioral-change.rs:17:1 + | +LL | impl<'a> Deref for dyn Foo + 'a { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo` implements `Deref>` which conflicts with supertrait `Bar` +... +LL | type Target = dyn Bar + 'a; + | -------------------------------- target type is a supertrait of `dyn Foo` + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #89460 +note: the lint level is defined here + --> $DIR/deref-upcast-behavioral-change.rs:1:9 + | +LL | #![deny(deref_into_dyn_supertrait)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + diff --git a/tests/ui/traits/trait-upcasting/fewer-associated.rs b/tests/ui/traits/trait-upcasting/fewer-associated.rs index 8228eea26..58e72d9d7 100644 --- a/tests/ui/traits/trait-upcasting/fewer-associated.rs +++ b/tests/ui/traits/trait-upcasting/fewer-associated.rs @@ -1,7 +1,7 @@ // check-pass // issue: 114035 // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr index 59c9d5737..1538e2f3f 100644 --- a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr +++ b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr @@ -9,6 +9,6 @@ LL | fn illegal(x: &dyn Sub) -> &dyn Super { x } = note: expected reference `&dyn Super` found reference `&dyn Sub` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr index 59c9d5737..1538e2f3f 100644 --- a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr +++ b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr @@ -9,6 +9,6 @@ LL | fn illegal(x: &dyn Sub) -> &dyn Super { x } = note: expected reference `&dyn Super` found reference `&dyn Sub` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs index 774474281..ffed8beb4 100644 --- a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs +++ b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs new file mode 100644 index 000000000..79fb643ea --- /dev/null +++ b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs @@ -0,0 +1,36 @@ +#![deny(deref_into_dyn_supertrait)] +#![feature(trait_upcasting)] // remove this and the test compiles + +use std::ops::Deref; + +trait Bar {} +impl Bar for T {} + +trait Foo: Bar { + fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar + 'a); +} + +impl Foo for () { + fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar + 'a) { + self + } +} + +impl<'a> Deref for dyn Foo + 'a { + type Target = dyn Bar + 'a; + + fn deref(&self) -> &Self::Target { + self.as_dyn_bar_u32() + } +} + +fn take_dyn(x: &dyn Bar) -> T { + todo!() +} + +fn main() { + let x: &dyn Foo = &(); + let y = take_dyn(x); + let z: u32 = y; + //~^ ERROR mismatched types +} diff --git a/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr new file mode 100644 index 000000000..6b6a26d15 --- /dev/null +++ b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr @@ -0,0 +1,16 @@ +error[E0308]: mismatched types + --> $DIR/inference-behavior-change-deref.rs:34:18 + | +LL | let z: u32 = y; + | --- ^ expected `u32`, found `i32` + | | + | expected due to this + | +help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit + | +LL | let z: u32 = y.try_into().unwrap(); + | ++++++++++++++++++++ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/traits/trait-upcasting/issue-11515.current.stderr b/tests/ui/traits/trait-upcasting/issue-11515.current.stderr index 97d66cccb..da7ac4cc0 100644 --- a/tests/ui/traits/trait-upcasting/issue-11515.current.stderr +++ b/tests/ui/traits/trait-upcasting/issue-11515.current.stderr @@ -8,6 +8,6 @@ LL | let test = Box::new(Test { func: closure }); = help: add `#![feature(trait_upcasting)]` to the crate attributes to enable = note: required when coercing `Box<(dyn Fn() + 'static)>` into `Box<(dyn FnMut() + 'static)>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/traits/trait-upcasting/issue-11515.next.stderr b/tests/ui/traits/trait-upcasting/issue-11515.next.stderr index 97d66cccb..da7ac4cc0 100644 --- a/tests/ui/traits/trait-upcasting/issue-11515.next.stderr +++ b/tests/ui/traits/trait-upcasting/issue-11515.next.stderr @@ -8,6 +8,6 @@ LL | let test = Box::new(Test { func: closure }); = help: add `#![feature(trait_upcasting)]` to the crate attributes to enable = note: required when coercing `Box<(dyn Fn() + 'static)>` into `Box<(dyn FnMut() + 'static)>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/traits/trait-upcasting/issue-11515.rs b/tests/ui/traits/trait-upcasting/issue-11515.rs index 723f3a24f..31ea2fb35 100644 --- a/tests/ui/traits/trait-upcasting/issue-11515.rs +++ b/tests/ui/traits/trait-upcasting/issue-11515.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver struct Test { func: Box, diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs new file mode 100644 index 000000000..da1a9cc27 --- /dev/null +++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs @@ -0,0 +1,18 @@ +#![deny(deref_into_dyn_supertrait)] + +use std::ops::Deref; + +trait Bar<'a> {} +trait Foo<'a>: Bar<'a> {} + +impl<'a> Deref for dyn Foo<'a> { + //~^ ERROR this `Deref` implementation is covered by an implicit supertrait coercion + //~| WARN this will change its meaning in a future release! + type Target = dyn Bar<'a>; + + fn deref(&self) -> &Self::Target { + todo!() + } +} + +fn main() {} diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr new file mode 100644 index 000000000..a5f3660d4 --- /dev/null +++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr @@ -0,0 +1,19 @@ +error: this `Deref` implementation is covered by an implicit supertrait coercion + --> $DIR/migrate-lint-deny-regions.rs:8:1 + | +LL | impl<'a> Deref for dyn Foo<'a> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo<'_>` implements `Deref>` which conflicts with supertrait `Bar<'_>` +... +LL | type Target = dyn Bar<'a>; + | -------------------------- target type is a supertrait of `dyn Foo<'_>` + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #89460 +note: the lint level is defined here + --> $DIR/migrate-lint-deny-regions.rs:1:9 + | +LL | #![deny(deref_into_dyn_supertrait)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny.rs b/tests/ui/traits/trait-upcasting/migrate-lint-deny.rs index d62418756..926b3649e 100644 --- a/tests/ui/traits/trait-upcasting/migrate-lint-deny.rs +++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny.rs @@ -1,16 +1,14 @@ #![deny(deref_into_dyn_supertrait)] -extern crate core; - -use core::ops::Deref; +use std::ops::Deref; // issue 89190 trait A {} trait B: A {} impl<'a> Deref for dyn 'a + B { - //~^ ERROR `(dyn B + 'a)` implements `Deref` with supertrait `A` as target - //~| WARN this was previously accepted by the compiler but is being phased out; + //~^ ERROR this `Deref` implementation is covered by an implicit supertrait coercion + //~| WARN this will change its meaning in a future release! type Target = dyn A; fn deref(&self) -> &Self::Target { diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr index 4533b1163..29997a9b3 100644 --- a/tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr +++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr @@ -1,13 +1,13 @@ -error: `(dyn B + 'a)` implements `Deref` with supertrait `A` as target - --> $DIR/migrate-lint-deny.rs:11:1 +error: this `Deref` implementation is covered by an implicit supertrait coercion + --> $DIR/migrate-lint-deny.rs:9:1 | LL | impl<'a> Deref for dyn 'a + B { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn B` implements `Deref` which conflicts with supertrait `A` ... LL | type Target = dyn A; - | -------------------- target type is set here + | -------------------- target type is a supertrait of `dyn B` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = warning: this will change its meaning in a future release! = note: for more information, see issue #89460 note: the lint level is defined here --> $DIR/migrate-lint-deny.rs:1:9 @@ -15,5 +15,5 @@ note: the lint level is defined here LL | #![deny(deref_into_dyn_supertrait)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs new file mode 100644 index 000000000..8a90a09ff --- /dev/null +++ b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs @@ -0,0 +1,21 @@ +// check-pass + +use std::ops::Deref; + +trait Bar {} + +trait Foo: Bar { + fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar + 'a); +} + +impl<'a> Deref for dyn Foo + 'a { + //~^ WARN this `Deref` implementation is covered by an implicit supertrait coercion + //~| WARN this will change its meaning in a future release! + type Target = dyn Bar + 'a; + + fn deref(&self) -> &Self::Target { + self.as_dyn_bar_u32() + } +} + +fn main() {} diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr new file mode 100644 index 000000000..6245da5a1 --- /dev/null +++ b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr @@ -0,0 +1,15 @@ +warning: this `Deref` implementation is covered by an implicit supertrait coercion + --> $DIR/migrate-lint-different-substs.rs:11:1 + | +LL | impl<'a> Deref for dyn Foo + 'a { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo` implements `Deref>` which conflicts with supertrait `Bar` +... +LL | type Target = dyn Bar + 'a; + | -------------------------------- target type is a supertrait of `dyn Foo` + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #89460 + = note: `#[warn(deref_into_dyn_supertrait)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr index 0ad18be03..70ba1fcaf 100644 --- a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr +++ b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr @@ -9,6 +9,6 @@ LL | let t: &dyn Bar<_> = s; = note: expected reference `&dyn Bar<_>` found reference `&dyn Foo` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr b/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr index ad80a009e..d075102b2 100644 --- a/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr +++ b/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr @@ -10,5 +10,5 @@ note: the lint level is defined here LL | #![deny(multiple_supertrait_upcastable)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/traits/trait-upcasting/normalization.rs b/tests/ui/traits/trait-upcasting/normalization.rs index c78338b0d..24da1ec5d 100644 --- a/tests/ui/traits/trait-upcasting/normalization.rs +++ b/tests/ui/traits/trait-upcasting/normalization.rs @@ -1,7 +1,7 @@ // check-pass // issue: 114113 // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr b/tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr index b612005fc..10c22440a 100644 --- a/tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr +++ b/tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr @@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `&dyn Foo` as `&dyn Bar<_>` LL | let _ = x as &dyn Bar<_>; // Ambiguous | ^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0605`. diff --git a/tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr b/tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr index b612005fc..10c22440a 100644 --- a/tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr +++ b/tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr @@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `&dyn Foo` as `&dyn Bar<_>` LL | let _ = x as &dyn Bar<_>; // Ambiguous | ^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0605`. diff --git a/tests/ui/traits/trait-upcasting/type-checking-test-1.rs b/tests/ui/traits/trait-upcasting/type-checking-test-1.rs index afea8521e..54c3c5e0c 100644 --- a/tests/ui/traits/trait-upcasting/type-checking-test-1.rs +++ b/tests/ui/traits/trait-upcasting/type-checking-test-1.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr index 9f0993d65..f1f0cd309 100644 --- a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr +++ b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr @@ -8,6 +8,6 @@ LL | x = help: add `#![feature(trait_upcasting)]` to the crate attributes to enable = note: required when coercing `Box>` into `Box>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr index 9f0993d65..f1f0cd309 100644 --- a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr +++ b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr @@ -8,6 +8,6 @@ LL | x = help: add `#![feature(trait_upcasting)]` to the crate attributes to enable = note: required when coercing `Box>` into `Box>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs index 42495f45f..948f058e5 100644 --- a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs +++ b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver struct Wrapper(T); -- cgit v1.2.3