Skip to content

add links to query documentation for E0391 #113622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions compiler/rustc_error_codes/src/error_codes/E0391.md
Original file line number Diff line number Diff line change
@@ -14,3 +14,6 @@ trait SecondTrait : FirstTrait {

The previous example contains a circular dependency between two traits:
`FirstTrait` depends on `SecondTrait` which itself depends on `FirstTrait`.

See https://rustc-dev-guide.rust-lang.org/overview.html#queries and
https://rustc-dev-guide.rust-lang.org/query.html for more information.
1 change: 1 addition & 0 deletions compiler/rustc_query_system/messages.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
query_system_cycle = cycle detected when {$stack_bottom}
.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
query_system_cycle_recursive_trait_alias = trait aliases cannot be recursive
2 changes: 2 additions & 0 deletions compiler/rustc_query_system/src/error.rs
Original file line number Diff line number Diff line change
@@ -57,6 +57,8 @@ pub struct Cycle {
pub alias: Option<Alias>,
#[subdiagnostic]
pub cycle_usage: Option<CycleUsage>,
#[note]
pub note_span: (),
}

#[derive(Diagnostic)]
1 change: 1 addition & 0 deletions compiler/rustc_query_system/src/query/job.rs
Original file line number Diff line number Diff line change
@@ -607,6 +607,7 @@ pub(crate) fn report_cycle<'a, D: DepKind>(
alias,
cycle_usage: cycle_usage,
stack_count,
note_span: (),
};

cycle_diag.into_diagnostic(&sess.parse_sess.span_diagnostic)
1 change: 1 addition & 0 deletions src/tools/miri/tests/fail/layout_cycle.stderr
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ error[E0391]: cycle detected when computing layout of `S<S<()>>`
|
= note: ...which requires computing layout of `<S<()> as Tr>::I`...
= note: ...which again requires computing layout of `S<S<()>>`, completing the cycle
= 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: post-monomorphization error: a cycle occurred during layout computation
--> RUSTLIB/core/src/mem/mod.rs:LL:CC
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ LL | | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
LL | | assert!(bar(&meh) == bar(&muh));
LL | | }
| |_^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/associated-consts/defaults-cyclic-fail.stderr
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ note: cycle used when const-evaluating + checking `main::promoted[1]`
|
LL | assert_eq!(<() as Tr>::A, 0);
| ^^^^^^^^^^^^^
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ LL | const BAR: u32 = IMPL_REF_BAR;
| ^^^^^^^^^^^^^^
= note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ LL | const BAR: u32 = DEFAULT_REF_BAR;
| ^^^^^^^^^^^^^^
= note: ...which again requires elaborating drops for `FooDefault::BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ LL | const BAR: u32 = TRAIT_REF_BAR;
| ^^^^^^^^^^^^^^
= note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ LL | |
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@ LL | | // FIXME(inherent_associated_types): This shouldn't lead to a cycle error
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to previous error

2 changes: 2 additions & 0 deletions tests/ui/associated-type-bounds/ambiguous-associated-type2.rs
Original file line number Diff line number Diff line change
@@ -7,4 +7,6 @@ trait Bar<T> {
trait Baz: Foo + Bar<Self::Item> {}
//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item` [E0391]



