Remove #[default..]
and add #[const_trait]
This commit is contained in:
parent
f558990814
commit
257f06587c
30 changed files with 74 additions and 250 deletions
|
@ -152,9 +152,7 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
|
|||
|
||||
let constness = match hir_id {
|
||||
Some(hir_id) => match tcx.hir().get(hir_id) {
|
||||
hir::Node::TraitItem(hir::TraitItem { kind: hir::TraitItemKind::Fn(..), .. })
|
||||
if tcx.has_attr(def_id, sym::default_method_body_is_const) =>
|
||||
{
|
||||
hir::Node::TraitItem(hir::TraitItem { kind: hir::TraitItemKind::Fn(..), .. }) if matches!(tcx.trait_of_item(def_id), Some(trait_id) if tcx.has_attr(trait_id, sym::const_trait)) => {
|
||||
hir::Constness::Const
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue