mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Allow include! an empty content file
This commit is contained in:
parent
b5804296dd
commit
20d55ce44d
3 changed files with 33 additions and 3 deletions
|
@ -325,9 +325,6 @@ trait TokenConvertor {
|
|||
while self.peek().is_some() {
|
||||
self.collect_leaf(&mut subtree.token_trees);
|
||||
}
|
||||
if subtree.token_trees.is_empty() {
|
||||
return None;
|
||||
}
|
||||
if subtree.token_trees.len() == 1 {
|
||||
if let tt::TokenTree::Subtree(first) = &subtree.token_trees[0] {
|
||||
return Some(first.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue