about summary refs log tree commit diff
path: root/tests/ui/traits/custom-on-unimplemented-diagnostic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/custom-on-unimplemented-diagnostic.rs')
-rw-r--r--tests/ui/traits/custom-on-unimplemented-diagnostic.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/traits/custom-on-unimplemented-diagnostic.rs b/tests/ui/traits/custom-on-unimplemented-diagnostic.rs
new file mode 100644
index 00000000000..d7e257ef3bb
--- /dev/null
+++ b/tests/ui/traits/custom-on-unimplemented-diagnostic.rs
@@ -0,0 +1,19 @@
+#[diagnostic::on_unimplemented(message = "my message", label = "my label", note = "my note")]
+pub trait ProviderLt {}
+
+pub trait ProviderExt {
+    fn request<R>(&self) {
+        todo!()
+    }
+}
+
+impl<T: ?Sized + ProviderLt> ProviderExt for T {}
+
+struct B;
+
+fn main() {
+    B.request();
+    //~^ my message [E0599]
+    //~| my label
+    //~| my note
+}