X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Ftype-alias-impl-trait%2Fissue-85113.stderr;h=233c996340d844fe57b47485af643d0308d3a703;hb=587e8fd11267911599322878fb37c8d185738c9b;hp=361d66866ef8b0bece6e1a3a5f7d25e51e552c50;hpb=dd1525a021a6639a7976129abe525ad00defff59;p=rust.git diff --git a/src/test/ui/type-alias-impl-trait/issue-85113.stderr b/src/test/ui/type-alias-impl-trait/issue-85113.stderr index 361d66866ef..233c996340d 100644 --- a/src/test/ui/type-alias-impl-trait/issue-85113.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-85113.stderr @@ -10,6 +10,18 @@ note: hidden type `&' str` captures lifetime smaller than the function bo LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a; | ^^^^^^^^^^^^^^^^^^^^ +error: concrete type differs from previous defining opaque type use + --> $DIR/issue-85113.rs:14:1 + | +LL | fn cool_fn<'a>(arg: &'a str) -> OpaqueOutputImpl<'a> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&' str`, got `&'a str` + | +note: previous use here + --> $DIR/issue-85113.rs:14:1 + | +LL | fn cool_fn<'a>(arg: &'a str) -> OpaqueOutputImpl<'a> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error[E0477]: the type `&' str` does not fulfill the required lifetime --> $DIR/issue-85113.rs:5:29 | @@ -42,7 +54,7 @@ LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a; = note: expected `Output<'a>` found `Output<'_>` -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors Some errors have detailed explanations: E0477, E0495, E0700. For more information about an error, try `rustc --explain E0477`.