Remove trait_of_item query.
This commit is contained in:
parent
d7ea161b7e
commit
957548183d
10 changed files with 25 additions and 36 deletions
|
@ -97,7 +97,7 @@ impl<'tcx> CheckConstVisitor<'tcx> {
|
|||
|
||||
// If the function belongs to a trait, then it must enable the const_trait_impl
|
||||
// feature to use that trait function (with a const default body).
|
||||
if tcx.trait_of_item(def_id).is_some() {
|
||||
if tcx.trait_of_item(def_id.to_def_id()).is_some() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue