diff options
author | Jonas Schievink <[email protected]> | 2021-04-04 00:46:45 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-04-04 00:46:45 +0100 |
commit | 3abcdc03ba335fb3487c62547f61746e4a199fe6 (patch) | |
tree | 8386a83d383563308a83f4491d313be043dc94d3 /crates/hir_def/src | |
parent | bcf600fc881026ab018d0a8ae09eff7e54af538b (diff) |
Make `ast_to_token_tree` infallible
It could never return `None`, so reflect that in the return type
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r-- | crates/hir_def/src/attr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index 2bab121d9..442c5fb5b 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs | |||
@@ -533,7 +533,7 @@ impl Attr { | |||
533 | }; | 533 | }; |
534 | Some(AttrInput::Literal(value)) | 534 | Some(AttrInput::Literal(value)) |
535 | } else if let Some(tt) = ast.token_tree() { | 535 | } else if let Some(tt) = ast.token_tree() { |
536 | Some(AttrInput::TokenTree(ast_to_token_tree(&tt)?.0)) | 536 | Some(AttrInput::TokenTree(ast_to_token_tree(&tt).0)) |
537 | } else { | 537 | } else { |
538 | None | 538 | None |
539 | }; | 539 | }; |