]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/impl_wf_check.rs
Unify output of "variant not found" errors
[rust.git] / src / librustc_typeck / impl_wf_check.rs
index 55b2ad44467902cc1fac67a2869df1615100ebf2..b22d7c68cf9b6247cf4f54dd4c3c39b02b7c6864 100644 (file)
@@ -9,15 +9,15 @@
 //! fixed, but for the moment it's easier to do these checks early.
 
 use crate::constrained_generic_params as cgp;
-use rustc::hir;
-use rustc::hir::def_id::DefId;
-use rustc::hir::itemlikevisit::ItemLikeVisitor;
 use rustc::ty::query::Providers;
 use rustc::ty::{self, TyCtxt, TypeFoldable};
-use rustc::util::nodemap::{FxHashMap, FxHashSet};
+use rustc_data_structures::fx::{FxHashMap, FxHashSet};
+use rustc_hir as hir;
+use rustc_hir::def_id::DefId;
+use rustc_hir::itemlikevisit::ItemLikeVisitor;
 use std::collections::hash_map::Entry::{Occupied, Vacant};
 
-use syntax_pos::Span;
+use rustc_span::Span;
 
 use rustc_error_codes::*;
 
@@ -98,7 +98,10 @@ fn enforce_impl_params_are_constrained(
         // (#36836)
         tcx.sess.delay_span_bug(
             tcx.def_span(impl_def_id),
-            "potentially unconstrained type parameters weren't evaluated",
+            &format!(
+                "potentially unconstrained type parameters weren't evaluated: {:?}",
+                impl_self_ty,
+            ),
         );
         return;
     }