mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Merge #10193
10193: fix: fix type mismatches with `panic!()` on Rust 1.55.0 r=jonas-schievink a=jonas-schievink This addresses the regression mentioned in https://github.com/rust-analyzer/rust-analyzer/issues/8961#issuecomment-916332702 (no test because https://github.com/rust-analyzer/rust-analyzer/issues/10192 makes that rather hard, but I've checked that the analysis-stats are back to normal) bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
21a1ced8b6
1 changed files with 14 additions and 1 deletions
|
@ -1812,7 +1812,20 @@ impl ModCollector<'_, '_> {
|
||||||
name = tt::Ident { text: it.clone(), id: tt::TokenId::unspecified() }.as_name();
|
name = tt::Ident { text: it.clone(), id: tt::TokenId::unspecified() }.as_name();
|
||||||
&name
|
&name
|
||||||
}
|
}
|
||||||
|
None => {
|
||||||
|
match attrs.by_key("rustc_builtin_macro").tt_values().next().and_then(|tt| {
|
||||||
|
match tt.token_trees.first() {
|
||||||
|
Some(tt::TokenTree::Leaf(tt::Leaf::Ident(name))) => Some(name),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}) {
|
||||||
|
Some(ident) => {
|
||||||
|
name = ident.as_name();
|
||||||
|
&name
|
||||||
|
}
|
||||||
None => &mac.name,
|
None => &mac.name,
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
let krate = self.def_collector.def_map.krate;
|
let krate = self.def_collector.def_map.krate;
|
||||||
match find_builtin_macro(name, krate, ast_id) {
|
match find_builtin_macro(name, krate, ast_id) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue