diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-03-15 11:36:21 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-03-15 11:36:21 +0000 |
| commit | defcc44238d9d79b7bcf5dfae2ec33001f568dd0 (patch) | |
| tree | 4bd54b17404a6a41d41066ed0d7e3d491558a7ec /compiler/rustc_builtin_macros/src/assert.rs | |
| parent | ee03c286cfdca26fa5b2a4ee40957625d2c826ff (diff) | |
| download | rust-defcc44238d9d79b7bcf5dfae2ec33001f568dd0.tar.gz rust-defcc44238d9d79b7bcf5dfae2ec33001f568dd0.zip | |
Make `unexpected` always "return" `PResult<()>` & add `unexpected_any`
This prevents breakage when `?` no longer skews inference.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/assert.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/assert.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/assert.rs b/compiler/rustc_builtin_macros/src/assert.rs index 35a0857fe51..5905bdd7108 100644 --- a/compiler/rustc_builtin_macros/src/assert.rs +++ b/compiler/rustc_builtin_macros/src/assert.rs @@ -151,7 +151,7 @@ fn parse_assert<'a>(cx: &mut ExtCtxt<'a>, sp: Span, stream: TokenStream) -> PRes }; if parser.token != token::Eof { - return parser.unexpected(); + parser.unexpected()?; } Ok(Assert { cond_expr, custom_message }) |
