mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Make syntax bridge fully infallible
This commit is contained in:
parent
17afa2e778
commit
5088926ec3
5 changed files with 18 additions and 31 deletions
|
|
@ -735,7 +735,7 @@ impl Attr {
|
|||
hygiene: &Hygiene,
|
||||
id: AttrId,
|
||||
) -> Option<Attr> {
|
||||
let (parse, _) = mbe::token_tree_to_syntax_node(tt, mbe::TopEntryPoint::MetaItem).ok()?;
|
||||
let (parse, _) = mbe::token_tree_to_syntax_node(tt, mbe::TopEntryPoint::MetaItem);
|
||||
let ast = ast::Meta::cast(parse.syntax_node())?;
|
||||
|
||||
Self::from_src(db, ast, hygiene, id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue