diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/impl-trait | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
143 files changed, 369 insertions, 235 deletions
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr index 168a5aa18..825682c52 100644 --- a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr +++ b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr @@ -13,6 +13,6 @@ help: to declare that `impl Sized + 'a` captures `'b`, you can add an explicit ` LL | fn step2<'a, 'b: 'a>() -> impl Sized + 'a + 'b { | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr index cabba4baf..b87e31acc 100644 --- a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr +++ b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr @@ -13,6 +13,6 @@ help: to declare that `impl Swap + 'a` captures `'b`, you can add an explicit `' LL | fn hide<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a + 'b { | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr b/tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr index baeec6d58..6c9b8cf24 100644 --- a/tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr +++ b/tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr @@ -8,6 +8,6 @@ LL | pub(super) fn step2<'a, 'b: 'a>() -> Tait<'a> { LL | super::step1::<'a, 'b>() | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr b/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr index d5086c7bc..158cfc834 100644 --- a/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr +++ b/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr @@ -17,6 +17,6 @@ LL | let () = y; = note: expected type parameter `impl FnOnce(&mut Header, &mut [EntryMetadata], &mut [Entry<C::EncodedKey, C::EncodedValue>]) -> R` found unit type `()` -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/impl-trait/auto-trait-coherence.next.stderr b/tests/ui/impl-trait/auto-trait-coherence.next.stderr index 7833ac688..3f979d1a5 100644 --- a/tests/ui/impl-trait/auto-trait-coherence.next.stderr +++ b/tests/ui/impl-trait/auto-trait-coherence.next.stderr @@ -7,6 +7,6 @@ LL | impl<T: Send> AnotherTrait for T {} LL | impl AnotherTrait for D<OpaqueType> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/impl-trait/auto-trait-coherence.old.stderr b/tests/ui/impl-trait/auto-trait-coherence.old.stderr index 7833ac688..3f979d1a5 100644 --- a/tests/ui/impl-trait/auto-trait-coherence.old.stderr +++ b/tests/ui/impl-trait/auto-trait-coherence.old.stderr @@ -7,6 +7,6 @@ LL | impl<T: Send> AnotherTrait for T {} LL | impl AnotherTrait for D<OpaqueType> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/impl-trait/auto-trait-coherence.rs b/tests/ui/impl-trait/auto-trait-coherence.rs index a5cd01a87..e4226b200 100644 --- a/tests/ui/impl-trait/auto-trait-coherence.rs +++ b/tests/ui/impl-trait/auto-trait-coherence.rs @@ -1,5 +1,5 @@ // revisions: old next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver // Tests that type alias impls traits do not leak auto-traits for // the purposes of coherence checking diff --git a/tests/ui/impl-trait/auto-trait-leak.stderr b/tests/ui/impl-trait/auto-trait-leak.stderr index 28643ec03..3fab766fa 100644 --- a/tests/ui/impl-trait/auto-trait-leak.stderr +++ b/tests/ui/impl-trait/auto-trait-leak.stderr @@ -22,5 +22,5 @@ note: required by a bound in `send` LL | fn send<T: Send>(_: T) {} | ^^^^ required by this bound in `send` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/autoderef.rs b/tests/ui/impl-trait/autoderef.rs index cd2cdd9e3..48ff8be65 100644 --- a/tests/ui/impl-trait/autoderef.rs +++ b/tests/ui/impl-trait/autoderef.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver // check-pass use std::path::Path; diff --git a/tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr b/tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr index 61fed1629..444f3d668 100644 --- a/tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr +++ b/tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr @@ -8,6 +8,6 @@ LL | impl Into<T> for Foo { - impl<T, U> Into<U> for T where U: From<T>; -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr b/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr index 7c69c4bfe..faaad2769 100644 --- a/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr +++ b/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr @@ -8,6 +8,6 @@ LL | impl Into<T> for Foo { - impl<T, U> Into<U> for T where U: From<T>; -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr b/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr index a1a629bdd..06b5ae6e3 100644 --- a/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr +++ b/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr @@ -4,6 +4,6 @@ error[E0282]: type annotations needed LL | ().foo(|| ()) | ^^^ cannot infer type for type parameter `T` declared on the trait `Foo` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/impl-trait/does-not-live-long-enough.stderr b/tests/ui/impl-trait/does-not-live-long-enough.stderr index 750687e23..cfc132980 100644 --- a/tests/ui/impl-trait/does-not-live-long-enough.stderr +++ b/tests/ui/impl-trait/does-not-live-long-enough.stderr @@ -16,6 +16,6 @@ help: to force the closure to take ownership of `prefix` (and any other referenc LL | self.data.iter().filter(move |s| s.starts_with(prefix)).map(|s| s.as_ref()) | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0373`. diff --git a/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr b/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr index 9b63911da..ea3d7f324 100644 --- a/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr +++ b/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr @@ -11,6 +11,6 @@ LL | | LL | | } | |_____^ expected `&str`, found `()` -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/impl-trait/dyn-trait-return-should-be-impl-trait.stderr b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr index ed9261d0d..4a52f8254 100644 --- a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr +++ b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr @@ -16,7 +16,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) } | doesn't have a size known at compile-time | = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)` - = note: required because it appears within the type `(usize, dyn Trait)` + = note: required because it appears within the type `(usize, (dyn Trait + 'static))` = note: the return type of a function must have a statically known size error[E0308]: mismatched types @@ -37,7 +37,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) } | doesn't have a size known at compile-time | = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)` - = note: required because it appears within the type `(usize, dyn Trait)` + = note: required because it appears within the type `(usize, (dyn Trait + 'static))` = note: the return type of a function must have a statically known size error[E0746]: return type cannot have an unboxed trait object diff --git a/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr b/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr index 83791f0d3..046d35e4e 100644 --- a/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr +++ b/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr @@ -1,4 +1,4 @@ -error: internal compiler error: no errors encountered even though `delay_span_bug` issued +error: internal compiler error: no errors encountered even though `span_delayed_bug` issued error: internal compiler error: {OpaqueTypeKey { def_id: DefId(rpit::{opaque#0}), args: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: no-location (#0), ty: Alias(Opaque, AliasTy { args: [], def_id: DefId(foo::{opaque#0}) }) } }} | diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr b/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr index 84b61dc50..4cd4febc4 100644 --- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr +++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr @@ -1,4 +1,4 @@ -error: {foo<ReEarlyBound(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()} +error: {foo<ReEarlyParam(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()} --> $DIR/erased-regions-in-hidden-ty.rs:11:36 | LL | fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static { diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr b/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr index 84b61dc50..4cd4febc4 100644 --- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr +++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr @@ -1,4 +1,4 @@ -error: {foo<ReEarlyBound(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()} +error: {foo<ReEarlyParam(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()} --> $DIR/erased-regions-in-hidden-ty.rs:11:36 | LL | fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static { diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs index 698123a93..b1f36fc24 100644 --- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs +++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs @@ -1,6 +1,6 @@ // revisions: current next // compile-flags: -Zverbose -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver // normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)" #![feature(rustc_attrs)] diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr index 9c1011018..e8cd16bc3 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr @@ -13,6 +13,6 @@ LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {} | ^^^ - = note: `impl Trait` cannot be explicitly specified as a generic argument -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0107`. diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr index a26460c8e..b2478c4cd 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr @@ -16,6 +16,6 @@ help: add missing generic argument LL | f::<[u8], U>("a", b"a"); | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0107`. diff --git a/tests/ui/impl-trait/extra-item.stderr b/tests/ui/impl-trait/extra-item.stderr index 728bcc0aa..622997072 100644 --- a/tests/ui/impl-trait/extra-item.stderr +++ b/tests/ui/impl-trait/extra-item.stderr @@ -4,6 +4,6 @@ error[E0407]: method `extra` is not a member of trait `extra_item::MyTrait` LL | fn extra() {} | ^^^^^^^^^^^^^ not a member of trait `extra_item::MyTrait` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0407`. diff --git a/tests/ui/impl-trait/fallback_inference.stderr b/tests/ui/impl-trait/fallback_inference.stderr index 4ac3c238f..4f8121ae8 100644 --- a/tests/ui/impl-trait/fallback_inference.stderr +++ b/tests/ui/impl-trait/fallback_inference.stderr @@ -9,6 +9,6 @@ help: consider specifying the generic argument LL | PhantomData::<T> | +++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr index edf3911e2..6e36922b4 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr @@ -4,6 +4,6 @@ error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is LL | fn ice() -> impl AsRef<Fn(&())> { | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr index 30fbba168..2e13ca753 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr @@ -9,6 +9,6 @@ help: add `dyn` keyword before this trait LL | fn ice() -> impl AsRef<dyn Fn(&())> { | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0782`. diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr index 835f7f765..4e453c108 100644 --- a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr +++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr @@ -8,6 +8,6 @@ LL | |x| x | | | hidden type `&u8` captures the anonymous lifetime as defined here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr b/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr index 443ffeb55..a5982a554 100644 --- a/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr +++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr @@ -5,7 +5,7 @@ LL | fn d() -> impl Fn() -> (impl Debug + '_) { | ^^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from -help: consider using the `'static` lifetime +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values | LL | fn d() -> impl Fn() -> (impl Debug + 'static) { | ~~~~~~~ diff --git a/tests/ui/impl-trait/impl-generic-mismatch-ab.stderr b/tests/ui/impl-trait/impl-generic-mismatch-ab.stderr index db97fc2bd..7046e729e 100644 --- a/tests/ui/impl-trait/impl-generic-mismatch-ab.stderr +++ b/tests/ui/impl-trait/impl-generic-mismatch-ab.stderr @@ -18,6 +18,6 @@ LL | fn foo<A: Debug>(&self, a: &A, b: &impl Debug); = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0053`. diff --git a/tests/ui/impl-trait/impl-trait-in-macro.stderr b/tests/ui/impl-trait/impl-trait-in-macro.stderr index 7cfbe3447..4380f47c5 100644 --- a/tests/ui/impl-trait/impl-trait-in-macro.stderr +++ b/tests/ui/impl-trait/impl-trait-in-macro.stderr @@ -17,6 +17,6 @@ LL | a = y; = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters -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/impl-trait/implicit-capture-late.rs b/tests/ui/impl-trait/implicit-capture-late.rs new file mode 100644 index 000000000..8bfb16760 --- /dev/null +++ b/tests/ui/impl-trait/implicit-capture-late.rs @@ -0,0 +1,14 @@ +// known-bug: #117647 + +#![feature(lifetime_capture_rules_2024)] +#![feature(rustc_attrs)] +#![allow(internal_features)] +#![rustc_variance_of_opaques] + +use std::ops::Deref; + +fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> { + Box::new(x) +} + +fn main() {} diff --git a/tests/ui/impl-trait/implicit-capture-late.stderr b/tests/ui/impl-trait/implicit-capture-late.stderr new file mode 100644 index 000000000..9b3a4ff5f --- /dev/null +++ b/tests/ui/impl-trait/implicit-capture-late.stderr @@ -0,0 +1,9 @@ +error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level + --> $DIR/implicit-capture-late.rs:10:36 + | +LL | fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> { + | ^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0657`. diff --git a/tests/ui/impl-trait/in-assoc-type.stderr b/tests/ui/impl-trait/in-assoc-type.stderr index af60da07c..d5b543ea9 100644 --- a/tests/ui/impl-trait/in-assoc-type.stderr +++ b/tests/ui/impl-trait/in-assoc-type.stderr @@ -17,6 +17,6 @@ note: this item must have the opaque type in its signature in order to be able t LL | fn foo(&self) -> <Self as Foo<()>>::Bar {} | ^^^ -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/impl-trait/in-trait/async-and-ret-ref.stderr b/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr index 7c9028a8c..79a86b0a3 100644 --- a/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr +++ b/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr @@ -9,6 +9,6 @@ LL | async fn foo() -> &'static impl T; | = help: consider adding an explicit lifetime bound `<Self as MyTrait>::{opaque#0}: 'static`... -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0310`. diff --git a/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr b/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr index 324eaa37a..c898d17f4 100644 --- a/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr +++ b/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr @@ -28,6 +28,6 @@ help: replace the return type so that it matches the trait LL | fn iter(&self) -> impl Iterator<Item = <Self as Iterable>::Item<'_>> + '_ { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0276`. diff --git a/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr b/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr index 1570b2ecd..86f9cc4d9 100644 --- a/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr +++ b/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr @@ -11,6 +11,6 @@ note: required by a bound in `Wrapper` LL | struct Wrapper<G: Send>(G); | ^^^^ required by this bound in `Wrapper` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/in-trait/deep-match.stderr b/tests/ui/impl-trait/in-trait/deep-match.stderr index a658d8fa0..8ec30239e 100644 --- a/tests/ui/impl-trait/in-trait/deep-match.stderr +++ b/tests/ui/impl-trait/in-trait/deep-match.stderr @@ -10,6 +10,6 @@ LL | fn bar() -> i32 { = note: expected struct `Wrapper<_>` found type `i32` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0053`. diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr b/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr index fcace10cd..77f6945f0 100644 --- a/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr +++ b/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr @@ -6,6 +6,6 @@ LL | 42 | | | expected `String`, found integer -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/impl-trait/in-trait/default-body-type-err.stderr b/tests/ui/impl-trait/in-trait/default-body-type-err.stderr index 596ff1011..6f1ac4bce 100644 --- a/tests/ui/impl-trait/in-trait/default-body-type-err.stderr +++ b/tests/ui/impl-trait/in-trait/default-body-type-err.stderr @@ -7,6 +7,6 @@ LL | LL | &1i32 | ----- return type was inferred to be `&i32` here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0271`. diff --git a/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr b/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr index cd45c6a9c..baee1b5db 100644 --- a/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr +++ b/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr @@ -12,6 +12,6 @@ note: required by a bound in `Foo::{opaque#0}` LL | fn bar() -> impl std::fmt::Display; | ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr index 830e663da..39f70e413 100644 --- a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr +++ b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr @@ -7,6 +7,6 @@ LL | fn foo(&self) -> impl Sized; LL | impl MyTrait for i32 { | ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0046`. diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr index f29ec95d5..9cc4c4b2f 100644 --- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr +++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr @@ -11,6 +11,6 @@ LL | fn bar(self) -> impl Deref<Target = impl Sized>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait cannot be made into an object because method `bar` references an `impl Trait` type in its return type = help: only type `rpitit::Foreign` implements the trait, consider using it directly instead -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0038`. diff --git a/tests/ui/impl-trait/in-trait/generics-mismatch.stderr b/tests/ui/impl-trait/in-trait/generics-mismatch.stderr index 043dbc8db..d847065eb 100644 --- a/tests/ui/impl-trait/in-trait/generics-mismatch.stderr +++ b/tests/ui/impl-trait/in-trait/generics-mismatch.stderr @@ -7,6 +7,6 @@ LL | fn bar(&self) -> impl Sized; LL | fn bar<T>(&self) {} | ^ found 1 type parameter -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0049`. diff --git a/tests/ui/impl-trait/in-trait/issue-102571.stderr b/tests/ui/impl-trait/in-trait/issue-102571.stderr index 872988faf..1f25069a0 100644 --- a/tests/ui/impl-trait/in-trait/issue-102571.stderr +++ b/tests/ui/impl-trait/in-trait/issue-102571.stderr @@ -9,6 +9,6 @@ LL | let () = t.bar(); = note: expected associated type `impl Deref<Target = impl std::fmt::Display + ?Sized>` found unit type `()` -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/impl-trait/in-trait/method-signature-matches.lt.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr index 874a1b95a..59ffea6fb 100644 --- a/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr +++ b/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr @@ -16,6 +16,6 @@ LL | fn early<'early, T>(x: &'early T) -> impl Sized; = note: expected signature `fn(&T)` found signature `fn(&'late ())` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0053`. diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr index e0bd1cc4f..f8980828b 100644 --- a/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr +++ b/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr @@ -15,6 +15,6 @@ LL | fn owo(x: ()) -> impl Sized; = note: expected signature `fn(())` found signature `fn(u8)` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0053`. diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr index 096e96c85..a6fb1a200 100644 --- a/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr +++ b/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr @@ -15,6 +15,6 @@ LL | async fn owo(x: ()) {} = note: expected signature `fn(()) -> _` found signature `fn(u8) -> _` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0053`. diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr index 96eff1a58..0b26e039e 100644 --- a/tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr +++ b/tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr @@ -7,6 +7,6 @@ LL | fn come_on_a_little_more_effort(_: (), _: (), _: ()) -> impl Sized; LL | fn come_on_a_little_more_effort() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 0 -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0050`. diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr index 0fc847051..9226e1f8b 100644 --- a/tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr +++ b/tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr @@ -7,6 +7,6 @@ LL | fn calm_down_please() -> impl Sized; LL | fn calm_down_please(_: (), _: (), _: ()) {} | ^^^^^^^^^^^^^^^^ expected 0 parameters, found 3 -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0050`. diff --git a/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr b/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr index 1fd678a1f..3e763c9f1 100644 --- a/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr +++ b/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr @@ -18,6 +18,6 @@ help: consider introducing lifetime `'missing` here LL | trait Iterable<'missing> { | ++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0261`. diff --git a/tests/ui/impl-trait/in-trait/object-safety-sized.rs b/tests/ui/impl-trait/in-trait/object-safety-sized.rs index 35afe80c9..1a23493a9 100644 --- a/tests/ui/impl-trait/in-trait/object-safety-sized.rs +++ b/tests/ui/impl-trait/in-trait/object-safety-sized.rs @@ -1,6 +1,6 @@ // check-pass // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver fn main() { diff --git a/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr b/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr index e260762d8..4996e6839 100644 --- a/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr +++ b/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr @@ -12,6 +12,6 @@ LL | let x: &str = ().bar(); = note: expected reference `&str` found opaque type `impl std::fmt::Display` -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/impl-trait/in-trait/opaque-variances.rs b/tests/ui/impl-trait/in-trait/opaque-variances.rs index 60bfab0de..63e56051d 100644 --- a/tests/ui/impl-trait/in-trait/opaque-variances.rs +++ b/tests/ui/impl-trait/in-trait/opaque-variances.rs @@ -1,5 +1,5 @@ // check-pass -// compile-flags: -Ztrait-solver=next +// compile-flags: -Znext-solver fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Sized { () diff --git a/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs new file mode 100644 index 000000000..33d348703 --- /dev/null +++ b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs @@ -0,0 +1,14 @@ +// check-pass + +pub fn main() {} + +pub trait Iced { + fn get(&self) -> &impl Sized; +} + +/// Impl causes ICE +impl Iced for () { + fn get(&self) -> &impl Sized { + &() + } +} diff --git a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr index 181d6a284..db587d069 100644 --- a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr +++ b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr @@ -11,6 +11,6 @@ note: required by a bound in `Foo::{opaque#0}` LL | fn foo<F2>(self) -> impl Foo<T>; | ^^^^^^ required by this bound in `Foo::{opaque#0}` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr b/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr index afc59cc5b..5ace64b69 100644 --- a/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr +++ b/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr @@ -11,6 +11,6 @@ note: but the referenced data is only valid for the lifetime `'a` as defined her LL | fn extend<'a: 'a>(s: &'a str) -> (Option<&'static &'a ()>, &'static str) | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0491`. diff --git a/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr b/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr index 7e1a8f083..3430055da 100644 --- a/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr +++ b/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr @@ -11,6 +11,6 @@ note: but the referenced data is only valid for the anonymous lifetime defined h LL | fn extend(s: &str) -> (Option<&'static &'_ ()>, &'static str) { | ^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0491`. diff --git a/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr b/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr index 6e4a5bb5d..73ada8d70 100644 --- a/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr +++ b/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr @@ -4,6 +4,6 @@ error[E0412]: cannot find type `Missing` in this scope LL | fn w() -> impl Deref<Target = Missing<impl Sized>>; | ^^^^^^^ not found in this scope -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0412`. diff --git a/tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr b/tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr index 729963a81..b8ac826ad 100644 --- a/tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr +++ b/tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr @@ -12,6 +12,6 @@ LL | fn bar() -> impl Sized { = note: expected struct `String` found opaque type `impl Sized` -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/impl-trait/in-trait/signature-mismatch.failure.stderr b/tests/ui/impl-trait/in-trait/signature-mismatch.failure.stderr index 468cf12f1..0cd76815a 100644 --- a/tests/ui/impl-trait/in-trait/signature-mismatch.failure.stderr +++ b/tests/ui/impl-trait/in-trait/signature-mismatch.failure.stderr @@ -9,6 +9,6 @@ LL | ) -> impl Future<Output = Vec<u8>> { | | | ...but data from `buff` is returned here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0623`. diff --git a/tests/ui/impl-trait/in-trait/specialization-broken.stderr b/tests/ui/impl-trait/in-trait/specialization-broken.stderr index 25c0adedd..b8a8e2401 100644 --- a/tests/ui/impl-trait/in-trait/specialization-broken.stderr +++ b/tests/ui/impl-trait/in-trait/specialization-broken.stderr @@ -15,8 +15,8 @@ note: type in trait | LL | fn bar(&self) -> impl Sized; | ^^^^^^^^^^ - = note: expected signature `fn(&U) -> impl Sized` - found signature `fn(&U) -> U` + = note: expected signature `fn(&_) -> impl Sized` + found signature `fn(&_) -> U` error: method with return-position `impl Trait` in trait cannot be specialized --> $DIR/specialization-broken.rs:15:5 diff --git a/tests/ui/impl-trait/in-trait/suggest-missing-item.stderr b/tests/ui/impl-trait/in-trait/suggest-missing-item.stderr index cec94e39a..cf68ed870 100644 --- a/tests/ui/impl-trait/in-trait/suggest-missing-item.stderr +++ b/tests/ui/impl-trait/in-trait/suggest-missing-item.stderr @@ -16,6 +16,6 @@ LL | async fn baz(&self) -> &i32; LL | impl Trait for S {} | ^^^^^^^^^^^^^^^^ missing `foo`, `bar`, `test`, `baz` in implementation -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0046`. diff --git a/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr b/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr index 2836e9c78..eed4c0771 100644 --- a/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr +++ b/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr @@ -7,6 +7,6 @@ LL | fn bar<T>() -> impl Sized; LL | fn bar() -> impl Sized {} | ^ found 0 type parameters -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0049`. diff --git a/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr b/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr index 61a0f8454..4c5a42c0b 100644 --- a/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr +++ b/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr @@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, LL | impl<'a, T> Foo for T { | ^^ unconstrained lifetime parameter -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0207`. diff --git a/tests/ui/impl-trait/issue-100075-2.stderr b/tests/ui/impl-trait/issue-100075-2.stderr index d2dbd8c62..b3b696775 100644 --- a/tests/ui/impl-trait/issue-100075-2.stderr +++ b/tests/ui/impl-trait/issue-100075-2.stderr @@ -19,6 +19,6 @@ LL | fn opaque<T>(t: T) -> impl Sized { LL | opaque(Some(t)) | --------------- returning here with type `impl Sized` -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0720`. diff --git a/tests/ui/impl-trait/issue-100075.stderr b/tests/ui/impl-trait/issue-100075.stderr index 267ecfdae..759634892 100644 --- a/tests/ui/impl-trait/issue-100075.stderr +++ b/tests/ui/impl-trait/issue-100075.stderr @@ -7,6 +7,6 @@ LL | fn _g<T>(t: &'static T) -> &'static impl Marker { LL | return _g(t); | ----- returning here with type `&impl Marker` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0720`. diff --git a/tests/ui/impl-trait/issue-103181-1.current.stderr b/tests/ui/impl-trait/issue-103181-1.current.stderr index e87a9d28a..83410dfc6 100644 --- a/tests/ui/impl-trait/issue-103181-1.current.stderr +++ b/tests/ui/impl-trait/issue-103181-1.current.stderr @@ -7,6 +7,6 @@ LL | } LL | impl HttpBody for () { | ^^^^^^^^^^^^^^^^^^^^ missing `Error` in implementation -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0046`. diff --git a/tests/ui/impl-trait/issue-103181-1.next.stderr b/tests/ui/impl-trait/issue-103181-1.next.stderr index e87a9d28a..83410dfc6 100644 --- a/tests/ui/impl-trait/issue-103181-1.next.stderr +++ b/tests/ui/impl-trait/issue-103181-1.next.stderr @@ -7,6 +7,6 @@ LL | } LL | impl HttpBody for () { | ^^^^^^^^^^^^^^^^^^^^ missing `Error` in implementation -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0046`. diff --git a/tests/ui/impl-trait/issue-103181-1.rs b/tests/ui/impl-trait/issue-103181-1.rs index 5154abcd6..14c813cf0 100644 --- a/tests/ui/impl-trait/issue-103181-1.rs +++ b/tests/ui/impl-trait/issue-103181-1.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver // edition:2021 mod hyper { diff --git a/tests/ui/impl-trait/issue-103181-2.stderr b/tests/ui/impl-trait/issue-103181-2.stderr index 5eb2dd918..cef4449db 100644 --- a/tests/ui/impl-trait/issue-103181-2.stderr +++ b/tests/ui/impl-trait/issue-103181-2.stderr @@ -4,6 +4,6 @@ error[E0425]: cannot find value `ident_error` in this scope LL | ident_error; | ^^^^^^^^^^^ not found in this scope -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/impl-trait/issue-35668.stderr b/tests/ui/impl-trait/issue-35668.stderr index 84add5799..ba02d2898 100644 --- a/tests/ui/impl-trait/issue-35668.stderr +++ b/tests/ui/impl-trait/issue-35668.stderr @@ -11,6 +11,6 @@ help: consider introducing a `where` clause, but there might be an alternative b LL | fn func<'a, T>(a: &'a [T]) -> impl Iterator<Item=&'a T> where &T: Mul<&T> { | +++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0369`. diff --git a/tests/ui/impl-trait/issue-54966.stderr b/tests/ui/impl-trait/issue-54966.stderr index aa9a61cb5..4024c5afa 100644 --- a/tests/ui/impl-trait/issue-54966.stderr +++ b/tests/ui/impl-trait/issue-54966.stderr @@ -4,6 +4,6 @@ error[E0412]: cannot find type `Oper` in this scope LL | fn generate_duration() -> Oper<impl FnMut()> {} | ^^^^ not found in this scope -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0412`. diff --git a/tests/ui/impl-trait/issue-55872-3.stderr b/tests/ui/impl-trait/issue-55872-3.stderr index b542b6141..9af0fad9c 100644 --- a/tests/ui/impl-trait/issue-55872-3.stderr +++ b/tests/ui/impl-trait/issue-55872-3.stderr @@ -4,6 +4,6 @@ error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:15:9: 15:17}: LL | fn foo<T>() -> Self::E { | ^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:15:9: 15:17}` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/issue-55872.stderr b/tests/ui/impl-trait/issue-55872.stderr index cb370fbe1..4ff8527bb 100644 --- a/tests/ui/impl-trait/issue-55872.stderr +++ b/tests/ui/impl-trait/issue-55872.stderr @@ -4,5 +4,5 @@ error: type parameter `T` is part of concrete type but not used in parameter lis LL | || () | ^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/issue-86465.stderr b/tests/ui/impl-trait/issue-86465.stderr index 90d6904ed..e330d178d 100644 --- a/tests/ui/impl-trait/issue-86465.stderr +++ b/tests/ui/impl-trait/issue-86465.stderr @@ -7,5 +7,5 @@ LL | (a, a) | expected `&'a u32`, got `&'b u32` | this expression supplies two conflicting concrete types for the same opaque type -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/issue-87450.stderr b/tests/ui/impl-trait/issue-87450.stderr index 173fca63f..9567e0965 100644 --- a/tests/ui/impl-trait/issue-87450.stderr +++ b/tests/ui/impl-trait/issue-87450.stderr @@ -22,6 +22,6 @@ LL | wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo()))))))) LL | fn wrap(f: impl Fn()) -> impl Fn() { | --------- returning this opaque type `impl Fn()` -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0720`. diff --git a/tests/ui/impl-trait/issue-99914.stderr b/tests/ui/impl-trait/issue-99914.stderr index c86e9eadc..06e85e521 100644 --- a/tests/ui/impl-trait/issue-99914.stderr +++ b/tests/ui/impl-trait/issue-99914.stderr @@ -9,6 +9,6 @@ help: try wrapping the expression in `Ok` LL | t.and_then(|t| -> _ { Ok(bar(t)) }); | +++ + -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/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr b/tests/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr index 9150d957d..e5d718393 100644 --- a/tests/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr +++ b/tests/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr @@ -14,6 +14,6 @@ note: `Foo` defines an item `foo`, perhaps you need to implement it LL | trait Foo<A> { | ^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`. diff --git a/tests/ui/impl-trait/issues/issue-54600.stderr b/tests/ui/impl-trait/issues/issue-54600.stderr index 9a8e3675b..946ad74b8 100644 --- a/tests/ui/impl-trait/issues/issue-54600.stderr +++ b/tests/ui/impl-trait/issues/issue-54600.stderr @@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument LL | let x: Option<impl Debug> = Some(44_u32); | ^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0562`. diff --git a/tests/ui/impl-trait/issues/issue-54840.stderr b/tests/ui/impl-trait/issues/issue-54840.stderr index 67cabf449..c4ab79f11 100644 --- a/tests/ui/impl-trait/issues/issue-54840.stderr +++ b/tests/ui/impl-trait/issues/issue-54840.stderr @@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument LL | let j: &impl Add = &i; | ^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0562`. diff --git a/tests/ui/impl-trait/issues/issue-54895.stderr b/tests/ui/impl-trait/issues/issue-54895.stderr index 7d22f027a..999ffd521 100644 --- a/tests/ui/impl-trait/issues/issue-54895.stderr +++ b/tests/ui/impl-trait/issues/issue-54895.stderr @@ -10,5 +10,5 @@ note: lifetime declared here LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> { | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr b/tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr index 6bebbc01f..83d0d7765 100644 --- a/tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr +++ b/tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr @@ -7,6 +7,6 @@ LL | pub fn demo(_: impl Quux<Assoc=Deeper<impl Foo<impl Bar>>>) { } | | nested `impl Trait` here | outer `impl Trait` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0666`. diff --git a/tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr b/tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr index e31393181..55f47785f 100644 --- a/tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr +++ b/tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr @@ -4,6 +4,6 @@ error[E0667]: `impl Trait` is not allowed in path parameters LL | pub fn demo(_: impl Quux<(), Assoc=<() as Quux<impl Bar>>::Assoc>) { } | ^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0667`. diff --git a/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr b/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr index 8d3d4b5e2..0e105817b 100644 --- a/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr +++ b/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr @@ -7,6 +7,6 @@ LL | pub fn demo(_: impl Quux<Assoc=impl Foo<impl Bar>>) { } | | nested `impl Trait` here | outer `impl Trait` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0666`. diff --git a/tests/ui/impl-trait/issues/issue-58504.stderr b/tests/ui/impl-trait/issues/issue-58504.stderr index 49376f559..e67e48728 100644 --- a/tests/ui/impl-trait/issues/issue-58504.stderr +++ b/tests/ui/impl-trait/issues/issue-58504.stderr @@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument LL | let gens: [impl Coroutine<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0562`. diff --git a/tests/ui/impl-trait/issues/issue-67830.stderr b/tests/ui/impl-trait/issues/issue-67830.stderr index d3ea8cb03..17cfa151a 100644 --- a/tests/ui/impl-trait/issues/issue-67830.stderr +++ b/tests/ui/impl-trait/issues/issue-67830.stderr @@ -10,5 +10,5 @@ note: lifetime declared here LL | fn test() -> impl for<'a> MyFn<&'a A, Output=impl Iterator + 'a> { | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/issues/issue-70877.stderr b/tests/ui/impl-trait/issues/issue-70877.stderr index ee140e6f6..274139f01 100644 --- a/tests/ui/impl-trait/issues/issue-70877.stderr +++ b/tests/ui/impl-trait/issues/issue-70877.stderr @@ -15,5 +15,5 @@ note: opaque type being used as hidden type LL | type FooRet = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/issues/issue-70971.stderr b/tests/ui/impl-trait/issues/issue-70971.stderr index 5609f8b9b..fcc67291e 100644 --- a/tests/ui/impl-trait/issues/issue-70971.stderr +++ b/tests/ui/impl-trait/issues/issue-70971.stderr @@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument LL | let x : (impl Copy,) = (true,); | ^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0562`. diff --git a/tests/ui/impl-trait/issues/issue-82139.stderr b/tests/ui/impl-trait/issues/issue-82139.stderr index 0adcd4a7a..b87084433 100644 --- a/tests/ui/impl-trait/issues/issue-82139.stderr +++ b/tests/ui/impl-trait/issues/issue-82139.stderr @@ -4,6 +4,6 @@ error[E0425]: cannot find value `j` in this scope LL | Some(42).map(|_| j) | ^ not found in this scope -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/impl-trait/issues/issue-83919.stderr b/tests/ui/impl-trait/issues/issue-83919.stderr index d39dcf7fb..200257235 100644 --- a/tests/ui/impl-trait/issues/issue-83919.stderr +++ b/tests/ui/impl-trait/issues/issue-83919.stderr @@ -7,6 +7,6 @@ LL | fn get_fut(&self) -> Self::Fut { = help: the trait `Future` is not implemented for `{integer}` = note: {integer} must be a future or must implement `IntoFuture` to be awaited -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/issues/issue-84073.stderr b/tests/ui/impl-trait/issues/issue-84073.stderr index b4be16ff0..d03e458ae 100644 --- a/tests/ui/impl-trait/issues/issue-84073.stderr +++ b/tests/ui/impl-trait/issues/issue-84073.stderr @@ -9,6 +9,6 @@ help: consider giving this closure parameter an explicit type, where the type fo LL | Race::new(|race: RaceBuilder<T, Never<T>>| race.when()); | ++++++++++++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/impl-trait/issues/issue-84919.stderr b/tests/ui/impl-trait/issues/issue-84919.stderr index 20b131b8b..963865efa 100644 --- a/tests/ui/impl-trait/issues/issue-84919.stderr +++ b/tests/ui/impl-trait/issues/issue-84919.stderr @@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument LL | let _x: impl Trait = (); | ^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0562`. diff --git a/tests/ui/impl-trait/issues/issue-86642.stderr b/tests/ui/impl-trait/issues/issue-86642.stderr index 6d3be3fff..3ad18a132 100644 --- a/tests/ui/impl-trait/issues/issue-86642.stderr +++ b/tests/ui/impl-trait/issues/issue-86642.stderr @@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument LL | static x: impl Fn(&str) -> Result<&str, ()> = move |source| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0562`. diff --git a/tests/ui/impl-trait/issues/issue-87295.stderr b/tests/ui/impl-trait/issues/issue-87295.stderr index 3fe4ee73c..e9a635f24 100644 --- a/tests/ui/impl-trait/issues/issue-87295.stderr +++ b/tests/ui/impl-trait/issues/issue-87295.stderr @@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument LL | let _do_not_waste: Struct<impl Trait<Output = i32>> = Struct::new(()); | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0562`. diff --git a/tests/ui/impl-trait/issues/issue-87340.stderr b/tests/ui/impl-trait/issues/issue-87340.stderr index 2ab1e6a03..8513cb288 100644 --- a/tests/ui/impl-trait/issues/issue-87340.stderr +++ b/tests/ui/impl-trait/issues/issue-87340.stderr @@ -4,6 +4,6 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self LL | impl<T> X for () { | ^ unconstrained type parameter -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0207`. diff --git a/tests/ui/impl-trait/issues/issue-88236.stderr b/tests/ui/impl-trait/issues/issue-88236.stderr index 7a4cc57b0..6cf1a42d6 100644 --- a/tests/ui/impl-trait/issues/issue-88236.stderr +++ b/tests/ui/impl-trait/issues/issue-88236.stderr @@ -10,5 +10,5 @@ note: lifetime declared here LL | fn make_impl() -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {} | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/issues/issue-92305.stderr b/tests/ui/impl-trait/issues/issue-92305.stderr index 86d7184da..88fb1fb27 100644 --- a/tests/ui/impl-trait/issues/issue-92305.stderr +++ b/tests/ui/impl-trait/issues/issue-92305.stderr @@ -9,6 +9,6 @@ help: add missing generic argument LL | fn f<T>(data: &[T]) -> impl Iterator<Item = Vec<T>> { | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0107`. diff --git a/tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr b/tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr index f0dceb1b1..a83e0df91 100644 --- a/tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr +++ b/tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr @@ -20,6 +20,6 @@ note: required by a bound in `Foo::Item` LL | type Item: Bar<Other = Self>; | ^^^^^^^^^^^^ required by this bound in `Foo::Item` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0271`. diff --git a/tests/ui/impl-trait/method-suggestion-no-duplication.stderr b/tests/ui/impl-trait/method-suggestion-no-duplication.stderr index b727b2ca0..c401269da 100644 --- a/tests/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/tests/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -11,6 +11,6 @@ LL | foo(|s| s.is_empty()); = note: the following trait defines an item `is_empty`, perhaps you need to implement it: candidate #1: `ExactSizeIterator` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`. diff --git a/tests/ui/impl-trait/multiple-defining-usages-in-body.stderr b/tests/ui/impl-trait/multiple-defining-usages-in-body.stderr index f3c090408..faa5d3ba4 100644 --- a/tests/ui/impl-trait/multiple-defining-usages-in-body.stderr +++ b/tests/ui/impl-trait/multiple-defining-usages-in-body.stderr @@ -22,5 +22,5 @@ note: previous use here LL | let a: T = foo::<T, U>(); | ^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr b/tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr index 5b0b1cc5e..b968592be 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr +++ b/tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr @@ -10,6 +10,6 @@ LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { LL | u.0 | ^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr b/tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr index ccd004003..c511081a8 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr +++ b/tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr @@ -11,5 +11,5 @@ LL | let _: &'b i32 = *u.0; | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr b/tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr index 01d9f506a..00709ee74 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr +++ b/tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr @@ -11,5 +11,5 @@ LL | let _: &'b i32 = *u.0; | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr index 68ac22a05..4d4ba58c9 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr @@ -14,6 +14,6 @@ help: to declare that `impl Trait<'d, 'e>` captures `'b`, you can add an explici LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e> + 'b | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr index 493a9e66e..060eaa7e6 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr @@ -14,6 +14,6 @@ help: to declare that `impl Trait<'a, 'b>` captures `'b`, you can add an explici LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b> + 'b | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/negative-reasoning.stderr b/tests/ui/impl-trait/negative-reasoning.stderr index ddce5e7ec..3cb4be16f 100644 --- a/tests/ui/impl-trait/negative-reasoning.stderr +++ b/tests/ui/impl-trait/negative-reasoning.stderr @@ -9,6 +9,6 @@ LL | impl AnotherTrait for D<OpaqueType> { | = note: upstream crates may add a new impl of trait `std::marker::FnPtr` for type `OpaqueType` in future versions -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/impl-trait/nested-return-type4.stderr b/tests/ui/impl-trait/nested-return-type4.stderr index a1e2d227f..14d51a1b0 100644 --- a/tests/ui/impl-trait/nested-return-type4.stderr +++ b/tests/ui/impl-trait/nested-return-type4.stderr @@ -17,6 +17,6 @@ help: to declare that `impl Sized` captures `'s`, you can add an explicit `'s` l LL | fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized + 's> { | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/nested-rpit-hrtb-2.stderr b/tests/ui/impl-trait/nested-rpit-hrtb-2.stderr index 71d1d45f4..0fcacc19c 100644 --- a/tests/ui/impl-trait/nested-rpit-hrtb-2.stderr +++ b/tests/ui/impl-trait/nested-rpit-hrtb-2.stderr @@ -7,6 +7,6 @@ LL | fn test() -> impl for<'a> Trait<'a, Assoc = impl Sized> {} | | opaque type defined here | hidden type `&'a str` captures the lifetime `'a` as defined here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/no-trait.stderr b/tests/ui/impl-trait/no-trait.stderr index 3a636f252..a58fa5cd7 100644 --- a/tests/ui/impl-trait/no-trait.stderr +++ b/tests/ui/impl-trait/no-trait.stderr @@ -4,5 +4,5 @@ error: at least one trait must be specified LL | fn f() -> impl 'static {} | ^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/normalize-tait-in-const.stderr b/tests/ui/impl-trait/normalize-tait-in-const.stderr index ada8fd7fa..e0513433b 100644 --- a/tests/ui/impl-trait/normalize-tait-in-const.stderr +++ b/tests/ui/impl-trait/normalize-tait-in-const.stderr @@ -4,5 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits LL | const fn with_positive<F: ~const for<'a> Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) { | ^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr b/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr index 234780534..5ade6a69d 100644 --- a/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr +++ b/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr @@ -6,6 +6,6 @@ LL | fn run() -> Foo<impl Future<Output = ()>> { | = note: cannot satisfy `_: Future` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0283`. diff --git a/tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr b/tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr index a4ff51047..c4ea44740 100644 --- a/tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr +++ b/tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr @@ -15,6 +15,6 @@ note: required for `()` to implement `Test` LL | impl<T> Test for T where T: Super<Assoc = ()> {} | ^^^^ ^ ---------- unsatisfied trait bound introduced here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0271`. diff --git a/tests/ui/impl-trait/recursive-coroutine.current.stderr b/tests/ui/impl-trait/recursive-coroutine.current.stderr new file mode 100644 index 000000000..e838634ed --- /dev/null +++ b/tests/ui/impl-trait/recursive-coroutine.current.stderr @@ -0,0 +1,12 @@ +error[E0720]: cannot resolve opaque type + --> $DIR/recursive-coroutine.rs:7:13 + | +LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type +... +LL | let mut gen = Box::pin(foo()); + | ------- coroutine captures itself here + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0720`. diff --git a/tests/ui/impl-trait/recursive-coroutine.next.stderr b/tests/ui/impl-trait/recursive-coroutine.next.stderr new file mode 100644 index 000000000..e838634ed --- /dev/null +++ b/tests/ui/impl-trait/recursive-coroutine.next.stderr @@ -0,0 +1,12 @@ +error[E0720]: cannot resolve opaque type + --> $DIR/recursive-coroutine.rs:7:13 + | +LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type +... +LL | let mut gen = Box::pin(foo()); + | ------- coroutine captures itself here + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0720`. diff --git a/tests/ui/impl-trait/recursive-coroutine.rs b/tests/ui/impl-trait/recursive-coroutine.rs index 6351cef95..b82fe134a 100644 --- a/tests/ui/impl-trait/recursive-coroutine.rs +++ b/tests/ui/impl-trait/recursive-coroutine.rs @@ -1,3 +1,5 @@ +// revisions: current next +//[next] compile-flags: -Znext-solver #![feature(coroutines, coroutine_trait)] use std::ops::{Coroutine, CoroutineState}; diff --git a/tests/ui/impl-trait/recursive-coroutine.stderr b/tests/ui/impl-trait/recursive-coroutine.stderr deleted file mode 100644 index d36a58a86..000000000 --- a/tests/ui/impl-trait/recursive-coroutine.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0720]: cannot resolve opaque type - --> $DIR/recursive-coroutine.rs:5:13 - | -LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type -... -LL | let mut gen = Box::pin(foo()); - | ------- coroutine captures itself here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0720`. diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr index fe765271b..07ac1a37e 100644 --- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr +++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr @@ -18,8 +18,8 @@ LL | fn eq(&self, _other: &(Foo, i32)) -> bool { | expected `a::Bar`, found opaque type | help: change the parameter type to match the trait: `&(a::Bar, i32)` | - = note: expected signature `fn(&a::Bar, &(a::Bar, i32)) -> _` - found signature `fn(&a::Bar, &(a::Foo, i32)) -> _` + = note: expected signature `fn(&a::Bar, &(a::Bar, _)) -> _` + found signature `fn(&a::Bar, &(a::Foo, _)) -> _` error: unconstrained opaque type --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:18:16 @@ -41,8 +41,8 @@ LL | fn eq(&self, _other: &(Bar, i32)) -> bool { | expected opaque type, found `b::Bar` | help: change the parameter type to match the trait: `&(b::Foo, i32)` | - = note: expected signature `fn(&b::Bar, &(b::Foo, i32)) -> _` - found signature `fn(&b::Bar, &(b::Bar, i32)) -> _` + = note: expected signature `fn(&b::Bar, &(b::Foo, _)) -> _` + found signature `fn(&b::Bar, &(b::Bar, _)) -> _` note: this item must have the opaque type in its signature in order to be able to register hidden types --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:24:12 | diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr index b98b859a9..bc810c0f8 100644 --- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr +++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr @@ -10,6 +10,6 @@ LL | Bar = help: the trait `PartialEq<(Foo, i32)>` is not implemented for `Bar` = help: the trait `PartialEq<(Bar, i32)>` is implemented for `Bar` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/region-escape-via-bound.stderr b/tests/ui/impl-trait/region-escape-via-bound.stderr index e4556bc21..43f0eeeb5 100644 --- a/tests/ui/impl-trait/region-escape-via-bound.stderr +++ b/tests/ui/impl-trait/region-escape-via-bound.stderr @@ -14,6 +14,6 @@ help: to declare that `impl Trait<'y>` captures `'x`, you can add an explicit `' LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y> + 'x | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/reveal-during-codegen.rs b/tests/ui/impl-trait/reveal-during-codegen.rs index 11463772e..7b2ca9c33 100644 --- a/tests/ui/impl-trait/reveal-during-codegen.rs +++ b/tests/ui/impl-trait/reveal-during-codegen.rs @@ -1,6 +1,6 @@ // build-pass // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver fn test() -> Option<impl Sized> { Some("") diff --git a/tests/ui/impl-trait/rpit-not-sized.stderr b/tests/ui/impl-trait/rpit-not-sized.stderr index 608c94fc0..7fe275f06 100644 --- a/tests/ui/impl-trait/rpit-not-sized.stderr +++ b/tests/ui/impl-trait/rpit-not-sized.stderr @@ -7,6 +7,6 @@ LL | fn foo() -> impl ?Sized { = help: the trait `Sized` is not implemented for `impl ?Sized` = note: the return type of a function must have a statically known size -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/suggest-calling-rpit-closure.stderr b/tests/ui/impl-trait/suggest-calling-rpit-closure.stderr index c10a856d8..b0ae10b8d 100644 --- a/tests/ui/impl-trait/suggest-calling-rpit-closure.stderr +++ b/tests/ui/impl-trait/suggest-calling-rpit-closure.stderr @@ -16,6 +16,6 @@ help: use parentheses to call this opaque type LL | opaque()() | ++ -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/impl-trait/two_tait_defining_each_other.current.stderr b/tests/ui/impl-trait/two_tait_defining_each_other.current.stderr new file mode 100644 index 000000000..b60529ed0 --- /dev/null +++ b/tests/ui/impl-trait/two_tait_defining_each_other.current.stderr @@ -0,0 +1,19 @@ +error: opaque type's hidden type cannot be another opaque type from the same scope + --> $DIR/two_tait_defining_each_other.rs:16:5 + | +LL | x // A's hidden type is `Bar`, because all the hidden types of `B` are compared with each other + | ^ one of the two opaque types used here has to be outside its defining scope + | +note: opaque type whose hidden type is being assigned + --> $DIR/two_tait_defining_each_other.rs:8:10 + | +LL | type B = impl Foo; + | ^^^^^^^^ +note: opaque type being used as hidden type + --> $DIR/two_tait_defining_each_other.rs:7:10 + | +LL | type A = impl Foo; + | ^^^^^^^^ + +error: aborting due to 1 previous error + diff --git a/tests/ui/impl-trait/two_tait_defining_each_other.rs b/tests/ui/impl-trait/two_tait_defining_each_other.rs index 6eb2a11b2..6a9e33500 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other.rs @@ -1,3 +1,7 @@ +// revisions: current next +//[next] compile-flags: -Znext-solver +//[next] check-pass + #![feature(type_alias_impl_trait)] type A = impl Foo; @@ -10,7 +14,7 @@ fn muh(x: A) -> B { return Bar; // B's hidden type is Bar } x // A's hidden type is `Bar`, because all the hidden types of `B` are compared with each other - //~^ ERROR opaque type's hidden type cannot be another opaque type + //[current]~^ ERROR opaque type's hidden type cannot be another opaque type } struct Bar; diff --git a/tests/ui/impl-trait/two_tait_defining_each_other.stderr b/tests/ui/impl-trait/two_tait_defining_each_other.stderr deleted file mode 100644 index 1a42ac525..000000000 --- a/tests/ui/impl-trait/two_tait_defining_each_other.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error: opaque type's hidden type cannot be another opaque type from the same scope - --> $DIR/two_tait_defining_each_other.rs:12:5 - | -LL | x // A's hidden type is `Bar`, because all the hidden types of `B` are compared with each other - | ^ one of the two opaque types used here has to be outside its defining scope - | -note: opaque type whose hidden type is being assigned - --> $DIR/two_tait_defining_each_other.rs:4:10 - | -LL | type B = impl Foo; - | ^^^^^^^^ -note: opaque type being used as hidden type - --> $DIR/two_tait_defining_each_other.rs:3:10 - | -LL | type A = impl Foo; - | ^^^^^^^^ - -error: aborting due to previous error - diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr b/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr new file mode 100644 index 000000000..33866451c --- /dev/null +++ b/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr @@ -0,0 +1,27 @@ +error: unconstrained opaque type + --> $DIR/two_tait_defining_each_other2.rs:5:10 + | +LL | type A = impl Foo; + | ^^^^^^^^ + | + = note: `A` must be used in combination with a concrete type within the same module + +error: opaque type's hidden type cannot be another opaque type from the same scope + --> $DIR/two_tait_defining_each_other2.rs:11:5 + | +LL | x // B's hidden type is A (opaquely) + | ^ one of the two opaque types used here has to be outside its defining scope + | +note: opaque type whose hidden type is being assigned + --> $DIR/two_tait_defining_each_other2.rs:6:10 + | +LL | type B = impl Foo; + | ^^^^^^^^ +note: opaque type being used as hidden type + --> $DIR/two_tait_defining_each_other2.rs:5:10 + | +LL | type A = impl Foo; + | ^^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr b/tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr new file mode 100644 index 000000000..e49d1d18b --- /dev/null +++ b/tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr @@ -0,0 +1,9 @@ +error[E0284]: type annotations needed: cannot satisfy `A <: B` + --> $DIR/two_tait_defining_each_other2.rs:11:5 + | +LL | x // B's hidden type is A (opaquely) + | ^ cannot satisfy `A <: B` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0284`. diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.rs b/tests/ui/impl-trait/two_tait_defining_each_other2.rs index 05b096680..8a79af197 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other2.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other2.rs @@ -1,13 +1,16 @@ +// revisions: current next +//[next] compile-flags: -Znext-solver #![feature(type_alias_impl_trait)] -type A = impl Foo; //~ ERROR unconstrained opaque type +type A = impl Foo; //[current]~ ERROR unconstrained opaque type type B = impl Foo; trait Foo {} fn muh(x: A) -> B { x // B's hidden type is A (opaquely) - //~^ ERROR opaque type's hidden type cannot be another opaque type + //[current]~^ ERROR opaque type's hidden type cannot be another opaque type + //[next]~^^ ERROR type annotations needed: cannot satisfy `A <: B` } struct Bar; diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.stderr b/tests/ui/impl-trait/two_tait_defining_each_other2.stderr deleted file mode 100644 index 4d8f96de1..000000000 --- a/tests/ui/impl-trait/two_tait_defining_each_other2.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: unconstrained opaque type - --> $DIR/two_tait_defining_each_other2.rs:3:10 - | -LL | type A = impl Foo; - | ^^^^^^^^ - | - = note: `A` must be used in combination with a concrete type within the same module - -error: opaque type's hidden type cannot be another opaque type from the same scope - --> $DIR/two_tait_defining_each_other2.rs:9:5 - | -LL | x // B's hidden type is A (opaquely) - | ^ one of the two opaque types used here has to be outside its defining scope - | -note: opaque type whose hidden type is being assigned - --> $DIR/two_tait_defining_each_other2.rs:4:10 - | -LL | type B = impl Foo; - | ^^^^^^^^ -note: opaque type being used as hidden type - --> $DIR/two_tait_defining_each_other2.rs:3:10 - | -LL | type A = impl Foo; - | ^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/tests/ui/impl-trait/two_tait_defining_each_other3.current.stderr b/tests/ui/impl-trait/two_tait_defining_each_other3.current.stderr new file mode 100644 index 000000000..1dccfd17a --- /dev/null +++ b/tests/ui/impl-trait/two_tait_defining_each_other3.current.stderr @@ -0,0 +1,19 @@ +error: opaque type's hidden type cannot be another opaque type from the same scope + --> $DIR/two_tait_defining_each_other3.rs:13:16 + | +LL | return x; // B's hidden type is A (opaquely) + | ^ one of the two opaque types used here has to be outside its defining scope + | +note: opaque type whose hidden type is being assigned + --> $DIR/two_tait_defining_each_other3.rs:7:10 + | +LL | type B = impl Foo; + | ^^^^^^^^ +note: opaque type being used as hidden type + --> $DIR/two_tait_defining_each_other3.rs:6:10 + | +LL | type A = impl Foo; + | ^^^^^^^^ + +error: aborting due to 1 previous error + diff --git a/tests/ui/impl-trait/two_tait_defining_each_other3.rs b/tests/ui/impl-trait/two_tait_defining_each_other3.rs index 37f8ae1b8..55def937f 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other3.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other3.rs @@ -1,3 +1,6 @@ +// revisions: current next +//[next] compile-flags: -Znext-solver +//[next] check-pass #![feature(type_alias_impl_trait)] type A = impl Foo; @@ -8,7 +11,7 @@ trait Foo {} fn muh(x: A) -> B { if false { return x; // B's hidden type is A (opaquely) - //~^ ERROR opaque type's hidden type cannot be another opaque type + //[current]~^ ERROR opaque type's hidden type cannot be another opaque type } Bar // A's hidden type is `Bar`, because all the return types are compared with each other } diff --git a/tests/ui/impl-trait/two_tait_defining_each_other3.stderr b/tests/ui/impl-trait/two_tait_defining_each_other3.stderr deleted file mode 100644 index b06dc16d5..000000000 --- a/tests/ui/impl-trait/two_tait_defining_each_other3.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error: opaque type's hidden type cannot be another opaque type from the same scope - --> $DIR/two_tait_defining_each_other3.rs:10:16 - | -LL | return x; // B's hidden type is A (opaquely) - | ^ one of the two opaque types used here has to be outside its defining scope - | -note: opaque type whose hidden type is being assigned - --> $DIR/two_tait_defining_each_other3.rs:4:10 - | -LL | type B = impl Foo; - | ^^^^^^^^ -note: opaque type being used as hidden type - --> $DIR/two_tait_defining_each_other3.rs:3:10 - | -LL | type A = impl Foo; - | ^^^^^^^^ - -error: aborting due to previous error - diff --git a/tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr b/tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr index 30322f88c..d3d651a28 100644 --- a/tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr +++ b/tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr @@ -10,6 +10,6 @@ LL | fn foo(&self, t: impl Clone) {} | found 1 type parameter | `impl Trait` introduces an implicit type parameter -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0049`. diff --git a/tests/ui/impl-trait/type_parameters_captured.stderr b/tests/ui/impl-trait/type_parameters_captured.stderr index 46859296f..28dfcd8b8 100644 --- a/tests/ui/impl-trait/type_parameters_captured.stderr +++ b/tests/ui/impl-trait/type_parameters_captured.stderr @@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound LL | fn foo<T: 'static>(x: T) -> impl Any + 'static { | +++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0310`. diff --git a/tests/ui/impl-trait/unactionable_diagnostic.stderr b/tests/ui/impl-trait/unactionable_diagnostic.stderr index 4df7f45c3..be37da08e 100644 --- a/tests/ui/impl-trait/unactionable_diagnostic.stderr +++ b/tests/ui/impl-trait/unactionable_diagnostic.stderr @@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound LL | pub fn bar<'t, T: 't>( | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0309`. diff --git a/tests/ui/impl-trait/universal-mismatched-type.stderr b/tests/ui/impl-trait/universal-mismatched-type.stderr index 82e0f2396..21da1d087 100644 --- a/tests/ui/impl-trait/universal-mismatched-type.stderr +++ b/tests/ui/impl-trait/universal-mismatched-type.stderr @@ -11,6 +11,6 @@ LL | x = note: expected struct `String` found type parameter `impl Debug` -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/impl-trait/universal-two-impl-traits.stderr b/tests/ui/impl-trait/universal-two-impl-traits.stderr index ab8a53d0d..3b4844ab1 100644 --- a/tests/ui/impl-trait/universal-two-impl-traits.stderr +++ b/tests/ui/impl-trait/universal-two-impl-traits.stderr @@ -15,6 +15,6 @@ LL | a = y; = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters -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/impl-trait/universal_wrong_hrtb.stderr b/tests/ui/impl-trait/universal_wrong_hrtb.stderr index b5a091b61..e07189279 100644 --- a/tests/ui/impl-trait/universal_wrong_hrtb.stderr +++ b/tests/ui/impl-trait/universal_wrong_hrtb.stderr @@ -4,5 +4,5 @@ error: `impl Trait` can only mention lifetimes from an fn or impl LL | fn test_argument_position(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {} | -- lifetime declared here ^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/variance.e2024.stderr b/tests/ui/impl-trait/variance.e2024.stderr new file mode 100644 index 000000000..172450557 --- /dev/null +++ b/tests/ui/impl-trait/variance.e2024.stderr @@ -0,0 +1,26 @@ +error: [*, o] + --> $DIR/variance.rs:14:36 + | +LL | fn not_captured_early<'a: 'a>() -> impl Sized {} + | ^^^^^^^^^^ + +error: [*, o] + --> $DIR/variance.rs:19:32 + | +LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: [o] + --> $DIR/variance.rs:21:40 + | +LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {} + | ^^^^^^^^^^ + +error: [o] + --> $DIR/variance.rs:26:36 + | +LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 4 previous errors + diff --git a/tests/ui/impl-trait/variance.new.stderr b/tests/ui/impl-trait/variance.new.stderr new file mode 100644 index 000000000..172450557 --- /dev/null +++ b/tests/ui/impl-trait/variance.new.stderr @@ -0,0 +1,26 @@ +error: [*, o] + --> $DIR/variance.rs:14:36 + | +LL | fn not_captured_early<'a: 'a>() -> impl Sized {} + | ^^^^^^^^^^ + +error: [*, o] + --> $DIR/variance.rs:19:32 + | +LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: [o] + --> $DIR/variance.rs:21:40 + | +LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {} + | ^^^^^^^^^^ + +error: [o] + --> $DIR/variance.rs:26:36 + | +LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 4 previous errors + diff --git a/tests/ui/impl-trait/variance.old.stderr b/tests/ui/impl-trait/variance.old.stderr new file mode 100644 index 000000000..9410b54b4 --- /dev/null +++ b/tests/ui/impl-trait/variance.old.stderr @@ -0,0 +1,26 @@ +error: [*] + --> $DIR/variance.rs:14:36 + | +LL | fn not_captured_early<'a: 'a>() -> impl Sized {} + | ^^^^^^^^^^ + +error: [*, o] + --> $DIR/variance.rs:19:32 + | +LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: [] + --> $DIR/variance.rs:21:40 + | +LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {} + | ^^^^^^^^^^ + +error: [o] + --> $DIR/variance.rs:26:36 + | +LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 4 previous errors + diff --git a/tests/ui/impl-trait/variance.rs b/tests/ui/impl-trait/variance.rs index d6212f8f3..86da19085 100644 --- a/tests/ui/impl-trait/variance.rs +++ b/tests/ui/impl-trait/variance.rs @@ -1,3 +1,9 @@ +// revisions: old new e2024 +//[e2024] edition: 2024 +//[e2024] compile-flags: -Z unstable-options + +#![cfg_attr(new, feature(lifetime_capture_rules_2024))] + #![feature(rustc_attrs)] #![allow(internal_features)] #![rustc_variance_of_opaques] @@ -5,11 +11,17 @@ trait Captures<'a> {} impl<T> Captures<'_> for T {} -fn not_captured_early<'a: 'a>() -> impl Sized {} //~ [*] +fn not_captured_early<'a: 'a>() -> impl Sized {} +//[old]~^ [*] +//[new]~^^ [*, o] +//[e2024]~^^^ [*, o] fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {} //~ [*, o] -fn not_captured_late<'a>(_: &'a ()) -> impl Sized {} //~ [] +fn not_captured_late<'a>(_: &'a ()) -> impl Sized {} +//[old]~^ [] +//[new]~^^ [o] +//[e2024]~^^^ [o] fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {} //~ [o] diff --git a/tests/ui/impl-trait/variance.stderr b/tests/ui/impl-trait/variance.stderr deleted file mode 100644 index 644736754..000000000 --- a/tests/ui/impl-trait/variance.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: [*] - --> $DIR/variance.rs:8:36 - | -LL | fn not_captured_early<'a: 'a>() -> impl Sized {} - | ^^^^^^^^^^ - -error: [*, o] - --> $DIR/variance.rs:10:32 - | -LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: [] - --> $DIR/variance.rs:12:40 - | -LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {} - | ^^^^^^^^^^ - -error: [o] - --> $DIR/variance.rs:14:36 - | -LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - diff --git a/tests/ui/impl-trait/where-allowed-2.stderr b/tests/ui/impl-trait/where-allowed-2.stderr index b3765ac1a..c421e587a 100644 --- a/tests/ui/impl-trait/where-allowed-2.stderr +++ b/tests/ui/impl-trait/where-allowed-2.stderr @@ -6,6 +6,6 @@ LL | fn in_adt_in_return() -> Vec<impl Debug> { panic!() } | = note: cannot satisfy `_: Debug` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0283`. |