Add constness
to TraitDef
This commit is contained in:
parent
f92a6c41e6
commit
46af987072
9 changed files with 42 additions and 31 deletions
|
@ -625,9 +625,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
_ => Const::No,
|
||||
}
|
||||
} else {
|
||||
self.tcx
|
||||
.get_attr(def_id, sym::const_trait)
|
||||
.map_or(Const::No, |attr| Const::Yes(attr.span))
|
||||
if self.tcx.is_const_trait(def_id) {
|
||||
// FIXME(effects) span
|
||||
Const::Yes(self.tcx.def_ident_span(def_id).unwrap())
|
||||
} else {
|
||||
Const::No
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Const::No
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue