about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/tests.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-09 23:27:55 +0000
committerbors <bors@rust-lang.org>2025-08-09 23:27:55 +0000
commit41ede7bd9bfbc9dc1e46c5c7de3b26524e5c61f0 (patch)
treea651adb8679dac8d84d44010df89c85ad15f5169 /compiler/rustc_parse/src/parser/tests.rs
parentca77504943887037504c7fc0b9bf06dab3910373 (diff)
parentad1113f87ef828b300ebb8fca397efd358580da3 (diff)
downloadrust-41ede7bd9bfbc9dc1e46c5c7de3b26524e5c61f0.tar.gz
rust-41ede7bd9bfbc9dc1e46c5c7de3b26524e5c61f0.zip
Auto merge of #145146 - fee1-dead-contrib:push-zmqrkurlzrxy, r=nnethercote
remove `P`

Previous work: rust-lang/rust#141603
MCP: https://github.com/rust-lang/compiler-team/issues/878

cc `@nnethercote`
Diffstat (limited to 'compiler/rustc_parse/src/parser/tests.rs')
-rw-r--r--compiler/rustc_parse/src/parser/tests.rs9
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()
     }