diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-07-27 11:52:55 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-27 11:52:55 +0900 |
| commit | fe51d07b99b662e7f839c2a7eac9588e701bf8f0 (patch) | |
| tree | 2eeb8c14d1ee12262c91b707b6f269e7c4c6f129 /src | |
| parent | 181bf05d86d906e5a8eea51f8fd702deb7a706cc (diff) | |
| parent | 76cf6bd03e262a3350852491202f3371a9e6244a (diff) | |
| download | rust-fe51d07b99b662e7f839c2a7eac9588e701bf8f0.tar.gz rust-fe51d07b99b662e7f839c2a7eac9588e701bf8f0.zip | |
Rollup merge of #99712 - davidtwco:translation-migrate-passes-2, r=compiler-errors
passes: port more of `check_attr` module Continues from #99213. Port more diagnostics in `rustc_passes::check_attr` to using the diagnostic derive and translation machinery. r? `@compiler-errors`
Diffstat (limited to 'src')
3 files changed, 10 insertions, 10 deletions
diff --git a/src/test/ui-fulldeps/internal-lints/diagnostics_incorrect.stderr b/src/test/ui-fulldeps/internal-lints/diagnostics_incorrect.stderr index 46c206f3bf9..e849ca2829e 100644 --- a/src/test/ui-fulldeps/internal-lints/diagnostics_incorrect.stderr +++ b/src/test/ui-fulldeps/internal-lints/diagnostics_incorrect.stderr @@ -4,14 +4,14 @@ error: malformed `rustc_lint_diagnostics` attribute input LL | #[rustc_lint_diagnostics(a)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_lint_diagnostics]` -error: attribute should be applied to a function +error: attribute should be applied to a function definition --> $DIR/diagnostics_incorrect.rs:5:1 | LL | #[rustc_lint_diagnostics] | ^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | struct Foo; - | ----------- not a function + | ----------- not a function definition error: aborting due to 2 previous errors diff --git a/src/test/ui-fulldeps/internal-lints/query_stability_incorrect.stderr b/src/test/ui-fulldeps/internal-lints/query_stability_incorrect.stderr index b5156f2ac59..3f78b39edd9 100644 --- a/src/test/ui-fulldeps/internal-lints/query_stability_incorrect.stderr +++ b/src/test/ui-fulldeps/internal-lints/query_stability_incorrect.stderr @@ -4,14 +4,14 @@ error: malformed `rustc_lint_query_instability` attribute input LL | #[rustc_lint_query_instability(a)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_lint_query_instability]` -error: attribute should be applied to a function +error: attribute should be applied to a function definition --> $DIR/query_stability_incorrect.rs:5:1 | LL | #[rustc_lint_query_instability] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | struct Foo; - | ----------- not a function + | ----------- not a function definition error: aborting due to 2 previous errors diff --git a/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.stderr b/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.stderr index bfe7bb2e10d..1ced1433fe9 100644 --- a/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.stderr +++ b/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.stderr @@ -50,13 +50,13 @@ error: arguments should be non-negative integers LL | #[rustc_legacy_const_generics(1, a, 2, b)] | ^ ^ -error: attribute should be applied to a function +error: attribute should be applied to a function definition --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:18:1 | LL | #[rustc_legacy_const_generics(0)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | struct S; - | --------- not a function + | --------- not a function definition error: #[rustc_legacy_const_generics] functions must only have const generics --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:29:1 @@ -66,21 +66,21 @@ LL | #[rustc_legacy_const_generics(0)] LL | fn foo8<X>() {} | - non-const generic parameter -error: attribute should be applied to a function +error: attribute should be applied to a function definition --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:33:5 | LL | #[rustc_legacy_const_generics(0)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | fn foo9<const X: usize>() {} - | ---------------------------- not a function + | ---------------------------- not a function definition -error: attribute should be applied to a function +error: attribute should be applied to a function definition --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:25:5 | LL | #[rustc_legacy_const_generics(1)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | fn foo7<const X: usize>(); - | -------------------------- not a function + | -------------------------- not a function definition error[E0044]: foreign items may not have const parameters --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:26:5 |
