-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Don't ICE when implementing Drop on enums #13041
Comments
We will accept ICE's, reluctantly, in a 1.0 release. Therefore, not a 1.0 blocker. Assigning P-low for now. |
Minimal repro: enum Foo {
Bar
}
impl Drop for Foo {
fn drop(&mut self) {}
} ICE message:
|
ghost
mentioned this issue
Jun 10, 2014
ghost
mentioned this issue
Jun 30, 2014
bors
added a commit
that referenced
this issue
Jul 22, 2014
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Aug 23, 2022
…soc-2, r=Veykril feat: Generate static method using Self::assoc() syntax This change improves the `generate_function` assist to support generating static methods/associated functions using the `Self::assoc()` syntax. Previously, one could generate a static method, but only when specifying the type name directly (like `Foo::assoc()`). After this change, `Self` is supported as well as the type name. Fixes rust-lang#13012
Jarcho
pushed a commit
to Jarcho/rust
that referenced
this issue
Aug 24, 2024
Refactor `absolute_paths` Checks are rearranged to do the more expensive checks later. Since the most likely path length will be one (locals and imported/local items) this will exclude such paths on the first check. Tests were rewritten as they were hard to follow (annotations would have helped), spammy (lots of tests for the same thing) and insufficient. One thing thing that came up and should be decided on now is what to do about the difference between `path::to::Trait::item` (4 segments) and `path::to::Type::item` (3 segments). The current behaviour treats these as different lengths which is terrible. I personally think these should both be three segments since the item can't actually be imported. Only the type or the trait could be. This makes `crate_name::Trait::item` the shortest absolute path which is shorter than the lint allows by default. changelog: None
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cc #6250
Drop
not only doesn't work on enums, it makes the compiler crash. Nominating.The text was updated successfully, but these errors were encountered: