rustc_ast_pretty: Don't print space after $
For example, this code:
$arg:expr
used to be pretty-printed as:
$ arg : expr
but is now pretty-printed as:
$arg : expr
This commit is contained in:
parent
f82d4845f2
commit
7ffec7028a
11 changed files with 32 additions and 28 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#![feature /* 0#0 */(no_core)]
|
||||
#![no_core /* 0#0 */]
|
||||
|
||||
macro_rules! foo /* 0#0 */ { ($ x : ident) => { y + $ x } }
|
||||
macro_rules! foo /* 0#0 */ { ($x : ident) => { y + $x } }
|
||||
|
||||
fn bar /* 0#0 */() {
|
||||
let x /* 0#0 */ = 1;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ macro_rules! produce_it
|
|||
*/ {
|
||||
() =>
|
||||
{
|
||||
meta_macro :: print_def_site! ($ crate :: dummy! ()) ;
|
||||
meta_macro :: print_def_site! ($crate :: dummy! ()) ;
|
||||
// `print_def_site!` will respan the `$crate` identifier
|
||||
// with `Span::def_site()`. This should cause it to resolve
|
||||
// relative to `meta_macro`, *not* `make_macro` (despite
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ macro_rules! outer
|
|||
/*
|
||||
0#0
|
||||
*/ {
|
||||
($ item : item) =>
|
||||
($item : item) =>
|
||||
{
|
||||
macro inner() { print_bang! { $ item } } inner! () ;
|
||||
macro inner() { print_bang! { $item } } inner! () ;
|
||||
|
||||
} ;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue