]> git.lizzy.rs Git - rust.git/blobdiff - crates/rust-analyzer/src/cargo_target_spec.rs
Make `ast_to_token_tree` infallible
[rust.git] / crates / rust-analyzer / src / cargo_target_spec.rs
index 5af0802a2f06363939782290d03fe5b048566431..909c21532254fb65398f329b2215587e063bf1d8 100644 (file)
@@ -201,7 +201,7 @@ fn check(cfg: &str, expected_features: &[&str]) {
         let cfg_expr = {
             let source_file = ast::SourceFile::parse(cfg).ok().unwrap();
             let tt = source_file.syntax().descendants().find_map(ast::TokenTree::cast).unwrap();
-            let (tt, _) = ast_to_token_tree(&tt).unwrap();
+            let (tt, _) = ast_to_token_tree(&tt);
             CfgExpr::parse(&tt)
         };