diff --git a/compiler/rustc_middle/src/ty/error.rs b/compiler/rustc_middle/src/ty/error.rs index 52f37ed4a9ea..81cd3efffc9d 100644 --- a/compiler/rustc_middle/src/ty/error.rs +++ b/compiler/rustc_middle/src/ty/error.rs @@ -35,7 +35,7 @@ fn report_maybe_different(expected: &str, found: &str) -> String { } match self { - TypeError::CyclicTy(_) => "cyclic type of infinite size".into(), + TypeError::CyclicTy(_) => "recursive type with infinite-size name".into(), TypeError::CyclicConst(_) => "encountered a self-referencing constant".into(), TypeError::Mismatch => "types differ".into(), TypeError::PolarityMismatch(values) => { diff --git a/tests/ui/closures/closure-referencing-itself-issue-25954.stderr b/tests/ui/closures/closure-referencing-itself-issue-25954.stderr index 22b7be4c729b..e189dd70e68d 100644 --- a/tests/ui/closures/closure-referencing-itself-issue-25954.stderr +++ b/tests/ui/closures/closure-referencing-itself-issue-25954.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/closure-referencing-itself-issue-25954.rs:16:13 | LL | let q = || p.b.set(5i32); - | ^^^^^^^^^^^^^^^^ cyclic type of infinite size + | ^^^^^^^^^^^^^^^^ recursive type with infinite-size name error: aborting due to 1 previous error diff --git a/tests/ui/closures/generic-typed-nested-closures-59494.stderr b/tests/ui/closures/generic-typed-nested-closures-59494.stderr index 9706fea82a30..3a0ed68f2026 100644 --- a/tests/ui/closures/generic-typed-nested-closures-59494.stderr +++ b/tests/ui/closures/generic-typed-nested-closures-59494.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/generic-typed-nested-closures-59494.rs:21:40 | LL | let t7 = |env| |a| |b| t7p(f, g)(((env, a), b)); - | ^^^ cyclic type of infinite size + | ^^^ recursive type with infinite-size name error: aborting due to 1 previous error diff --git a/tests/ui/closures/issue-25439.stderr b/tests/ui/closures/issue-25439.stderr index 19a26396a5d9..c48423cbf576 100644 --- a/tests/ui/closures/issue-25439.stderr +++ b/tests/ui/closures/issue-25439.stderr @@ -2,7 +2,7 @@ error[E0644]: closure/coroutine type that references itself --> $DIR/issue-25439.rs:8:9 | LL | fix(|_, x| x); - | ^^^^^^ cyclic type of infinite size + | ^^^^^^ recursive type with infinite-size name | = note: closures cannot capture themselves or take themselves as argument; this error may be the result of a recent compiler bug-fix, diff --git a/tests/ui/const-generics/occurs-check/unused-substs-2.rs b/tests/ui/const-generics/occurs-check/unused-substs-2.rs index 5bdd3e39806e..fa44079be22d 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-2.rs +++ b/tests/ui/const-generics/occurs-check/unused-substs-2.rs @@ -21,7 +21,7 @@ fn bind() -> (T, Self) { fn main() { let (mut t, foo) = Foo::bind(); //~^ ERROR mismatched types - //~| NOTE cyclic type + //~| NOTE recursive type // `t` is `ty::Infer(TyVar(?1t))` // `foo` contains `ty::Infer(TyVar(?1t))` in its substs diff --git a/tests/ui/const-generics/occurs-check/unused-substs-2.stderr b/tests/ui/const-generics/occurs-check/unused-substs-2.stderr index a2c4dec47243..bb5a9ad04417 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-2.stderr +++ b/tests/ui/const-generics/occurs-check/unused-substs-2.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/unused-substs-2.rs:22:24 | LL | let (mut t, foo) = Foo::bind(); - | ^^^^^^^^^^^ cyclic type of infinite size + | ^^^^^^^^^^^ recursive type with infinite-size name error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/occurs-check/unused-substs-3.rs b/tests/ui/const-generics/occurs-check/unused-substs-3.rs index dfb051192e2f..45f9082465e0 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-3.rs +++ b/tests/ui/const-generics/occurs-check/unused-substs-3.rs @@ -12,7 +12,7 @@ fn main() { let (mut t, foo) = bind(); //~^ ERROR mismatched types - //~| NOTE cyclic type + //~| NOTE recursive type // `t` is `ty::Infer(TyVar(?1t))` // `foo` contains `ty::Infer(TyVar(?1t))` in its substs diff --git a/tests/ui/const-generics/occurs-check/unused-substs-3.stderr b/tests/ui/const-generics/occurs-check/unused-substs-3.stderr index 30a2a7901bdf..b93903f1112f 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-3.stderr +++ b/tests/ui/const-generics/occurs-check/unused-substs-3.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/unused-substs-3.rs:13:24 | LL | let (mut t, foo) = bind(); - | ^^^^^^ cyclic type of infinite size + | ^^^^^^ recursive type with infinite-size name error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/occurs-check/unused-substs-5.stderr b/tests/ui/const-generics/occurs-check/unused-substs-5.stderr index 46230d455b27..c24061b9e330 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-5.stderr +++ b/tests/ui/const-generics/occurs-check/unused-substs-5.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/unused-substs-5.rs:15:19 | LL | x = q::<_, N>(x); - | ^ cyclic type of infinite size + | ^ recursive type with infinite-size name error: aborting due to 1 previous error diff --git a/tests/ui/coroutine/coroutine-yielding-or-returning-itself.stderr b/tests/ui/coroutine/coroutine-yielding-or-returning-itself.stderr index 32799148ae1d..0c153e2d0af3 100644 --- a/tests/ui/coroutine/coroutine-yielding-or-returning-itself.stderr +++ b/tests/ui/coroutine/coroutine-yielding-or-returning-itself.stderr @@ -9,7 +9,7 @@ LL | | LL | | if false { yield None.unwrap(); } LL | | None.unwrap() LL | | }) - | |_____^ cyclic type of infinite size + | |_____^ recursive type with infinite-size name | = note: closures cannot capture themselves or take themselves as argument; this error may be the result of a recent compiler bug-fix, @@ -34,7 +34,7 @@ LL | | LL | | if false { yield None.unwrap(); } LL | | None.unwrap() LL | | }) - | |_____^ cyclic type of infinite size + | |_____^ recursive type with infinite-size name | = note: closures cannot capture themselves or take themselves as argument; this error may be the result of a recent compiler bug-fix, diff --git a/tests/ui/typeck/cyclic_type_ice.stderr b/tests/ui/typeck/cyclic_type_ice.stderr index 645766becbf7..7b73609b2f4e 100644 --- a/tests/ui/typeck/cyclic_type_ice.stderr +++ b/tests/ui/typeck/cyclic_type_ice.stderr @@ -2,7 +2,7 @@ error[E0644]: closure/coroutine type that references itself --> $DIR/cyclic_type_ice.rs:3:7 | LL | f(f); - | ^ cyclic type of infinite size + | ^ recursive type with infinite-size name | = note: closures cannot capture themselves or take themselves as argument; this error may be the result of a recent compiler bug-fix, diff --git a/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr b/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr index 563167f3c0b0..01b581cadaa4 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr @@ -2,7 +2,7 @@ error[E0644]: closure/coroutine type that references itself --> $DIR/unboxed-closure-no-cyclic-sig.rs:8:7 | LL | g(|_| { }); - | ^^^ cyclic type of infinite size + | ^^^ recursive type with infinite-size name | = note: closures cannot capture themselves or take themselves as argument; this error may be the result of a recent compiler bug-fix,