diff options
| author | Michael Goulet <michael@errs.io> | 2024-02-27 16:11:35 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-02-27 17:43:40 +0000 |
| commit | b57ddfe079cbd9974f0b1f68a50f8f1b901cfdaf (patch) | |
| tree | b926fa5420f6e1fdb67a72b3dcfca2e512d30c7e /tests/ui/impl-trait | |
| parent | 1feef44daf4de5ab35c0bf1eea0f3a54c59cf49c (diff) | |
| download | rust-b57ddfe079cbd9974f0b1f68a50f8f1b901cfdaf.tar.gz rust-b57ddfe079cbd9974f0b1f68a50f8f1b901cfdaf.zip | |
Print RPITIT like an opaque
Diffstat (limited to 'tests/ui/impl-trait')
4 files changed, 6 insertions, 6 deletions
diff --git a/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs index e991b74a0f8..e0a7aef2c5f 100644 --- a/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs +++ b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs @@ -5,7 +5,7 @@ trait T {} trait MyTrait { async fn foo() -> &'static impl T; - //~^ ERROR the associated type `<Self as MyTrait>::{opaque#0}` may not live long enough + //~^ ERROR the associated type `impl T` may not live long enough } fn main() {} 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 a17653496db..19ffff9d3f2 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 @@ -1,10 +1,10 @@ -error[E0310]: the associated type `<Self as MyTrait>::{synthetic#0}` may not live long enough +error[E0310]: the associated type `impl T` may not live long enough --> $DIR/async-and-ret-ref.rs:7:5 | LL | async fn foo() -> &'static impl T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | the associated type `<Self as MyTrait>::{synthetic#0}` must be valid for the static lifetime... + | the associated type `impl T` must be valid for the static lifetime... | ...so that the reference type `&'static impl T` does not outlive the data it points at error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.rs b/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.rs index a36799c3ebd..ee9ecdda902 100644 --- a/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.rs +++ b/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.rs @@ -9,7 +9,7 @@ trait Erased { impl<T: Original> Erased for T { fn f(&self) -> Box<dyn Fn()> { Box::new(<T as Original>::f()) - //~^ ERROR the associated type `<T as Original>::{opaque#0}` may not live long enough + //~^ ERROR the associated type `impl Fn()` may not live long enough } } diff --git a/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.stderr b/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.stderr index 7fa4b8dbd49..1f787c1842c 100644 --- a/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.stderr +++ b/tests/ui/impl-trait/in-trait/missing-static-bound-from-impl.stderr @@ -1,10 +1,10 @@ -error[E0310]: the associated type `<T as Original>::{synthetic#0}` may not live long enough +error[E0310]: the associated type `impl Fn()` may not live long enough --> $DIR/missing-static-bound-from-impl.rs:11:9 | LL | Box::new(<T as Original>::f()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | the associated type `<T as Original>::{synthetic#0}` must be valid for the static lifetime... + | the associated type `impl Fn()` must be valid for the static lifetime... | ...so that the type `impl Fn()` will meet its required lifetime bounds error: aborting due to 1 previous error |
