dropck doc oversights / revision
The implementation of non-parametric dropck (#28861) included comments and doc that is missing a few things.
- There was feedback from @Gankro on changes to the rustonomicon that should be further tweaks (see comment thread from #28861)
- There should be a huge warning (maybe even a lint or something) that if you put
#[unsafe_destructor_blind_to_params]on a struct that is using native pointers (e.g.struct Foo<T>( { ptr: *mut T }) then you almost certainly need aPhantomDatain there.
The old code before #28861 was in fact busted in this respect, as one can see by taking the test case from #29106 and running it on older versions of Rust.
:+1: for a lint; CC @Manishearth
Aria Desires at 2015-10-16 23:40:50
hardwired lint makes sense here.
Note that if you add a lint, you need to be careful about backcompat if you're going to be removing it. We don't have a framework for "obsolete" lints yet, but it could be added.
Manish Goregaokar at 2015-10-16 23:42:47
Triage: I didn't even know this attribute was a thing!
Steve Klabnik at 2017-03-01 17:47:44
@steveklabnik The
unsafe_destructor_blind_to_paramsattribute is deprecated now. CC #34761.Andrew Paseltiner at 2017-03-01 17:50:25
@pnkfelix Is there a chance you could comment on the status of this issue since the attribute was deprecated in favor of (other?) issues.
Mark Rousskov at 2017-05-24 17:50:17
Triage: with no comment from @pnkfelix, I'm going to consider this stale and close it. felix, please let me know if you think this is still important and we can re-open.
Steve Klabnik at 2018-10-31 16:10:43
I imagine the same scenario arises with
#[may_dangle], which is what replacedunsafe destructor blind to paramsFelix S Klock II at 2018-11-01 13:27:00