mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-11 12:56:19 +00:00
Merge pull request #19511 from snprajwal/fixmes
chore: clean up some FIXMEs
This commit is contained in:
commit
33c3f67764
4 changed files with 36 additions and 47 deletions
|
@ -378,7 +378,7 @@ mod tests {
|
|||
use expect_test::expect;
|
||||
|
||||
use crate::{
|
||||
AstNode, SyntaxKind,
|
||||
AstNode,
|
||||
ast::{self, make, syntax_factory::SyntaxFactory},
|
||||
};
|
||||
|
||||
|
@ -624,20 +624,12 @@ mod tests {
|
|||
}
|
||||
|
||||
if let Some(tail) = parent_fn.body().unwrap().tail_expr() {
|
||||
// FIXME: We do this because `xtask tidy` will not allow us to have trailing whitespace in the expect string.
|
||||
if let Some(SyntaxElement::Token(token)) = tail.syntax().prev_sibling_or_token() {
|
||||
if let SyntaxKind::WHITESPACE = token.kind() {
|
||||
editor.delete(token);
|
||||
}
|
||||
}
|
||||
editor.delete(tail.syntax().clone());
|
||||
}
|
||||
|
||||
let edit = editor.finish();
|
||||
|
||||
let expect = expect![[r#"
|
||||
fn it() {
|
||||
}"#]];
|
||||
let expect = expect![["fn it() {\n \n}"]];
|
||||
expect.assert_eq(&edit.new_root.to_string());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue