summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/issue-108155.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 000000000..4ae0cbd92
--- /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() {}