remove Item::parse
This commit is contained in:
@@ -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, ()> {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user