From c429a72db9515eb3244d6da8c09c15c520aee9db Mon Sep 17 00:00:00 2001 From: nxya Date: Wed, 12 Jul 2023 10:18:30 -0400 Subject: [PATCH 1/7] add links to query documentation for E0391 --- compiler/rustc_error_codes/src/error_codes/E0391.md | 3 +++ compiler/rustc_query_system/messages.ftl | 2 +- tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr | 2 +- tests/ui/associated-consts/defaults-cyclic-fail.stderr | 2 +- .../issue-24949-assoc-const-static-recursion-impl.stderr | 2 +- ...-24949-assoc-const-static-recursion-trait-default.stderr | 2 +- .../issue-24949-assoc-const-static-recursion-trait.stderr | 2 +- .../bugs/cycle-iat-inside-of-adt.stderr | 2 +- .../bugs/cycle-iat-inside-of-where-predicate.stderr | 2 +- .../ui/associated-type-bounds/ambiguous-associated-type2.rs | 3 ++- .../ambiguous-associated-type2.stderr | 2 +- tests/ui/associated-types/issue-20825.stderr | 2 +- .../coherence/coherence-inherited-assoc-ty-cycle-err.stderr | 2 +- tests/ui/const-generics/generic_const_exprs/closures.stderr | 2 +- tests/ui/const-generics/issues/issue-83765.stderr | 2 +- tests/ui/consts/const-size_of-cycle.stderr | 2 +- tests/ui/consts/issue-103790.stderr | 4 ++-- tests/ui/consts/issue-36163.stderr | 2 +- tests/ui/consts/issue-44415.stderr | 2 +- tests/ui/consts/recursive-zst-static.default.stderr | 2 +- tests/ui/consts/recursive-zst-static.unleash.stderr | 2 +- tests/ui/consts/write-to-static-mut-in-static.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr | 2 +- tests/ui/cycle-trait/issue-12511.stderr | 2 +- tests/ui/dyn-star/param-env-region-infer.next.stderr | 2 +- tests/ui/impl-trait/auto-trait-leak.stderr | 4 ++-- tests/ui/infinite/infinite-trait-alias-recursion.stderr | 2 +- .../ui/infinite/infinite-type-alias-mutual-recursion.stderr | 2 +- tests/ui/infinite/infinite-vec-type-recursion.stderr | 2 +- tests/ui/issues/issue-17252.stderr | 2 +- tests/ui/issues/issue-20772.stderr | 2 +- tests/ui/issues/issue-21177.stderr | 2 +- tests/ui/issues/issue-23302-1.stderr | 2 +- tests/ui/issues/issue-23302-2.stderr | 2 +- tests/ui/issues/issue-23302-3.stderr | 2 +- tests/ui/issues/issue-34373.stderr | 2 +- .../ui/recursion/issue-26548-recursion-via-normalize.stderr | 2 +- tests/ui/recursion/recursive-static-definition.stderr | 2 +- tests/ui/resolve/resolve-self-in-impl.stderr | 2 +- tests/ui/sized/recursive-type-2.stderr | 2 +- tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs | 2 +- .../traits/trait-upcasting/cyclic-trait-resolution.stderr | 2 +- .../type-alias-enum-variants/self-in-enum-definition.stderr | 2 +- tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs | 4 ++-- tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr | 4 ++-- tests/ui/type-alias-impl-trait/inference-cycle.stderr | 4 ++-- tests/ui/type-alias-impl-trait/issue-53092-2.stderr | 2 +- tests/ui/type-alias-impl-trait/reveal_local.stderr | 6 +++--- 50 files changed, 60 insertions(+), 56 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0391.md b/compiler/rustc_error_codes/src/error_codes/E0391.md index dff50ccaa0b77..457fbd002a14b 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0391.md +++ b/compiler/rustc_error_codes/src/error_codes/E0391.md @@ -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. diff --git a/compiler/rustc_query_system/messages.ftl b/compiler/rustc_query_system/messages.ftl index 49b423d1adeb5..4e7ddeeebcd3e 100644 --- a/compiler/rustc_query_system/messages.ftl +++ b/compiler/rustc_query_system/messages.ftl @@ -1,4 +1,4 @@ -query_system_cycle = cycle detected when {$stack_bottom} +query_system_cycle = cycle detected when {$stack_bottom}. 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 diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr index 79e1b753112b8..0db322fbb75cf 100644 --- a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr +++ b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `Bar` +error[E0391]: cycle detected when expanding type alias `Bar`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-110629-private-type-cycle-dyn.rs:1:38 | LL | type Bar<'a, 'b> = Box>>; diff --git a/tests/ui/associated-consts/defaults-cyclic-fail.stderr b/tests/ui/associated-consts/defaults-cyclic-fail.stderr index a1483911b297d..bb4788b2ba1fa 100644 --- a/tests/ui/associated-consts/defaults-cyclic-fail.stderr +++ b/tests/ui/associated-consts/defaults-cyclic-fail.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Tr::A` +error[E0391]: cycle detected when const-evaluating + checking `Tr::A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/defaults-cyclic-fail.rs:5:19 | LL | const A: u8 = Self::B; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr index be57817615176..eaf06ff14494c 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `::BAR` +error[E0391]: cycle detected when elaborating drops for `::BAR`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22 | LL | const BAR: u32 = IMPL_REF_BAR; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr index 8347b260b5625..2f36e4ee5156b 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR` +error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22 | LL | const BAR: u32 = DEFAULT_REF_BAR; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr index 3955a3120c475..24fad93bc54ce 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `::BAR` +error[E0391]: cycle detected when elaborating drops for `::BAR`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22 | LL | const BAR: u32 = TRAIT_REF_BAR; diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr index 23269e1afab54..7cf243e546c89 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing predicates of `Foo` +error[E0391]: cycle detected when computing predicates of `Foo`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-iat-inside-of-adt.rs:7:1 | LL | struct Foo { diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr index aaa9a39ea0f4a..e5725e5ef1be0 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing predicates of `user` +error[E0391]: cycle detected when computing predicates of `user`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1 | LL | fn user() where S::P: std::fmt::Debug {} diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs b/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs index 48de593342fa6..7b2e1365a8fb0 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs @@ -5,6 +5,7 @@ trait Bar { type Item; } trait Baz: Foo + Bar {} -//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item` [E0391] +//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] + fn main() {} diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr index 575b00e09b02c..f51d9b381e62e 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `Baz` with associated type name `Item` +error[E0391]: cycle detected when computing the super traits of `Baz` with associated type name `Item`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/ambiguous-associated-type2.rs:7:1 | LL | trait Baz: Foo + Bar {} diff --git a/tests/ui/associated-types/issue-20825.stderr b/tests/ui/associated-types/issue-20825.stderr index c4dea68b884a2..fda07c78892e8 100644 --- a/tests/ui/associated-types/issue-20825.stderr +++ b/tests/ui/associated-types/issue-20825.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `Processor` with associated type name `Input` +error[E0391]: cycle detected when computing the super traits of `Processor` with associated type name `Input`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-20825.rs:5:1 | LL | pub trait Processor: Subscriber { diff --git a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr index 7bd50649d6d09..662d023b6aaa9 100644 --- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr +++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr @@ -8,7 +8,7 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default -error[E0391]: cycle detected when building specialization graph of trait `Trait` +error[E0391]: cycle detected when building specialization graph of trait `Trait`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 | LL | trait Trait { type Assoc; } diff --git a/tests/ui/const-generics/generic_const_exprs/closures.stderr b/tests/ui/const-generics/generic_const_exprs/closures.stderr index a7d891d77908c..bac2ef58e9181 100644 --- a/tests/ui/const-generics/generic_const_exprs/closures.stderr +++ b/tests/ui/const-generics/generic_const_exprs/closures.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when building an abstract representation for `test::{constant#0}` +error[E0391]: cycle detected when building an abstract representation for `test::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/closures.rs:3:35 | LL | fn test() -> [u8; N + (|| 42)()] {} diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr index d7b2b006c2aea..c28a55ec9ae3c 100644 --- a/tests/ui/const-generics/issues/issue-83765.stderr +++ b/tests/ui/const-generics/issues/issue-83765.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when resolving instance `::DIM, DIM> as TensorDimension>::DIM` +error[E0391]: cycle detected when resolving instance `::DIM, DIM> as TensorDimension>::DIM`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-83765.rs:5:5 | LL | const DIM: usize; diff --git a/tests/ui/consts/const-size_of-cycle.stderr b/tests/ui/consts/const-size_of-cycle.stderr index 17088d9995f2d..28448223a2aaf 100644 --- a/tests/ui/consts/const-size_of-cycle.stderr +++ b/tests/ui/consts/const-size_of-cycle.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when evaluating type-level constant +error[E0391]: cycle detected when evaluating type-level constant. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/const-size_of-cycle.rs:4:17 | LL | bytes: [u8; std::mem::size_of::()] diff --git a/tests/ui/consts/issue-103790.stderr b/tests/ui/consts/issue-103790.stderr index 34d8ee281cf8c..7eae2555ca105 100644 --- a/tests/ui/consts/issue-103790.stderr +++ b/tests/ui/consts/issue-103790.stderr @@ -22,7 +22,7 @@ help: add missing generic argument LL | struct S = { S }>; | +++ -error[E0391]: cycle detected when computing type of `S::S` +error[E0391]: cycle detected when computing type of `S::S`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-103790.rs:4:32 | LL | struct S; @@ -35,7 +35,7 @@ note: cycle used when computing type of `S` LL | struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0391]: cycle detected when computing type of `S` +error[E0391]: cycle detected when computing type of `S`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-103790.rs:4:1 | LL | struct S; diff --git a/tests/ui/consts/issue-36163.stderr b/tests/ui/consts/issue-36163.stderr index 7137c053847ce..2188dc0e356a8 100644 --- a/tests/ui/consts/issue-36163.stderr +++ b/tests/ui/consts/issue-36163.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant#0}` +error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-36163.rs:4:9 | LL | B = A, diff --git a/tests/ui/consts/issue-44415.stderr b/tests/ui/consts/issue-44415.stderr index ec64b956dfe2b..02be3e644f86b 100644 --- a/tests/ui/consts/issue-44415.stderr +++ b/tests/ui/consts/issue-44415.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when evaluating type-level constant +error[E0391]: cycle detected when evaluating type-level constant. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-44415.rs:6:17 | LL | bytes: [u8; unsafe { intrinsics::size_of::() }], diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr index d68960b097213..e4838e9271067 100644 --- a/tests/ui/consts/recursive-zst-static.default.stderr +++ b/tests/ui/consts/recursive-zst-static.default.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO` +error[E0391]: cycle detected when const-evaluating + checking `FOO`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = FOO; diff --git a/tests/ui/consts/recursive-zst-static.unleash.stderr b/tests/ui/consts/recursive-zst-static.unleash.stderr index d68960b097213..e4838e9271067 100644 --- a/tests/ui/consts/recursive-zst-static.unleash.stderr +++ b/tests/ui/consts/recursive-zst-static.unleash.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO` +error[E0391]: cycle detected when const-evaluating + checking `FOO`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = FOO; diff --git a/tests/ui/consts/write-to-static-mut-in-static.stderr b/tests/ui/consts/write-to-static-mut-in-static.stderr index 395b2d42f97a3..8816f952d1696 100644 --- a/tests/ui/consts/write-to-static-mut-in-static.stderr +++ b/tests/ui/consts/write-to-static-mut-in-static.stderr @@ -4,7 +4,7 @@ error[E0080]: could not evaluate static initializer LL | pub static mut B: () = unsafe { A = 1; }; | ^^^^^ modifying a static's initial value from another static's initializer -error[E0391]: cycle detected when const-evaluating + checking `C` +error[E0391]: cycle detected when const-evaluating + checking `C`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/write-to-static-mut-in-static.rs:5:1 | LL | pub static mut C: u32 = unsafe { C = 1; 0 }; diff --git a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr index 9d715f4947146..cfc434e3a369c 100644 --- a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr +++ b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::X` +error[E0391]: cycle detected when computing type of `Foo::X`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-trait-default-type-trait.rs:4:23 | LL | trait Foo> { diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr index e2b2aac05ac94..4bb9edf3cb57b 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `Chromosome` +error[E0391]: cycle detected when computing the super predicates of `Chromosome`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-trait-supertrait-direct.rs:3:19 | LL | trait Chromosome: Chromosome { diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr index c903e11465768..61af1f29db799 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `B` +error[E0391]: cycle detected when computing the super predicates of `B`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-trait-supertrait-indirect.rs:7:10 | LL | trait B: C { diff --git a/tests/ui/cycle-trait/issue-12511.stderr b/tests/ui/cycle-trait/issue-12511.stderr index 558aad10946ec..7c61156065f7a 100644 --- a/tests/ui/cycle-trait/issue-12511.stderr +++ b/tests/ui/cycle-trait/issue-12511.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `T1` +error[E0391]: cycle detected when computing the super predicates of `T1`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-12511.rs:1:12 | LL | trait T1 : T2 { diff --git a/tests/ui/dyn-star/param-env-region-infer.next.stderr b/tests/ui/dyn-star/param-env-region-infer.next.stderr index dd724a6590829..1222645567cb2 100644 --- a/tests/ui/dyn-star/param-env-region-infer.next.stderr +++ b/tests/ui/dyn-star/param-env-region-infer.next.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `make_dyn_star::{opaque#0}` +error[E0391]: cycle detected when computing type of `make_dyn_star::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/param-env-region-infer.rs:16:60 | LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a { diff --git a/tests/ui/impl-trait/auto-trait-leak.stderr b/tests/ui/impl-trait/auto-trait-leak.stderr index 92a9763bc9b57..53b229c24028b 100644 --- a/tests/ui/impl-trait/auto-trait-leak.stderr +++ b/tests/ui/impl-trait/auto-trait-leak.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}` +error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/auto-trait-leak.rs:11:16 | LL | fn cycle1() -> impl Clone { @@ -34,7 +34,7 @@ LL | | Rc::new(String::from("foo")) LL | | } | |_^ -error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}` +error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/auto-trait-leak.rs:11:16 | LL | fn cycle1() -> impl Clone { diff --git a/tests/ui/infinite/infinite-trait-alias-recursion.stderr b/tests/ui/infinite/infinite-trait-alias-recursion.stderr index 683987b4943da..56331e17f624e 100644 --- a/tests/ui/infinite/infinite-trait-alias-recursion.stderr +++ b/tests/ui/infinite/infinite-trait-alias-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `T1` +error[E0391]: cycle detected when computing the super predicates of `T1`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/infinite-trait-alias-recursion.rs:3:12 | LL | trait T1 = T2; diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr index 7f82b294434f1..547cbc10aeae1 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `X1` +error[E0391]: cycle detected when expanding type alias `X1`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/infinite-type-alias-mutual-recursion.rs:1:11 | LL | type X1 = X2; diff --git a/tests/ui/infinite/infinite-vec-type-recursion.stderr b/tests/ui/infinite/infinite-vec-type-recursion.stderr index 1e487a5b11c2a..a7411cf73d98a 100644 --- a/tests/ui/infinite/infinite-vec-type-recursion.stderr +++ b/tests/ui/infinite/infinite-vec-type-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `X` +error[E0391]: cycle detected when expanding type alias `X`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/infinite-vec-type-recursion.rs:1:14 | LL | type X = Vec; diff --git a/tests/ui/issues/issue-17252.stderr b/tests/ui/issues/issue-17252.stderr index aca5242b29689..bd357003cc704 100644 --- a/tests/ui/issues/issue-17252.stderr +++ b/tests/ui/issues/issue-17252.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO` +error[E0391]: cycle detected when const-evaluating + checking `FOO`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-17252.rs:1:20 | LL | const FOO: usize = FOO; diff --git a/tests/ui/issues/issue-20772.stderr b/tests/ui/issues/issue-20772.stderr index 416fd8c062fa3..ab692e64cda24 100644 --- a/tests/ui/issues/issue-20772.stderr +++ b/tests/ui/issues/issue-20772.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `T` with associated type name `Item` +error[E0391]: cycle detected when computing the super traits of `T` with associated type name `Item`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-20772.rs:1:1 | LL | trait T : Iterator diff --git a/tests/ui/issues/issue-21177.stderr b/tests/ui/issues/issue-21177.stderr index 6877a18460509..69b26cbb10521 100644 --- a/tests/ui/issues/issue-21177.stderr +++ b/tests/ui/issues/issue-21177.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the bounds for type parameter `T` +error[E0391]: cycle detected when computing the bounds for type parameter `T`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-21177.rs:6:21 | LL | fn foo>() { } diff --git a/tests/ui/issues/issue-23302-1.stderr b/tests/ui/issues/issue-23302-1.stderr index 9366050d7ecdf..f238b1c8a213c 100644 --- a/tests/ui/issues/issue-23302-1.stderr +++ b/tests/ui/issues/issue-23302-1.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `X::A::{constant#0}` +error[E0391]: cycle detected when const-evaluating + checking `X::A::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-23302-1.rs:4:9 | LL | A = X::A as isize, diff --git a/tests/ui/issues/issue-23302-2.stderr b/tests/ui/issues/issue-23302-2.stderr index b97ae287a47a9..454b4ad9aa956 100644 --- a/tests/ui/issues/issue-23302-2.stderr +++ b/tests/ui/issues/issue-23302-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Y::A::{constant#0}` +error[E0391]: cycle detected when const-evaluating + checking `Y::A::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-23302-2.rs:4:9 | LL | A = Y::B as isize, diff --git a/tests/ui/issues/issue-23302-3.stderr b/tests/ui/issues/issue-23302-3.stderr index c6cafe575e51b..318eb42ef3e93 100644 --- a/tests/ui/issues/issue-23302-3.stderr +++ b/tests/ui/issues/issue-23302-3.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `A` +error[E0391]: cycle detected when const-evaluating + checking `A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-23302-3.rs:1:16 | LL | const A: i32 = B; diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr index 8be3cfa72fb26..b7c358a5f6acc 100644 --- a/tests/ui/issues/issue-34373.stderr +++ b/tests/ui/issues/issue-34373.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::T` +error[E0391]: cycle detected when computing type of `Foo::T`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-34373.rs:7:30 | LL | pub struct Foo>>; diff --git a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr index a75097cdbfbda..48d146d9cdbb7 100644 --- a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr +++ b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing layout of `core::option::Option` +error[E0391]: cycle detected when computing layout of `core::option::Option`. 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<::It>`... diff --git a/tests/ui/recursion/recursive-static-definition.stderr b/tests/ui/recursion/recursive-static-definition.stderr index 1359761457a66..e5b9e64bcb107 100644 --- a/tests/ui/recursion/recursive-static-definition.stderr +++ b/tests/ui/recursion/recursive-static-definition.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO` +error[E0391]: cycle detected when const-evaluating + checking `FOO`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/recursive-static-definition.rs:1:1 | LL | pub static FOO: u32 = FOO; diff --git a/tests/ui/resolve/resolve-self-in-impl.stderr b/tests/ui/resolve/resolve-self-in-impl.stderr index 9f9ed68898f6c..e9b6793713fdd 100644 --- a/tests/ui/resolve/resolve-self-in-impl.stderr +++ b/tests/ui/resolve/resolve-self-in-impl.stderr @@ -38,7 +38,7 @@ LL | impl (Self, Self) {} | = note: replace `Self` with a different type -error[E0391]: cycle detected when computing trait implemented by `` +error[E0391]: cycle detected when computing trait implemented by ``. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/resolve-self-in-impl.rs:19:1 | LL | impl Tr for S {} diff --git a/tests/ui/sized/recursive-type-2.stderr b/tests/ui/sized/recursive-type-2.stderr index d0e6e9db07e9b..fc68cac9599cf 100644 --- a/tests/ui/sized/recursive-type-2.stderr +++ b/tests/ui/sized/recursive-type-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing layout of `Foo<()>` +error[E0391]: cycle detected when computing layout of `Foo<()>`. 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 `<() as A>::Assoc`... = note: ...which again requires computing layout of `Foo<()>`, completing the cycle diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs index 511e41562b220..8efe17d5d0e86 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs @@ -1,5 +1,5 @@ trait A: B + A {} -//~^ ERROR cycle detected when computing the super predicates of `A` [E0391] +//~^ ERROR cycle detected when computing the super predicates of `A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] trait B {} diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr index ca98e1831507e..e20776dafbee4 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `A` +error[E0391]: cycle detected when computing the super predicates of `A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cyclic-trait-resolution.rs:1:14 | LL | trait A: B + A {} diff --git a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr index c943a4918ba67..b7b6bab891686 100644 --- a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr +++ b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{constant#0}` +error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/self-in-enum-definition.rs:5:10 | LL | V3 = Self::V1 {} as u8 + 2, diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs index fd3f9c61420e9..a1c913292466c 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs @@ -5,8 +5,8 @@ mod m { pub type Foo = impl std::fmt::Debug; - //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391] - //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391] + //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] + //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] pub fn foo() -> Foo { 22_u32 diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr index dd56c59bf5f23..6ed5d83509501 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/auto-trait-leakage3.rs:7:20 | LL | pub type Foo = impl std::fmt::Debug; @@ -17,7 +17,7 @@ note: cycle used when checking item types in module `m` LL | mod m { | ^^^^^ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/auto-trait-leakage3.rs:7:20 | LL | pub type Foo = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/inference-cycle.stderr b/tests/ui/type-alias-impl-trait/inference-cycle.stderr index 4d5f367476b7e..07b656a07220a 100644 --- a/tests/ui/type-alias-impl-trait/inference-cycle.stderr +++ b/tests/ui/type-alias-impl-trait/inference-cycle.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/inference-cycle.rs:5:20 | LL | pub type Foo = impl std::fmt::Debug; @@ -17,7 +17,7 @@ note: cycle used when checking item types in module `m` LL | mod m { | ^^^^^ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/inference-cycle.rs:5:20 | LL | pub type Foo = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr index 2565a28b49354..909ceedcc659e 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Bug::{opaque#0}` +error[E0391]: cycle detected when computing type of `Bug::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-53092-2.rs:4:18 | LL | type Bug = impl Fn(T) -> U + Copy; diff --git a/tests/ui/type-alias-impl-trait/reveal_local.stderr b/tests/ui/type-alias-impl-trait/reveal_local.stderr index 0c5ef4a6fb418..e4a919db95650 100644 --- a/tests/ui/type-alias-impl-trait/reveal_local.stderr +++ b/tests/ui/type-alias-impl-trait/reveal_local.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/reveal_local.rs:5:12 | LL | type Foo = impl Debug; @@ -23,7 +23,7 @@ LL | | LL | | fn main() {} | |____________^ -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/reveal_local.rs:5:12 | LL | type Foo = impl Debug; @@ -69,7 +69,7 @@ note: required by a bound in `is_send` LL | fn is_send() {} | ^^^^ required by this bound in `is_send` -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/reveal_local.rs:5:12 | LL | type Foo = impl Debug; From bef91ee6878e3710c0a31f7570c837131e184e0c Mon Sep 17 00:00:00 2001 From: nxya Date: Wed, 12 Jul 2023 22:59:01 -0400 Subject: [PATCH 2/7] added links as a note --- compiler/rustc_query_system/messages.ftl | 3 ++- compiler/rustc_query_system/src/error.rs | 1 + ...issue-110629-private-type-cycle-dyn.stderr | 7 ++++++- .../defaults-cyclic-fail.stderr | 7 ++++++- ...9-assoc-const-static-recursion-impl.stderr | 7 ++++++- ...onst-static-recursion-trait-default.stderr | 7 ++++++- ...-assoc-const-static-recursion-trait.stderr | 7 ++++++- .../bugs/cycle-iat-inside-of-adt.stderr | 7 ++++++- ...cycle-iat-inside-of-where-predicate.stderr | 7 ++++++- .../ambiguous-associated-type2.rs | 2 +- .../ambiguous-associated-type2.stderr | 7 ++++++- tests/ui/associated-types/issue-20825.stderr | 7 ++++++- ...erence-inherited-assoc-ty-cycle-err.stderr | 7 ++++++- .../generic_const_exprs/closures.stderr | 7 ++++++- .../const-generics/issues/issue-83765.stderr | 7 ++++++- tests/ui/consts/const-size_of-cycle.stderr | 7 ++++++- tests/ui/consts/issue-103790.stderr | 14 +++++++++++-- tests/ui/consts/issue-36163.stderr | 7 ++++++- tests/ui/consts/issue-44415.stderr | 7 ++++++- .../recursive-zst-static.default.stderr | 7 ++++++- .../recursive-zst-static.unleash.stderr | 7 ++++++- .../write-to-static-mut-in-static.stderr | 7 ++++++- .../cycle-trait-default-type-trait.stderr | 7 ++++++- .../cycle-trait-supertrait-direct.stderr | 7 ++++++- .../cycle-trait-supertrait-indirect.stderr | 7 ++++++- tests/ui/cycle-trait/issue-12511.stderr | 7 ++++++- .../param-env-region-infer.next.stderr | 7 ++++++- tests/ui/impl-trait/auto-trait-leak.stderr | 14 +++++++++++-- .../infinite-trait-alias-recursion.stderr | 7 ++++++- ...nfinite-type-alias-mutual-recursion.stderr | 7 ++++++- .../infinite-vec-type-recursion.stderr | 7 ++++++- tests/ui/issues/issue-17252.stderr | 7 ++++++- tests/ui/issues/issue-20772.stderr | 7 ++++++- tests/ui/issues/issue-21177.stderr | 7 ++++++- tests/ui/issues/issue-23302-1.stderr | 7 ++++++- tests/ui/issues/issue-23302-2.stderr | 7 ++++++- tests/ui/issues/issue-23302-3.stderr | 7 ++++++- tests/ui/issues/issue-34373.stderr | 7 ++++++- .../issue-26548-recursion-via-normalize.rs | 1 + ...issue-26548-recursion-via-normalize.stderr | 3 ++- .../recursive-static-definition.stderr | 7 ++++++- tests/ui/resolve/resolve-self-in-impl.stderr | 7 ++++++- tests/ui/sized/recursive-type-2.stderr | 3 ++- .../cyclic-trait-resolution.rs | 2 +- .../cyclic-trait-resolution.stderr | 7 ++++++- .../self-in-enum-definition.stderr | 7 ++++++- .../auto-trait-leakage3.rs | 4 ++-- .../auto-trait-leakage3.stderr | 14 +++++++++++-- .../inference-cycle.stderr | 14 +++++++++++-- .../issue-53092-2.stderr | 7 ++++++- .../type-alias-impl-trait/reveal_local.stderr | 21 ++++++++++++++++--- 51 files changed, 306 insertions(+), 56 deletions(-) diff --git a/compiler/rustc_query_system/messages.ftl b/compiler/rustc_query_system/messages.ftl index 4e7ddeeebcd3e..d5fed8fe179fd 100644 --- a/compiler/rustc_query_system/messages.ftl +++ b/compiler/rustc_query_system/messages.ftl @@ -1,4 +1,5 @@ -query_system_cycle = cycle detected when {$stack_bottom}. 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 = 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 diff --git a/compiler/rustc_query_system/src/error.rs b/compiler/rustc_query_system/src/error.rs index cf2f04c7486b8..8ed559f2b727b 100644 --- a/compiler/rustc_query_system/src/error.rs +++ b/compiler/rustc_query_system/src/error.rs @@ -46,6 +46,7 @@ pub struct CycleUsage { #[derive(Diagnostic)] #[diag(query_system_cycle, code = "E0391")] pub struct Cycle { + #[note] #[primary_span] pub span: Span, pub stack_bottom: String, diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr index 0db322fbb75cf..777b4c46798a6 100644 --- a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr +++ b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when expanding type alias `Bar`. 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 expanding type alias `Bar` --> $DIR/issue-110629-private-type-cycle-dyn.rs:1:38 | LL | type Bar<'a, 'b> = Box>>; | ^^^^^^^^^^^ | +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 + --> $DIR/issue-110629-private-type-cycle-dyn.rs:1:38 + | +LL | type Bar<'a, 'b> = Box>>; + | ^^^^^^^^^^^ = note: ...which immediately requires expanding type alias `Bar` again = note: type aliases cannot be recursive = help: consider using a struct, enum, or union instead to break the cycle diff --git a/tests/ui/associated-consts/defaults-cyclic-fail.stderr b/tests/ui/associated-consts/defaults-cyclic-fail.stderr index bb4788b2ba1fa..d6a13ae4dbf4b 100644 --- a/tests/ui/associated-consts/defaults-cyclic-fail.stderr +++ b/tests/ui/associated-consts/defaults-cyclic-fail.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `Tr::A`. 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 const-evaluating + checking `Tr::A` --> $DIR/defaults-cyclic-fail.rs:5:19 | LL | const A: u8 = Self::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 + --> $DIR/defaults-cyclic-fail.rs:5:19 + | +LL | const A: u8 = Self::B; + | ^^^^^^^ note: ...which requires const-evaluating + checking `Tr::B`... --> $DIR/defaults-cyclic-fail.rs:8:19 | diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr index eaf06ff14494c..40b3bcec2437c 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when elaborating drops for `::BAR`. 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 elaborating drops for `::BAR` --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22 | LL | const BAR: u32 = IMPL_REF_BAR; | ^^^^^^^^^^^^ | +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 + --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22 + | +LL | const BAR: u32 = IMPL_REF_BAR; + | ^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `IMPL_REF_BAR`... --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:1 | diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr index 2f36e4ee5156b..e58d93de59df5 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR`. 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 elaborating drops for `FooDefault::BAR` --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22 | LL | const BAR: u32 = DEFAULT_REF_BAR; | ^^^^^^^^^^^^^^^ | +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 + --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22 + | +LL | const BAR: u32 = DEFAULT_REF_BAR; + | ^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`... --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1 | diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr index 24fad93bc54ce..6a97ea64dded6 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when elaborating drops for `::BAR`. 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 elaborating drops for `::BAR` --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22 | LL | const BAR: u32 = TRAIT_REF_BAR; | ^^^^^^^^^^^^^ | +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 + --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22 + | +LL | const BAR: u32 = TRAIT_REF_BAR; + | ^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `TRAIT_REF_BAR`... --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:1 | diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr index 7cf243e546c89..f088ecba4a8a5 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing predicates of `Foo`. 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 predicates of `Foo` --> $DIR/cycle-iat-inside-of-adt.rs:7:1 | 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 + --> $DIR/cycle-iat-inside-of-adt.rs:7:1 + | +LL | struct Foo { + | ^^^^^^^^^^ note: ...which requires computing predicates of `Foo`... --> $DIR/cycle-iat-inside-of-adt.rs:7:1 | diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr index e5725e5ef1be0..cfc16d622e9c7 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing predicates of `user`. 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 predicates of `user` --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1 | LL | fn user() where S::P: std::fmt::Debug {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1 + | +LL | fn user() where S::P: std::fmt::Debug {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires computing predicates of `user`... --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1 | diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs b/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs index 7b2e1365a8fb0..2b6df6d2a327b 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs @@ -5,7 +5,7 @@ trait Bar { type Item; } trait Baz: Foo + Bar {} -//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] +//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item` [E0391] fn main() {} diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr index f51d9b381e62e..4bf53f462336c 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the super traits of `Baz` with associated type name `Item`. 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 the super traits of `Baz` with associated type name `Item` --> $DIR/ambiguous-associated-type2.rs:7:1 | LL | trait Baz: Foo + Bar {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/ambiguous-associated-type2.rs:7:1 + | +LL | trait Baz: Foo + Bar {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which immediately requires computing the super traits of `Baz` with associated type name `Item` again note: cycle used when computing the super predicates of `Baz` --> $DIR/ambiguous-associated-type2.rs:7:1 diff --git a/tests/ui/associated-types/issue-20825.stderr b/tests/ui/associated-types/issue-20825.stderr index fda07c78892e8..068f049cae5a0 100644 --- a/tests/ui/associated-types/issue-20825.stderr +++ b/tests/ui/associated-types/issue-20825.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the super traits of `Processor` with associated type name `Input`. 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 the super traits of `Processor` with associated type name `Input` --> $DIR/issue-20825.rs:5:1 | LL | pub trait Processor: Subscriber { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/issue-20825.rs:5:1 + | +LL | pub trait Processor: Subscriber { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which immediately requires computing the super traits of `Processor` with associated type name `Input` again note: cycle used when computing the super predicates of `Processor` --> $DIR/issue-20825.rs:5:1 diff --git a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr index 662d023b6aaa9..91e45b0ccb1e3 100644 --- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr +++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr @@ -8,12 +8,17 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default -error[E0391]: cycle detected when building specialization graph of trait `Trait`. 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 building specialization graph of trait `Trait` --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 | LL | trait Trait { 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 + --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 + | +LL | trait Trait { type Assoc; } + | ^^^^^^^^^^^^^^ = note: ...which immediately requires building specialization graph of trait `Trait` again note: cycle used when coherence checking all impls of trait `Trait` --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 diff --git a/tests/ui/const-generics/generic_const_exprs/closures.stderr b/tests/ui/const-generics/generic_const_exprs/closures.stderr index bac2ef58e9181..976cd67937a93 100644 --- a/tests/ui/const-generics/generic_const_exprs/closures.stderr +++ b/tests/ui/const-generics/generic_const_exprs/closures.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when building an abstract representation for `test::{constant#0}`. 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 building an abstract representation for `test::{constant#0}` --> $DIR/closures.rs:3:35 | LL | fn test() -> [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 + --> $DIR/closures.rs:3:35 + | +LL | fn test() -> [u8; N + (|| 42)()] {} + | ^^^^^^^^^^^^^ note: ...which requires building THIR for `test::{constant#0}`... --> $DIR/closures.rs:3:35 | diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr index c28a55ec9ae3c..bec7eca089d66 100644 --- a/tests/ui/const-generics/issues/issue-83765.stderr +++ b/tests/ui/const-generics/issues/issue-83765.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when resolving instance `::DIM, DIM> as TensorDimension>::DIM`. 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 resolving instance `::DIM, DIM> as TensorDimension>::DIM` --> $DIR/issue-83765.rs:5:5 | LL | const DIM: usize; | ^^^^^^^^^^^^^^^^ | +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 + --> $DIR/issue-83765.rs:5:5 + | +LL | const DIM: usize; + | ^^^^^^^^^^^^^^^^ note: ...which requires computing candidate for `::DIM, DIM> as TensorDimension>`... --> $DIR/issue-83765.rs:4:1 | diff --git a/tests/ui/consts/const-size_of-cycle.stderr b/tests/ui/consts/const-size_of-cycle.stderr index 28448223a2aaf..3a18c769246f3 100644 --- a/tests/ui/consts/const-size_of-cycle.stderr +++ b/tests/ui/consts/const-size_of-cycle.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when evaluating type-level constant. 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 evaluating type-level constant --> $DIR/const-size_of-cycle.rs:4:17 | LL | bytes: [u8; std::mem::size_of::()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/const-size_of-cycle.rs:4:17 + | +LL | bytes: [u8; std::mem::size_of::()] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`... --> $DIR/const-size_of-cycle.rs:4:17 | diff --git a/tests/ui/consts/issue-103790.stderr b/tests/ui/consts/issue-103790.stderr index 7eae2555ca105..917c8b1173ec1 100644 --- a/tests/ui/consts/issue-103790.stderr +++ b/tests/ui/consts/issue-103790.stderr @@ -22,12 +22,17 @@ help: add missing generic argument LL | struct S = { S }>; | +++ -error[E0391]: cycle detected when computing type of `S::S`. 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::S` --> $DIR/issue-103790.rs:4:32 | LL | struct 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 + --> $DIR/issue-103790.rs:4:32 + | +LL | struct S; + | ^ = note: ...which immediately requires computing type of `S::S` again note: cycle used when computing type of `S` --> $DIR/issue-103790.rs:4:1 @@ -35,12 +40,17 @@ note: cycle used when computing type of `S` LL | struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0391]: cycle detected when computing type of `S`. 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 | LL | struct 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 + --> $DIR/issue-103790.rs:4:1 + | +LL | struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires computing type of `S::S`... --> $DIR/issue-103790.rs:4:32 | diff --git a/tests/ui/consts/issue-36163.stderr b/tests/ui/consts/issue-36163.stderr index 2188dc0e356a8..fb2866554ffd3 100644 --- a/tests/ui/consts/issue-36163.stderr +++ b/tests/ui/consts/issue-36163.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant#0}`. 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 const-evaluating + checking `Foo::B::{constant#0}` --> $DIR/issue-36163.rs:4:9 | 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 + --> $DIR/issue-36163.rs:4:9 + | +LL | B = A, + | ^ note: ...which requires const-evaluating + checking `A`... --> $DIR/issue-36163.rs:1:18 | diff --git a/tests/ui/consts/issue-44415.stderr b/tests/ui/consts/issue-44415.stderr index 02be3e644f86b..12284ff2fb21e 100644 --- a/tests/ui/consts/issue-44415.stderr +++ b/tests/ui/consts/issue-44415.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when evaluating type-level constant. 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 evaluating type-level constant --> $DIR/issue-44415.rs:6:17 | LL | bytes: [u8; unsafe { intrinsics::size_of::() }], | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/issue-44415.rs:6:17 + | +LL | bytes: [u8; unsafe { intrinsics::size_of::() }], + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`... --> $DIR/issue-44415.rs:6:17 | diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr index e4838e9271067..7f9d7c1cb8b4a 100644 --- a/tests/ui/consts/recursive-zst-static.default.stderr +++ b/tests/ui/consts/recursive-zst-static.default.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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 const-evaluating + checking `FOO` --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = 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 + --> $DIR/recursive-zst-static.rs:10:1 + | +LL | static FOO: () = FOO; + | ^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `FOO`... --> $DIR/recursive-zst-static.rs:10:18 | diff --git a/tests/ui/consts/recursive-zst-static.unleash.stderr b/tests/ui/consts/recursive-zst-static.unleash.stderr index e4838e9271067..7f9d7c1cb8b4a 100644 --- a/tests/ui/consts/recursive-zst-static.unleash.stderr +++ b/tests/ui/consts/recursive-zst-static.unleash.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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 const-evaluating + checking `FOO` --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = 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 + --> $DIR/recursive-zst-static.rs:10:1 + | +LL | static FOO: () = FOO; + | ^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `FOO`... --> $DIR/recursive-zst-static.rs:10:18 | diff --git a/tests/ui/consts/write-to-static-mut-in-static.stderr b/tests/ui/consts/write-to-static-mut-in-static.stderr index 8816f952d1696..74c636c357b83 100644 --- a/tests/ui/consts/write-to-static-mut-in-static.stderr +++ b/tests/ui/consts/write-to-static-mut-in-static.stderr @@ -4,12 +4,17 @@ error[E0080]: could not evaluate static initializer LL | pub static mut B: () = unsafe { A = 1; }; | ^^^^^ modifying a static's initial value from another static's initializer -error[E0391]: cycle detected when const-evaluating + checking `C`. 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 const-evaluating + checking `C` --> $DIR/write-to-static-mut-in-static.rs:5:1 | LL | pub static mut C: u32 = unsafe { C = 1; 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 + --> $DIR/write-to-static-mut-in-static.rs:5:1 + | +LL | pub static mut C: u32 = unsafe { C = 1; 0 }; + | ^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `C`... --> $DIR/write-to-static-mut-in-static.rs:5:34 | diff --git a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr index cfc434e3a369c..3c1f7198de7c2 100644 --- a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr +++ b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing type of `Foo::X`. 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::X` --> $DIR/cycle-trait-default-type-trait.rs:4:23 | LL | trait 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 + --> $DIR/cycle-trait-default-type-trait.rs:4:23 + | +LL | trait Foo> { + | ^^^ = note: ...which immediately requires computing type of `Foo::X` again note: cycle used when collecting item types in top-level module --> $DIR/cycle-trait-default-type-trait.rs:4:1 diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr index 4bb9edf3cb57b..26ae7869524cb 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the super predicates of `Chromosome`. 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 the super predicates of `Chromosome` --> $DIR/cycle-trait-supertrait-direct.rs:3:19 | LL | trait Chromosome: Chromosome { | ^^^^^^^^^^ | +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 + --> $DIR/cycle-trait-supertrait-direct.rs:3:19 + | +LL | trait Chromosome: Chromosome { + | ^^^^^^^^^^ = note: ...which immediately requires computing the super predicates of `Chromosome` again note: cycle used when collecting item types in top-level module --> $DIR/cycle-trait-supertrait-direct.rs:3:1 diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr index 61af1f29db799..ec4f4a6ca5387 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the super predicates of `B`. 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 the super predicates of `B` --> $DIR/cycle-trait-supertrait-indirect.rs:7:10 | LL | trait B: C { | ^ | +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 + --> $DIR/cycle-trait-supertrait-indirect.rs:7:10 + | +LL | trait B: C { + | ^ note: ...which requires computing the super predicates of `C`... --> $DIR/cycle-trait-supertrait-indirect.rs:11:10 | diff --git a/tests/ui/cycle-trait/issue-12511.stderr b/tests/ui/cycle-trait/issue-12511.stderr index 7c61156065f7a..1e7152fbb3948 100644 --- a/tests/ui/cycle-trait/issue-12511.stderr +++ b/tests/ui/cycle-trait/issue-12511.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the super predicates of `T1`. 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 the super predicates of `T1` --> $DIR/issue-12511.rs:1:12 | 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 + --> $DIR/issue-12511.rs:1:12 + | +LL | trait T1 : T2 { + | ^^ note: ...which requires computing the super predicates of `T2`... --> $DIR/issue-12511.rs:5:12 | diff --git a/tests/ui/dyn-star/param-env-region-infer.next.stderr b/tests/ui/dyn-star/param-env-region-infer.next.stderr index 1222645567cb2..9ea7677389ce7 100644 --- a/tests/ui/dyn-star/param-env-region-infer.next.stderr +++ b/tests/ui/dyn-star/param-env-region-infer.next.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing type of `make_dyn_star::{opaque#0}`. 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 `make_dyn_star::{opaque#0}` --> $DIR/param-env-region-infer.rs:16:60 | LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + '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 + --> $DIR/param-env-region-infer.rs:16:60 + | +LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `make_dyn_star`... --> $DIR/param-env-region-infer.rs:16:1 | diff --git a/tests/ui/impl-trait/auto-trait-leak.stderr b/tests/ui/impl-trait/auto-trait-leak.stderr index 53b229c24028b..9c662053c81ac 100644 --- a/tests/ui/impl-trait/auto-trait-leak.stderr +++ b/tests/ui/impl-trait/auto-trait-leak.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`. 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 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ | +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 + --> $DIR/auto-trait-leak.rs:11:16 + | +LL | fn cycle1() -> impl Clone { + | ^^^^^^^^^^ note: ...which requires type-checking `cycle1`... --> $DIR/auto-trait-leak.rs:14:5 | @@ -34,12 +39,17 @@ LL | | Rc::new(String::from("foo")) LL | | } | |_^ -error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`. 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 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ | +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 + --> $DIR/auto-trait-leak.rs:11:16 + | +LL | fn cycle1() -> impl Clone { + | ^^^^^^^^^^ note: ...which requires type-checking `cycle1`... --> $DIR/auto-trait-leak.rs:14:5 | diff --git a/tests/ui/infinite/infinite-trait-alias-recursion.stderr b/tests/ui/infinite/infinite-trait-alias-recursion.stderr index 56331e17f624e..36894dc189402 100644 --- a/tests/ui/infinite/infinite-trait-alias-recursion.stderr +++ b/tests/ui/infinite/infinite-trait-alias-recursion.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the super predicates of `T1`. 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 the super predicates of `T1` --> $DIR/infinite-trait-alias-recursion.rs:3:12 | 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 + --> $DIR/infinite-trait-alias-recursion.rs:3:12 + | +LL | trait T1 = T2; + | ^^ note: ...which requires computing the super predicates of `T2`... --> $DIR/infinite-trait-alias-recursion.rs:6:12 | diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr index 547cbc10aeae1..7a4900e511065 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when expanding type alias `X1`. 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 expanding type alias `X1` --> $DIR/infinite-type-alias-mutual-recursion.rs:1:11 | LL | type X1 = X2; | ^^ | +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 + --> $DIR/infinite-type-alias-mutual-recursion.rs:1:11 + | +LL | type X1 = X2; + | ^^ note: ...which requires expanding type alias `X2`... --> $DIR/infinite-type-alias-mutual-recursion.rs:3:11 | diff --git a/tests/ui/infinite/infinite-vec-type-recursion.stderr b/tests/ui/infinite/infinite-vec-type-recursion.stderr index a7411cf73d98a..82a53f13f14ce 100644 --- a/tests/ui/infinite/infinite-vec-type-recursion.stderr +++ b/tests/ui/infinite/infinite-vec-type-recursion.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when expanding type alias `X`. 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 expanding type alias `X` --> $DIR/infinite-vec-type-recursion.rs:1:14 | LL | type X = Vec; | ^ | +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 + --> $DIR/infinite-vec-type-recursion.rs:1:14 + | +LL | type X = Vec; + | ^ = note: ...which immediately requires expanding type alias `X` again = note: type aliases cannot be recursive = help: consider using a struct, enum, or union instead to break the cycle diff --git a/tests/ui/issues/issue-17252.stderr b/tests/ui/issues/issue-17252.stderr index bd357003cc704..eaaa6b6dc6269 100644 --- a/tests/ui/issues/issue-17252.stderr +++ b/tests/ui/issues/issue-17252.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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 const-evaluating + checking `FOO` --> $DIR/issue-17252.rs:1:20 | LL | const FOO: usize = 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 + --> $DIR/issue-17252.rs:1:20 + | +LL | const FOO: usize = FOO; + | ^^^ = note: ...which immediately requires const-evaluating + checking `FOO` again note: cycle used when const-evaluating + checking `main::{constant#0}` --> $DIR/issue-17252.rs:4:18 diff --git a/tests/ui/issues/issue-20772.stderr b/tests/ui/issues/issue-20772.stderr index ab692e64cda24..1d51be5895494 100644 --- a/tests/ui/issues/issue-20772.stderr +++ b/tests/ui/issues/issue-20772.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the super traits of `T` with associated type name `Item`. 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 the super traits of `T` with associated type name `Item` --> $DIR/issue-20772.rs:1:1 | LL | trait T : Iterator | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/issue-20772.rs:1:1 + | +LL | trait T : Iterator + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which immediately requires computing the super traits of `T` with associated type name `Item` again note: cycle used when computing the super predicates of `T` --> $DIR/issue-20772.rs:1:1 diff --git a/tests/ui/issues/issue-21177.stderr b/tests/ui/issues/issue-21177.stderr index 69b26cbb10521..b3e550b36d88a 100644 --- a/tests/ui/issues/issue-21177.stderr +++ b/tests/ui/issues/issue-21177.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the bounds for type parameter `T`. 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 the bounds for type parameter `T` --> $DIR/issue-21177.rs:6:21 | LL | fn 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 + --> $DIR/issue-21177.rs:6:21 + | +LL | fn foo>() { } + | ^^^^ = note: ...which immediately requires computing the bounds for type parameter `T` again note: cycle used when computing explicit predicates of `foo` --> $DIR/issue-21177.rs:6:21 diff --git a/tests/ui/issues/issue-23302-1.stderr b/tests/ui/issues/issue-23302-1.stderr index f238b1c8a213c..86773f13511c5 100644 --- a/tests/ui/issues/issue-23302-1.stderr +++ b/tests/ui/issues/issue-23302-1.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `X::A::{constant#0}`. 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 const-evaluating + checking `X::A::{constant#0}` --> $DIR/issue-23302-1.rs:4:9 | 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 + --> $DIR/issue-23302-1.rs:4:9 + | +LL | A = X::A as isize, + | ^^^^^^^^^^^^^ = note: ...which immediately requires const-evaluating + checking `X::A::{constant#0}` again note: cycle used when simplifying constant for the type system `X::A::{constant#0}` --> $DIR/issue-23302-1.rs:4:9 diff --git a/tests/ui/issues/issue-23302-2.stderr b/tests/ui/issues/issue-23302-2.stderr index 454b4ad9aa956..67d07219d16c5 100644 --- a/tests/ui/issues/issue-23302-2.stderr +++ b/tests/ui/issues/issue-23302-2.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `Y::A::{constant#0}`. 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 const-evaluating + checking `Y::A::{constant#0}` --> $DIR/issue-23302-2.rs:4:9 | 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 + --> $DIR/issue-23302-2.rs:4:9 + | +LL | A = Y::B as isize, + | ^^^^^^^^^^^^^ = note: ...which immediately requires const-evaluating + checking `Y::A::{constant#0}` again note: cycle used when simplifying constant for the type system `Y::A::{constant#0}` --> $DIR/issue-23302-2.rs:4:9 diff --git a/tests/ui/issues/issue-23302-3.stderr b/tests/ui/issues/issue-23302-3.stderr index 318eb42ef3e93..0cbeee1d0798f 100644 --- a/tests/ui/issues/issue-23302-3.stderr +++ b/tests/ui/issues/issue-23302-3.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `A`. 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 const-evaluating + checking `A` --> $DIR/issue-23302-3.rs:1:16 | 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 + --> $DIR/issue-23302-3.rs:1:16 + | +LL | const A: i32 = B; + | ^ note: ...which requires const-evaluating + checking `B`... --> $DIR/issue-23302-3.rs:3:16 | diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr index b7c358a5f6acc..e2c0c9182bb58 100644 --- a/tests/ui/issues/issue-34373.stderr +++ b/tests/ui/issues/issue-34373.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing type of `Foo::T`. 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::T` --> $DIR/issue-34373.rs:7:30 | LL | pub 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 + --> $DIR/issue-34373.rs:7:30 + | +LL | pub struct Foo>>; + | ^^^^^^^^^^ note: ...which requires expanding type alias `DefaultFoo`... --> $DIR/issue-34373.rs:8:19 | diff --git a/tests/ui/recursion/issue-26548-recursion-via-normalize.rs b/tests/ui/recursion/issue-26548-recursion-via-normalize.rs index 91958dffcf4df..6c7fc4beb543d 100644 --- a/tests/ui/recursion/issue-26548-recursion-via-normalize.rs +++ b/tests/ui/recursion/issue-26548-recursion-via-normalize.rs @@ -1,4 +1,5 @@ //~ ERROR cycle detected when computing layout of `core::option::Option` +//~| 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<::It>`... //~| NOTE ...which again requires computing layout of `core::option::Option`, completing the cycle diff --git a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr index 48d146d9cdbb7..cdd4937e7243b 100644 --- a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr +++ b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr @@ -1,5 +1,6 @@ -error[E0391]: cycle detected when computing layout of `core::option::Option`. 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 layout of `core::option::Option` | + = 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<::It>`... = note: ...which again requires computing layout of `core::option::Option`, completing the cycle diff --git a/tests/ui/recursion/recursive-static-definition.stderr b/tests/ui/recursion/recursive-static-definition.stderr index e5b9e64bcb107..85ca99bef457f 100644 --- a/tests/ui/recursion/recursive-static-definition.stderr +++ b/tests/ui/recursion/recursive-static-definition.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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 const-evaluating + checking `FOO` --> $DIR/recursive-static-definition.rs:1:1 | LL | pub static FOO: u32 = 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 + --> $DIR/recursive-static-definition.rs:1:1 + | +LL | pub static FOO: u32 = FOO; + | ^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `FOO`... --> $DIR/recursive-static-definition.rs:1:23 | diff --git a/tests/ui/resolve/resolve-self-in-impl.stderr b/tests/ui/resolve/resolve-self-in-impl.stderr index e9b6793713fdd..f9dc44d5b9a1e 100644 --- a/tests/ui/resolve/resolve-self-in-impl.stderr +++ b/tests/ui/resolve/resolve-self-in-impl.stderr @@ -38,12 +38,17 @@ LL | impl (Self, Self) {} | = note: replace `Self` with a different type -error[E0391]: cycle detected when computing trait implemented by ``. 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 trait implemented by `` --> $DIR/resolve-self-in-impl.rs:19:1 | LL | impl Tr for 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 + --> $DIR/resolve-self-in-impl.rs:19:1 + | +LL | impl Tr for S {} + | ^^^^^^^^^^^^^^^^^^^^^^ = note: ...which immediately requires computing trait implemented by `` again note: cycle used when collecting item types in top-level module --> $DIR/resolve-self-in-impl.rs:1:1 diff --git a/tests/ui/sized/recursive-type-2.stderr b/tests/ui/sized/recursive-type-2.stderr index fc68cac9599cf..574c0e0021f2e 100644 --- a/tests/ui/sized/recursive-type-2.stderr +++ b/tests/ui/sized/recursive-type-2.stderr @@ -1,5 +1,6 @@ -error[E0391]: cycle detected when computing layout of `Foo<()>`. 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 layout of `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 = note: ...which requires computing layout of `<() as A>::Assoc`... = note: ...which again requires computing layout of `Foo<()>`, completing the cycle note: cycle used when elaborating drops for `main` diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs index 8efe17d5d0e86..511e41562b220 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs @@ -1,5 +1,5 @@ trait A: B + A {} -//~^ ERROR cycle detected when computing the super predicates of `A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] +//~^ ERROR cycle detected when computing the super predicates of `A` [E0391] trait B {} diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr index e20776dafbee4..af1fa1594ce05 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing the super predicates of `A`. 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 the super predicates of `A` --> $DIR/cyclic-trait-resolution.rs:1:14 | 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 + --> $DIR/cyclic-trait-resolution.rs:1:14 + | +LL | trait A: B + A {} + | ^ = note: ...which immediately requires computing the super predicates of `A` again note: cycle used when collecting item types in top-level module --> $DIR/cyclic-trait-resolution.rs:1:1 diff --git a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr index b7b6bab891686..be76d0b2621a9 100644 --- a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr +++ b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{constant#0}`. 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 simplifying constant for the type system `Alpha::V3::{constant#0}` --> $DIR/self-in-enum-definition.rs:5:10 | LL | V3 = Self::V1 {} as u8 + 2, | ^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/self-in-enum-definition.rs:5:10 + | +LL | V3 = Self::V1 {} as u8 + 2, + | ^^^^^^^^^^^^^^^^^^^^^ note: ...which requires simplifying constant for the type system `Alpha::V3::{constant#0}`... --> $DIR/self-in-enum-definition.rs:5:10 | diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs index a1c913292466c..fd3f9c61420e9 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs @@ -5,8 +5,8 @@ mod m { pub type Foo = impl std::fmt::Debug; - //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] - //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] + //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391] + //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391] pub fn foo() -> Foo { 22_u32 diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr index 6ed5d83509501..fb414bca91ece 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. 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 | LL | pub type Foo = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/auto-trait-leakage3.rs:7:20 + | +LL | pub type Foo = impl std::fmt::Debug; + | ^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `m::bar`... --> $DIR/auto-trait-leakage3.rs:16:9 | @@ -17,12 +22,17 @@ note: cycle used when checking item types in module `m` LL | mod m { | ^^^^^ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. 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 | LL | pub type Foo = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/auto-trait-leakage3.rs:7:20 + | +LL | pub type Foo = impl std::fmt::Debug; + | ^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `m::bar`... --> $DIR/auto-trait-leakage3.rs:15:5 | diff --git a/tests/ui/type-alias-impl-trait/inference-cycle.stderr b/tests/ui/type-alias-impl-trait/inference-cycle.stderr index 07b656a07220a..6a14ec8f099f6 100644 --- a/tests/ui/type-alias-impl-trait/inference-cycle.stderr +++ b/tests/ui/type-alias-impl-trait/inference-cycle.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. 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 | LL | pub type Foo = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/inference-cycle.rs:5:20 + | +LL | pub type Foo = impl std::fmt::Debug; + | ^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `m::bar`... --> $DIR/inference-cycle.rs:16:9 | @@ -17,12 +22,17 @@ note: cycle used when checking item types in module `m` LL | mod m { | ^^^^^ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. 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 | LL | pub type Foo = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/inference-cycle.rs:5:20 + | +LL | pub type Foo = impl std::fmt::Debug; + | ^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `m::bar`... --> $DIR/inference-cycle.rs:15:5 | diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr index 909ceedcc659e..e23b9f3845c7e 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing type of `Bug::{opaque#0}`. 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 `Bug::{opaque#0}` --> $DIR/issue-53092-2.rs:4:18 | LL | type Bug = impl Fn(T) -> U + Copy; | ^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/issue-53092-2.rs:4:18 + | +LL | type Bug = impl Fn(T) -> U + Copy; + | ^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `CONST_BUG`... --> $DIR/issue-53092-2.rs:6:1 | diff --git a/tests/ui/type-alias-impl-trait/reveal_local.stderr b/tests/ui/type-alias-impl-trait/reveal_local.stderr index e4a919db95650..6c5fe8cf32fa5 100644 --- a/tests/ui/type-alias-impl-trait/reveal_local.stderr +++ b/tests/ui/type-alias-impl-trait/reveal_local.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. 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 | LL | type Foo = impl Debug; | ^^^^^^^^^^ | +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 + --> $DIR/reveal_local.rs:5:12 + | +LL | type Foo = impl Debug; + | ^^^^^^^^^^ note: ...which requires type-checking `not_good`... --> $DIR/reveal_local.rs:15:5 | @@ -23,12 +28,17 @@ LL | | LL | | fn main() {} | |____________^ -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. 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 | LL | type Foo = impl Debug; | ^^^^^^^^^^ | +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 + --> $DIR/reveal_local.rs:5:12 + | +LL | type Foo = impl Debug; + | ^^^^^^^^^^ note: ...which requires type-checking `not_good`... --> $DIR/reveal_local.rs:12:1 | @@ -69,12 +79,17 @@ note: required by a bound in `is_send` LL | fn is_send() {} | ^^^^ required by this bound in `is_send` -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. 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 | LL | type Foo = impl Debug; | ^^^^^^^^^^ | +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 + --> $DIR/reveal_local.rs:5:12 + | +LL | type Foo = impl Debug; + | ^^^^^^^^^^ note: ...which requires type-checking `not_gooder`... --> $DIR/reveal_local.rs:19:1 | From 5f68a5d20473eecf06c2039e7e6dedd10e17990c Mon Sep 17 00:00:00 2001 From: nxya Date: Thu, 13 Jul 2023 11:41:44 -0400 Subject: [PATCH 3/7] fix miri test with links to query documentation --- src/tools/miri/tests/fail/layout_cycle.stderr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/miri/tests/fail/layout_cycle.stderr b/src/tools/miri/tests/fail/layout_cycle.stderr index 62b7d5fb77d12..011b1adab95dd 100644 --- a/src/tools/miri/tests/fail/layout_cycle.stderr +++ b/src/tools/miri/tests/fail/layout_cycle.stderr @@ -1,5 +1,6 @@ error[E0391]: cycle detected when computing layout of `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 ` as Tr>::I`... = note: ...which again requires computing layout of `S>`, completing the cycle From f92a9f6808292558e60fc0d86bbaabf6ebb670cc Mon Sep 17 00:00:00 2001 From: nxya Date: Wed, 12 Jul 2023 10:18:30 -0400 Subject: [PATCH 4/7] add links to query documentation for E0391 --- tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr | 2 +- tests/ui/associated-consts/defaults-cyclic-fail.stderr | 2 +- .../issue-24949-assoc-const-static-recursion-impl.stderr | 2 +- ...-24949-assoc-const-static-recursion-trait-default.stderr | 2 +- .../issue-24949-assoc-const-static-recursion-trait.stderr | 2 +- .../bugs/cycle-iat-inside-of-adt.stderr | 2 +- .../bugs/cycle-iat-inside-of-where-predicate.stderr | 2 +- .../ui/associated-type-bounds/ambiguous-associated-type2.rs | 3 ++- .../ambiguous-associated-type2.stderr | 2 +- tests/ui/associated-types/issue-20825.stderr | 2 +- .../coherence/coherence-inherited-assoc-ty-cycle-err.stderr | 2 +- tests/ui/const-generics/generic_const_exprs/closures.stderr | 2 +- tests/ui/const-generics/issues/issue-83765.stderr | 2 +- tests/ui/consts/const-size_of-cycle.stderr | 2 +- tests/ui/consts/issue-103790.stderr | 4 ++-- tests/ui/consts/issue-36163.stderr | 2 +- tests/ui/consts/issue-44415.stderr | 2 +- tests/ui/consts/recursive-zst-static.default.stderr | 2 +- tests/ui/consts/recursive-zst-static.unleash.stderr | 2 +- tests/ui/consts/write-to-static-mut-in-static.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr | 2 +- tests/ui/cycle-trait/issue-12511.stderr | 2 +- tests/ui/dyn-star/param-env-region-infer.next.stderr | 2 +- tests/ui/impl-trait/auto-trait-leak.stderr | 4 ++-- tests/ui/infinite/infinite-trait-alias-recursion.stderr | 2 +- .../ui/infinite/infinite-type-alias-mutual-recursion.stderr | 2 +- tests/ui/infinite/infinite-vec-type-recursion.stderr | 2 +- tests/ui/issues/issue-17252.stderr | 2 +- tests/ui/issues/issue-20772.stderr | 2 +- tests/ui/issues/issue-21177.stderr | 2 +- tests/ui/issues/issue-23302-1.stderr | 2 +- tests/ui/issues/issue-23302-2.stderr | 2 +- tests/ui/issues/issue-23302-3.stderr | 2 +- tests/ui/issues/issue-34373.stderr | 2 +- .../ui/recursion/issue-26548-recursion-via-normalize.stderr | 2 +- tests/ui/recursion/recursive-static-definition.stderr | 2 +- tests/ui/resolve/resolve-self-in-impl.stderr | 2 +- tests/ui/sized/recursive-type-2.stderr | 2 +- tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs | 2 +- .../traits/trait-upcasting/cyclic-trait-resolution.stderr | 2 +- .../type-alias-enum-variants/self-in-enum-definition.stderr | 2 +- tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs | 4 ++-- tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr | 4 ++-- tests/ui/type-alias-impl-trait/inference-cycle.stderr | 4 ++-- tests/ui/type-alias-impl-trait/issue-53092-2.stderr | 2 +- tests/ui/type-alias-impl-trait/reveal_local.stderr | 6 +++--- 48 files changed, 56 insertions(+), 55 deletions(-) diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr index 777b4c46798a6..cc2fbfd54201a 100644 --- a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr +++ b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `Bar` +error[E0391]: cycle detected when expanding type alias `Bar`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-110629-private-type-cycle-dyn.rs:1:38 | LL | type Bar<'a, 'b> = Box>>; diff --git a/tests/ui/associated-consts/defaults-cyclic-fail.stderr b/tests/ui/associated-consts/defaults-cyclic-fail.stderr index d6a13ae4dbf4b..10a6417f65867 100644 --- a/tests/ui/associated-consts/defaults-cyclic-fail.stderr +++ b/tests/ui/associated-consts/defaults-cyclic-fail.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Tr::A` +error[E0391]: cycle detected when const-evaluating + checking `Tr::A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/defaults-cyclic-fail.rs:5:19 | LL | const A: u8 = Self::B; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr index 40b3bcec2437c..5c15bc262cc76 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `::BAR` +error[E0391]: cycle detected when elaborating drops for `::BAR`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22 | LL | const BAR: u32 = IMPL_REF_BAR; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr index e58d93de59df5..ab85dc78fc19b 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR` +error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22 | LL | const BAR: u32 = DEFAULT_REF_BAR; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr index 6a97ea64dded6..48c1c32a1e28e 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `::BAR` +error[E0391]: cycle detected when elaborating drops for `::BAR`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22 | LL | const BAR: u32 = TRAIT_REF_BAR; diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr index f088ecba4a8a5..6e3864ebf2890 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing predicates of `Foo` +error[E0391]: cycle detected when computing predicates of `Foo`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-iat-inside-of-adt.rs:7:1 | LL | struct Foo { diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr index cfc16d622e9c7..64616c206611c 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing predicates of `user` +error[E0391]: cycle detected when computing predicates of `user`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1 | LL | fn user() where S::P: std::fmt::Debug {} diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs b/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs index 2b6df6d2a327b..b7a60a2cba427 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs @@ -5,7 +5,8 @@ trait Bar { type Item; } trait Baz: Foo + Bar {} -//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item` [E0391] +//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] + fn main() {} diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr index 4bf53f462336c..6a55afc402713 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `Baz` with associated type name `Item` +error[E0391]: cycle detected when computing the super traits of `Baz` with associated type name `Item`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/ambiguous-associated-type2.rs:7:1 | LL | trait Baz: Foo + Bar {} diff --git a/tests/ui/associated-types/issue-20825.stderr b/tests/ui/associated-types/issue-20825.stderr index 068f049cae5a0..2f2d9c20dd494 100644 --- a/tests/ui/associated-types/issue-20825.stderr +++ b/tests/ui/associated-types/issue-20825.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `Processor` with associated type name `Input` +error[E0391]: cycle detected when computing the super traits of `Processor` with associated type name `Input`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-20825.rs:5:1 | LL | pub trait Processor: Subscriber { diff --git a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr index 91e45b0ccb1e3..c9ee2340bab8a 100644 --- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr +++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr @@ -8,7 +8,7 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default -error[E0391]: cycle detected when building specialization graph of trait `Trait` +error[E0391]: cycle detected when building specialization graph of trait `Trait`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 | LL | trait Trait { type Assoc; } diff --git a/tests/ui/const-generics/generic_const_exprs/closures.stderr b/tests/ui/const-generics/generic_const_exprs/closures.stderr index 976cd67937a93..8c158555f507a 100644 --- a/tests/ui/const-generics/generic_const_exprs/closures.stderr +++ b/tests/ui/const-generics/generic_const_exprs/closures.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when building an abstract representation for `test::{constant#0}` +error[E0391]: cycle detected when building an abstract representation for `test::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/closures.rs:3:35 | LL | fn test() -> [u8; N + (|| 42)()] {} diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr index bec7eca089d66..656e5ca02d19c 100644 --- a/tests/ui/const-generics/issues/issue-83765.stderr +++ b/tests/ui/const-generics/issues/issue-83765.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when resolving instance `::DIM, DIM> as TensorDimension>::DIM` +error[E0391]: cycle detected when resolving instance `::DIM, DIM> as TensorDimension>::DIM`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-83765.rs:5:5 | LL | const DIM: usize; diff --git a/tests/ui/consts/const-size_of-cycle.stderr b/tests/ui/consts/const-size_of-cycle.stderr index 3a18c769246f3..8211bb53670cf 100644 --- a/tests/ui/consts/const-size_of-cycle.stderr +++ b/tests/ui/consts/const-size_of-cycle.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when evaluating type-level constant +error[E0391]: cycle detected when evaluating type-level constant. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/const-size_of-cycle.rs:4:17 | LL | bytes: [u8; std::mem::size_of::()] diff --git a/tests/ui/consts/issue-103790.stderr b/tests/ui/consts/issue-103790.stderr index 917c8b1173ec1..feb6138ced862 100644 --- a/tests/ui/consts/issue-103790.stderr +++ b/tests/ui/consts/issue-103790.stderr @@ -22,7 +22,7 @@ help: add missing generic argument LL | struct S = { S }>; | +++ -error[E0391]: cycle detected when computing type of `S::S` +error[E0391]: cycle detected when computing type of `S::S`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-103790.rs:4:32 | LL | struct S; @@ -40,7 +40,7 @@ note: cycle used when computing type of `S` LL | struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0391]: cycle detected when computing type of `S` +error[E0391]: cycle detected when computing type of `S`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-103790.rs:4:1 | LL | struct S; diff --git a/tests/ui/consts/issue-36163.stderr b/tests/ui/consts/issue-36163.stderr index fb2866554ffd3..de506b4c61482 100644 --- a/tests/ui/consts/issue-36163.stderr +++ b/tests/ui/consts/issue-36163.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant#0}` +error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-36163.rs:4:9 | LL | B = A, diff --git a/tests/ui/consts/issue-44415.stderr b/tests/ui/consts/issue-44415.stderr index 12284ff2fb21e..d258f48f4eea1 100644 --- a/tests/ui/consts/issue-44415.stderr +++ b/tests/ui/consts/issue-44415.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when evaluating type-level constant +error[E0391]: cycle detected when evaluating type-level constant. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-44415.rs:6:17 | LL | bytes: [u8; unsafe { intrinsics::size_of::() }], diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr index 7f9d7c1cb8b4a..f57ae40dac3a2 100644 --- a/tests/ui/consts/recursive-zst-static.default.stderr +++ b/tests/ui/consts/recursive-zst-static.default.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO` +error[E0391]: cycle detected when const-evaluating + checking `FOO`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = FOO; diff --git a/tests/ui/consts/recursive-zst-static.unleash.stderr b/tests/ui/consts/recursive-zst-static.unleash.stderr index 7f9d7c1cb8b4a..f57ae40dac3a2 100644 --- a/tests/ui/consts/recursive-zst-static.unleash.stderr +++ b/tests/ui/consts/recursive-zst-static.unleash.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO` +error[E0391]: cycle detected when const-evaluating + checking `FOO`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = FOO; diff --git a/tests/ui/consts/write-to-static-mut-in-static.stderr b/tests/ui/consts/write-to-static-mut-in-static.stderr index 74c636c357b83..a88d09f54b361 100644 --- a/tests/ui/consts/write-to-static-mut-in-static.stderr +++ b/tests/ui/consts/write-to-static-mut-in-static.stderr @@ -4,7 +4,7 @@ error[E0080]: could not evaluate static initializer LL | pub static mut B: () = unsafe { A = 1; }; | ^^^^^ modifying a static's initial value from another static's initializer -error[E0391]: cycle detected when const-evaluating + checking `C` +error[E0391]: cycle detected when const-evaluating + checking `C`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/write-to-static-mut-in-static.rs:5:1 | LL | pub static mut C: u32 = unsafe { C = 1; 0 }; diff --git a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr index 3c1f7198de7c2..39d4a96da29fa 100644 --- a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr +++ b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::X` +error[E0391]: cycle detected when computing type of `Foo::X`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-trait-default-type-trait.rs:4:23 | LL | trait Foo> { diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr index 26ae7869524cb..69c1b47ab967a 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `Chromosome` +error[E0391]: cycle detected when computing the super predicates of `Chromosome`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-trait-supertrait-direct.rs:3:19 | LL | trait Chromosome: Chromosome { diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr index ec4f4a6ca5387..42ecd262545fc 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `B` +error[E0391]: cycle detected when computing the super predicates of `B`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cycle-trait-supertrait-indirect.rs:7:10 | LL | trait B: C { diff --git a/tests/ui/cycle-trait/issue-12511.stderr b/tests/ui/cycle-trait/issue-12511.stderr index 1e7152fbb3948..000726d558533 100644 --- a/tests/ui/cycle-trait/issue-12511.stderr +++ b/tests/ui/cycle-trait/issue-12511.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `T1` +error[E0391]: cycle detected when computing the super predicates of `T1`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-12511.rs:1:12 | LL | trait T1 : T2 { diff --git a/tests/ui/dyn-star/param-env-region-infer.next.stderr b/tests/ui/dyn-star/param-env-region-infer.next.stderr index 9ea7677389ce7..8ba18c54ef87d 100644 --- a/tests/ui/dyn-star/param-env-region-infer.next.stderr +++ b/tests/ui/dyn-star/param-env-region-infer.next.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `make_dyn_star::{opaque#0}` +error[E0391]: cycle detected when computing type of `make_dyn_star::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/param-env-region-infer.rs:16:60 | LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a { diff --git a/tests/ui/impl-trait/auto-trait-leak.stderr b/tests/ui/impl-trait/auto-trait-leak.stderr index 9c662053c81ac..72717f116c120 100644 --- a/tests/ui/impl-trait/auto-trait-leak.stderr +++ b/tests/ui/impl-trait/auto-trait-leak.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}` +error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/auto-trait-leak.rs:11:16 | LL | fn cycle1() -> impl Clone { @@ -39,7 +39,7 @@ LL | | Rc::new(String::from("foo")) LL | | } | |_^ -error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}` +error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/auto-trait-leak.rs:11:16 | LL | fn cycle1() -> impl Clone { diff --git a/tests/ui/infinite/infinite-trait-alias-recursion.stderr b/tests/ui/infinite/infinite-trait-alias-recursion.stderr index 36894dc189402..0439275757175 100644 --- a/tests/ui/infinite/infinite-trait-alias-recursion.stderr +++ b/tests/ui/infinite/infinite-trait-alias-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `T1` +error[E0391]: cycle detected when computing the super predicates of `T1`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/infinite-trait-alias-recursion.rs:3:12 | LL | trait T1 = T2; diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr index 7a4900e511065..55005ce351566 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `X1` +error[E0391]: cycle detected when expanding type alias `X1`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/infinite-type-alias-mutual-recursion.rs:1:11 | LL | type X1 = X2; diff --git a/tests/ui/infinite/infinite-vec-type-recursion.stderr b/tests/ui/infinite/infinite-vec-type-recursion.stderr index 82a53f13f14ce..8b9d44e0bd1ff 100644 --- a/tests/ui/infinite/infinite-vec-type-recursion.stderr +++ b/tests/ui/infinite/infinite-vec-type-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `X` +error[E0391]: cycle detected when expanding type alias `X`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/infinite-vec-type-recursion.rs:1:14 | LL | type X = Vec; diff --git a/tests/ui/issues/issue-17252.stderr b/tests/ui/issues/issue-17252.stderr index eaaa6b6dc6269..2bec022611e75 100644 --- a/tests/ui/issues/issue-17252.stderr +++ b/tests/ui/issues/issue-17252.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO` +error[E0391]: cycle detected when const-evaluating + checking `FOO`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-17252.rs:1:20 | LL | const FOO: usize = FOO; diff --git a/tests/ui/issues/issue-20772.stderr b/tests/ui/issues/issue-20772.stderr index 1d51be5895494..1a3c4feff0fae 100644 --- a/tests/ui/issues/issue-20772.stderr +++ b/tests/ui/issues/issue-20772.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `T` with associated type name `Item` +error[E0391]: cycle detected when computing the super traits of `T` with associated type name `Item`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-20772.rs:1:1 | LL | trait T : Iterator diff --git a/tests/ui/issues/issue-21177.stderr b/tests/ui/issues/issue-21177.stderr index b3e550b36d88a..2f8df03834d60 100644 --- a/tests/ui/issues/issue-21177.stderr +++ b/tests/ui/issues/issue-21177.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the bounds for type parameter `T` +error[E0391]: cycle detected when computing the bounds for type parameter `T`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-21177.rs:6:21 | LL | fn foo>() { } diff --git a/tests/ui/issues/issue-23302-1.stderr b/tests/ui/issues/issue-23302-1.stderr index 86773f13511c5..3c77582d19f22 100644 --- a/tests/ui/issues/issue-23302-1.stderr +++ b/tests/ui/issues/issue-23302-1.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `X::A::{constant#0}` +error[E0391]: cycle detected when const-evaluating + checking `X::A::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-23302-1.rs:4:9 | LL | A = X::A as isize, diff --git a/tests/ui/issues/issue-23302-2.stderr b/tests/ui/issues/issue-23302-2.stderr index 67d07219d16c5..fb2c4b5b483bc 100644 --- a/tests/ui/issues/issue-23302-2.stderr +++ b/tests/ui/issues/issue-23302-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Y::A::{constant#0}` +error[E0391]: cycle detected when const-evaluating + checking `Y::A::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-23302-2.rs:4:9 | LL | A = Y::B as isize, diff --git a/tests/ui/issues/issue-23302-3.stderr b/tests/ui/issues/issue-23302-3.stderr index 0cbeee1d0798f..253eca73510cc 100644 --- a/tests/ui/issues/issue-23302-3.stderr +++ b/tests/ui/issues/issue-23302-3.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `A` +error[E0391]: cycle detected when const-evaluating + checking `A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-23302-3.rs:1:16 | LL | const A: i32 = B; diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr index e2c0c9182bb58..045a82f8779a4 100644 --- a/tests/ui/issues/issue-34373.stderr +++ b/tests/ui/issues/issue-34373.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::T` +error[E0391]: cycle detected when computing type of `Foo::T`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-34373.rs:7:30 | LL | pub struct Foo>>; diff --git a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr index cdd4937e7243b..590c818c7268b 100644 --- a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr +++ b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing layout of `core::option::Option` +error[E0391]: cycle detected when computing layout of `core::option::Option`. 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: 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`... diff --git a/tests/ui/recursion/recursive-static-definition.stderr b/tests/ui/recursion/recursive-static-definition.stderr index 85ca99bef457f..1d5c91913a691 100644 --- a/tests/ui/recursion/recursive-static-definition.stderr +++ b/tests/ui/recursion/recursive-static-definition.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO` +error[E0391]: cycle detected when const-evaluating + checking `FOO`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/recursive-static-definition.rs:1:1 | LL | pub static FOO: u32 = FOO; diff --git a/tests/ui/resolve/resolve-self-in-impl.stderr b/tests/ui/resolve/resolve-self-in-impl.stderr index f9dc44d5b9a1e..e245c10db0f4c 100644 --- a/tests/ui/resolve/resolve-self-in-impl.stderr +++ b/tests/ui/resolve/resolve-self-in-impl.stderr @@ -38,7 +38,7 @@ LL | impl (Self, Self) {} | = note: replace `Self` with a different type -error[E0391]: cycle detected when computing trait implemented by `` +error[E0391]: cycle detected when computing trait implemented by ``. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/resolve-self-in-impl.rs:19:1 | LL | impl Tr for S {} diff --git a/tests/ui/sized/recursive-type-2.stderr b/tests/ui/sized/recursive-type-2.stderr index 574c0e0021f2e..b4dbe5333b56b 100644 --- a/tests/ui/sized/recursive-type-2.stderr +++ b/tests/ui/sized/recursive-type-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing layout of `Foo<()>` +error[E0391]: cycle detected when computing layout of `Foo<()>`. 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: 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 `<() as A>::Assoc`... diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs index 511e41562b220..8efe17d5d0e86 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs @@ -1,5 +1,5 @@ trait A: B + A {} -//~^ ERROR cycle detected when computing the super predicates of `A` [E0391] +//~^ ERROR cycle detected when computing the super predicates of `A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] trait B {} diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr index af1fa1594ce05..cdb26df0e5c4a 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `A` +error[E0391]: cycle detected when computing the super predicates of `A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/cyclic-trait-resolution.rs:1:14 | LL | trait A: B + A {} diff --git a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr index be76d0b2621a9..bf1c3d1fc76b7 100644 --- a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr +++ b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{constant#0}` +error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{constant#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/self-in-enum-definition.rs:5:10 | LL | V3 = Self::V1 {} as u8 + 2, diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs index fd3f9c61420e9..a1c913292466c 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs @@ -5,8 +5,8 @@ mod m { pub type Foo = impl std::fmt::Debug; - //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391] - //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391] + //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] + //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] pub fn foo() -> Foo { 22_u32 diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr index fb414bca91ece..fcb06240f9e61 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/auto-trait-leakage3.rs:7:20 | LL | pub type Foo = impl std::fmt::Debug; @@ -22,7 +22,7 @@ note: cycle used when checking item types in module `m` LL | mod m { | ^^^^^ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/auto-trait-leakage3.rs:7:20 | LL | pub type Foo = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/inference-cycle.stderr b/tests/ui/type-alias-impl-trait/inference-cycle.stderr index 6a14ec8f099f6..07f934dc8a991 100644 --- a/tests/ui/type-alias-impl-trait/inference-cycle.stderr +++ b/tests/ui/type-alias-impl-trait/inference-cycle.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/inference-cycle.rs:5:20 | LL | pub type Foo = impl std::fmt::Debug; @@ -22,7 +22,7 @@ note: cycle used when checking item types in module `m` LL | mod m { | ^^^^^ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/inference-cycle.rs:5:20 | LL | pub type Foo = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr index e23b9f3845c7e..8e1b9e10469c3 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Bug::{opaque#0}` +error[E0391]: cycle detected when computing type of `Bug::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/issue-53092-2.rs:4:18 | LL | type Bug = impl Fn(T) -> U + Copy; diff --git a/tests/ui/type-alias-impl-trait/reveal_local.stderr b/tests/ui/type-alias-impl-trait/reveal_local.stderr index 6c5fe8cf32fa5..46f61ffc33574 100644 --- a/tests/ui/type-alias-impl-trait/reveal_local.stderr +++ b/tests/ui/type-alias-impl-trait/reveal_local.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/reveal_local.rs:5:12 | LL | type Foo = impl Debug; @@ -28,7 +28,7 @@ LL | | LL | | fn main() {} | |____________^ -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/reveal_local.rs:5:12 | LL | type Foo = impl Debug; @@ -79,7 +79,7 @@ note: required by a bound in `is_send` LL | fn is_send() {} | ^^^^ required by this bound in `is_send` -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` +error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. --> $DIR/reveal_local.rs:5:12 | LL | type Foo = impl Debug; From e6e88920514d2428130fe1d95ae30ae538ac8644 Mon Sep 17 00:00:00 2001 From: nxya Date: Wed, 12 Jul 2023 22:59:01 -0400 Subject: [PATCH 5/7] added links as a note --- tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr | 2 +- tests/ui/associated-consts/defaults-cyclic-fail.stderr | 2 +- .../issue-24949-assoc-const-static-recursion-impl.stderr | 2 +- ...-24949-assoc-const-static-recursion-trait-default.stderr | 2 +- .../issue-24949-assoc-const-static-recursion-trait.stderr | 2 +- .../bugs/cycle-iat-inside-of-adt.stderr | 2 +- .../bugs/cycle-iat-inside-of-where-predicate.stderr | 2 +- .../ui/associated-type-bounds/ambiguous-associated-type2.rs | 2 +- .../ambiguous-associated-type2.stderr | 2 +- tests/ui/associated-types/issue-20825.stderr | 2 +- .../coherence/coherence-inherited-assoc-ty-cycle-err.stderr | 2 +- tests/ui/const-generics/generic_const_exprs/closures.stderr | 2 +- tests/ui/const-generics/issues/issue-83765.stderr | 2 +- tests/ui/consts/const-size_of-cycle.stderr | 2 +- tests/ui/consts/issue-103790.stderr | 4 ++-- tests/ui/consts/issue-36163.stderr | 2 +- tests/ui/consts/issue-44415.stderr | 2 +- tests/ui/consts/recursive-zst-static.default.stderr | 2 +- tests/ui/consts/recursive-zst-static.unleash.stderr | 2 +- tests/ui/consts/write-to-static-mut-in-static.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr | 2 +- tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr | 2 +- tests/ui/cycle-trait/issue-12511.stderr | 2 +- tests/ui/dyn-star/param-env-region-infer.next.stderr | 2 +- tests/ui/impl-trait/auto-trait-leak.stderr | 4 ++-- tests/ui/infinite/infinite-trait-alias-recursion.stderr | 2 +- .../ui/infinite/infinite-type-alias-mutual-recursion.stderr | 2 +- tests/ui/infinite/infinite-vec-type-recursion.stderr | 2 +- tests/ui/issues/issue-17252.stderr | 2 +- tests/ui/issues/issue-20772.stderr | 2 +- tests/ui/issues/issue-21177.stderr | 2 +- tests/ui/issues/issue-23302-1.stderr | 2 +- tests/ui/issues/issue-23302-2.stderr | 2 +- tests/ui/issues/issue-23302-3.stderr | 2 +- tests/ui/issues/issue-34373.stderr | 2 +- .../ui/recursion/issue-26548-recursion-via-normalize.stderr | 2 +- tests/ui/recursion/recursive-static-definition.stderr | 2 +- tests/ui/resolve/resolve-self-in-impl.stderr | 2 +- tests/ui/sized/recursive-type-2.stderr | 2 +- tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs | 2 +- .../traits/trait-upcasting/cyclic-trait-resolution.stderr | 2 +- .../type-alias-enum-variants/self-in-enum-definition.stderr | 2 +- tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs | 4 ++-- tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr | 4 ++-- tests/ui/type-alias-impl-trait/inference-cycle.stderr | 4 ++-- tests/ui/type-alias-impl-trait/issue-53092-2.stderr | 2 +- tests/ui/type-alias-impl-trait/reveal_local.stderr | 6 +++--- 48 files changed, 55 insertions(+), 55 deletions(-) diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr index cc2fbfd54201a..777b4c46798a6 100644 --- a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr +++ b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `Bar`. 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 expanding type alias `Bar` --> $DIR/issue-110629-private-type-cycle-dyn.rs:1:38 | LL | type Bar<'a, 'b> = Box>>; diff --git a/tests/ui/associated-consts/defaults-cyclic-fail.stderr b/tests/ui/associated-consts/defaults-cyclic-fail.stderr index 10a6417f65867..d6a13ae4dbf4b 100644 --- a/tests/ui/associated-consts/defaults-cyclic-fail.stderr +++ b/tests/ui/associated-consts/defaults-cyclic-fail.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Tr::A`. 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 const-evaluating + checking `Tr::A` --> $DIR/defaults-cyclic-fail.rs:5:19 | LL | const A: u8 = Self::B; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr index 5c15bc262cc76..40b3bcec2437c 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `::BAR`. 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 elaborating drops for `::BAR` --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22 | LL | const BAR: u32 = IMPL_REF_BAR; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr index ab85dc78fc19b..e58d93de59df5 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR`. 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 elaborating drops for `FooDefault::BAR` --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22 | LL | const BAR: u32 = DEFAULT_REF_BAR; diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr index 48c1c32a1e28e..6a97ea64dded6 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when elaborating drops for `::BAR`. 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 elaborating drops for `::BAR` --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22 | LL | const BAR: u32 = TRAIT_REF_BAR; diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr index 6e3864ebf2890..f088ecba4a8a5 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing predicates of `Foo`. 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 predicates of `Foo` --> $DIR/cycle-iat-inside-of-adt.rs:7:1 | LL | struct Foo { diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr index 64616c206611c..cfc16d622e9c7 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing predicates of `user`. 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 predicates of `user` --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1 | LL | fn user() where S::P: std::fmt::Debug {} diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs b/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs index b7a60a2cba427..e9cd57f173979 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.rs @@ -5,7 +5,7 @@ trait Bar { type Item; } trait Baz: Foo + Bar {} -//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] +//~^ ERROR cycle detected when computing the super traits of `Baz` with associated type name `Item` [E0391] diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr index 6a55afc402713..4bf53f462336c 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `Baz` with associated type name `Item`. 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 the super traits of `Baz` with associated type name `Item` --> $DIR/ambiguous-associated-type2.rs:7:1 | LL | trait Baz: Foo + Bar {} diff --git a/tests/ui/associated-types/issue-20825.stderr b/tests/ui/associated-types/issue-20825.stderr index 2f2d9c20dd494..068f049cae5a0 100644 --- a/tests/ui/associated-types/issue-20825.stderr +++ b/tests/ui/associated-types/issue-20825.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `Processor` with associated type name `Input`. 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 the super traits of `Processor` with associated type name `Input` --> $DIR/issue-20825.rs:5:1 | LL | pub trait Processor: Subscriber { diff --git a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr index c9ee2340bab8a..91e45b0ccb1e3 100644 --- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr +++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr @@ -8,7 +8,7 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default -error[E0391]: cycle detected when building specialization graph of trait `Trait`. 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 building specialization graph of trait `Trait` --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 | LL | trait Trait { type Assoc; } diff --git a/tests/ui/const-generics/generic_const_exprs/closures.stderr b/tests/ui/const-generics/generic_const_exprs/closures.stderr index 8c158555f507a..976cd67937a93 100644 --- a/tests/ui/const-generics/generic_const_exprs/closures.stderr +++ b/tests/ui/const-generics/generic_const_exprs/closures.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when building an abstract representation for `test::{constant#0}`. 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 building an abstract representation for `test::{constant#0}` --> $DIR/closures.rs:3:35 | LL | fn test() -> [u8; N + (|| 42)()] {} diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr index 656e5ca02d19c..bec7eca089d66 100644 --- a/tests/ui/const-generics/issues/issue-83765.stderr +++ b/tests/ui/const-generics/issues/issue-83765.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when resolving instance `::DIM, DIM> as TensorDimension>::DIM`. 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 resolving instance `::DIM, DIM> as TensorDimension>::DIM` --> $DIR/issue-83765.rs:5:5 | LL | const DIM: usize; diff --git a/tests/ui/consts/const-size_of-cycle.stderr b/tests/ui/consts/const-size_of-cycle.stderr index 8211bb53670cf..3a18c769246f3 100644 --- a/tests/ui/consts/const-size_of-cycle.stderr +++ b/tests/ui/consts/const-size_of-cycle.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when evaluating type-level constant. 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 evaluating type-level constant --> $DIR/const-size_of-cycle.rs:4:17 | LL | bytes: [u8; std::mem::size_of::()] diff --git a/tests/ui/consts/issue-103790.stderr b/tests/ui/consts/issue-103790.stderr index feb6138ced862..917c8b1173ec1 100644 --- a/tests/ui/consts/issue-103790.stderr +++ b/tests/ui/consts/issue-103790.stderr @@ -22,7 +22,7 @@ help: add missing generic argument LL | struct S = { S }>; | +++ -error[E0391]: cycle detected when computing type of `S::S`. 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::S` --> $DIR/issue-103790.rs:4:32 | LL | struct S; @@ -40,7 +40,7 @@ note: cycle used when computing type of `S` LL | struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0391]: cycle detected when computing type of `S`. 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 | LL | struct S; diff --git a/tests/ui/consts/issue-36163.stderr b/tests/ui/consts/issue-36163.stderr index de506b4c61482..fb2866554ffd3 100644 --- a/tests/ui/consts/issue-36163.stderr +++ b/tests/ui/consts/issue-36163.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant#0}`. 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 const-evaluating + checking `Foo::B::{constant#0}` --> $DIR/issue-36163.rs:4:9 | LL | B = A, diff --git a/tests/ui/consts/issue-44415.stderr b/tests/ui/consts/issue-44415.stderr index d258f48f4eea1..12284ff2fb21e 100644 --- a/tests/ui/consts/issue-44415.stderr +++ b/tests/ui/consts/issue-44415.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when evaluating type-level constant. 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 evaluating type-level constant --> $DIR/issue-44415.rs:6:17 | LL | bytes: [u8; unsafe { intrinsics::size_of::() }], diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr index f57ae40dac3a2..7f9d7c1cb8b4a 100644 --- a/tests/ui/consts/recursive-zst-static.default.stderr +++ b/tests/ui/consts/recursive-zst-static.default.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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 const-evaluating + checking `FOO` --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = FOO; diff --git a/tests/ui/consts/recursive-zst-static.unleash.stderr b/tests/ui/consts/recursive-zst-static.unleash.stderr index f57ae40dac3a2..7f9d7c1cb8b4a 100644 --- a/tests/ui/consts/recursive-zst-static.unleash.stderr +++ b/tests/ui/consts/recursive-zst-static.unleash.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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 const-evaluating + checking `FOO` --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = FOO; diff --git a/tests/ui/consts/write-to-static-mut-in-static.stderr b/tests/ui/consts/write-to-static-mut-in-static.stderr index a88d09f54b361..74c636c357b83 100644 --- a/tests/ui/consts/write-to-static-mut-in-static.stderr +++ b/tests/ui/consts/write-to-static-mut-in-static.stderr @@ -4,7 +4,7 @@ error[E0080]: could not evaluate static initializer LL | pub static mut B: () = unsafe { A = 1; }; | ^^^^^ modifying a static's initial value from another static's initializer -error[E0391]: cycle detected when const-evaluating + checking `C`. 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 const-evaluating + checking `C` --> $DIR/write-to-static-mut-in-static.rs:5:1 | LL | pub static mut C: u32 = unsafe { C = 1; 0 }; diff --git a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr index 39d4a96da29fa..3c1f7198de7c2 100644 --- a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr +++ b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::X`. 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::X` --> $DIR/cycle-trait-default-type-trait.rs:4:23 | LL | trait Foo> { diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr index 69c1b47ab967a..26ae7869524cb 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `Chromosome`. 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 the super predicates of `Chromosome` --> $DIR/cycle-trait-supertrait-direct.rs:3:19 | LL | trait Chromosome: Chromosome { diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr index 42ecd262545fc..ec4f4a6ca5387 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `B`. 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 the super predicates of `B` --> $DIR/cycle-trait-supertrait-indirect.rs:7:10 | LL | trait B: C { diff --git a/tests/ui/cycle-trait/issue-12511.stderr b/tests/ui/cycle-trait/issue-12511.stderr index 000726d558533..1e7152fbb3948 100644 --- a/tests/ui/cycle-trait/issue-12511.stderr +++ b/tests/ui/cycle-trait/issue-12511.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `T1`. 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 the super predicates of `T1` --> $DIR/issue-12511.rs:1:12 | LL | trait T1 : T2 { diff --git a/tests/ui/dyn-star/param-env-region-infer.next.stderr b/tests/ui/dyn-star/param-env-region-infer.next.stderr index 8ba18c54ef87d..9ea7677389ce7 100644 --- a/tests/ui/dyn-star/param-env-region-infer.next.stderr +++ b/tests/ui/dyn-star/param-env-region-infer.next.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `make_dyn_star::{opaque#0}`. 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 `make_dyn_star::{opaque#0}` --> $DIR/param-env-region-infer.rs:16:60 | LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a { diff --git a/tests/ui/impl-trait/auto-trait-leak.stderr b/tests/ui/impl-trait/auto-trait-leak.stderr index 72717f116c120..9c662053c81ac 100644 --- a/tests/ui/impl-trait/auto-trait-leak.stderr +++ b/tests/ui/impl-trait/auto-trait-leak.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`. 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 | LL | fn cycle1() -> impl Clone { @@ -39,7 +39,7 @@ LL | | Rc::new(String::from("foo")) LL | | } | |_^ -error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`. 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 | LL | fn cycle1() -> impl Clone { diff --git a/tests/ui/infinite/infinite-trait-alias-recursion.stderr b/tests/ui/infinite/infinite-trait-alias-recursion.stderr index 0439275757175..36894dc189402 100644 --- a/tests/ui/infinite/infinite-trait-alias-recursion.stderr +++ b/tests/ui/infinite/infinite-trait-alias-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `T1`. 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 the super predicates of `T1` --> $DIR/infinite-trait-alias-recursion.rs:3:12 | LL | trait T1 = T2; diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr index 55005ce351566..7a4900e511065 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `X1`. 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 expanding type alias `X1` --> $DIR/infinite-type-alias-mutual-recursion.rs:1:11 | LL | type X1 = X2; diff --git a/tests/ui/infinite/infinite-vec-type-recursion.stderr b/tests/ui/infinite/infinite-vec-type-recursion.stderr index 8b9d44e0bd1ff..82a53f13f14ce 100644 --- a/tests/ui/infinite/infinite-vec-type-recursion.stderr +++ b/tests/ui/infinite/infinite-vec-type-recursion.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when expanding type alias `X`. 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 expanding type alias `X` --> $DIR/infinite-vec-type-recursion.rs:1:14 | LL | type X = Vec; diff --git a/tests/ui/issues/issue-17252.stderr b/tests/ui/issues/issue-17252.stderr index 2bec022611e75..eaaa6b6dc6269 100644 --- a/tests/ui/issues/issue-17252.stderr +++ b/tests/ui/issues/issue-17252.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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 const-evaluating + checking `FOO` --> $DIR/issue-17252.rs:1:20 | LL | const FOO: usize = FOO; diff --git a/tests/ui/issues/issue-20772.stderr b/tests/ui/issues/issue-20772.stderr index 1a3c4feff0fae..1d51be5895494 100644 --- a/tests/ui/issues/issue-20772.stderr +++ b/tests/ui/issues/issue-20772.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super traits of `T` with associated type name `Item`. 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 the super traits of `T` with associated type name `Item` --> $DIR/issue-20772.rs:1:1 | LL | trait T : Iterator diff --git a/tests/ui/issues/issue-21177.stderr b/tests/ui/issues/issue-21177.stderr index 2f8df03834d60..b3e550b36d88a 100644 --- a/tests/ui/issues/issue-21177.stderr +++ b/tests/ui/issues/issue-21177.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the bounds for type parameter `T`. 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 the bounds for type parameter `T` --> $DIR/issue-21177.rs:6:21 | LL | fn foo>() { } diff --git a/tests/ui/issues/issue-23302-1.stderr b/tests/ui/issues/issue-23302-1.stderr index 3c77582d19f22..86773f13511c5 100644 --- a/tests/ui/issues/issue-23302-1.stderr +++ b/tests/ui/issues/issue-23302-1.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `X::A::{constant#0}`. 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 const-evaluating + checking `X::A::{constant#0}` --> $DIR/issue-23302-1.rs:4:9 | LL | A = X::A as isize, diff --git a/tests/ui/issues/issue-23302-2.stderr b/tests/ui/issues/issue-23302-2.stderr index fb2c4b5b483bc..67d07219d16c5 100644 --- a/tests/ui/issues/issue-23302-2.stderr +++ b/tests/ui/issues/issue-23302-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `Y::A::{constant#0}`. 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 const-evaluating + checking `Y::A::{constant#0}` --> $DIR/issue-23302-2.rs:4:9 | LL | A = Y::B as isize, diff --git a/tests/ui/issues/issue-23302-3.stderr b/tests/ui/issues/issue-23302-3.stderr index 253eca73510cc..0cbeee1d0798f 100644 --- a/tests/ui/issues/issue-23302-3.stderr +++ b/tests/ui/issues/issue-23302-3.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `A`. 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 const-evaluating + checking `A` --> $DIR/issue-23302-3.rs:1:16 | LL | const A: i32 = B; diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr index 045a82f8779a4..e2c0c9182bb58 100644 --- a/tests/ui/issues/issue-34373.stderr +++ b/tests/ui/issues/issue-34373.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::T`. 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::T` --> $DIR/issue-34373.rs:7:30 | LL | pub struct Foo>>; diff --git a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr index 590c818c7268b..cdd4937e7243b 100644 --- a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr +++ b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing layout of `core::option::Option`. 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 layout of `core::option::Option` | = 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`... diff --git a/tests/ui/recursion/recursive-static-definition.stderr b/tests/ui/recursion/recursive-static-definition.stderr index 1d5c91913a691..85ca99bef457f 100644 --- a/tests/ui/recursion/recursive-static-definition.stderr +++ b/tests/ui/recursion/recursive-static-definition.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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 const-evaluating + checking `FOO` --> $DIR/recursive-static-definition.rs:1:1 | LL | pub static FOO: u32 = FOO; diff --git a/tests/ui/resolve/resolve-self-in-impl.stderr b/tests/ui/resolve/resolve-self-in-impl.stderr index e245c10db0f4c..f9dc44d5b9a1e 100644 --- a/tests/ui/resolve/resolve-self-in-impl.stderr +++ b/tests/ui/resolve/resolve-self-in-impl.stderr @@ -38,7 +38,7 @@ LL | impl (Self, Self) {} | = note: replace `Self` with a different type -error[E0391]: cycle detected when computing trait implemented by ``. 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 trait implemented by `` --> $DIR/resolve-self-in-impl.rs:19:1 | LL | impl Tr for S {} diff --git a/tests/ui/sized/recursive-type-2.stderr b/tests/ui/sized/recursive-type-2.stderr index b4dbe5333b56b..574c0e0021f2e 100644 --- a/tests/ui/sized/recursive-type-2.stderr +++ b/tests/ui/sized/recursive-type-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing layout of `Foo<()>`. 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 layout of `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 = note: ...which requires computing layout of `<() as A>::Assoc`... diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs index 8efe17d5d0e86..511e41562b220 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs @@ -1,5 +1,5 @@ trait A: B + A {} -//~^ ERROR cycle detected when computing the super predicates of `A`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] +//~^ ERROR cycle detected when computing the super predicates of `A` [E0391] trait B {} diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr index cdb26df0e5c4a..af1fa1594ce05 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing the super predicates of `A`. 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 the super predicates of `A` --> $DIR/cyclic-trait-resolution.rs:1:14 | LL | trait A: B + A {} diff --git a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr index bf1c3d1fc76b7..be76d0b2621a9 100644 --- a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr +++ b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{constant#0}`. 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 simplifying constant for the type system `Alpha::V3::{constant#0}` --> $DIR/self-in-enum-definition.rs:5:10 | LL | V3 = Self::V1 {} as u8 + 2, diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs index a1c913292466c..fd3f9c61420e9 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs @@ -5,8 +5,8 @@ mod m { pub type Foo = impl std::fmt::Debug; - //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] - //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}`. see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information. [E0391] + //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391] + //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391] pub fn foo() -> Foo { 22_u32 diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr index fcb06240f9e61..fb414bca91ece 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. 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 | LL | pub type Foo = impl std::fmt::Debug; @@ -22,7 +22,7 @@ note: cycle used when checking item types in module `m` LL | mod m { | ^^^^^ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. 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 | LL | pub type Foo = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/inference-cycle.stderr b/tests/ui/type-alias-impl-trait/inference-cycle.stderr index 07f934dc8a991..6a14ec8f099f6 100644 --- a/tests/ui/type-alias-impl-trait/inference-cycle.stderr +++ b/tests/ui/type-alias-impl-trait/inference-cycle.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. 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 | LL | pub type Foo = impl std::fmt::Debug; @@ -22,7 +22,7 @@ note: cycle used when checking item types in module `m` LL | mod m { | ^^^^^ -error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`. 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 | LL | pub type Foo = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr index 8e1b9e10469c3..e23b9f3845c7e 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Bug::{opaque#0}`. 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 `Bug::{opaque#0}` --> $DIR/issue-53092-2.rs:4:18 | LL | type Bug = impl Fn(T) -> U + Copy; diff --git a/tests/ui/type-alias-impl-trait/reveal_local.stderr b/tests/ui/type-alias-impl-trait/reveal_local.stderr index 46f61ffc33574..6c5fe8cf32fa5 100644 --- a/tests/ui/type-alias-impl-trait/reveal_local.stderr +++ b/tests/ui/type-alias-impl-trait/reveal_local.stderr @@ -1,4 +1,4 @@ -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. 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 | LL | type Foo = impl Debug; @@ -28,7 +28,7 @@ LL | | LL | | fn main() {} | |____________^ -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. 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 | LL | type Foo = impl Debug; @@ -79,7 +79,7 @@ note: required by a bound in `is_send` LL | fn is_send() {} | ^^^^ required by this bound in `is_send` -error[E0391]: cycle detected when computing type of `Foo::{opaque#0}`. 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 | LL | type Foo = impl Debug; From a54a66830db71252f56ac851b9d03e4d8a9d75f4 Mon Sep 17 00:00:00 2001 From: nxya Date: Tue, 18 Jul 2023 21:53:34 -0400 Subject: [PATCH 6/7] moved note as unspanned note, moved note to the bottom of the msg --- compiler/rustc_query_system/src/error.rs | 3 ++- compiler/rustc_query_system/src/query/job.rs | 1 + src/tools/miri/tests/fail/layout_cycle.stderr | 2 +- .../defaults-cyclic-fail.stderr | 6 +----- ...49-assoc-const-static-recursion-impl.stderr | 6 +----- ...const-static-recursion-trait-default.stderr | 6 +----- ...9-assoc-const-static-recursion-trait.stderr | 6 +----- .../bugs/cycle-iat-inside-of-adt.stderr | 6 +----- .../cycle-iat-inside-of-where-predicate.stderr | 6 +----- .../ambiguous-associated-type2.stderr | 6 +----- tests/ui/associated-types/issue-20825.stderr | 6 +----- ...herence-inherited-assoc-ty-cycle-err.stderr | 6 +----- .../generic_const_exprs/closures.stderr | 6 +----- .../const-generics/issues/issue-83765.stderr | 6 +----- tests/ui/consts/const-size_of-cycle.stderr | 6 +----- tests/ui/consts/issue-103790.stderr | 12 ++---------- tests/ui/consts/issue-36163.stderr | 6 +----- tests/ui/consts/issue-44415.stderr | 6 +----- .../consts/recursive-zst-static.default.stderr | 6 +----- .../consts/recursive-zst-static.unleash.stderr | 6 +----- .../write-to-static-mut-in-static.stderr | 6 +----- .../cycle-trait-default-type-trait.stderr | 6 +----- .../cycle-trait-supertrait-direct.stderr | 6 +----- .../cycle-trait-supertrait-indirect.stderr | 6 +----- tests/ui/cycle-trait/issue-12511.stderr | 6 +----- .../param-env-region-infer.next.stderr | 6 +----- tests/ui/impl-trait/auto-trait-leak.stderr | 12 ++---------- .../infinite-trait-alias-recursion.stderr | 6 +----- ...infinite-type-alias-mutual-recursion.stderr | 6 +----- .../infinite-vec-type-recursion.stderr | 6 +----- tests/ui/issues/issue-17252.stderr | 6 +----- tests/ui/issues/issue-20772.stderr | 6 +----- tests/ui/issues/issue-21177.stderr | 6 +----- tests/ui/issues/issue-23302-1.stderr | 6 +----- tests/ui/issues/issue-23302-2.stderr | 6 +----- tests/ui/issues/issue-23302-3.stderr | 6 +----- tests/ui/issues/issue-34373.stderr | 6 +----- .../issue-26548-recursion-via-normalize.stderr | 2 +- .../recursive-static-definition.stderr | 6 +----- tests/ui/resolve/resolve-self-in-impl.stderr | 6 +----- tests/ui/sized/recursive-type-2.stderr | 2 +- .../cyclic-trait-resolution.stderr | 6 +----- .../self-in-enum-definition.stderr | 6 +----- .../auto-trait-leakage3.stderr | 12 ++---------- .../inference-cycle.stderr | 12 ++---------- .../type-alias-impl-trait/issue-53092-2.stderr | 6 +----- .../type-alias-impl-trait/reveal_local.stderr | 18 +++--------------- 47 files changed, 54 insertions(+), 244 deletions(-) diff --git a/compiler/rustc_query_system/src/error.rs b/compiler/rustc_query_system/src/error.rs index 8ed559f2b727b..e49e78cc7c410 100644 --- a/compiler/rustc_query_system/src/error.rs +++ b/compiler/rustc_query_system/src/error.rs @@ -46,7 +46,6 @@ pub struct CycleUsage { #[derive(Diagnostic)] #[diag(query_system_cycle, code = "E0391")] pub struct Cycle { - #[note] #[primary_span] pub span: Span, pub stack_bottom: String, @@ -58,6 +57,8 @@ pub struct Cycle { pub alias: Option, #[subdiagnostic] pub cycle_usage: Option, + #[note] + pub note_span: (), } #[derive(Diagnostic)] diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index f45f7ca5da6dd..1e301ea2619fb 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -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) diff --git a/src/tools/miri/tests/fail/layout_cycle.stderr b/src/tools/miri/tests/fail/layout_cycle.stderr index 011b1adab95dd..38907a1c50cc5 100644 --- a/src/tools/miri/tests/fail/layout_cycle.stderr +++ b/src/tools/miri/tests/fail/layout_cycle.stderr @@ -1,8 +1,8 @@ error[E0391]: cycle detected when computing layout of `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 ` as Tr>::I`... = note: ...which again requires computing layout of `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 diff --git a/tests/ui/associated-consts/defaults-cyclic-fail.stderr b/tests/ui/associated-consts/defaults-cyclic-fail.stderr index d6a13ae4dbf4b..ebdb76e4286ab 100644 --- a/tests/ui/associated-consts/defaults-cyclic-fail.stderr +++ b/tests/ui/associated-consts/defaults-cyclic-fail.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when const-evaluating + checking `Tr::A` LL | const A: u8 = Self::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 - --> $DIR/defaults-cyclic-fail.rs:5:19 - | -LL | const A: u8 = Self::B; - | ^^^^^^^ note: ...which requires const-evaluating + checking `Tr::B`... --> $DIR/defaults-cyclic-fail.rs:8:19 | @@ -20,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 diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr index 40b3bcec2437c..51bf0cb5e5ce9 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when elaborating drops for ` $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22 - | -LL | const BAR: u32 = IMPL_REF_BAR; - | ^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `IMPL_REF_BAR`... --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:1 | @@ -31,6 +26,7 @@ LL | const BAR: u32 = IMPL_REF_BAR; | ^^^^^^^^^^^^^^ = note: ...which again requires elaborating drops for `::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 diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr index e58d93de59df5..8277d41a1c945 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR` LL | const BAR: u32 = DEFAULT_REF_BAR; | ^^^^^^^^^^^^^^^ | -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 - --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22 - | -LL | const BAR: u32 = DEFAULT_REF_BAR; - | ^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`... --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1 | @@ -31,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 diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr index 6a97ea64dded6..9983ba794cd22 100644 --- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr +++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when elaborating drops for ` $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22 - | -LL | const BAR: u32 = TRAIT_REF_BAR; - | ^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `TRAIT_REF_BAR`... --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:1 | @@ -31,6 +26,7 @@ LL | const BAR: u32 = TRAIT_REF_BAR; | ^^^^^^^^^^^^^^ = note: ...which again requires elaborating drops for `::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 diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr index f088ecba4a8a5..3c373f139cbe8 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing predicates of `Foo` 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 - --> $DIR/cycle-iat-inside-of-adt.rs:7:1 - | -LL | struct Foo { - | ^^^^^^^^^^ note: ...which requires computing predicates of `Foo`... --> $DIR/cycle-iat-inside-of-adt.rs:7:1 | @@ -42,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 diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr index cfc16d622e9c7..ab6a97b3d858f 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing predicates of `user` LL | fn user() where S::P: std::fmt::Debug {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1 - | -LL | fn user() where S::P: std::fmt::Debug {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires computing predicates of `user`... --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1 | @@ -36,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 diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr index 4bf53f462336c..f2604f0ba881d 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr @@ -4,17 +4,13 @@ error[E0391]: cycle detected when computing the super traits of `Baz` with assoc LL | trait Baz: Foo + Bar {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/ambiguous-associated-type2.rs:7:1 - | -LL | trait Baz: Foo + Bar {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which immediately requires computing the super traits of `Baz` with associated type name `Item` again note: cycle used when computing the super predicates of `Baz` --> $DIR/ambiguous-associated-type2.rs:7:1 | LL | trait Baz: Foo + Bar {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = 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 diff --git a/tests/ui/associated-types/issue-20825.stderr b/tests/ui/associated-types/issue-20825.stderr index 068f049cae5a0..02b3536e2d15c 100644 --- a/tests/ui/associated-types/issue-20825.stderr +++ b/tests/ui/associated-types/issue-20825.stderr @@ -4,17 +4,13 @@ error[E0391]: cycle detected when computing the super traits of `Processor` with LL | pub trait Processor: Subscriber { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/issue-20825.rs:5:1 - | -LL | pub trait Processor: Subscriber { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which immediately requires computing the super traits of `Processor` with associated type name `Input` again note: cycle used when computing the super predicates of `Processor` --> $DIR/issue-20825.rs:5:1 | LL | pub trait Processor: Subscriber { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = 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 diff --git a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr index 91e45b0ccb1e3..684e528220f87 100644 --- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr +++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr @@ -14,17 +14,13 @@ error[E0391]: cycle detected when building specialization graph of trait `Trait` LL | trait Trait { 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 - --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 - | -LL | trait Trait { type Assoc; } - | ^^^^^^^^^^^^^^ = note: ...which immediately requires building specialization graph of trait `Trait` again note: cycle used when coherence checking all impls of trait `Trait` --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 | LL | trait Trait { 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 diff --git a/tests/ui/const-generics/generic_const_exprs/closures.stderr b/tests/ui/const-generics/generic_const_exprs/closures.stderr index 976cd67937a93..45d7922bd0b80 100644 --- a/tests/ui/const-generics/generic_const_exprs/closures.stderr +++ b/tests/ui/const-generics/generic_const_exprs/closures.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when building an abstract representation for `test: LL | fn test() -> [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 - --> $DIR/closures.rs:3:35 - | -LL | fn test() -> [u8; N + (|| 42)()] {} - | ^^^^^^^^^^^^^ note: ...which requires building THIR for `test::{constant#0}`... --> $DIR/closures.rs:3:35 | @@ -25,6 +20,7 @@ note: cycle used when checking that `test` is well-formed | LL | fn test() -> [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 diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr index bec7eca089d66..df734933c250c 100644 --- a/tests/ui/const-generics/issues/issue-83765.stderr +++ b/tests/ui/const-generics/issues/issue-83765.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when resolving instance ` $DIR/issue-83765.rs:5:5 - | -LL | const DIM: usize; - | ^^^^^^^^^^^^^^^^ note: ...which requires computing candidate for `::DIM, DIM> as TensorDimension>`... --> $DIR/issue-83765.rs:4:1 | @@ -20,6 +15,7 @@ note: cycle used when computing candidate for `()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/const-size_of-cycle.rs:4:17 - | -LL | bytes: [u8; std::mem::size_of::()] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`... --> $DIR/const-size_of-cycle.rs:4:17 | @@ -28,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 diff --git a/tests/ui/consts/issue-103790.stderr b/tests/ui/consts/issue-103790.stderr index 917c8b1173ec1..67334469dcde5 100644 --- a/tests/ui/consts/issue-103790.stderr +++ b/tests/ui/consts/issue-103790.stderr @@ -28,17 +28,13 @@ error[E0391]: cycle detected when computing type of `S::S` LL | struct 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 - --> $DIR/issue-103790.rs:4:32 - | -LL | struct S; - | ^ = note: ...which immediately requires computing type of `S::S` again note: cycle used when computing type of `S` --> $DIR/issue-103790.rs:4:1 | LL | struct 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 @@ -46,11 +42,6 @@ error[E0391]: cycle detected when computing type of `S` LL | struct 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 - --> $DIR/issue-103790.rs:4:1 - | -LL | struct S; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires computing type of `S::S`... --> $DIR/issue-103790.rs:4:32 | @@ -68,6 +59,7 @@ LL | | struct 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 diff --git a/tests/ui/consts/issue-36163.stderr b/tests/ui/consts/issue-36163.stderr index fb2866554ffd3..190b41062f818 100644 --- a/tests/ui/consts/issue-36163.stderr +++ b/tests/ui/consts/issue-36163.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant 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 - --> $DIR/issue-36163.rs:4:9 - | -LL | B = A, - | ^ note: ...which requires const-evaluating + checking `A`... --> $DIR/issue-36163.rs:1:18 | @@ -20,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 diff --git a/tests/ui/consts/issue-44415.stderr b/tests/ui/consts/issue-44415.stderr index 12284ff2fb21e..01d24a6208144 100644 --- a/tests/ui/consts/issue-44415.stderr +++ b/tests/ui/consts/issue-44415.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when evaluating type-level constant LL | bytes: [u8; unsafe { intrinsics::size_of::() }], | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/issue-44415.rs:6:17 - | -LL | bytes: [u8; unsafe { intrinsics::size_of::() }], - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`... --> $DIR/issue-44415.rs:6:17 | @@ -28,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 diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr index 7f9d7c1cb8b4a..d592b5aeef5e5 100644 --- a/tests/ui/consts/recursive-zst-static.default.stderr +++ b/tests/ui/consts/recursive-zst-static.default.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when const-evaluating + checking `FOO` LL | static FOO: () = 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 - --> $DIR/recursive-zst-static.rs:10:1 - | -LL | static FOO: () = FOO; - | ^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `FOO`... --> $DIR/recursive-zst-static.rs:10:18 | @@ -24,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 diff --git a/tests/ui/consts/recursive-zst-static.unleash.stderr b/tests/ui/consts/recursive-zst-static.unleash.stderr index 7f9d7c1cb8b4a..d592b5aeef5e5 100644 --- a/tests/ui/consts/recursive-zst-static.unleash.stderr +++ b/tests/ui/consts/recursive-zst-static.unleash.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when const-evaluating + checking `FOO` LL | static FOO: () = 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 - --> $DIR/recursive-zst-static.rs:10:1 - | -LL | static FOO: () = FOO; - | ^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `FOO`... --> $DIR/recursive-zst-static.rs:10:18 | @@ -24,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 diff --git a/tests/ui/consts/write-to-static-mut-in-static.stderr b/tests/ui/consts/write-to-static-mut-in-static.stderr index 74c636c357b83..5665e56439e01 100644 --- a/tests/ui/consts/write-to-static-mut-in-static.stderr +++ b/tests/ui/consts/write-to-static-mut-in-static.stderr @@ -10,11 +10,6 @@ error[E0391]: cycle detected when const-evaluating + checking `C` LL | pub static mut C: u32 = unsafe { C = 1; 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 - --> $DIR/write-to-static-mut-in-static.rs:5:1 - | -LL | pub static mut C: u32 = unsafe { C = 1; 0 }; - | ^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `C`... --> $DIR/write-to-static-mut-in-static.rs:5:34 | @@ -32,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 diff --git a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr index 3c1f7198de7c2..3b66704d6131f 100644 --- a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr +++ b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing type of `Foo::X` LL | trait 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 - --> $DIR/cycle-trait-default-type-trait.rs:4:23 - | -LL | trait Foo> { - | ^^^ = note: ...which immediately requires computing type of `Foo::X` again note: cycle used when collecting item types in top-level module --> $DIR/cycle-trait-default-type-trait.rs:4:1 @@ -19,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 diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr index 26ae7869524cb..03cb5015ab0b1 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing the super predicates of `Chromosome` LL | trait Chromosome: Chromosome { | ^^^^^^^^^^ | -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 - --> $DIR/cycle-trait-supertrait-direct.rs:3:19 - | -LL | trait Chromosome: Chromosome { - | ^^^^^^^^^^ = note: ...which immediately requires computing the super predicates of `Chromosome` again note: cycle used when collecting item types in top-level module --> $DIR/cycle-trait-supertrait-direct.rs:3:1 @@ -17,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 diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr index ec4f4a6ca5387..c7cc314352044 100644 --- a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr +++ b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing the super predicates of `B` LL | trait B: C { | ^ | -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 - --> $DIR/cycle-trait-supertrait-indirect.rs:7:10 - | -LL | trait B: C { - | ^ note: ...which requires computing the super predicates of `C`... --> $DIR/cycle-trait-supertrait-indirect.rs:11:10 | @@ -20,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 diff --git a/tests/ui/cycle-trait/issue-12511.stderr b/tests/ui/cycle-trait/issue-12511.stderr index 1e7152fbb3948..f5e4f83473dff 100644 --- a/tests/ui/cycle-trait/issue-12511.stderr +++ b/tests/ui/cycle-trait/issue-12511.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing the super predicates of `T1` 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 - --> $DIR/issue-12511.rs:1:12 - | -LL | trait T1 : T2 { - | ^^ note: ...which requires computing the super predicates of `T2`... --> $DIR/issue-12511.rs:5:12 | @@ -22,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 diff --git a/tests/ui/dyn-star/param-env-region-infer.next.stderr b/tests/ui/dyn-star/param-env-region-infer.next.stderr index 9ea7677389ce7..28aec533a0067 100644 --- a/tests/ui/dyn-star/param-env-region-infer.next.stderr +++ b/tests/ui/dyn-star/param-env-region-infer.next.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing type of `make_dyn_star::{opaque#0}` LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + '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 - --> $DIR/param-env-region-infer.rs:16:60 - | -LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `make_dyn_star`... --> $DIR/param-env-region-infer.rs:16:1 | @@ -28,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 diff --git a/tests/ui/impl-trait/auto-trait-leak.stderr b/tests/ui/impl-trait/auto-trait-leak.stderr index 9c662053c81ac..a024cff0b8da6 100644 --- a/tests/ui/impl-trait/auto-trait-leak.stderr +++ b/tests/ui/impl-trait/auto-trait-leak.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}` LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ | -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 - --> $DIR/auto-trait-leak.rs:11:16 - | -LL | fn cycle1() -> impl Clone { - | ^^^^^^^^^^ note: ...which requires type-checking `cycle1`... --> $DIR/auto-trait-leak.rs:14:5 | @@ -38,6 +33,7 @@ LL | | fn 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 @@ -45,11 +41,6 @@ error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}` LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ | -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 - --> $DIR/auto-trait-leak.rs:11:16 - | -LL | fn cycle1() -> impl Clone { - | ^^^^^^^^^^ note: ...which requires type-checking `cycle1`... --> $DIR/auto-trait-leak.rs:14:5 | @@ -78,6 +69,7 @@ LL | | fn 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 diff --git a/tests/ui/infinite/infinite-trait-alias-recursion.stderr b/tests/ui/infinite/infinite-trait-alias-recursion.stderr index 36894dc189402..39d7aa4c16aa3 100644 --- a/tests/ui/infinite/infinite-trait-alias-recursion.stderr +++ b/tests/ui/infinite/infinite-trait-alias-recursion.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing the super predicates of `T1` 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 - --> $DIR/infinite-trait-alias-recursion.rs:3:12 - | -LL | trait T1 = T2; - | ^^ note: ...which requires computing the super predicates of `T2`... --> $DIR/infinite-trait-alias-recursion.rs:6:12 | @@ -26,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 diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr index 7a4900e511065..bbdb1f70b803d 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when expanding type alias `X1` LL | type X1 = X2; | ^^ | -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 - --> $DIR/infinite-type-alias-mutual-recursion.rs:1:11 - | -LL | type X1 = X2; - | ^^ note: ...which requires expanding type alias `X2`... --> $DIR/infinite-type-alias-mutual-recursion.rs:3:11 | @@ -33,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 diff --git a/tests/ui/infinite/infinite-vec-type-recursion.stderr b/tests/ui/infinite/infinite-vec-type-recursion.stderr index 82a53f13f14ce..a21b033a9a9a8 100644 --- a/tests/ui/infinite/infinite-vec-type-recursion.stderr +++ b/tests/ui/infinite/infinite-vec-type-recursion.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when expanding type alias `X` LL | type X = Vec; | ^ | -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 - --> $DIR/infinite-vec-type-recursion.rs:1:14 - | -LL | type X = Vec; - | ^ = note: ...which immediately requires expanding type alias `X` again = note: type aliases cannot be recursive = help: consider using a struct, enum, or union instead to break the cycle @@ -21,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 diff --git a/tests/ui/issues/issue-17252.stderr b/tests/ui/issues/issue-17252.stderr index eaaa6b6dc6269..daaf82e80adea 100644 --- a/tests/ui/issues/issue-17252.stderr +++ b/tests/ui/issues/issue-17252.stderr @@ -4,17 +4,13 @@ error[E0391]: cycle detected when const-evaluating + checking `FOO` LL | const FOO: usize = 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 - --> $DIR/issue-17252.rs:1:20 - | -LL | const FOO: usize = FOO; - | ^^^ = note: ...which immediately requires const-evaluating + checking `FOO` again note: cycle used when const-evaluating + checking `main::{constant#0}` --> $DIR/issue-17252.rs:4:18 | 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 diff --git a/tests/ui/issues/issue-20772.stderr b/tests/ui/issues/issue-20772.stderr index 1d51be5895494..0c7e728c67e8d 100644 --- a/tests/ui/issues/issue-20772.stderr +++ b/tests/ui/issues/issue-20772.stderr @@ -4,17 +4,13 @@ error[E0391]: cycle detected when computing the super traits of `T` with associa LL | trait T : Iterator | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/issue-20772.rs:1:1 - | -LL | trait T : Iterator - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which immediately requires computing the super traits of `T` with associated type name `Item` again note: cycle used when computing the super predicates of `T` --> $DIR/issue-20772.rs:1:1 | LL | trait T : Iterator | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = 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 diff --git a/tests/ui/issues/issue-21177.stderr b/tests/ui/issues/issue-21177.stderr index b3e550b36d88a..8b749edcc77f0 100644 --- a/tests/ui/issues/issue-21177.stderr +++ b/tests/ui/issues/issue-21177.stderr @@ -4,17 +4,13 @@ error[E0391]: cycle detected when computing the bounds for type parameter `T` LL | fn 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 - --> $DIR/issue-21177.rs:6:21 - | -LL | fn foo>() { } - | ^^^^ = note: ...which immediately requires computing the bounds for type parameter `T` again note: cycle used when computing explicit predicates of `foo` --> $DIR/issue-21177.rs:6:21 | LL | fn 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 diff --git a/tests/ui/issues/issue-23302-1.stderr b/tests/ui/issues/issue-23302-1.stderr index 86773f13511c5..d807e24403e0b 100644 --- a/tests/ui/issues/issue-23302-1.stderr +++ b/tests/ui/issues/issue-23302-1.stderr @@ -4,17 +4,13 @@ error[E0391]: cycle detected when const-evaluating + checking `X::A::{constant#0 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 - --> $DIR/issue-23302-1.rs:4:9 - | -LL | A = X::A as isize, - | ^^^^^^^^^^^^^ = note: ...which immediately requires const-evaluating + checking `X::A::{constant#0}` again note: cycle used when simplifying constant for the type system `X::A::{constant#0}` --> $DIR/issue-23302-1.rs:4:9 | 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 diff --git a/tests/ui/issues/issue-23302-2.stderr b/tests/ui/issues/issue-23302-2.stderr index 67d07219d16c5..91b39dba1ba2c 100644 --- a/tests/ui/issues/issue-23302-2.stderr +++ b/tests/ui/issues/issue-23302-2.stderr @@ -4,17 +4,13 @@ error[E0391]: cycle detected when const-evaluating + checking `Y::A::{constant#0 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 - --> $DIR/issue-23302-2.rs:4:9 - | -LL | A = Y::B as isize, - | ^^^^^^^^^^^^^ = note: ...which immediately requires const-evaluating + checking `Y::A::{constant#0}` again note: cycle used when simplifying constant for the type system `Y::A::{constant#0}` --> $DIR/issue-23302-2.rs:4:9 | 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 diff --git a/tests/ui/issues/issue-23302-3.stderr b/tests/ui/issues/issue-23302-3.stderr index 0cbeee1d0798f..6b708d81f73f8 100644 --- a/tests/ui/issues/issue-23302-3.stderr +++ b/tests/ui/issues/issue-23302-3.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when const-evaluating + checking `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 - --> $DIR/issue-23302-3.rs:1:16 - | -LL | const A: i32 = B; - | ^ note: ...which requires const-evaluating + checking `B`... --> $DIR/issue-23302-3.rs:3:16 | @@ -20,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 diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr index e2c0c9182bb58..0f0821518a424 100644 --- a/tests/ui/issues/issue-34373.stderr +++ b/tests/ui/issues/issue-34373.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing type of `Foo::T` LL | pub 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 - --> $DIR/issue-34373.rs:7:30 - | -LL | pub struct Foo>>; - | ^^^^^^^^^^ note: ...which requires expanding type alias `DefaultFoo`... --> $DIR/issue-34373.rs:8:19 | @@ -26,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 diff --git a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr index cdd4937e7243b..514bed607003b 100644 --- a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr +++ b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr @@ -1,10 +1,10 @@ error[E0391]: cycle detected when computing layout of `core::option::Option` | - = 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<::It>`... = note: ...which again requires computing layout of `core::option::Option`, completing the cycle = note: cycle used when computing layout of `core::option::Option<::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 diff --git a/tests/ui/recursion/recursive-static-definition.stderr b/tests/ui/recursion/recursive-static-definition.stderr index 85ca99bef457f..b112228d4039a 100644 --- a/tests/ui/recursion/recursive-static-definition.stderr +++ b/tests/ui/recursion/recursive-static-definition.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when const-evaluating + checking `FOO` LL | pub static FOO: u32 = 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 - --> $DIR/recursive-static-definition.rs:1:1 - | -LL | pub static FOO: u32 = FOO; - | ^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `FOO`... --> $DIR/recursive-static-definition.rs:1:23 | @@ -23,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 diff --git a/tests/ui/resolve/resolve-self-in-impl.stderr b/tests/ui/resolve/resolve-self-in-impl.stderr index f9dc44d5b9a1e..183a17171f7fc 100644 --- a/tests/ui/resolve/resolve-self-in-impl.stderr +++ b/tests/ui/resolve/resolve-self-in-impl.stderr @@ -44,11 +44,6 @@ error[E0391]: cycle detected when computing trait implemented by ` for 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 - --> $DIR/resolve-self-in-impl.rs:19:1 - | -LL | impl Tr for S {} - | ^^^^^^^^^^^^^^^^^^^^^^ = note: ...which immediately requires computing trait implemented by `` again note: cycle used when collecting item types in top-level module --> $DIR/resolve-self-in-impl.rs:1:1 @@ -61,6 +56,7 @@ LL | | trait Tr { 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 diff --git a/tests/ui/sized/recursive-type-2.stderr b/tests/ui/sized/recursive-type-2.stderr index 574c0e0021f2e..0f72f74145e8d 100644 --- a/tests/ui/sized/recursive-type-2.stderr +++ b/tests/ui/sized/recursive-type-2.stderr @@ -1,6 +1,5 @@ error[E0391]: cycle detected when computing layout of `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 = note: ...which requires computing layout of `<() as A>::Assoc`... = note: ...which again requires computing layout of `Foo<()>`, completing the cycle note: cycle used when elaborating drops for `main` @@ -8,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 diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr index af1fa1594ce05..62c732fb1d958 100644 --- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr +++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr @@ -4,17 +4,13 @@ error[E0391]: cycle detected when computing the super predicates of `A` 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 - --> $DIR/cyclic-trait-resolution.rs:1:14 - | -LL | trait A: B + A {} - | ^ = note: ...which immediately requires computing the super predicates of `A` again note: cycle used when collecting item types in top-level module --> $DIR/cyclic-trait-resolution.rs:1:1 | 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 diff --git a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr index be76d0b2621a9..aa79b1a57c4c8 100644 --- a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr +++ b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when simplifying constant for the type system `Alph LL | V3 = Self::V1 {} as u8 + 2, | ^^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/self-in-enum-definition.rs:5:10 - | -LL | V3 = Self::V1 {} as u8 + 2, - | ^^^^^^^^^^^^^^^^^^^^^ note: ...which requires simplifying constant for the type system `Alpha::V3::{constant#0}`... --> $DIR/self-in-enum-definition.rs:5:10 | @@ -72,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 diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr index fb414bca91ece..5bd0f76c31fb4 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` LL | pub type Foo = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/auto-trait-leakage3.rs:7:20 - | -LL | pub type Foo = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `m::bar`... --> $DIR/auto-trait-leakage3.rs:16:9 | @@ -21,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 @@ -28,11 +24,6 @@ error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` LL | pub type Foo = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/auto-trait-leakage3.rs:7:20 - | -LL | pub type Foo = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `m::bar`... --> $DIR/auto-trait-leakage3.rs:15:5 | @@ -44,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 diff --git a/tests/ui/type-alias-impl-trait/inference-cycle.stderr b/tests/ui/type-alias-impl-trait/inference-cycle.stderr index 6a14ec8f099f6..41530dda983a8 100644 --- a/tests/ui/type-alias-impl-trait/inference-cycle.stderr +++ b/tests/ui/type-alias-impl-trait/inference-cycle.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` LL | pub type Foo = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/inference-cycle.rs:5:20 - | -LL | pub type Foo = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `m::bar`... --> $DIR/inference-cycle.rs:16:9 | @@ -21,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 @@ -28,11 +24,6 @@ error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}` LL | pub type Foo = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/inference-cycle.rs:5:20 - | -LL | pub type Foo = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `m::bar`... --> $DIR/inference-cycle.rs:15:5 | @@ -44,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 diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr index e23b9f3845c7e..6148131b491f5 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing type of `Bug::{opaque#0}` LL | type Bug = impl Fn(T) -> U + Copy; | ^^^^^^^^^^^^^^^^^^^^^^ | -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 - --> $DIR/issue-53092-2.rs:4:18 - | -LL | type Bug = impl Fn(T) -> U + Copy; - | ^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires type-checking `CONST_BUG`... --> $DIR/issue-53092-2.rs:6:1 | @@ -28,6 +23,7 @@ LL | | type Bug = 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` is not satisfied --> $DIR/issue-53092-2.rs:9:5 diff --git a/tests/ui/type-alias-impl-trait/reveal_local.stderr b/tests/ui/type-alias-impl-trait/reveal_local.stderr index 6c5fe8cf32fa5..813185c137795 100644 --- a/tests/ui/type-alias-impl-trait/reveal_local.stderr +++ b/tests/ui/type-alias-impl-trait/reveal_local.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` LL | type Foo = impl Debug; | ^^^^^^^^^^ | -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 - --> $DIR/reveal_local.rs:5:12 - | -LL | type Foo = impl Debug; - | ^^^^^^^^^^ note: ...which requires type-checking `not_good`... --> $DIR/reveal_local.rs:15:5 | @@ -27,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 @@ -34,11 +30,6 @@ error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` LL | type Foo = impl Debug; | ^^^^^^^^^^ | -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 - --> $DIR/reveal_local.rs:5:12 - | -LL | type Foo = impl Debug; - | ^^^^^^^^^^ note: ...which requires type-checking `not_good`... --> $DIR/reveal_local.rs:12:1 | @@ -56,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 @@ -85,11 +77,6 @@ error[E0391]: cycle detected when computing type of `Foo::{opaque#0}` LL | type Foo = impl Debug; | ^^^^^^^^^^ | -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 - --> $DIR/reveal_local.rs:5:12 - | -LL | type Foo = impl Debug; - | ^^^^^^^^^^ note: ...which requires type-checking `not_gooder`... --> $DIR/reveal_local.rs:19:1 | @@ -107,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 From a903ac5124b8fe8c91b80fe8a6cb16bc784efbd5 Mon Sep 17 00:00:00 2001 From: nxya Date: Wed, 19 Jul 2023 10:02:15 -0400 Subject: [PATCH 7/7] fix issue-110629-private-type-cycle-dyn test --- tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr index 777b4c46798a6..9aeb3389e2d31 100644 --- a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr +++ b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr @@ -4,11 +4,6 @@ error[E0391]: cycle detected when expanding type alias `Bar` LL | type Bar<'a, 'b> = Box>>; | ^^^^^^^^^^^ | -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 - --> $DIR/issue-110629-private-type-cycle-dyn.rs:1:38 - | -LL | type Bar<'a, 'b> = Box>>; - | ^^^^^^^^^^^ = note: ...which immediately requires expanding type alias `Bar` again = note: type aliases cannot be recursive = help: consider using a struct, enum, or union instead to break the cycle @@ -24,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