about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2023-02-17 14:32:08 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2023-02-17 14:44:58 +0000
commiteebd31c1875677bf1f4d7c43801f6cedd57c0ea2 (patch)
tree33cd4b7749ab8fd5ac0680afd0b236d47b5b9a2f /tests
parentb5c8c329a7b4f6a12ae72ae41cb834989228221e (diff)
downloadrust-eebd31c1875677bf1f4d7c43801f6cedd57c0ea2.tar.gz
rust-eebd31c1875677bf1f4d7c43801f6cedd57c0ea2.zip
Don't eagerly convert principal to string
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/lint/issue-108155.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/lint/issue-108155.rs b/tests/ui/lint/issue-108155.rs
new file mode 100644
index 00000000000..4ae0cbd92ff
--- /dev/null
+++ b/tests/ui/lint/issue-108155.rs
@@ -0,0 +1,15 @@
+// check-pass
+// check that `deref_into_dyn_supertrait` doesn't cause ICE by eagerly converting
+// a cancelled lint
+
+#![allow(deref_into_dyn_supertrait)]
+
+trait Trait {}
+impl std::ops::Deref for dyn Trait + Send + Sync {
+    type Target = dyn Trait;
+    fn deref(&self) -> &Self::Target {
+        self
+    }
+}
+
+fn main() {}