diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2025-07-24 19:05:31 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2025-07-28 09:53:50 -0500 |
| commit | 172af038a733020ec487d57a593ddb27ce16c325 (patch) | |
| tree | a754f3637b3b51556b5c4de9f0eb801c3b2921d7 /compiler/rustc_const_eval/src/check_consts | |
| parent | 0d7abc8df083296c29e0fb816c1c4b10e4cf6577 (diff) | |
| download | rust-172af038a733020ec487d57a593ddb27ce16c325.tar.gz rust-172af038a733020ec487d57a593ddb27ce16c325.zip | |
Rename trait_of_item -> trait_of_assoc
Diffstat (limited to 'compiler/rustc_const_eval/src/check_consts')
| -rw-r--r-- | compiler/rustc_const_eval/src/check_consts/check.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/check_consts/qualifs.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs index 69637cadcc9..44e5d1d5ee7 100644 --- a/compiler/rustc_const_eval/src/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/check_consts/check.rs @@ -784,7 +784,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { self.revalidate_conditional_constness(callee, fn_args, *fn_span); // Attempting to call a trait method? - if let Some(trait_did) = tcx.trait_of_item(callee) { + if let Some(trait_did) = tcx.trait_of_assoc(callee) { // We can't determine the actual callee here, so we have to do different checks // than usual. diff --git a/compiler/rustc_const_eval/src/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/check_consts/qualifs.rs index 166491b47a1..faf41f1658b 100644 --- a/compiler/rustc_const_eval/src/check_consts/qualifs.rs +++ b/compiler/rustc_const_eval/src/check_consts/qualifs.rs @@ -369,7 +369,7 @@ where assert!(promoted.is_none() || Q::ALLOW_PROMOTED); // Don't peek inside trait associated constants. - if promoted.is_none() && cx.tcx.trait_of_item(def).is_none() { + if promoted.is_none() && cx.tcx.trait_of_assoc(def).is_none() { let qualifs = cx.tcx.at(constant.span).mir_const_qualif(def); if !Q::in_qualifs(&qualifs) { |
