functions marked with attr are not const
This commit is contained in:
parent
89d190f090
commit
27e863b3df
2 changed files with 9 additions and 4 deletions
|
@ -60,9 +60,6 @@ fn is_const_fn_raw(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
|
|||
return true;
|
||||
}
|
||||
|
||||
if tcx.has_attr(def_id, sym::default_method_body_is_const) {
|
||||
return true;
|
||||
}
|
||||
// If the function itself is not annotated with `const`, it may still be a `const fn`
|
||||
// if it resides in a const trait impl.
|
||||
is_parent_const_impl_raw(tcx, hir_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue