-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Continue evaluating after item-type checking #60126
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # 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 } }` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This note doesn't seem like something the user would understand... :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't. There hard error removal is causing some spurious and duplicated errors that I want to hide, but for now I want to put these changes out asap so that's we can capture any lurking ICEs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have a lot of cycle errors without comprehensible diagnostics. This is something that needs to be addressed in general and is not specific to this PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed #60178 |
||
|
||
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.