]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-70877.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / impl-trait / issues / issue-70877.stderr
1 error: opaque type's hidden type cannot be another opaque type from the same scope
2   --> $DIR/issue-70877.rs:31:12
3    |
4 LL |     return func(&"oof");
5    |            ^^^^^^^^^^^^ one of the two opaque types used here has to be outside its defining scope
6    |
7 note: opaque type whose hidden type is being assigned
8   --> $DIR/issue-70877.rs:28:13
9    |
10 LL | fn oof() -> impl std::fmt::Debug {
11    |             ^^^^^^^^^^^^^^^^^^^^
12 note: opaque type being used as hidden type
13   --> $DIR/issue-70877.rs:4:15
14    |
15 LL | type FooRet = impl std::fmt::Debug;
16    |               ^^^^^^^^^^^^^^^^^^^^
17
18 error: aborting due to previous error
19