diff options
| author | Lee Bousfield <ljbousfield@gmail.com> | 2017-07-06 18:00:46 -0400 |
|---|---|---|
| committer | Lee Bousfield <ljbousfield@gmail.com> | 2017-07-08 10:28:56 -0400 |
| commit | a10213f297be8e231f55fd6db843674a8f512140 (patch) | |
| tree | 33434ed9abf23e37de4e27407ab5121893cb923f /src/libsyntax | |
| parent | 4d4d76cf42feceb4cdba5f219c15b8855ea37957 (diff) | |
| download | rust-a10213f297be8e231f55fd6db843674a8f512140.tar.gz rust-a10213f297be8e231f55fd6db843674a8f512140.zip | |
Raised alignment limit from 2^15 to 2^31
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/attr.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index f0fc849c0c5..45c106f2a7f 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 <= 32768 - if align <= 32768 { - acc.push(ReprAlign(align as u16)); + // rustc::ty::layout::Align restricts align to <= 2147483648 + if align <= 2147483648 { + acc.push(ReprAlign(align as u32)); } else { - align_error = Some("larger than 32768"); + align_error = Some("larger than 2147483648"); } } else { align_error = Some("not a power of two"); @@ -1027,7 +1027,7 @@ pub enum ReprAttr { ReprExtern, ReprPacked, ReprSimd, - ReprAlign(u16), + ReprAlign(u32), } #[derive(Eq, Hash, PartialEq, Debug, RustcEncodable, RustcDecodable, Copy, Clone)] |
