diff options
| author | bors <bors@rust-lang.org> | 2018-01-09 04:22:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-01-09 04:22:50 +0000 |
| commit | 74966b5cb84934737d21bd9001db07bd93fa5d64 (patch) | |
| tree | 91adae4383a3e9a5dcbd68543a78ef9adcda5b29 /src/libsyntax | |
| parent | b5392f54503fdaf04df4b9578510b2baa944f4af (diff) | |
| parent | 9ef98545c9d55e109242b6b3489060ebc690ab05 (diff) | |
| download | rust-74966b5cb84934737d21bd9001db07bd93fa5d64.tar.gz rust-74966b5cb84934737d21bd9001db07bd93fa5d64.zip | |
Auto merge of #47276 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests - Successful merges: #47210, #47233, #47246, #47254, #47256, #47258, #47259, #47263, #47270, #47272 - Failed merges: #47248
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/attr.rs | 5 | ||||
| -rw-r--r-- | src/libsyntax/parse/lexer/comments.rs | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index 0b868b514fe..4291f811f3f 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -1008,8 +1008,7 @@ pub fn find_repr_attrs(diagnostic: &Handler, attr: &Attribute) -> Vec<ReprAttr> if let Some(mi) = item.word() { let word = &*mi.name().as_str(); let hint = match word { - // Can't use "extern" because it's not a lexical identifier. - "C" => Some(ReprExtern), + "C" => Some(ReprC), "packed" => Some(ReprPacked), "simd" => Some(ReprSimd), _ => match int_type_of_word(word) { @@ -1080,7 +1079,7 @@ fn int_type_of_word(s: &str) -> Option<IntType> { #[derive(PartialEq, Debug, RustcEncodable, RustcDecodable, Copy, Clone)] pub enum ReprAttr { ReprInt(IntType), - ReprExtern, + ReprC, ReprPacked, ReprSimd, ReprAlign(u32), diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs index 23449ee69ab..49362f07799 100644 --- a/src/libsyntax/parse/lexer/comments.rs +++ b/src/libsyntax/parse/lexer/comments.rs @@ -101,7 +101,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> String { break; } } - if i > line.len() { + if i >= line.len() { can_trim = false; } if !can_trim { |
