diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-13 00:58:21 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-08-01 21:39:26 +0200 |
| commit | 957548183d774c2f19b69ba50b8ed822130d8628 (patch) | |
| tree | 25242bfbca791f44efaf80aa0a0d535d6c0d52cd /compiler/rustc_const_eval/src/transform | |
| parent | d7ea161b7e71f6a76868b1566bad31c1ca52824c (diff) | |
| download | rust-957548183d774c2f19b69ba50b8ed822130d8628.tar.gz rust-957548183d774c2f19b69ba50b8ed822130d8628.zip | |
Remove trait_of_item query.
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/check.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index 628298df473..0adb88a180f 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -772,7 +772,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { let mut nonconst_call_permission = false; if let Some(callee_trait) = tcx.trait_of_item(callee) && tcx.has_attr(callee_trait, sym::const_trait) - && Some(callee_trait) == tcx.trait_of_item(caller) + && Some(callee_trait) == tcx.trait_of_item(caller.to_def_id()) // Can only call methods when it's `<Self as TheTrait>::f`. && tcx.types.self_param == substs.type_at(0) { |
