-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Put #[unsafe_destructor]
behind a feature gate
#14937
Labels
A-destructors
Area: Destructors (`Drop`, …)
Milestone
Comments
I think that type parameters may only be half the problem, this is still a problem with all RAII-like structures with lifetimes, which are liberally used in the standard library. For example, this innocuous looking code triggers valgrind errors: use std::cell::RefCell;
fn main() {
let b = {
let a = box RefCell::new(4);
*a.borrow() + 1
};
println!("{}", b);
}
As much as I'd love to punt on things for 1.0, this seems like a serious issue we need to fix. |
1.0, P-backcompat-lang |
Closed by dcbf4ec. |
matthiaskrgr
pushed a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 5, 2024
feat: Support for GOTO def from *inside* files included with include! macro close rust-lang#14937 Try to implement goto def from *inside* files included with include! macro. This implementation has two limitations: 1. Only **one** file which calls include! will be tracked. (I think multiple file be included is a rare case and we may let it go for now) 2. Mapping token from included file to macro call file (semantics.rs:646~658) works fine but I am not sure is this the correct way to implement.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I propose putting
#[unsafe_destructor]
behind a feature gate because it's definitely not what we want to do long-term. This would also essentially solve #8142.Nominating for 1.0, P-backcompat-lang.
The text was updated successfully, but these errors were encountered: