diff --git a/compiler/rustc_middle/src/ty/error.rs b/compiler/rustc_middle/src/ty/error.rs index 52f37ed4a9eac..81cd3efffc9d4 100644 --- a/compiler/rustc_middle/src/ty/error.rs +++ b/compiler/rustc_middle/src/ty/error.rs @@ -35,7 +35,7 @@ impl<'tcx> TypeError<'tcx> { } 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 22b7be4c729ba..e189dd70e68d8 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 9706fea82a300..3a0ed68f20260 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 19a26396a5d94..c48423cbf5769 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 5bdd3e39806e3..fa44079be22d8 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 @@ impl Bind for Foo<{ 6 + 1 }> { 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 a2c4dec472439..bb5a9ad044177 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 dfb051192e2f3..45f9082465e0f 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 bind() -> (T, [u8; 6 + 1]) { 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 30a2a7901bdf5..b93903f1112ff 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 46230d455b270..c24061b9e330c 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 32799148ae1da..0c153e2d0af36 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 645766becbf72..7b73609b2f4ec 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 563167f3c0b06..01b581cadaa4f 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,