mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
use correct spacing for enum pattern
This commit is contained in:
parent
3126152a84
commit
4ef9b8d17a
4 changed files with 6 additions and 6 deletions
|
@ -77,7 +77,7 @@ pub fn tuple_struct_pat(
|
|||
|
||||
pub fn record_pat(path: ast::Path, pats: impl Iterator<Item = ast::Pat>) -> ast::RecordPat {
|
||||
let pats_str = pats.map(|p| p.syntax().to_string()).join(", ");
|
||||
return from_text(&format!("{}{{ {} }}", path.syntax(), pats_str));
|
||||
return from_text(&format!("{} {{ {} }}", path.syntax(), pats_str));
|
||||
|
||||
fn from_text(text: &str) -> ast::RecordPat {
|
||||
ast_from_text(&format!("fn f({}: ())", text))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue