mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
move tests
This commit is contained in:
parent
42fd71e6c8
commit
dce41e5a03
4 changed files with 82 additions and 88 deletions
|
@ -141,15 +141,6 @@ pub(crate) fn parse_macro(ra_fixture: &str) -> MacroFixture {
|
|||
MacroFixture { rules }
|
||||
}
|
||||
|
||||
pub(crate) fn parse_macro_error(ra_fixture: &str) -> ParseError {
|
||||
let definition_tt = parse_macro_rules_to_tt(ra_fixture);
|
||||
|
||||
match MacroRules::parse(&definition_tt) {
|
||||
Ok(_) => panic!("Expect error"),
|
||||
Err(err) => err,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn parse_to_token_tree_by_syntax(ra_fixture: &str) -> tt::Subtree {
|
||||
let source_file = ast::SourceFile::parse(ra_fixture).ok().unwrap();
|
||||
let tt = syntax_node_to_token_tree(source_file.syntax()).0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue