Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
rustc: Remove needless lifetimes
This commit is contained in:
commit
d23cb738d2
109 changed files with 266 additions and 320 deletions
|
@ -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))
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue