]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_const_eval/eval.rs
trait_of_item
[rust.git] / src / librustc_const_eval / eval.rs
index 8b1aa0708807bc4284b8b7f8bad0c09840e7ec70..e79f23aee11456e2fd3f3ce35f7e72a95f45d1ca 100644 (file)
@@ -74,7 +74,7 @@ pub fn lookup_const_by_id<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                 // constants, we only try to find the expression for a
                 // trait-associated const if the caller gives us the
                 // substitutions for the reference to it.
-                if tcx.sess.cstore.trait_of_item(def_id).is_some() {
+                if tcx.trait_of_item(def_id).is_some() {
                     resolve_trait_associated_const(tcx, def_id, substs)
                 } else {
                     Some((def_id, substs))