about summary refs log tree commit diff
path: root/tests/ui/coverage-attr/name-value.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/coverage-attr/name-value.rs')
-rw-r--r--tests/ui/coverage-attr/name-value.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/coverage-attr/name-value.rs b/tests/ui/coverage-attr/name-value.rs
index 8171dbbf692..6e81ab89616 100644
--- a/tests/ui/coverage-attr/name-value.rs
+++ b/tests/ui/coverage-attr/name-value.rs
@@ -20,6 +20,7 @@ mod my_mod_inner {
 
 #[coverage = "off"]
 //~^ ERROR malformed `coverage` attribute input
+//~| ERROR attribute cannot be used on
 struct MyStruct;
 
 #[coverage = "off"]
@@ -27,18 +28,22 @@ struct MyStruct;
 impl MyStruct {
     #[coverage = "off"]
     //~^ ERROR malformed `coverage` attribute input
+    //~| ERROR attribute cannot be used on
     const X: u32 = 7;
 }
 
 #[coverage = "off"]
 //~^ ERROR malformed `coverage` attribute input
+//~| ERROR attribute cannot be used on
 trait MyTrait {
     #[coverage = "off"]
     //~^ ERROR malformed `coverage` attribute input
+    //~| ERROR attribute cannot be used on
     const X: u32;
 
     #[coverage = "off"]
     //~^ ERROR malformed `coverage` attribute input
+    //~| ERROR attribute cannot be used on
     type T;
 }
 
@@ -47,10 +52,12 @@ trait MyTrait {
 impl MyTrait for MyStruct {
     #[coverage = "off"]
     //~^ ERROR malformed `coverage` attribute input
+    //~| ERROR attribute cannot be used on
     const X: u32 = 8;
 
     #[coverage = "off"]
     //~^ ERROR malformed `coverage` attribute input
+    //~| ERROR attribute cannot be used on
     type T = ();
 }