diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2022-03-16 20:49:54 +1100 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-05-30 08:52:24 +0000 |
| commit | 257f06587c7cb271517ca9a02c4ed3fd4581f71e (patch) | |
| tree | 6874a3d3b7940e79c007321146df413274c6a3b2 /compiler/rustc_ty_utils/src | |
| parent | f558990814bb43cfb67db321b299dfdf275663e3 (diff) | |
| download | rust-257f06587c7cb271517ca9a02c4ed3fd4581f71e.tar.gz rust-257f06587c7cb271517ca9a02c4ed3fd4581f71e.zip | |
Remove `#[default..]` and add `#[const_trait]`
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/ty.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs index 23700e653e3..b52ee817509 100644 --- a/compiler/rustc_ty_utils/src/ty.rs +++ b/compiler/rustc_ty_utils/src/ty.rs @@ -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 } |
