Skip to content

Conversation

compiler-errors
Copy link
Member

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

Fixes #110858

It doesn't really make sense for a type to have a !Drop impl. Or at least, I don't want us to implicitly assign a meaning to it by the way the compiler currently handles it (incompletely), and rather I would like to see a PR (or an RFC...) assign a meaning to !Drop if we actually wanted one for it.

@rustbot
Copy link
Collaborator

rustbot commented Apr 26, 2023

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@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 26, 2023
@compiler-errors
Copy link
Member Author

cc @rust-lang/types I guess, though this is already behind a feature gate (negative_impls) so it's not like we're breaking anything.

@bors
Copy link
Collaborator

bors commented Apr 26, 2023

☔ The latest upstream changes (presumably #110852) made this pull request unmergeable. Please resolve the merge conflicts.

@boulanlo
Copy link

This impl !Drop reminds me of Niko's blog last month. I would love to see a RFC for this!

@rust-cloud-vms rust-cloud-vms bot force-pushed the no-negative-drop-impls branch 2 times, most recently from c27dbf6 to bd146c7 Compare April 27, 2023 17:08
@oli-obk
Copy link
Contributor

oli-obk commented May 3, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented May 3, 2023

📌 Commit bd146c7 has been approved by oli-obk

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 May 3, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 4, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#110859 (Explicitly reject negative and reservation drop impls)
 - rust-lang#111020 (Validate resolution for SelfCtor too.)
 - rust-lang#111024 (Use the full Fingerprint when stringifying Svh)
 - rust-lang#111027 (Remove `allow(rustc::potential_query_instability)` for `builtin_macros`)
 - rust-lang#111039 (Encode def span for foreign return-position `impl Trait` in trait)
 - rust-lang#111070 (Don't suffix `RibKind` variants)
 - rust-lang#111094 (Add needs-unwind annotations to tests that need stack unwinding)
 - rust-lang#111103 (correctly recurse when expanding anon consts)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6fca1a9 into rust-lang:master May 4, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 4, 2023
@compiler-errors compiler-errors deleted the no-negative-drop-impls branch August 11, 2023 20:11
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: Drop impl without drop function
5 participants