Skip to content

feature-gate unsafe_no_drop_flag #22173

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
pnkfelix opened this issue Feb 11, 2015 · 4 comments · Fixed by #22178 or #22787
Closed

feature-gate unsafe_no_drop_flag #22173

pnkfelix opened this issue Feb 11, 2015 · 4 comments · Fixed by #22178 or #22787
Assignees

Comments

@pnkfelix
Copy link
Member

As part of non-zeroing dynamic drop (RFC 320), we need to feature-gate unsafe_no_drop_flag so that users do not come to rely on its unstable semantics when we release 1.0.

@pnkfelix
Copy link
Member Author

nominating, seems 1.0 beta to me.

@pnkfelix pnkfelix self-assigned this Feb 11, 2015
@pnkfelix
Copy link
Member Author

(subtask of #5016, but gets higher priority due to (more) semantic visibility)

pnkfelix added a commit to pnkfelix/rust that referenced this issue Feb 11, 2015
See RFC 320, "Non-zeroing dynamic drops."

Fix rust-lang#22173

[breaking-change]
@SSheldon
Copy link
Contributor

This feature gate doesn't seem to be required as of alpha 2. The following compiles without issue:

#[unsafe_no_drop_flag]
struct Foo;

impl Drop for Foo {
    fn drop(&mut self) {
        println!("Dropping");
    }
}

fn main() { }

@pnkfelix pnkfelix reopened this Feb 21, 2015
@pnkfelix
Copy link
Member Author

it seems like PR #22364 may have accidentally have removed the gating of unsafe_no_drop_flag.

(That's what I deserve for not including a regression test on this.)

I think I know how to fix this. (And I will look into making sure all of the feature-gated things have tests.)

pnkfelix added a commit to pnkfelix/rust that referenced this issue Feb 25, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 25, 2015
…o_drop_flag, r=alexcrichton

 Turn `unsafe_no_drop_flag` back into a gated-feature.

Fix rust-lang#22173
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants