-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Continue evaluating after item-type checking #60126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
enum MList { Cons(isize, MList), Nil } | ||
//~^ ERROR recursive type `MList` has infinite size | ||
//~| ERROR cycle detected when processing `MList` | ||
|
||
fn main() { let a = MList::Cons(10, MList::Cons(11, MList::Nil)); } |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,16 @@ LL | enum MList { Cons(isize, MList), Nil } | |
| | ||
= help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `MList` representable | ||
|
||
error: aborting due to previous error | ||
error[E0391]: cycle detected when processing `MList` | ||
--> $DIR/infinite-tag-type-recursion.rs:1:1 | ||
| | ||
LL | enum MList { Cons(isize, MList), Nil } | ||
| ^^^^^^^^^^ | ||
| | ||
= note: ...which again requires processing `MList`, completing the cycle | ||
= note: cycle used when computing dropck types for `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, def_id: None }, value: MList } }` | ||
|
||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0072`. | ||
Some errors have detailed explanations: E0072, E0391. | ||
For more information about an error, try `rustc --explain E0072`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// compile-flags: --test | ||
|
||
use std::num::ParseIntError; | ||
use std::num::ParseFloatError; | ||
|
||
#[test] | ||
fn can_parse_zero_as_f32() -> Result<f32, ParseIntError> { //~ ERROR | ||
fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> { //~ ERROR | ||
"0".parse() | ||
} |
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.