Skip to content
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

Delay a good path bug on drop for TypeErrCtxt (instead of a regular delayed bug) #110476

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Apr 18, 2023

r? @lcnr
Perhaps we should just delete the Drop impl altogether though?

Fixes rust-lang/rust-clippy#10645

@matthiaskrgr: I don't know how to make a clippy test for this. Any idea? Clippy's UI tests run with -D warnings and I have no idea how to switch it off to make a test that triggers this ICE in the clippy test suite 🤣

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 18, 2023
@rust-log-analyzer

This comment has been minimized.

@matthiaskrgr
Copy link
Member

Does it work if you explicitly #![allow(clippy::whatever)] whatever is triggering inside the test and then warn(clippy::thelint) the lint? 🤔

Need to check after work.

@compiler-errors
Copy link
Member Author

No, I tried a bunch of combinations and they all seem to not work lol...

@lcnr
Copy link
Contributor

lcnr commented Apr 18, 2023

r=me with or without a clippy test 🤷 don't have an opinion on whether we should instead completely remove the Drop impl

@matthiaskrgr
Copy link
Member

oh I see, so the ice happens AFTER the lint is emitted, and since we default to errors, compilation just stops and we simply don't hit the ICE in the tests, weird :/

@matthiaskrgr
Copy link
Member

ok it's a bit dirty but you force the test to warn via // compile-flags: --cap-lints=warn and that will reproduce the ice :3

@matthiaskrgr
Copy link
Member

If you cherry-pick matthiaskrgr@b1d6e8f into your branch it should work I think :)

@rustbot
Copy link
Collaborator

rustbot commented Apr 18, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@compiler-errors
Copy link
Member Author

Thanks @matthiaskrgr for the test!

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Apr 18, 2023

📌 Commit c5e6ccb has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 18, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#110432 (Report more detailed reason why `Index` impl is not satisfied)
 - rust-lang#110451 (Minor changes to `IndexVec::ensure_contains_elem` & related methods)
 - rust-lang#110476 (Delay a good path bug on drop for `TypeErrCtxt` (instead of a regular delayed bug))
 - rust-lang#110498 (Switch to `EarlyBinder` for `collect_return_position_impl_trait_in_trait_tys`)
 - rust-lang#110507 (boostrap: print output during building tools)
 - rust-lang#110510 (Fix ICE for transmutability in candidate assembly)
 - rust-lang#110513 (make `non_upper_case_globals` lint not report trait impls)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f20da94 into rust-lang:master Apr 19, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 19, 2023
@compiler-errors compiler-errors deleted the ty-err-ctxt-good-path branch August 11, 2023 20:21
nnethercote added a commit to nnethercote/rust that referenced this pull request Feb 12, 2024
The check within changed from `delay_span_bug` to `delay_good_path_bug`
in rust-lang#110476, and removing the check altogether was considered. It's a
very weak sanity check and gets in the way of removing good path delayed
bugs altogether, so this PR just removes it.
nnethercote added a commit to nnethercote/rust that referenced this pull request Feb 12, 2024
The check within changed from `delay_span_bug` to `delay_good_path_bug`
in rust-lang#110476, and removing the check altogether was considered. It's a
very weak sanity check and gets in the way of removing good path delayed
bugs altogether, so this PR just removes it.
nnethercote added a commit to nnethercote/rust that referenced this pull request Feb 13, 2024
The check within changed from `delay_span_bug` to `delay_good_path_bug`
in rust-lang#110476, and removing the check altogether was considered. It's a
very weak sanity check and gets in the way of removing good path delayed
bugs altogether, so this PR just removes it.
nnethercote added a commit to nnethercote/rust that referenced this pull request Feb 13, 2024
The check within changed from `delay_span_bug` to `delay_good_path_bug`
in rust-lang#110476, and removing the check altogether was considered. It's a
very weak sanity check and gets in the way of removing good path delayed
bugs altogether, so this PR just removes it.
RustyYato pushed a commit to RustyYato/rust that referenced this pull request Jun 2, 2024
The check within changed from `delay_span_bug` to `delay_good_path_bug`
in rust-lang#110476, and removing the check altogether was considered. It's a
very weak sanity check and gets in the way of removing good path delayed
bugs altogether, so this PR just removes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: delay_span_bug: used a TypeErrCtxt without failing compilation: future-not-send`
6 participants