10000 Add lint for never type regressions by Aaron1011 · Pull Request #68350 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Add lint for never type regressions #68350

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

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
da33dc0
Initial work for linting on bad never fallback
Aaron1011 Jan 12, 2020
0c49893
Emit warning
Aaron1011 Jan 12, 2020
3a22be9
Improve lint to check substs
Aaron1011 Jan 12, 2020
d0dc1e3
Make the error message much better
Aaron1011 Jan 12, 2020
ebf1918
Provide a better error when no substs is provided for generic param
Aaron1011 Jan 13, 2020
5253bb6
Factor out code into its own module
Aaron1011 Jan 13, 2020
087af85
Tweak error message
Aaron1011 Jan 15, 2020
932d7c2
Some fixup and cleanup
Aaron1011 Jan 15, 2020
10cd2e3
Work on splitting up post_fallback
Aaron1011 Jan 15, 2020
a8ce823
More refactoring
Aaron1011 Jan 15, 2020
65318da
Add a bunch of comments
Aaron1011 Jan 15, 2020
61b879c
Some additional cleanup
Aaron1011 Jan 15, 2020
c5691a8
Change warning to error
Aaron1011 Jan 15, 2020
1ed39bc
Add some tests
Aaron1011 Jan 17, 2020
d4bd422
Fix tidy errors
Aaron1011 Jan 18, 2020
f1961b5
Fix failing test
Aaron1011 Jan 18, 2020
643a708
Unconditionally enable never-type fallback for Crater
Aaron1011 Jan 18, 2020
a81c513
Bail out on inference variables in function arguments
Aaron1011 Jan 19, 2020
9eb803a
Run never-compat post_fallback after errors are reported
Aaron1011 Jan 19, 2020
78a831f
Bail out if errors have occured
Aaron1011 Jan 19, 2020
3aefe61
Never consider built-in constructor fns to be 'questionable'
Aaron1011 Jan 19, 2020
409e8d7
Only skip fallback when errors have been reported in the same function
Aaron1011 Jan 19, 2020
39af896
Update test output
Aaron1011 Jan 19, 2020
c82ea60
Add explicit type annotations for `vec.push(break)` test
Aaron1011 Jan 19, 2020
fe77a00
Properly handle missing divering/regular inference variables
Aaron1011 Jan 26, 2020
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
Prev Previous commit
Next Next commit
Tweak error message
  • Loading branch information
Aaron1011 committed Jan 17, 2020
commit 087af859c078f242943c26f34777982947dbe62c
6 changes: 5 additions & 1 deletion src/librustc_typeck/check/never_compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ impl<'tcx> NeverCompatHandler<'tcx> {
}
}

err.span_note(diverging_var_span, "... due to this expression").emit();
err.span_note(
diverging_var_span,
"... due to this expression evaluating to `!`",
)
.emit();
}
}
}
Expand Down
0