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

Replace unsafe_destructor_blind_to_params with may_dangle #62568

Merged
merged 2 commits into from
Jul 13, 2019

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Jul 10, 2019

This PR will completely remove support for #[unsafe_destructor_blind_to_params] attribute,
which is deprecated in #38970 by [may_dangle] unsafe attribute.

Closes #34761

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 10, 2019
@tesuji
Copy link
Contributor Author

tesuji commented Jul 10, 2019

Or should I remove support for #[unsafe_destructor_blind_to_params] attribute completely?

@Centril
Copy link
Contributor

Centril commented Jul 10, 2019

r? @matthewjasper

Copy link
Contributor

@matthewjasper matthewjasper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should I remove support for #[unsafe_destructor_blind_to_params] attribute completely?

Yes

#[may_dangle] is unsafe, so all of the implementations using it need to be unsafe impls.

src/test/run-pass/issues/issue-28498-ugeh-ex1.rs Outdated Show resolved Hide resolved
@tesuji
Copy link
Contributor Author

tesuji commented Jul 10, 2019

#[may_dangle] is unsafe,

Yup! I completely forgot about that.

@tesuji tesuji force-pushed the replace_may_dangle branch 2 times, most recently from 5afcf80 to c2d96da Compare July 11, 2019 03:07
@tesuji
Copy link
Contributor Author

tesuji commented Jul 11, 2019

The build is passed.

Copy link
Contributor

@matthewjasper matthewjasper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you re-wrap the text in comments that now have a short line?

src/libsyntax/feature_gate.rs Show resolved Hide resolved
Therefore we also remove `#[unsafe_destructor_blind_to_params]`
attribute completly.
@@ -641,6 +638,8 @@ declare_features! (
(removed, extern_in_paths, "1.33.0", Some(55600), None,
Some("subsumed by `::foo::bar` paths")),
(removed, quote, "1.33.0", Some(29601), None, None),
// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238).
(removed, dropck_parametricity, "1.38.0", Some(28498), None, None),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? This features is unstable since 1.3.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK unstable features just disappear entirely, no need to keep any trace of them around.

@matthewjasper
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 11, 2019

📌 Commit 8347917 has been approved by matthewjasper

@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 Jul 11, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 12, 2019
…wjasper

Replace unsafe_destructor_blind_to_params with may_dangle

This PR will completely remove support for `#[unsafe_destructor_blind_to_params]` attribute,
which is deprecated in rust-lang#38970 by `[may_dangle]` unsafe  attribute.

Closes rust-lang#34761
bors added a commit that referenced this pull request Jul 12, 2019
Rollup of 12 pull requests

Successful merges:

 - #61535 (Coherence test when a generic type param has a default value from an associated type)
 - #62274 (rustc_mir: follow FalseUnwind's real_target edge in qualify_consts.)
 - #62431 (Add messages to `Option`'s and `Result`'s `must_use` annotation for `is_*`)
 - #62453 (in which we suggest anonymizing single-use lifetimes in paths )
 - #62568 (Replace unsafe_destructor_blind_to_params with may_dangle)
 - #62578 (Add test for #49919)
 - #62595 (Document that the crate keyword refers to the project root)
 - #62599 (move mem::uninitialized deprecation back by 1 release, to 1.39)
 - #62605 (Emit dropped unemitted errors to aid in ICE debugging)
 - #62607 (Correctly break out of recovery loop)
 - #62608 (`async unsafe fn` tests)
 - #62623 (downgrade indirect_structural_match lint to allow)

Failed merges:

r? @ghost
@bors bors merged commit 8347917 into rust-lang:master Jul 13, 2019
@tesuji tesuji deleted the replace_may_dangle branch July 13, 2019 04:19
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#[may_dangle], a refined dropck escape hatch (tracking issue for RFC 1327)
6 participants