remove Item::parse

This commit is contained in:
Aleksey Kladov 2021-12-27 20:33:33 +03:00
parent b468bd6645
commit f0fefde401
6 changed files with 17 additions and 22 deletions

View file

@ -194,13 +194,6 @@ impl ast::Expr {
}
}
impl ast::Item {
/// Returns `text`, parsed as an item, but only if it has no errors.
pub fn parse(text: &str) -> Result<Self, ()> {
parsing::parse_text_as(text, parser::ParserEntryPoint::Item)
}
}
impl ast::Attr {
/// Returns `text`, parsed as an attribute, but only if it has no errors.
pub fn parse(text: &str) -> Result<Self, ()> {

View file

@ -86,15 +86,6 @@ fn pattern_parser_tests() {
);
}
#[test]
fn item_parser_tests() {
fragment_parser_dir_test(
&["parser/fragments/item/ok"],
&["parser/fragments/item/err"],
crate::ast::Item::parse,
);
}
#[test]
fn stmt_parser_tests() {
fragment_parser_dir_test(