-
Notifications
You must be signed in to change notification settings - Fork 13.5k
add more ice tests #122863
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
Merged
Merged
add more ice tests #122863
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1bcbed1
add test for #110696
matthiaskrgr 4d9ce7a
add test for ice #121472
matthiaskrgr 2b57403
add test for https://github.com/rust-lang/rust/issues/112823
matthiaskrgr d7e166d
add test for ice "type mismatching when copying!"
matthiaskrgr b0e1008
add test for ice #113017 no entry found for key in generics_of.rs
matthiaskrgr bd2d70d
add test for ice #119275 "no entry found for key" in predicates_of.rs
matthiaskrgr e68cb00
address review comments
matthiaskrgr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
address review comments
- Loading branch information
commit e68cb00fb272fd9a45cc6c4ec4b2ed14e7ba0bad
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 7 additions & 80 deletions
87
...i/const-generics/generic_const_exprs/ice-generics_of-no-entry-found-for-key-113017.stderr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,19 @@ | ||
error: expected one of `:`, `@`, or `|`, found `)` | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:6:22 | ||
| | ||
LL | pub fn String<V>(elem) | ||
| ^ expected one of `:`, `@`, or `|` | ||
| | ||
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685) | ||
help: if this is a `self` type, give it a parameter name | ||
| | ||
LL | pub fn String<V>(self: elem) | ||
| +++++ | ||
help: if this is a parameter name, give it a type | ||
| | ||
LL | pub fn String<V>(elem: TypeName) | ||
| ++++++++++ | ||
help: if this is a type, explicitly ignore the parameter name | ||
| | ||
LL | pub fn String<V>(_: elem) | ||
| ++ | ||
|
||
error[E0261]: use of undeclared lifetime name `'a` | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:9:8 | ||
| | ||
LL | V: 'a, | ||
| ^^ undeclared lifetime | ||
| | ||
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html | ||
help: consider making the bound lifetime-generic with a new `'a` lifetime | ||
| | ||
LL | for<'a> V: 'a, | ||
| +++++++ | ||
help: consider introducing lifetime `'a` here | ||
| | ||
LL | pub fn String<'a, V>(elem) | ||
| +++ | ||
|
||
error[E0261]: use of undeclared lifetime name `'a` | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:11:39 | ||
| | ||
LL | for<const N: usize = { || {}}> V: 'a, | ||
| ^^ undeclared lifetime | ||
| | ||
help: consider making the bound lifetime-generic with a new `'a` lifetime | ||
| | ||
LL | for<'a, const N: usize = { || {}}> V: 'a, | ||
| +++ | ||
help: consider introducing lifetime `'a` here | ||
| | ||
LL | pub fn String<'a, V>(elem) | ||
| +++ | ||
|
||
error[E0637]: `&` without an explicit lifetime name cannot be used here | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:15:26 | ||
| | ||
LL | for<C2: , R2, R3: > <&str as IntoIterator>::Item: 'static, | ||
| ^ explicit lifetime name needed here | ||
| | ||
help: consider introducing a higher-ranked lifetime here | ||
| | ||
LL | for<'a> for<C2: , R2, R3: > <&'a str as IntoIterator>::Item: 'static, | ||
| +++++++ ++ | ||
|
||
error[E0658]: only lifetime parameters can be used in this context | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:11:15 | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:8:15 | ||
| | ||
LL | for<const N: usize = { || {}}> V: 'a, | ||
LL | for<const N: usize = { || {}; 1 }> ():, | ||
| ^ | ||
| | ||
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information | ||
= help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable | ||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | ||
|
||
error[E0658]: only lifetime parameters can be used in this context | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:15:9 | ||
| | ||
LL | for<C2: , R2, R3: > <&str as IntoIterator>::Item: 'static, | ||
| ^^ ^^ ^^ | ||
| | ||
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information | ||
= help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable | ||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | ||
|
||
error: defaults for generic parameters are not allowed in `for<...>` binders | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:11:9 | ||
--> $DIR/ice-generics_of-no-entry-found-for-key-113017.rs:8:9 | ||
| | ||
LL | for<const N: usize = { || {}}> V: 'a, | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | for<const N: usize = { || {}; 1 }> ():, | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 7 previous errors | ||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0261, E0637, E0658. | ||
For more information about an error, try `rustc --explain E0261`. | ||
For more information about this error, try `rustc --explain E0658`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expecct that this file is still not minimized for this ICE
and believe that most of the syntax issues don't contribute to the ICE and make it more likely this tests ends up being ineffective once we change the way we handle such errors when continuing compilation.
It would be nice to manually spend a few minutes trying to fix all unrelated errors while tracking whether the ICE still triggers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well what you call "syntax issues" I call "additional coverage" 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what I mean is, we want tests to also protect against future ICEs and minimizing everything to the absolute minimum just reduces the effectiveness in that regard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll use the example from #113017 (comment)