about summary refs log tree commit diff
path: root/tests/ui/coverage-attr
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-12-24 22:59:11 +1100
committerZalathar <Zalathar@users.noreply.github.com>2024-12-25 11:40:39 +1100
commitd4005b68119701c36a7930320b51d3666750020a (patch)
tree9027f83395029188ebeff79cdcde7943d979902b /tests/ui/coverage-attr
parenta92c3cf04d945aa2071067ef299bfacec7bfebe4 (diff)
downloadrust-d4005b68119701c36a7930320b51d3666750020a.tar.gz
rust-d4005b68119701c36a7930320b51d3666750020a.zip
Rename `tests/ui/coverage-attr/no-coverage.rs` to `allowed-positions.rs`
Diffstat (limited to 'tests/ui/coverage-attr')
-rw-r--r--tests/ui/coverage-attr/allowed-positions.rs (renamed from tests/ui/coverage-attr/no-coverage.rs)4
-rw-r--r--tests/ui/coverage-attr/allowed-positions.stderr (renamed from tests/ui/coverage-attr/no-coverage.stderr)26
2 files changed, 16 insertions, 14 deletions
diff --git a/tests/ui/coverage-attr/no-coverage.rs b/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
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;
    |              ^^^^^^^^^^