diff options
| author | David Wood <david.wood@huawei.com> | 2022-07-19 10:00:16 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-07-25 15:11:22 +0100 |
| commit | 76cf6bd03e262a3350852491202f3371a9e6244a (patch) | |
| tree | f62253d456dbf94acdce524ac2c8551cd2d66f27 /src/test | |
| parent | 2f320a224e827b400be25966755a621779f797cc (diff) | |
| download | rust-76cf6bd03e262a3350852491202f3371a9e6244a.tar.gz rust-76cf6bd03e262a3350852491202f3371a9e6244a.zip | |
passes: port more of `check_attr` module
Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'src/test')
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 |
