Skip to content

Commit 998aad9

Browse files
committed
fix(lifetime): Add lifetimes back.
1 parent 3b01fba commit 998aad9

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

src/attributes.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ 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>(cx: &CodegenCx<'gcc, '_>, inline: InlineAttr) -> Option<FnAttribute<'gcc>> {
18+
fn inline_attr<'gcc, 'tcx>(
19+
cx: &CodegenCx<'gcc, 'tcx>,
20+
inline: InlineAttr,
21+
) -> Option<FnAttribute<'gcc>> {
1922
match inline {
2023
InlineAttr::Hint => Some(FnAttribute::Inline),
2124
InlineAttr::Always => Some(FnAttribute::AlwaysInline),

src/consts.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ use crate::context::CodegenCx;
1818
use crate::errors::InvalidMinimumAlignment;
1919
use crate::type_of::LayoutGccExt;
2020

21-
fn set_global_alignment<'gcc>(cx: &CodegenCx<'gcc, '_>, gv: LValue<'gcc>, mut align: Align) {
21+
fn set_global_alignment<'gcc, 'tcx>(
22+
cx: &CodegenCx<'gcc, 'tcx>,
23+
gv: LValue<'gcc>,
24+
mut align: Align,
25+
) {
2226
// The target may require greater alignment for globals than the type does.
2327
// Note: GCC and Clang also allow `__attribute__((aligned))` on variables,
2428
// which can force it to be smaller. Rust doesn't support this yet.

src/intrinsic/mod.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ 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>(cx: &CodegenCx<'gcc, '_>, name: Symbol) -> Option<Function<'gcc>> {
42+
fn get_simple_intrinsic<'gcc, 'tcx>(
43+
cx: &CodegenCx<'gcc, 'tcx>,
44+
name: Symbol,
45+
) -> Option<Function<'gcc>> {
4346
let gcc_name = match name {
4447
sym::sqrtf32 => "sqrtf",
4548
sym::sqrtf64 => "sqrt",
@@ -584,7 +587,10 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
584587
}
585588
}
586589

587-
fn int_type_width_signed<'tcx>(ty: Ty<'tcx>, cx: &CodegenCx<'_, 'tcx>) -> Option<(u64, bool)> {
590+
fn int_type_width_signed<'gcc, 'tcx>(
591+
ty: Ty<'tcx>,
592+
cx: &CodegenCx<'gcc, 'tcx>,
593+
) -> Option<(u64, bool)> {
588594
match *ty.kind() {
589595
ty::Int(t) => Some((
590596
match t {

0 commit comments

Comments
 (0)