-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Always force non-trimming of path in unreachable_patterns
lint
#135310
Conversation
Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`. This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite. Fix rust-lang#135289.
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
Some changes occurred in match checking cc @Nadrieril |
The job Click to see the possible cause of the failure (guessed by this bot)
|
I had the same workaround locally, but still wondered where the lint was silenced for the unreachable arms in that crate 🤔. |
@lqd my assumption it is because of cargo silencing the lint for deps, but it's only a guess. |
Interesting possibility. They do that via |
Would be nice to have a test for this |
I don't get why a lint wasn't emitted, I too would really like a repro. |
I identified it is happening at Edit: If I don't find a more appropriate solution before then, we should beta-backport this change in 4/5 weeks. |
@rustbot label: +beta-nominated |
well, merging because ICE and backports, would be nice to get a repro eventually but also shrug @bors r+ |
Always force non-trimming of path in `unreachable_patterns` lint Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`. This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite. Fix rust-lang#135289.
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#135310 (Always force non-trimming of path in `unreachable_patterns` lint) - rust-lang#135446 (further improve panic_immediate_abort by removing rtprintpanic! messages) - rust-lang#135491 (Remove dead rustc_allowed_through_unstable_modules for std::os::fd contents) - rust-lang#135542 (Add the concrete syntax for precise capturing to 1.82 release notes.) - rust-lang#135700 (Emit single privacy error for struct literal with multiple private fields and add test for `default_field_values` privacy) - rust-lang#135729 (Add debug assertions to compiler profile) - rust-lang#135736 (rustdoc: Fix flaky doctest test) - rust-lang#135738 (Replace usages of `map_or(bool, ...)` with `is_{some_and|none_or|ok_and}`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 5 pull requests Successful merges: - rust-lang#134276 (fully de-stabilize all custom inner attributes) - rust-lang#135237 (Match Ergonomics 2024: document and reorganize the currently-implemented feature gates) - rust-lang#135310 (Always force non-trimming of path in `unreachable_patterns` lint) - rust-lang#135446 (further improve panic_immediate_abort by removing rtprintpanic! messages) - rust-lang#135491 (Remove dead rustc_allowed_through_unstable_modules for std::os::fd contents) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135310 - estebank:issue-135289, r=Nadrieril Always force non-trimming of path in `unreachable_patterns` lint Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`. This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite. Fix rust-lang#135289.
thx for your investigation @estebank btw! |
A fixme would also be good, at least to track that the fix is suboptimal and more of a workaround for the ICE. But the test is a prerequisite for analysis to even know what the principled fix is in the first place. Maybe others can help. |
Add fixme and test for issue rust-lang#135289 This PR: - adds a test minimizing issue rust-lang#135289 for PR rust-lang#135310 - adds a fixme about the suboptimal fix for the ICE I've verified the test indeed ICEs with 3f2f695 reverted. r? `@estebank`
Rollup merge of rust-lang#135833 - lqd:add-ice-test, r=compiler-errors Add fixme and test for issue rust-lang#135289 This PR: - adds a test minimizing issue rust-lang#135289 for PR rust-lang#135310 - adds a fixme about the suboptimal fix for the ICE I've verified the test indeed ICEs with 3f2f695 reverted. r? `@estebank`
[beta] backports - Always force non-trimming of path in `unreachable_patterns` lint rust-lang#135310 - Add Profile Override for Non-Git Sources rust-lang#135433 - resolve symlinks of LLVM tool binaries before copying them rust-lang#135585 - add cache to `AmbiguityCausesVisitor` rust-lang#135618 - When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely rust-lang#135643 - Temporarily bring back `Rvalue::Len` rust-lang#135709 - make it possible to use ci-rustc on tarball sources rust-lang#135722 - Remove test panic from File::open rust-lang#135837 - Only assert the `Parser` size on specific arches rust-lang#135855 r? cuviper
[beta] backports - Always force non-trimming of path in `unreachable_patterns` lint rust-lang#135310 - Add Profile Override for Non-Git Sources rust-lang#135433 - resolve symlinks of LLVM tool binaries before copying them rust-lang#135585 - add cache to `AmbiguityCausesVisitor` rust-lang#135618 - When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely rust-lang#135643 - Temporarily bring back `Rvalue::Len` rust-lang#135709 - make it possible to use ci-rustc on tarball sources rust-lang#135722 - Remove test panic from File::open rust-lang#135837 - Only assert the `Parser` size on specific arches rust-lang#135855 - [beta] TRPL: more backward-compatible Edition changes rust-lang#135843 r? cuviper
[beta] backports - Always force non-trimming of path in `unreachable_patterns` lint rust-lang#135310 - Add Profile Override for Non-Git Sources rust-lang#135433 - resolve symlinks of LLVM tool binaries before copying them rust-lang#135585 - add cache to `AmbiguityCausesVisitor` rust-lang#135618 - When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely rust-lang#135643 - make it possible to use ci-rustc on tarball sources rust-lang#135722 - Remove test panic from File::open rust-lang#135837 - Only assert the `Parser` size on specific arches rust-lang#135855 - [beta] TRPL: more backward-compatible Edition changes rust-lang#135843 r? cuviper
Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using
with_no_trimmed_path!
.This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite.
Fix #135289.