diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-08-12 20:37:53 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-12 20:37:53 +1000 |
| commit | d862ae2fce07c32252adc95bf32904fc74bbc532 (patch) | |
| tree | 5f64932ad738f1920023a0393a82ed1714ab9725 /tests/ui/error-codes | |
| parent | 38483d8eb156f5947deedf3ca2654e2ac560a082 (diff) | |
| parent | 928dd114377f5a0c9db521d85987f0df73ca254d (diff) | |
| download | rust-d862ae2fce07c32252adc95bf32904fc74bbc532.tar.gz rust-d862ae2fce07c32252adc95bf32904fc74bbc532.zip | |
Rollup merge of #145238 - estebank:attr-overhaul, r=jdonszelmann
Tweak invalid builtin attribute output - Add link to reference/docs when possible - More accurate suggestions by supporting multiple alternative suggestions ``` error: malformed `crate_type` attribute input --> $DIR/crate-type-macro-call.rs:1:1 | LL | #![crate_type = foo!()] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: for more information, visit <https://doc.rust-lang.org/reference/linkage.html> help: the following are the possible correct uses | LL - #![crate_type = foo!()] LL + #![crate_type = "bin"] | LL - #![crate_type = foo!()] LL + #![crate_type = "cdylib"] | LL - #![crate_type = foo!()] LL + #![crate_type = "dylib"] | LL - #![crate_type = foo!()] LL + #![crate_type = "lib"] | = and 4 other candidates ```
Diffstat (limited to 'tests/ui/error-codes')
| -rw-r--r-- | tests/ui/error-codes/E0540.stderr | 7 | ||||
| -rw-r--r-- | tests/ui/error-codes/E0565-1.stderr | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/ui/error-codes/E0540.stderr b/tests/ui/error-codes/E0540.stderr index 3e5f408feb5..ae23dce5c50 100644 --- a/tests/ui/error-codes/E0540.stderr +++ b/tests/ui/error-codes/E0540.stderr @@ -6,10 +6,13 @@ LL | #[inline()] | | | expected a single argument here | + = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute> help: try changing it to one of the following valid forms of the attribute | -LL | #[inline(always|never)] - | ++++++++++++ +LL | #[inline(always)] + | ++++++ +LL | #[inline(never)] + | +++++ LL - #[inline()] LL + #[inline] | diff --git a/tests/ui/error-codes/E0565-1.stderr b/tests/ui/error-codes/E0565-1.stderr index 6277e6400d7..52daf2a62fc 100644 --- a/tests/ui/error-codes/E0565-1.stderr +++ b/tests/ui/error-codes/E0565-1.stderr @@ -12,11 +12,15 @@ LL - #[deprecated("since")] LL + #[deprecated = "reason"] | LL - #[deprecated("since")] -LL + #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")] +LL + #[deprecated(note = "reason")] | LL - #[deprecated("since")] -LL + #[deprecated] +LL + #[deprecated(since = "version")] | +LL - #[deprecated("since")] +LL + #[deprecated(since = "version", note = "reason")] + | + = and 1 other candidate error: aborting due to 1 previous error |
