Don't specialize on maybe-const - #162138
clarfonthey wants to merge 1 commit into
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| [] u8, [] u16, [] u32, [] u64, [] u128, [] usize, | ||
| [] i8, [] i16, [] i32, [] i64, [] i128, [] isize, | ||
| [] bool, [] char, | ||
| [T: ?Sized] *const T, [T: ?Sized] *mut T, |
There was a problem hiding this comment.
Line of shame that makes this change not work atm.
This comment has been minimized.
This comment has been minimized.
|
Maybe this should be reviewed by Types? It's not very clear to me (a) what problems this solves or (b) how we avoid them elsewhere -- presumably we should have the compiler stop allowing the pattern? Are there any other traits affected in std?
Is this waiting on review then? What specifically is being sought for discussion here? (Maybe this will become clear once @jackh726 gets an opportunity to write up a summary of the discussion on the linked issue?) |
|
Yes, apologies for assigning this to you; it should really be: @rustbot label -T-libs +T-types |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Apologies for this @-mentioning so many people. Will bother more people in the nominated thread as needed. |
1e20ed2 to
62e4453
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Related: #148200
Was mentioned at a T-types meeting. Immediately an issue with this due to pointers being not const-comparable, but wanted to at least open a PR with the change to discuss.
Note that currently the following impls are notable:
const trait BytewiseEq<Rhs = Self>: [const] PartialEq<Rhs> + Sizedconst trait AlwaysApplicableOrd: [const] SliceOrd + [const] Ord {}const unsafe trait UnsignedBytewiseOrd: [const] Ord {}const unsafe trait TrustedStep: [const] Step + Copy {}