about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorLee Bousfield <ljbousfield@gmail.com>2017-07-08 10:28:20 -0400
committerLee Bousfield <ljbousfield@gmail.com>2017-07-08 10:28:56 -0400
commitafed75a2d9b7e049dc26be7af3cb72297274d343 (patch)
tree2b3e04c0d249821ae26a710621b515297f46a615 /src/libsyntax
parenta10213f297be8e231f55fd6db843674a8f512140 (diff)
downloadrust-afed75a2d9b7e049dc26be7af3cb72297274d343.tar.gz
rust-afed75a2d9b7e049dc26be7af3cb72297274d343.zip
Lower alignment limit down to 2^31 - 1 (from LLVM)
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/attr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs
index 45c106f2a7f..a247fe7f8a5 100644
--- a/src/libsyntax/attr.rs
+++ b/src/libsyntax/attr.rs
@@ -974,11 +974,11 @@ pub fn find_repr_attrs(diagnostic: &Handler, attr: &Attribute) -> Vec<ReprAttr>
                         let mut align_error = None;
                         if let ast::LitKind::Int(align, ast::LitIntType::Unsuffixed) = value.node {
                             if align.is_power_of_two() {
-                                // rustc::ty::layout::Align restricts align to <= 2147483648
-                                if align <= 2147483648 {
+                                // rustc::ty::layout::Align restricts align to <= 2147483647
+                                if align <= 2147483647 {
                                     acc.push(ReprAlign(align as u32));
                                 } else {
-                                    align_error = Some("larger than 2147483648");
+                                    align_error = Some("larger than 2147483647");
                                 }
                             } else {
                                 align_error = Some("not a power of two");