fn main() {}
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ note: cycle used when computing the super predicates of `Baz`
|
LL | trait Baz: Foo + Bar<Self::Item> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/associated-types/issue-20825.stderr
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ note: cycle used when computing the super predicates of `Processor`
|
LL | pub trait Processor: Subscriber<Input = Self::Input> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ note: cycle used when coherence checking all impls of trait `Trait`
|
LL | trait Trait<T> { type Assoc; }
| ^^^^^^^^^^^^^^
= 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: aborting due to previous error; 1 warning emitted

Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ note: cycle used when checking that `test` is well-formed
|
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/const-generics/issues/issue-83765.stderr
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ note: cycle used when computing candidate for `<LazyUpdim<'_, T, { T::DIM }, DIM
|
LL | trait TensorDimension {
| ^^^^^^^^^^^^^^^^^^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/consts/const-size_of-cycle.stderr
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ note: cycle used when checking that `Foo` is well-formed
|
LL | struct Foo {
| ^^^^^^^^^^
= 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: aborting due to previous error

2 changes: 2 additions & 0 deletions tests/ui/consts/issue-103790.stderr
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ note: cycle used when computing type of `S`
|
LL | struct S<const S: (), const S: S = { S }>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= 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 `S`
--> $DIR/issue-103790.rs:4:1
@@ -58,6 +59,7 @@ LL | | struct S<const S: (), const S: S = { S }>;
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to 4 previous errors

1 change: 1 addition & 0 deletions tests/ui/consts/issue-36163.stderr
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ note: cycle used when simplifying constant for the type system `Foo::B::{constan
|
LL | B = A,
| ^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/consts/issue-44415.stderr
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ note: cycle used when checking that `Foo` is well-formed
|
LL | struct Foo {
| ^^^^^^^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/consts/recursive-zst-static.default.stderr
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ LL | | fn main() {
LL | | FOO
LL | | }
| |_^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/consts/recursive-zst-static.unleash.stderr
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ LL | | fn main() {
LL | | FOO
LL | | }
| |_^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/consts/write-to-static-mut-in-static.stderr
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ LL | |
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to 2 previous errors

1 change: 1 addition & 0 deletions tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ LL | | }
LL | |
LL | | fn main() { }
| |_____________^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ LL | / trait Chromosome: Chromosome {
LL | |
LL | | }
| |_^
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ note: cycle used when computing the super predicates of `A`
|
LL | trait A: B {
| ^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/cycle-trait/issue-12511.stderr
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ LL | / trait T1 : T2 {
LL | |
LL | | }
| |_^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/dyn-star/param-env-region-infer.next.stderr
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ LL | | use std::fmt::Debug;
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to previous error

2 changes: 2 additions & 0 deletions tests/ui/impl-trait/auto-trait-leak.stderr
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ LL | | fn send<T: Send>(_: T) {}
LL | | Rc::new(String::from("foo"))
LL | | }
| |_^
= 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 `cycle1::{opaque#0}`
--> $DIR/auto-trait-leak.rs:11:16
@@ -68,6 +69,7 @@ LL | | fn send<T: Send>(_: T) {}
LL | | Rc::new(String::from("foo"))
LL | | }
| |_^
= 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: cannot check whether the hidden type of opaque type satisfies auto traits
--> $DIR/auto-trait-leak.rs:21:10
1 change: 1 addition & 0 deletions tests/ui/infinite/infinite-trait-alias-recursion.stderr
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ note: cycle used when collecting item types in top-level module
|
LL | trait T1 = T2;
| ^^^^^^^^^^^^^^
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ LL | | type X3 = X1;
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/infinite/infinite-vec-type-recursion.stderr
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ LL | |
LL | |
LL | | fn main() { let b: X = Vec::new(); }
| |____________________________________^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/issues/issue-17252.stderr
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ note: cycle used when const-evaluating + checking `main::{constant#0}`
|
LL | let _x: [u8; FOO]; // caused stack overflow prior to fix
| ^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/issues/issue-20772.stderr
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ note: cycle used when computing the super predicates of `T`
|
LL | trait T : Iterator<Item=Self::Item>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/issues/issue-21177.stderr
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ note: cycle used when computing explicit predicates of `foo`
|
LL | fn foo<T: Trait<A = T::B>>() { }
| ^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/issues/issue-23302-1.stderr
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ note: cycle used when simplifying constant for the type system `X::A::{constant#
|
LL | A = X::A as isize,
| ^^^^^^^^^^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/issues/issue-23302-2.stderr
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ note: cycle used when simplifying constant for the type system `Y::A::{constant#
|
LL | A = Y::B as isize,
| ^^^^^^^^^^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/issues/issue-23302-3.stderr
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ note: cycle used when simplifying constant for the type system `A`
|
LL | const A: i32 = B;
| ^^^^^^^^^^^^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/issues/issue-34373.stderr
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ LL | | fn foo(_: T) {}
LL | | fn main() {
LL | | }
| |_^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/recursion/issue-26548-recursion-via-normalize.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//~ ERROR cycle detected when computing layout of `core::option::Option<S>`
//~| 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 ...which requires computing layout of `S`...
//~| NOTE ...which requires computing layout of `core::option::Option<<S as Mirror>::It>`...
//~| NOTE ...which again requires computing layout of `core::option::Option<S>`, completing the cycle
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ error[E0391]: cycle detected when computing layout of `core::option::Option<S>`
= note: ...which requires computing layout of `core::option::Option<<S as Mirror>::It>`...
= note: ...which again requires computing layout of `core::option::Option<S>`, completing the cycle
= note: cycle used when computing layout of `core::option::Option<<S as Mirror>::It>`
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/recursion/recursive-static-definition.stderr
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ LL | |
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to previous error

1 change: 1 addition & 0 deletions tests/ui/resolve/resolve-self-in-impl.stderr
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ LL | | trait Tr<T = u8> {
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to 6 previous errors

1 change: 1 addition & 0 deletions tests/ui/sized/recursive-type-2.stderr
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ note: cycle used when elaborating drops for `main`
|
LL | fn main() {
| ^^^^^^^^^
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ note: cycle used when collecting item types in top-level module
|
LL | trait A: B + A {}
| ^^^^^^^^^^^^^^^^^
= 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: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -67,6 +67,7 @@ LL | | V2 = Self::V1 as u8 + 1, // OK; See #50072.
LL | |
LL | | fn main() {}
| |____________^
= 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: aborting due to previous error

2 changes: 2 additions & 0 deletions tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ note: cycle used when checking item types in module `m`
|
LL | mod m {
| ^^^^^
= 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 `m::Foo::{opaque#0}`
--> $DIR/auto-trait-leakage3.rs:7:20
@@ -34,6 +35,7 @@ note: cycle used when checking item types in module `m`
|
LL | mod m {
| ^^^^^
= 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: cannot check whether the hidden type of `auto_trait_leakage3[211d]::m::Foo::{opaque#0}` satisfies auto traits
--> $DIR/auto-trait-leakage3.rs:16:17
2 changes: 2 additions & 0 deletions tests/ui/type-alias-impl-trait/inference-cycle.stderr
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ note: cycle used when checking item types in module `m`
|
LL | mod m {
| ^^^^^
= 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 `m::Foo::{opaque#0}`
--> $DIR/inference-cycle.rs:5:20
@@ -34,6 +35,7 @@ note: cycle used when checking item types in module `m`
|
LL | mod m {
| ^^^^^
= 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: cannot check whether the hidden type of `inference_cycle[4ecc]::m::Foo::{opaque#0}` satisfies auto traits
--> $DIR/inference-cycle.rs:16:17
1 change: 1 addition & 0 deletions tests/ui/type-alias-impl-trait/issue-53092-2.stderr
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ LL | | type Bug<T, U> = impl Fn(T) -> U + Copy;
LL | | CONST_BUG(0);
LL | | }
| |_^
= 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[E0277]: the trait bound `U: From<T>` is not satisfied
--> $DIR/issue-53092-2.rs:9:5
3 changes: 3 additions & 0 deletions tests/ui/type-alias-impl-trait/reveal_local.stderr
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ LL | |
LL | |
LL | | fn main() {}
| |____________^
= 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::{opaque#0}`
--> $DIR/reveal_local.rs:5:12
@@ -46,6 +47,7 @@ LL | |
LL | |
LL | | fn main() {}
| |____________^
= 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: cannot check whether the hidden type of `reveal_local[9507]::Foo::{opaque#0}` satisfies auto traits
--> $DIR/reveal_local.rs:15:15
@@ -92,6 +94,7 @@ LL | |
LL | |
LL | | fn main() {}
| |____________^
= 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: cannot check whether the hidden type of `reveal_local[9507]::Foo::{opaque#0}` satisfies auto traits
--> $DIR/reveal_local.rs:25:15