diff options
Diffstat (limited to 'src/librustc/traits/coherence.rs')
| -rw-r--r-- | src/librustc/traits/coherence.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/librustc/traits/coherence.rs b/src/librustc/traits/coherence.rs index 35d8e2beef5..afbce5a4f0a 100644 --- a/src/librustc/traits/coherence.rs +++ b/src/librustc/traits/coherence.rs @@ -4,17 +4,16 @@ //! [trait-resolution]: https://rust-lang.github.io/rustc-guide/traits/resolution.html //! [trait-specialization]: https://rust-lang.github.io/rustc-guide/traits/specialization.html -use crate::infer::CombinedSnapshot; +use crate::infer::{CombinedSnapshot, InferOk}; use crate::hir::def_id::{DefId, LOCAL_CRATE}; -use syntax_pos::DUMMY_SP; use crate::traits::{self, Normalized, SelectionContext, Obligation, ObligationCause}; use crate::traits::IntercrateMode; use crate::traits::select::IntercrateAmbiguityCause; use crate::ty::{self, Ty, TyCtxt}; use crate::ty::fold::TypeFoldable; use crate::ty::subst::Subst; - -use crate::infer::{InferOk}; +use syntax::symbol::sym; +use syntax_pos::DUMMY_SP; /// Whether we do the orphan check relative to this crate or /// to some remote crate. @@ -233,7 +232,7 @@ pub fn trait_ref_is_knowable<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>, pub fn trait_ref_is_local_or_fundamental<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>, trait_ref: ty::TraitRef<'tcx>) -> bool { - trait_ref.def_id.krate == LOCAL_CRATE || tcx.has_attr(trait_ref.def_id, "fundamental") + trait_ref.def_id.krate == LOCAL_CRATE || tcx.has_attr(trait_ref.def_id, sym::fundamental) } pub enum OrphanCheckErr<'tcx> { |
