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

Port of pcwalton removal of #[unsafe_destructor] check. #23819

Merged
merged 1 commit into from
Mar 29, 2015

Conversation

pnkfelix
Copy link
Member

Port of pcwalton removal of #[unsafe_destructor] check.

Earlier commits impose rules on lifetimes that make generic destructors safe; thus we no longer need the #[unsafe_destructor] attribute nor its associated check.


So remove the check for the unsafe_destructor attribute.

And remove outdated compile-fail tests from when lifetime-parameteric dtors were disallowed/unsafe.

In addition, when one uses the attribute without the associated feature, report that the attribute is deprecated.

However, I do not think this is a breaking-change, because the attribute and feature are still currently accepted by the compiler. (After the next snapshot that has this commit, we can remove the feature itself and the attribute as well.)


I consider this to:

Fix #22196

(technically there is still the post snapshot work of removing the last remnants of the feature and the attribute, but the ticket can still be closed in my opinion).

Earlier commits impose rules on lifetimes that make generic
destructors safe; thus we no longer need the `#[unsafe_destructor]`
attribute nor its associated check.

----

So remove the check for the unsafe_destructor attribute.

And remove outdated compile-fail tests from when lifetime-parameteric
dtors were disallowed/unsafe.

In addition, when one uses the attribute without the associated
feature, report that the attribute is deprecated.

However, I do not think this is a breaking-change, because the
attribute and feature are still currently accepted by the compiler.
(After the next snapshot that has this commit, we can remove the
feature itself and the attribute as well.)

----

I consider this to:

Fix rust-lang#22196

(techincally there is still the post snapshot work of removing the
last remants of the feature and the attribute, but the ticket can
still be closed in my opinion).
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

@pnkfelix
Copy link
Member Author

Since this is a port of code that @pcwalton wrote (and I just ported/updated/squashed), I'm going to r+ myself.

@pnkfelix
Copy link
Member Author

@bors r=pnkfelix

@bors
Copy link
Contributor

bors commented Mar 28, 2015

📌 Commit 64c48f3 has been approved by pnkfelix

@bors
Copy link
Contributor

bors commented Mar 29, 2015

⌛ Testing commit 64c48f3 with merge 27af78c...

bors added a commit that referenced this pull request Mar 29, 2015
Port of pcwalton removal of `#[unsafe_destructor]` check.

Earlier commits impose rules on lifetimes that make generic destructors safe; thus we no longer need the `#[unsafe_destructor]` attribute nor its associated check.

----

So remove the check for the unsafe_destructor attribute.

And remove outdated compile-fail tests from when lifetime-parameteric dtors were disallowed/unsafe.

In addition, when one uses the attribute without the associated feature, report that the attribute is deprecated.

However, I do not think this is a breaking-change, because the attribute and feature are still currently accepted by the compiler. (After the next snapshot that has this commit, we can remove the feature itself and the attribute as well.)

----

I consider this to:

Fix #22196

(technically there is still the post snapshot work of removing the last remnants of the feature and the attribute, but the ticket can still be closed in my opinion).
@bors bors merged commit 64c48f3 into rust-lang:master Mar 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Once confident in dropck: remove #[unsafe_destructor] attribute
4 participants