Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/closures/issue-25439.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/const-generics/occurs-check/unused-substs-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl<T> Bind<T> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/const-generics/occurs-check/unused-substs-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn bind<T>() -> (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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/typeck/cyclic_type_ice.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading