From 76cf6bd03e262a3350852491202f3371a9e6244a Mon Sep 17 00:00:00 2001 From: David Wood Date: Tue, 19 Jul 2022 10:00:16 +0100 Subject: passes: port more of `check_attr` module Signed-off-by: David Wood --- .../ui-fulldeps/internal-lints/diagnostics_incorrect.stderr | 4 ++-- .../internal-lints/query_stability_incorrect.stderr | 4 ++-- .../invalid-rustc_legacy_const_generics-arguments.stderr | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') 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() {} | - 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() {} - | ---------------------------- 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(); - | -------------------------- 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 -- cgit 1.4.1-3-g733a5