Rollup merge of #104320 - fee1-dead-contrib:use-derive-const-in-std, r=oli-obk
Use `derive_const` and rm manual StructuralEq impl This does not change any semantics of the impl except for the const stability. It should be fine because trait methods and const bounds can never be used in stable without enabling `const_trait_impl`. cc `@oli-obk`
This commit is contained in:
commit
eefea28dea
3 changed files with 15 additions and 0 deletions
|
@ -536,6 +536,14 @@ impl<'tcx> MissingStabilityAnnotations<'tcx> {
|
|||
return;
|
||||
}
|
||||
|
||||
// if the const impl is derived using the `derive_const` attribute,
|
||||
// then it would be "stable" at least for the impl.
|
||||
// We gate usages of it using `feature(const_trait_impl)` anyways
|
||||
// so there is no unstable leakage
|
||||
if self.tcx.is_builtin_derive(def_id.to_def_id()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let is_const = self.tcx.is_const_fn(def_id.to_def_id())
|
||||
|| self.tcx.is_const_trait_impl_raw(def_id.to_def_id());
|
||||
let is_stable = self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue