X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Fty%2Fcontext.rs;h=28399ed5439f79de9a3bcba7bb9dde3ad7bf3fca;hb=d0311e71548ad5c7fb259901014552a8279ecb3b;hp=b84ebd8afe8852bfdff20a09ef7ab7bd07dd8e96;hpb=4f2471574548c1cd0ef0f65c03eae525147fb1a8;p=rust.git diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index b84ebd8afe8..28399ed5439 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -231,7 +231,7 @@ pub struct CommonConsts<'tcx> { pub err: &'tcx Const<'tcx>, } -pub struct LocalTableInContext<'a, V: 'a> { +pub struct LocalTableInContext<'a, V> { local_id_root: Option, data: &'a ItemLocalMap } @@ -294,7 +294,7 @@ fn index(&self, key: hir::HirId) -> &V { } } -pub struct LocalTableInContextMut<'a, V: 'a> { +pub struct LocalTableInContextMut<'a, V> { local_id_root: Option, data: &'a mut ItemLocalMap } @@ -1610,7 +1610,7 @@ pub fn return_type_impl_trait( ) -> Option> { // HACK: `type_of_def_id()` will fail on these (#55796), so return None let hir_id = self.hir().as_local_hir_id(scope_def_id).unwrap(); - match self.hir().get_by_hir_id(hir_id) { + match self.hir().get(hir_id) { Node::Item(item) => { match item.node { ItemKind::Fn(..) => { /* type_of_def_id() will work */ } @@ -2171,7 +2171,7 @@ pub fn print_debug_stats(self) { /// An entry in an interner. -struct Interned<'tcx, T: 'tcx+?Sized>(&'tcx T); +struct Interned<'tcx, T: ?Sized>(&'tcx T); impl<'tcx, T: 'tcx+?Sized> Clone for Interned<'tcx, T> { fn clone(&self) -> Self { @@ -2223,7 +2223,7 @@ fn borrow<'a>(&'a self) -> &'a [Ty<'tcx>] { } impl<'tcx> Borrow<[CanonicalVarInfo]> for Interned<'tcx, List> { - fn borrow<'a>(&'a self) -> &'a [CanonicalVarInfo] { + fn borrow(&self) -> &[CanonicalVarInfo] { &self.0[..] } } @@ -2236,13 +2236,13 @@ fn borrow<'a>(&'a self) -> &'a [Kind<'tcx>] { impl<'tcx> Borrow<[ProjectionKind]> for Interned<'tcx, List> { - fn borrow<'a>(&'a self) -> &'a [ProjectionKind] { + fn borrow(&self) -> &[ProjectionKind] { &self.0[..] } } impl<'tcx> Borrow for Interned<'tcx, RegionKind> { - fn borrow<'a>(&'a self) -> &'a RegionKind { + fn borrow(&self) -> &RegionKind { &self.0 } }