mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-25 11:17:13 +00:00
Fix spacing for LIFETIME_IDENT near keywords and literals in test output
This commit is contained in:
parent
a7c09532a0
commit
12226b704a
@ -2046,7 +2046,7 @@ macro_rules! m {
|
||||
($($x:expr)'a*) => (stringify!($($x)'b*));
|
||||
}
|
||||
fn f() {
|
||||
let _ = stringify!(0 'b1 'b2);
|
||||
let _ = stringify!(0 'b 1 'b 2);
|
||||
}
|
||||
"#]],
|
||||
);
|
||||
|
@ -784,7 +784,7 @@ macro_rules! delegate_impl {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl <> Data for &'amut G where G: Data {}
|
||||
impl <> Data for &'a mut G where G: Data {}
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
@ -308,8 +308,16 @@ fn pretty_print_macro_expansion(
|
||||
{
|
||||
" "
|
||||
}
|
||||
(IDENT, _) if curr_kind.is_keyword(Edition::CURRENT) => " ",
|
||||
(_, IDENT) if prev_kind.is_keyword(Edition::CURRENT) => " ",
|
||||
(IDENT | LIFETIME_IDENT, _)
|
||||
if curr_kind.is_keyword(Edition::CURRENT) || curr_kind.is_literal() =>
|
||||
{
|
||||
" "
|
||||
}
|
||||
(_, IDENT | LIFETIME_IDENT)
|
||||
if prev_kind.is_keyword(Edition::CURRENT) || prev_kind.is_literal() =>
|
||||
{
|
||||
" "
|
||||
}
|
||||
(T![>], IDENT) => " ",
|
||||
(T![>], _) if curr_kind.is_keyword(Edition::CURRENT) => " ",
|
||||
(T![->], _) | (_, T![->]) => " ",
|
||||
|
Loading…
x
Reference in New Issue
Block a user