diff options
| author | bors <bors@rust-lang.org> | 2017-12-27 07:11:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-12-27 07:11:50 +0000 |
| commit | 3fd27b2718438ceec6243869cde3edde7e5a904e (patch) | |
| tree | 500df19b7e797341a03aedf5d9934f5c026cd6f2 /src/libsyntax | |
| parent | e8098c5c4db081585e0dc12fe6a2e0defe92857f (diff) | |
| parent | 6081989adc7e06dcb6b88feb12908dbb08565c6c (diff) | |
| download | rust-3fd27b2718438ceec6243869cde3edde7e5a904e.tar.gz rust-3fd27b2718438ceec6243869cde3edde7e5a904e.zip | |
Auto merge of #46977 - est31:column_fix, r=dtolnay
Make the output of the column! macro 1 based Fixes #46868. I didn't add any regression tests as the change already had to change tests inside the codebase. r? @dtolnay
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index 4da485fc9a4..6b08448107a 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -49,7 +49,7 @@ pub fn expand_column(cx: &mut ExtCtxt, sp: Span, tts: &[tokenstream::TokenTree]) let topmost = cx.expansion_cause().unwrap_or(sp); let loc = cx.codemap().lookup_char_pos(topmost.lo()); - base::MacEager::expr(cx.expr_u32(topmost, loc.col.to_usize() as u32)) + base::MacEager::expr(cx.expr_u32(topmost, loc.col.to_usize() as u32 + 1)) } /* __rust_unstable_column!(): expands to the current column number */ |
