Closed
Description
Given the following code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=f5f8842e55751ce384c7d40390bde7e1
#[should_panic = 1]
fn test() {}
The current output is:
error: malformed `should_panic` attribute input
--> src/lib.rs:1:1
|
1 | #[should_panic = 1]
| ^^^^^^^^^^^^^^^^^^^
|
help: the following are the possible correct uses
|
1 | #[should_panic = "reason"]
|
1 | #[should_panic(expected = "reason)]
|
1 | #[should_panic]
|
Note that in #[should_panic(expected = "reason)]
we miss the closing quotes.
This is because the attribute template is missing it:
rust/compiler/rustc_feature/src/builtin_attrs.rs
Lines 278 to 281 in 80ed61f
Fixing that should be simple as introducing it there.