diff options
| author | bors <bors@rust-lang.org> | 2017-07-08 22:09:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-07-08 22:09:04 +0000 |
| commit | 4b7f41a22509d87a26d429185aeeaba0a2d024c5 (patch) | |
| tree | 71de7278e21a82d9eb7e0521b1d7fd00ddc019e0 /src/libsyntax | |
| parent | 720c596ec62e8fec855c2953f21b0118ae408bdd (diff) | |
| parent | b4973e961974ac9bdd9076acbe783b0e43242256 (diff) | |
| download | rust-4b7f41a22509d87a26d429185aeeaba0a2d024c5.tar.gz rust-4b7f41a22509d87a26d429185aeeaba0a2d024c5.zip | |
Auto merge of #43097 - PlasmaPower:large-align, r=eddyb
Raise alignment limit from 2^15 to 2^31 - 1 Fixes #42960
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..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 <= 32768 - if align <= 32768 { - acc.push(ReprAlign(align as u16)); + // rustc::ty::layout::Align restricts align to <= 2147483647 + if align <= 2147483647 { + acc.push(ReprAlign(align as u32)); } else { - align_error = Some("larger than 32768"); + align_error = Some("larger than 2147483647"); } } 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)] |
