Skip to content

dropck doc oversights / revision #29111

Open
@pnkfelix

Description

@pnkfelix

The implementation of non-parametric dropck (#28861) included comments and doc that is missing a few things.

  1. There was feedback from @gankro on changes to the rustonomicon that should be further tweaks (see comment thread from implement RFC 1238: nonparametric dropck. #28861)
  2. 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 a PhantomData in 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.

Metadata

Metadata

Assignees

Labels

A-destructorsArea: Destructors (`Drop`, …)C-enhancementCategory: An issue proposing an enhancement or a PR with one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions