Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upconst fn can have little a phantom data #67649
Comments
I don't see anything special about |
|
All the type based limitations of rust/src/librustc_mir/transform/qualify_min_const_fn.rs Lines 79 to 122 in 3e0a1c0 adding a PhantomData exception will make this check more complex. A real world example that makes this feature useful would be good as motiviation to do this change.
|
Playground
We should probably not restrict the phantom datas a const fn is allowed to construct
cc @oli-obk