mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 21:04:18 +00:00
drop dead code
This commit is contained in:
parent
2cbfcf431e
commit
7e9c74d20b
35 changed files with 0 additions and 249 deletions
|
|
@ -201,13 +201,6 @@ impl ast::Attr {
|
|||
}
|
||||
}
|
||||
|
||||
impl ast::Stmt {
|
||||
/// Returns `text`, parsed as statement, but only if it has no errors.
|
||||
pub fn parse(text: &str) -> Result<Self, ()> {
|
||||
parsing::parse_text_as(text, parser::ParserEntryPoint::StatementOptionalSemi)
|
||||
}
|
||||
}
|
||||
|
||||
/// Matches a `SyntaxNode` against an `ast` type.
|
||||
///
|
||||
/// # Example:
|
||||
|
|
|
|||
|
|
@ -59,15 +59,6 @@ fn validation_tests() {
|
|||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn expr_parser_tests() {
|
||||
fragment_parser_dir_test(
|
||||
&["parser/fragments/expr/ok"],
|
||||
&["parser/fragments/expr/err"],
|
||||
crate::ast::Expr::parse,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn path_parser_tests() {
|
||||
fragment_parser_dir_test(
|
||||
|
|
@ -86,15 +77,6 @@ fn pattern_parser_tests() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stmt_parser_tests() {
|
||||
fragment_parser_dir_test(
|
||||
&["parser/fragments/stmt/ok"],
|
||||
&["parser/fragments/stmt/err"],
|
||||
crate::ast::Stmt::parse,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parser_fuzz_tests() {
|
||||
for (_, text) in collect_rust_files(&test_data_dir(), &["parser/fuzz-failures"]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue