diff options
| author | bors <bors@rust-lang.org> | 2016-02-02 07:28:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-02 07:28:04 +0000 |
| commit | 01d44ca74fa63e078d7b8c2e5f221df06d72fb46 (patch) | |
| tree | 74dcc155ed99bbc82d5be3ef7b63ef6ac28a32e4 /src/libsyntax | |
| parent | 508c21e4aeaa950553ac823f064a525c24ea85fd (diff) | |
| parent | c3f6122215fe5576ddca544b9c22f8aa34312eb5 (diff) | |
| download | rust-01d44ca74fa63e078d7b8c2e5f221df06d72fb46.tar.gz rust-01d44ca74fa63e078d7b8c2e5f221df06d72fb46.zip | |
Auto merge of #31359 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30971, #31202, #31247, #31270, #31281, #31327, #31339, #31340, #31342, #31344, #31345, #31346, #31348 - Failed merges:
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/errors/emitter.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index e327adfaf89..19bedab9d30 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -70,9 +70,9 @@ pub struct Name(pub u32); /// A SyntaxContext represents a chain of macro-expandings /// and renamings. Each macro expansion corresponds to /// a fresh u32. This u32 is a reference to a table stored -// in thread-local storage. -// The special value EMPTY_CTXT is used to indicate an empty -// syntax context. +/// in thread-local storage. +/// The special value EMPTY_CTXT is used to indicate an empty +/// syntax context. #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)] pub struct SyntaxContext(pub u32); diff --git a/src/libsyntax/errors/emitter.rs b/src/libsyntax/errors/emitter.rs index 7e0e17423de..94bbd1bd128 100644 --- a/src/libsyntax/errors/emitter.rs +++ b/src/libsyntax/errors/emitter.rs @@ -516,7 +516,7 @@ impl EmitterWriter { }; let lo = self.cm.lookup_char_pos(sp.lo); let hi = self.cm.lookup_char_pos(sp.hi); - let elide_sp = (lo.line - hi.line) > MAX_SP_LINES; + let elide_sp = (hi.line - lo.line) >= MAX_SP_LINES; let line_num = line.line_index + 1; if !(lo.line <= line_num && hi.line >= line_num) { @@ -1024,7 +1024,7 @@ mod test { \x20 ^ ^\n"; let expect0_end = "dummy.txt: 5 ccccc\n\ - \x20 ...\n\ + dummy.txt: 6 xxxxx\n\ dummy.txt: 7 yyyyy\n\ \x20 ^\n\ \x20 ...\n\ |
