diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2019-11-30 17:46:46 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2019-12-27 19:20:28 +0100 |
| commit | 6b87d5cdf1f60b14140b9c68c2ecb05f1a61e651 (patch) | |
| tree | 14f72ed128f3c67d66935e078cd0a1497463cfe7 /src/librustc/ty | |
| parent | 66f91980473db385d3560cfa4a1e9f889fb6f906 (diff) | |
| download | rust-6b87d5cdf1f60b14140b9c68c2ecb05f1a61e651.tar.gz rust-6b87d5cdf1f60b14140b9c68c2ecb05f1a61e651.zip | |
Syntax for hir::Ty.
Diffstat (limited to 'src/librustc/ty')
| -rw-r--r-- | src/librustc/ty/context.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/mod.rs | 6 | ||||
| -rw-r--r-- | src/librustc/ty/wf.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 2659caf030b..d92fd34d7e4 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -464,7 +464,7 @@ impl<'tcx> TypeckTables<'tcx> { } /// Returns the final resolution of a `QPath` in an `Expr` or `Pat` node. - pub fn qpath_res(&self, qpath: &hir::QPath, id: hir::HirId) -> Res { + pub fn qpath_res(&self, qpath: &hir::QPath<'_>, id: hir::HirId) -> Res { match *qpath { hir::QPath::Resolved(_, ref path) => path.res, hir::QPath::TypeRelative(..) => self diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 8834e0e5a08..2c40c9dc9ef 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -298,7 +298,7 @@ impl<'tcx> DefIdTree for TyCtxt<'tcx> { } impl Visibility { - pub fn from_hir(visibility: &hir::Visibility, id: hir::HirId, tcx: TyCtxt<'_>) -> Self { + pub fn from_hir(visibility: &hir::Visibility<'_>, id: hir::HirId, tcx: TyCtxt<'_>) -> Self { match visibility.node { hir::VisibilityKind::Public => Visibility::Public, hir::VisibilityKind::Crate(_) => Visibility::Restricted(DefId::local(CRATE_DEF_INDEX)), @@ -2757,7 +2757,7 @@ impl<'tcx> TyCtxt<'tcx> { fn associated_item_from_trait_item_ref( self, parent_def_id: DefId, - parent_vis: &hir::Visibility, + parent_vis: &hir::Visibility<'_>, trait_item_ref: &hir::TraitItemRef, ) -> AssocItem { let def_id = self.hir().local_def_id(trait_item_ref.id.hir_id); @@ -2783,7 +2783,7 @@ impl<'tcx> TyCtxt<'tcx> { fn associated_item_from_impl_item_ref( self, parent_def_id: DefId, - impl_item_ref: &hir::ImplItemRef, + impl_item_ref: &hir::ImplItemRef<'_>, ) -> AssocItem { let def_id = self.hir().local_def_id(impl_item_ref.id.hir_id); let (kind, has_self) = match impl_item_ref.kind { diff --git a/src/librustc/ty/wf.rs b/src/librustc/ty/wf.rs index 900c425fac2..afd1b690232 100644 --- a/src/librustc/ty/wf.rs +++ b/src/librustc/ty/wf.rs @@ -694,7 +694,7 @@ pub fn object_region_bounds<'tcx>( /// Find the span of a generic bound affecting an associated type. fn get_generic_bound_spans( - generics: &hir::Generics, + generics: &hir::Generics<'_>, trait_name: Option<&Ident>, assoc_item_name: Ident, ) -> Vec<Span> { @@ -729,7 +729,7 @@ fn get_generic_bound_spans( bounds } -fn is_self_path(kind: &hir::TyKind) -> bool { +fn is_self_path(kind: &hir::TyKind<'_>) -> bool { match kind { hir::TyKind::Path(hir::QPath::Resolved(None, path)) => { let mut s = path.segments.iter(); |
