error[E0391]: cycle detected when computing type of `::foo::{anon_assoc#0}` --> $DIR/method-compatability-via-leakage-cycle.rs:21:24 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^ | note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires computing type of `::foo::{opaque#0}`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:24 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^ note: ...which requires computing type of opaque `::foo::{opaque#0}`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:24 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^ note: ...which requires borrow-checking `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires promoting constants in MIR for `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires checking if `::foo` contains FFI-unwind calls... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires building MIR for `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires match-checking `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which again requires computing type of `::foo::{anon_assoc#0}`, completing the cycle note: cycle used when checking assoc item `::foo` is compatible with trait definition --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information error[E0391]: cycle detected when computing type of `::foo::{anon_assoc#0}` --> $DIR/method-compatability-via-leakage-cycle.rs:21:24 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^ | note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires computing type of `::foo::{opaque#0}`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:24 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^ note: ...which requires computing type of opaque `::foo::{opaque#0}`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:24 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^ note: ...which requires borrow-checking `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires promoting constants in MIR for `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires checking if `::foo` contains FFI-unwind calls... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires building MIR for `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires match-checking `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `::foo`... --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which again requires computing type of `::foo::{anon_assoc#0}`, completing the cycle note: cycle used when checking assoc item `::foo` is compatible with trait definition --> $DIR/method-compatability-via-leakage-cycle.rs:21:5 | LL | fn foo(b: bool) -> impl Sized { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0391`.