diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2025-08-09 13:24:06 +0800 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2025-08-09 15:47:01 +0800 |
| commit | ad1113f87ef828b300ebb8fca397efd358580da3 (patch) | |
| tree | 1698ee8e278895989d53e13aa569f1c9601b4d19 /compiler/rustc_parse/src/parser/tests.rs | |
| parent | 4c7749e8c8e50ad146da599eea3a250160c1bc2b (diff) | |
| download | rust-ad1113f87ef828b300ebb8fca397efd358580da3.tar.gz rust-ad1113f87ef828b300ebb8fca397efd358580da3.zip | |
remove `P`
Diffstat (limited to 'compiler/rustc_parse/src/parser/tests.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/tests.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/tests.rs b/compiler/rustc_parse/src/parser/tests.rs index 43a1d779a75..a6e7266e71b 100644 --- a/compiler/rustc_parse/src/parser/tests.rs +++ b/compiler/rustc_parse/src/parser/tests.rs @@ -8,7 +8,6 @@ use std::sync::{Arc, Mutex}; use std::{io, str}; use ast::token::IdentIsRaw; -use rustc_ast::ptr::P; use rustc_ast::token::{self, Delimiter, Token}; use rustc_ast::tokenstream::{DelimSpacing, DelimSpan, Spacing, TokenStream, TokenTree}; use rustc_ast::{self as ast, PatKind, visit}; @@ -2240,7 +2239,7 @@ fn parse_item_from_source_str( name: FileName, source: String, psess: &ParseSess, -) -> PResult<'_, Option<P<ast::Item>>> { +) -> PResult<'_, Option<Box<ast::Item>>> { unwrap_or_emit_fatal(new_parser_from_source_str(psess, name, source)) .parse_item(ForceCollect::No) } @@ -2251,12 +2250,12 @@ fn sp(a: u32, b: u32) -> Span { } /// Parses a string, return an expression. -fn string_to_expr(source_str: String) -> P<ast::Expr> { +fn string_to_expr(source_str: String) -> Box<ast::Expr> { with_error_checking_parse(source_str, &psess(), |p| p.parse_expr()) } /// Parses a string, returns an item. -fn string_to_item(source_str: String) -> Option<P<ast::Item>> { +fn string_to_item(source_str: String) -> Option<Box<ast::Item>> { with_error_checking_parse(source_str, &psess(), |p| p.parse_item(ForceCollect::No)) } @@ -2520,7 +2519,7 @@ fn ttdelim_span() { name: FileName, source: String, psess: &ParseSess, - ) -> PResult<'_, P<ast::Expr>> { + ) -> PResult<'_, Box<ast::Expr>> { unwrap_or_emit_fatal(new_parser_from_source_str(psess, name, source)).parse_expr() } |
