mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
fix: Fix doc comment desugaring for proc-macros
This commit is contained in:
parent
bfe59bbdc8
commit
36c1c77cf9
14 changed files with 228 additions and 52 deletions
|
@ -7,11 +7,16 @@ use tt::{
|
|||
Leaf, Punct, Spacing,
|
||||
};
|
||||
|
||||
use crate::{syntax_node_to_token_tree, DummyTestSpanMap, DUMMY};
|
||||
use crate::{syntax_node_to_token_tree, DocCommentDesugarMode, DummyTestSpanMap, DUMMY};
|
||||
|
||||
fn check_punct_spacing(fixture: &str) {
|
||||
let source_file = ast::SourceFile::parse(fixture, span::Edition::CURRENT).ok().unwrap();
|
||||
let subtree = syntax_node_to_token_tree(source_file.syntax(), DummyTestSpanMap, DUMMY);
|
||||
let subtree = syntax_node_to_token_tree(
|
||||
source_file.syntax(),
|
||||
DummyTestSpanMap,
|
||||
DUMMY,
|
||||
DocCommentDesugarMode::Mbe,
|
||||
);
|
||||
let mut annotations: FxHashMap<_, _> = extract_annotations(fixture)
|
||||
.into_iter()
|
||||
.map(|(range, annotation)| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue