Merge #11211
11211: fix: Fix parsing of `#[derive]` paths r=jonas-schievink a=jonas-schievink Currently this code produces an empty derive path for every `,`, which makes the IDE layer resolve derive paths to the wrong derive macro in the list. Skip `,`s to fix that. (nameres just ignored them, so it didn't cause problems there) bors r+ Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
This commit is contained in:
commit
7111c27cec
@ -737,6 +737,7 @@ pub fn parse_path_comma_token_tree(&self) -> Option<impl Iterator<Item = ModPath
|
||||
matches!(tt, tt::TokenTree::Leaf(tt::Leaf::Punct(Punct { char: ',', .. })))
|
||||
})
|
||||
.into_iter()
|
||||
.filter(|(comma, _)| !*comma)
|
||||
.map(|(_, tts)| {
|
||||
let segments = tts.filter_map(|tt| match tt {
|
||||
tt::TokenTree::Leaf(tt::Leaf::Ident(id)) => Some(id.as_name()),
|
||||
|
Loading…
Reference in New Issue
Block a user