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/generics.rs | |
| parent | 4c7749e8c8e50ad146da599eea3a250160c1bc2b (diff) | |
| download | rust-ad1113f87ef828b300ebb8fca397efd358580da3.tar.gz rust-ad1113f87ef828b300ebb8fca397efd358580da3.zip | |
remove `P`
Diffstat (limited to 'compiler/rustc_parse/src/parser/generics.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/generics.rs | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/compiler/rustc_parse/src/parser/generics.rs b/compiler/rustc_parse/src/parser/generics.rs index 86326341a75..4a8530a2b38 100644 --- a/compiler/rustc_parse/src/parser/generics.rs +++ b/compiler/rustc_parse/src/parser/generics.rs @@ -308,9 +308,7 @@ impl<'a> Parser<'a> { /// Parses an experimental fn contract /// (`contract_requires(WWW) contract_ensures(ZZZ)`) - pub(super) fn parse_contract( - &mut self, - ) -> PResult<'a, Option<rustc_ast::ptr::P<ast::FnContract>>> { + pub(super) fn parse_contract(&mut self) -> PResult<'a, Option<Box<ast::FnContract>>> { let requires = if self.eat_keyword_noexpect(exp!(ContractRequires).kw) { self.psess.gated_spans.gate(sym::contracts_internals, self.prev_token.span); let precond = self.parse_expr()?; @@ -328,7 +326,7 @@ impl<'a> Parser<'a> { if requires.is_none() && ensures.is_none() { Ok(None) } else { - Ok(Some(rustc_ast::ptr::P(ast::FnContract { requires, ensures }))) + Ok(Some(Box::new(ast::FnContract { requires, ensures }))) } } | 
