about summary refs log tree commit diff
path: root/tests/ui/unsafe/unsafe-trait-impl.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-05 19:19:56 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-30 10:44:24 +0300
commit20faf8532b5ddeb636ba3078344b0cad058c8f8a (patch)
tree04512e985a99a3715b4a0829826be7139fdcee09 /tests/ui/unsafe/unsafe-trait-impl.rs
parent427288b3ce2d574847fdb41cc3184c893750e09a (diff)
downloadrust-20faf8532b5ddeb636ba3078344b0cad058c8f8a.tar.gz
rust-20faf8532b5ddeb636ba3078344b0cad058c8f8a.zip
compiletest: Make diagnostic kind mandatory on line annotations
Diffstat (limited to 'tests/ui/unsafe/unsafe-trait-impl.rs')
-rw-r--r--tests/ui/unsafe/unsafe-trait-impl.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/ui/unsafe/unsafe-trait-impl.rs b/tests/ui/unsafe/unsafe-trait-impl.rs
index 9fd9ff65288..dc7e119ed7a 100644
--- a/tests/ui/unsafe/unsafe-trait-impl.rs
+++ b/tests/ui/unsafe/unsafe-trait-impl.rs
@@ -1,5 +1,7 @@
 // Check that safe fns are not a subtype of unsafe fns.
 
+//@ dont-require-annotations: NOTE
+
 trait Foo {
     unsafe fn len(&self) -> u32;
 }
@@ -7,8 +9,8 @@ trait Foo {
 impl Foo for u32 {
     fn len(&self) -> u32 { *self }
     //~^ ERROR method `len` has an incompatible type for trait
-    //~| expected signature `unsafe fn(&_) -> _`
-    //~| found signature `fn(&_) -> _`
+    //~| NOTE expected signature `unsafe fn(&_) -> _`
+    //~| NOTE found signature `fn(&_) -> _`
 }
 
 fn main() { }