diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-11-18 23:03:58 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-11-20 20:18:21 +1100 |
| commit | 3f3b2d6b7ef68d3a3817804fa4dba849a74e6878 (patch) | |
| tree | 836e0f14928c4a9022fd0c29311e25e7a818bbe3 /src/libsyntax | |
| parent | 803aacd5aef78f90fdd06ae7653fc20eec224992 (diff) | |
| download | rust-3f3b2d6b7ef68d3a3817804fa4dba849a74e6878.tar.gz rust-3f3b2d6b7ef68d3a3817804fa4dba849a74e6878.zip | |
Rename `col!` to `column!`.
This macro is very rarely used, so there is no need (and it is better) for it to avoid the abbreviation. Closes rust-lang/rfcs#467. [breaking-change]
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/base.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/source_util.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 0c7a3cf4a6c..d5eccf37756 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -414,9 +414,9 @@ fn initial_syntax_expander_table(ecfg: &expand::ExpansionConfig) -> SyntaxEnv { syntax_expanders.insert(intern("line"), builtin_normal_expander( ext::source_util::expand_line)); - syntax_expanders.insert(intern("col"), + syntax_expanders.insert(intern("column"), builtin_normal_expander( - ext::source_util::expand_col)); + ext::source_util::expand_column)); syntax_expanders.insert(intern("file"), builtin_normal_expander( ext::source_util::expand_file)); diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index f1923084409..570231940aa 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -38,10 +38,10 @@ pub fn expand_line(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) base::MacExpr::new(cx.expr_uint(topmost, loc.line)) } -/* col!(): expands to the current column number */ -pub fn expand_col(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) +/* column!(): expands to the current column number */ +pub fn expand_column(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) -> Box<base::MacResult+'static> { - base::check_zero_tts(cx, sp, tts, "col!"); + base::check_zero_tts(cx, sp, tts, "column!"); let topmost = cx.original_span_in_file(); let loc = cx.codemap().lookup_char_pos(topmost.lo); |
