diff options
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/symbol_export.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/debuginfo/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/meth.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/target_features.rs | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index a1c77ec0cfc..edde1537b81 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -607,21 +607,21 @@ fn link_dwarf_object<'a>( } impl<Relocations> ThorinSession<Relocations> { - fn alloc_mmap<'arena>(&'arena self, data: Mmap) -> &'arena Mmap { + fn alloc_mmap(&self, data: Mmap) -> &Mmap { (*self.arena_mmap.alloc(data)).borrow() } } impl<Relocations> thorin::Session<Relocations> for ThorinSession<Relocations> { - fn alloc_data<'arena>(&'arena self, data: Vec<u8>) -> &'arena [u8] { + fn alloc_data(&self, data: Vec<u8>) -> &[u8] { (*self.arena_data.alloc(data)).borrow() } - fn alloc_relocation<'arena>(&'arena self, data: Relocations) -> &'arena Relocations { + fn alloc_relocation(&self, data: Relocations) -> &Relocations { (*self.arena_relocations.alloc(data)).borrow() } - fn read_input<'arena>(&'arena self, path: &Path) -> std::io::Result<&'arena [u8]> { + fn read_input(&self, path: &Path) -> std::io::Result<&[u8]> { let file = File::open(&path)?; let mmap = (unsafe { Mmap::map(file) })?; Ok(self.alloc_mmap(mmap)) diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs index 22f534d909a..8cb7d74b90d 100644 --- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs +++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs @@ -163,10 +163,10 @@ fn is_reachable_non_generic_provider_extern(tcx: TyCtxt<'_>, def_id: DefId) -> b tcx.reachable_non_generics(def_id.krate).contains_key(&def_id) } -fn exported_symbols_provider_local<'tcx>( - tcx: TyCtxt<'tcx>, +fn exported_symbols_provider_local( + tcx: TyCtxt<'_>, cnum: CrateNum, -) -> &'tcx [(ExportedSymbol<'tcx>, SymbolExportInfo)] { +) -> &[(ExportedSymbol<'_>, SymbolExportInfo)] { assert_eq!(cnum, LOCAL_CRATE); if !tcx.sess.opts.output_types.should_codegen() { diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/mod.rs b/compiler/rustc_codegen_ssa/src/debuginfo/mod.rs index 6e3f4f0b8ef..60e9b40e8fb 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/mod.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/mod.rs @@ -10,7 +10,7 @@ pub mod type_names; /// NOTE: This is somewhat inconsistent right now: For empty enums and enums with a single /// fieldless variant, we generate DW_TAG_struct_type, although a /// DW_TAG_enumeration_type would be a better fit. -pub fn wants_c_like_enum_debuginfo<'tcx>(enum_type_and_layout: TyAndLayout<'tcx>) -> bool { +pub fn wants_c_like_enum_debuginfo(enum_type_and_layout: TyAndLayout<'_>) -> bool { match enum_type_and_layout.ty.kind() { ty::Adt(adt_def, _) => { if !adt_def.is_enum() { diff --git a/compiler/rustc_codegen_ssa/src/meth.rs b/compiler/rustc_codegen_ssa/src/meth.rs index d96ca921f1f..2421acab471 100644 --- a/compiler/rustc_codegen_ssa/src/meth.rs +++ b/compiler/rustc_codegen_ssa/src/meth.rs @@ -65,7 +65,7 @@ impl<'a, 'tcx> VirtualIndex { /// This takes a valid `self` receiver type and extracts the principal trait /// ref of the type. -fn expect_dyn_trait_in_self<'tcx>(ty: Ty<'tcx>) -> ty::PolyExistentialTraitRef<'tcx> { +fn expect_dyn_trait_in_self(ty: Ty<'_>) -> ty::PolyExistentialTraitRef<'_> { for arg in ty.peel_refs().walk() { if let GenericArgKind::Type(ty) = arg.unpack() { if let ty::Dynamic(data, _, _) = ty.kind() { diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 0dabe96b602..da69fc8ecf7 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -419,7 +419,7 @@ pub fn from_target_feature( /// Computes the set of target features used in a function for the purposes of /// inline assembly. -fn asm_target_features<'tcx>(tcx: TyCtxt<'tcx>, did: DefId) -> &'tcx FxHashSet<Symbol> { +fn asm_target_features(tcx: TyCtxt<'_>, did: DefId) -> &FxHashSet<Symbol> { let mut target_features = tcx.sess.unstable_target_features.clone(); if tcx.def_kind(did).has_codegen_attrs() { let attrs = tcx.codegen_fn_attrs(did); |
