Make syntax bridge fully infallible

This commit is contained in:
Jonas Schievink 2022-01-24 17:27:39 +01:00
parent 17afa2e778
commit 5088926ec3
5 changed files with 18 additions and 31 deletions

View file

@ -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)