Skip to content

Commit ad97b8c

Browse files
committed
fix(liftime): Gen. by cargo clippy
cmd: `cargo clippy --fix --lib -p rustc_codegen_gcc --allow-dirtyxs`
1 parent 8d4d878 commit ad97b8c

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

src/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ fn reg_to_gcc(reg: InlineAsmRegOrRegClass) -> ConstraintOrRegister {
691691

692692
/// Type to use for outputs that are discarded. It doesn't really matter what
693693
/// the type is, as long as it is valid for the constraint code.
694-
fn dummy_output_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, reg: InlineAsmRegClass) -> Type<'gcc> {
694+
fn dummy_output_type<'gcc>(cx: &CodegenCx<'gcc, '_>, reg: InlineAsmRegClass) -> Type<'gcc> {
695695
match reg {
696696
InlineAsmRegClass::AArch64(AArch64InlineAsmRegClass::reg) => cx.type_i32(),
697697
InlineAsmRegClass::AArch64(AArch64InlineAsmRegClass::preg) => unimplemented!(),

src/attributes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use crate::{context::CodegenCx, errors::TiedTargetFeatures};
1515
/// Get GCC attribute for the provided inline heuristic.
1616
#[cfg(feature = "master")]
1717
#[inline]
18-
fn inline_attr<'gcc, 'tcx>(
19-
cx: &CodegenCx<'gcc, 'tcx>,
18+
fn inline_attr<'gcc>(
19+
cx: &CodegenCx<'gcc, '_>,
2020
inline: InlineAttr,
2121
) -> Option<FnAttribute<'gcc>> {
2222
match inline {

src/builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,8 @@ impl<'gcc, 'tcx> BackendTypes for Builder<'_, 'gcc, 'tcx> {
506506
type DIVariable = <CodegenCx<'gcc, 'tcx> as BackendTypes>::DIVariable;
507507
}
508508

509-
fn set_rvalue_location<'a, 'gcc, 'tcx>(
510-
bx: &mut Builder<'a, 'gcc, 'tcx>,
509+
fn set_rvalue_location<'gcc>(
510+
bx: &mut Builder<'_, 'gcc, '_>,
511511
rvalue: RValue<'gcc>,
512512
) -> RValue<'gcc> {
513513
if bx.location.is_some() {
@@ -979,8 +979,8 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
979979
return OperandRef::zero_sized(place.layout);
980980
}
981981

982-
fn scalar_load_metadata<'a, 'gcc, 'tcx>(
983-
bx: &mut Builder<'a, 'gcc, 'tcx>,
982+
fn scalar_load_metadata<'gcc>(
983+
bx: &mut Builder<'_, 'gcc, '_>,
984984
load: RValue<'gcc>,
985985
scalar: &abi::Scalar,
986986
) {

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
3030
}
3131
}
3232

33-
pub fn bytes_in_context<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, bytes: &[u8]) -> RValue<'gcc> {
33+
pub fn bytes_in_context<'gcc>(cx: &CodegenCx<'gcc, '_>, bytes: &[u8]) -> RValue<'gcc> {
3434
let context = &cx.context;
3535
let byte_type = context.new_type::<u8>();
3636
let typ = context.new_array_type(None, byte_type, bytes.len() as u64);

src/consts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use crate::context::CodegenCx;
1818
use crate::errors::InvalidMinimumAlignment;
1919
use crate::type_of::LayoutGccExt;
2020

21-
fn set_global_alignment<'gcc, 'tcx>(
22-
cx: &CodegenCx<'gcc, 'tcx>,
21+
fn set_global_alignment<'gcc>(
22+
cx: &CodegenCx<'gcc, '_>,
2323
gv: LValue<'gcc>,
2424
mut align: Align,
2525
) {

src/intrinsic/llvm.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use rustc_codegen_ssa::traits::BuilderMethods;
55

66
use crate::{builder::Builder, context::CodegenCx};
77

8-
pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>(
9-
builder: &Builder<'a, 'gcc, 'tcx>,
8+
pub fn adjust_intrinsic_arguments<'b, 'gcc>(
9+
builder: &Builder<'_, 'gcc, '_>,
1010
gcc_func: FunctionPtrType<'gcc>,
1111
mut args: Cow<'b, [RValue<'gcc>]>,
1212
func_name: &str,
@@ -479,8 +479,8 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>(
479479
args
480480
}
481481

482-
pub fn adjust_intrinsic_return_value<'a, 'gcc, 'tcx>(
483-
builder: &Builder<'a, 'gcc, 'tcx>,
482+
pub fn adjust_intrinsic_return_value<'gcc>(
483+
builder: &Builder<'_, 'gcc, '_>,
484484
mut return_value: RValue<'gcc>,
485485
func_name: &str,
486486
args: &[RValue<'gcc>],
@@ -628,7 +628,7 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function
628628
}
629629

630630
#[cfg(feature = "master")]
631-
pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function<'gcc> {
631+
pub fn intrinsic<'gcc>(name: &str, cx: &CodegenCx<'gcc, '_>) -> Function<'gcc> {
632632
if name == "llvm.prefetch" {
633633
let gcc_name = "__builtin_prefetch";
634634
let func = cx.context.get_builtin_function(gcc_name);

src/intrinsic/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ use crate::context::CodegenCx;
3939
use crate::intrinsic::simd::generic_simd_intrinsic;
4040
use crate::type_of::LayoutGccExt;
4141

42-
fn get_simple_intrinsic<'gcc, 'tcx>(
43-
cx: &CodegenCx<'gcc, 'tcx>,
42+
fn get_simple_intrinsic<'gcc>(
43+
cx: &CodegenCx<'gcc, '_>,
4444
name: Symbol,
4545
) -> Option<Function<'gcc>> {
4646
let gcc_name = match name {
@@ -586,9 +586,9 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
586586
}
587587
}
588588

589-
fn int_type_width_signed<'gcc, 'tcx>(
589+
fn int_type_width_signed<'tcx>(
590590
ty: Ty<'tcx>,
591-
cx: &CodegenCx<'gcc, 'tcx>,
591+
cx: &CodegenCx<'_, 'tcx>,
592592
) -> Option<(u64, bool)> {
593593
match *ty.kind() {
594594
ty::Int(t) => Some((
@@ -1099,8 +1099,8 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
10991099
}
11001100
}
11011101

1102-
fn try_intrinsic<'a, 'b, 'gcc, 'tcx>(
1103-
bx: &'b mut Builder<'a, 'gcc, 'tcx>,
1102+
fn try_intrinsic<'gcc>(
1103+
bx: &mut Builder<'_, 'gcc, '_>,
11041104
try_func: RValue<'gcc>,
11051105
data: RValue<'gcc>,
11061106
_catch_func: RValue<'gcc>,

src/intrinsic/simd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,11 +694,11 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
694694
}
695695

696696
#[cfg(feature = "master")]
697-
fn gather<'a, 'gcc, 'tcx>(
697+
fn gather<'gcc>(
698698
default: RValue<'gcc>,
699699
pointers: RValue<'gcc>,
700700
mask: RValue<'gcc>,
701-
bx: &mut Builder<'a, 'gcc, 'tcx>,
701+
bx: &mut Builder<'_, 'gcc, '_>,
702702
in_len: u64,
703703
invert: bool,
704704
) -> RValue<'gcc> {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl CodegenBackend for GccCodegenBackend {
270270
}
271271
}
272272

273-
fn new_context<'gcc, 'tcx>(tcx: TyCtxt<'tcx>) -> Context<'gcc> {
273+
fn new_context<'gcc>(tcx: TyCtxt<'_>) -> Context<'gcc> {
274274
let context = Context::default();
275275
if tcx.sess.target.arch == "x86" || tcx.sess.target.arch == "x86_64" {
276276
context.add_command_line_option("-masm=intel");

0 commit comments

Comments
 (0)