-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE with incorrect turbofish #60989
Comments
Prior output:
|
Possibly related to const generics? cc @varkor With backtrace:
|
Regression in 2c8bbf5 |
cc @rust-lang/release |
triage: P-high. Leaving I-nominated to discuss at triage meeting in terms of how quickly we might address this. |
triage: discussed at compiler team meeting. We're seeing what we come up with in short term. Removing nomination tag. |
Slight reduction: struct A {}
struct B {}
impl From<A> for B {}
fn main() {
let c1 = A {};
c1::<Into<B>>;
} |
Maximal reduction: fn main() {
let c1 = ();
c1::<()>;
} |
The stable backport #61085 will land soon, will still need to be addressed in master and beta. |
As I wrote in #61085 (comment) this didn't make in 1.35.0. Someone needs to forward-port the change to master and beta-nominate it. |
I'll create the appropriate PRs over the weekend |
Is there a test case that makes sure this minimal example compiles? This seems like a good regression test to add. @Centril |
There is one in the fix PR: https://github.com/rust-lang/rust/pull/61189/files#diff-94ce7caf137efdc57471092222a49b4c that covers both cases of the examples in this issue |
I guess I missed it when scrolling through the diff |
How the heck did this pass through tests? Was turbo fish completely untested? Or is this behavior specific to when it is a value and not a function call being turbo fished? |
@czipperz Our conclusion from the compiler team meeting is that we simply are to reactive with testing and that we don't generally have sufficient test coverage. Let's try to change that moving forward. |
@czipperz The ICE doesn't occur on all uses of the turbofish. If you look at the example provided here, it shouldn't actually have compiled. Getting an ICE instead of a compiler error is still bad, of course, but not nearly as bad as having all uses of the turbofish syntax result in an ICE. |
@Centril Thanks. Is there a code coverage tool that supports utilities like line coverage? @jonas-schievink Yeah it's really hard to test every invalid case is handled correctly. |
Does someone want to maybe set up kcov to run with continuous integration? |
Turn turbo 🐟 🍨 into an error Master branch part of rust-lang#60989 r? @varkor
Some are linked in rust-lang/rfcs#646 (comment)
That's an independent topic to this issue, if you want you can open a separate issue for it, but we should keep this issue targeted to the ICE at hand. |
This issue already has a test (https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-60989.rs), so I think it can just be closed. |
gives
The text was updated successfully, but these errors were encountered: