File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,11 @@ impl From<Ident> for LifetimeSyntax {
148
148
/// `LifetimeSource::OutlivesBound` or `LifetimeSource::PreciseCapturing`
149
149
/// — there's no way to "elide" these lifetimes.
150
150
#[ derive( Debug , Copy , Clone , HashStable_Generic ) ]
151
+ // Raise the aligement to at least 4 bytes - this is relied on in other parts of the compiler(for pointer tagging):
152
+ // https://github.com/rust-lang/rust/blob/ce5fdd7d42aba9a2925692e11af2bd39cf37798a/compiler/rustc_data_structures/src/tagged_ptr.rs#L163
153
+ // Removing this `repr(4)` will cause the compiler to not build on platforms like `m68k` Linux, where the aligement of u32 and usize is only 2.
154
+ // Since `repr(align)` may only raise aligement, this has no effect on platforms where the aligement is already sufficient.
155
+ #[ repr( align( 4 ) ) ]
151
156
pub struct Lifetime {
152
157
#[ stable_hasher( ignore) ]
153
158
pub hir_id : HirId ,
You can’t perform that action at this time.
0 commit comments