about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-06 18:16:02 -0400
committerMichael Goulet <michael@errs.io>2024-07-07 11:10:32 -0400
commitb2e30bdec480d38d050b7a8a3281cbd71fdcb075 (patch)
tree38c2c343366ac22a5561e3de7503d553a51ca16b /compiler/rustc_trait_selection/src
parent382148d9a21ae0b506adf44fc1e55a410acde828 (diff)
downloadrust-b2e30bdec480d38d050b7a8a3281cbd71fdcb075.tar.gz
rust-b2e30bdec480d38d050b7a8a3281cbd71fdcb075.zip
Add fundamental to trait def
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/coherence.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs
index 9f0d84e7d45..57ba6c33ac5 100644
--- a/compiler/rustc_trait_selection/src/traits/coherence.rs
+++ b/compiler/rustc_trait_selection/src/traits/coherence.rs
@@ -666,7 +666,7 @@ pub fn trait_ref_is_local_or_fundamental<'tcx>(
     tcx: TyCtxt<'tcx>,
     trait_ref: ty::TraitRef<'tcx>,
 ) -> bool {
-    trait_ref.def_id.is_local() || tcx.has_attr(trait_ref.def_id, sym::fundamental)
+    trait_ref.def_id.is_local() || tcx.trait_def(trait_ref.def_id).is_fundamental
 }
 
 #[derive(Debug, Copy, Clone)]