diff options
Diffstat (limited to 'src/librustdoc/clean/auto_trait.rs')
| -rw-r--r-- | src/librustdoc/clean/auto_trait.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs index 289923b45e6..73df844a91b 100644 --- a/src/librustdoc/clean/auto_trait.rs +++ b/src/librustdoc/clean/auto_trait.rs @@ -1,7 +1,8 @@ -use rustc::ty::{self, Region, RegionVid, TypeFoldable}; use rustc_data_structures::fx::FxHashSet; use rustc_hir as hir; -use rustc_infer::traits::auto_trait::{self, AutoTraitResult}; +use rustc_hir::lang_items; +use rustc_middle::ty::{self, Region, RegionVid, TypeFoldable}; +use rustc_trait_selection::traits::auto_trait::{self, AutoTraitResult}; use std::fmt::Debug; @@ -493,15 +494,12 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> { // Writing a projection trait bound of the form // <T as Trait>::Name : ?Sized // is illegal, because ?Sized bounds can only - // be written in the (here, nonexistant) definition + // be written in the (here, nonexistent) definition // of the type. // Therefore, we make sure that we never add a ?Sized // bound for projections - match &ty { - &Type::QPath { .. } => { - has_sized.insert(ty.clone()); - } - _ => {} + if let Type::QPath { .. } = ty { + has_sized.insert(ty.clone()); } if bounds.is_empty() { |
