d-sparc64-dont-pack-spans
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Fri, 2 Nov 2018 08:42:36 +0000 (08:42 +0000)
committerXimin Luo <infinity0@debian.org>
Fri, 2 Nov 2018 08:42:36 +0000 (08:42 +0000)
Gbp-Pq: Name d-sparc64-dont-pack-spans.patch

src/libsyntax_pos/span_encoding.rs

index 473aa1bd1b8a471e2e1c6de98169c8cc9965818d..f95848cf05e0538c71f4d731ae156e81ea73ac5d 100644 (file)
@@ -26,7 +26,9 @@ use std::hash::{Hash, Hasher};
 /// The primary goal of `Span` is to be as small as possible and fit into other structures
 /// (that's why it uses `packed` as well). Decoding speed is the second priority.
 /// See `SpanData` for the info on span fields in decoded representation.
-#[repr(packed)]
+
+/// Workaround for compiler bug: https://github.com/rust-lang/rust/issues/53181
+#[cfg_attr(not(any(target_arch = "sparc64", target_arch = "sparcv9")), repr(packed))]
 pub struct Span(u32);
 
 impl Copy for Span {}