From d4005b68119701c36a7930320b51d3666750020a Mon Sep 17 00:00:00 2001 From: Zalathar Date: Tue, 24 Dec 2024 22:59:11 +1100 Subject: [PATCH] Rename `tests/ui/coverage-attr/no-coverage.rs` to `allowed-positions.rs` --- .../{no-coverage.rs => allowed-positions.rs} | 4 ++- ...verage.stderr => allowed-positions.stderr} | 26 +++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) rename tests/ui/coverage-attr/{no-coverage.rs => allowed-positions.rs} (96%) rename tests/ui/coverage-attr/{no-coverage.stderr => allowed-positions.stderr} (85%) diff --git a/tests/ui/coverage-attr/no-coverage.rs b/tests/ui/coverage-attr/allowed-positions.rs similarity index 96% rename from tests/ui/coverage-attr/no-coverage.rs rename to tests/ui/coverage-attr/allowed-positions.rs index c386f25816e..bfffbd26250 100644 --- a/tests/ui/coverage-attr/no-coverage.rs +++ b/tests/ui/coverage-attr/allowed-positions.rs @@ -1,7 +1,9 @@ +//! Tests where the `#[coverage(..)]` attribute can and cannot be used. + //@ reference: attributes.coverage.allowed-positions -#![feature(extern_types)] #![feature(coverage_attribute)] +#![feature(extern_types)] #![feature(impl_trait_in_assoc_type)] #![warn(unused_attributes)] #![coverage(off)] diff --git a/tests/ui/coverage-attr/no-coverage.stderr b/tests/ui/coverage-attr/allowed-positions.stderr similarity index 85% rename from tests/ui/coverage-attr/no-coverage.stderr rename to tests/ui/coverage-attr/allowed-positions.stderr index f5a44ecec74..80099fbd6dd 100644 --- a/tests/ui/coverage-attr/no-coverage.stderr +++ b/tests/ui/coverage-attr/allowed-positions.stderr @@ -1,5 +1,5 @@ error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:9:1 + --> $DIR/allowed-positions.rs:11:1 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -12,7 +12,7 @@ LL | | } | |_- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:50:5 + --> $DIR/allowed-positions.rs:52:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -20,7 +20,7 @@ LL | let _ = (); | ----------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:54:9 + --> $DIR/allowed-positions.rs:56:9 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -28,7 +28,7 @@ LL | () => (), | -------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:58:5 + --> $DIR/allowed-positions.rs:60:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -36,7 +36,7 @@ LL | return (); | --------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:11:5 + --> $DIR/allowed-positions.rs:13:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -44,7 +44,7 @@ LL | const X: u32; | ------------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:14:5 + --> $DIR/allowed-positions.rs:16:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -52,7 +52,7 @@ LL | type T; | ------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:19:5 + --> $DIR/allowed-positions.rs:21:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -60,7 +60,7 @@ LL | fn f(&self); | ------------ not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:22:5 + --> $DIR/allowed-positions.rs:24:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -68,7 +68,7 @@ LL | fn g(); | ------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:30:5 + --> $DIR/allowed-positions.rs:32:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -76,7 +76,7 @@ LL | type T = Self; | -------------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:33:5 + --> $DIR/allowed-positions.rs:35:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -84,7 +84,7 @@ LL | type U = impl Trait; | -------------------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:41:5 + --> $DIR/allowed-positions.rs:43:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -92,7 +92,7 @@ LL | static X: u32; | -------------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure - --> $DIR/no-coverage.rs:44:5 + --> $DIR/allowed-positions.rs:46:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -100,7 +100,7 @@ LL | type T; | ------- not a function or closure error: unconstrained opaque type - --> $DIR/no-coverage.rs:34:14 + --> $DIR/allowed-positions.rs:36:14 | LL | type U = impl Trait; | ^^^^^^^^^^