about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-10-06 16:29:44 +0200
committerGitHub <noreply@github.com>2022-10-06 16:29:44 +0200
commit045fc18cde46103f44fae75f0ea65cf0ee0f83dd (patch)
tree7720beac9ea6411c217340f91bfa4c51469aeb38 /src
parente77e0200ae5589323b799f77d5b597d4bf5928d6 (diff)
parentfe0533638c058c0c159804ce91887304ca16a640 (diff)
downloadrust-045fc18cde46103f44fae75f0ea65cf0ee0f83dd.tar.gz
rust-045fc18cde46103f44fae75f0ea65cf0ee0f83dd.zip
Rollup merge of #102718 - compiler-errors:opaque-bound-lint-ice, r=fee1-dead
Fix `opaque_hidden_inferred_bound` lint ICE

Fixes #102705
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/lint/issue-102705.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/lint/issue-102705.rs b/src/test/ui/lint/issue-102705.rs
new file mode 100644
index 00000000000..5bcc8950ada
--- /dev/null
+++ b/src/test/ui/lint/issue-102705.rs
@@ -0,0 +1,22 @@
+// check-pass
+
+#![allow(opaque_hidden_inferred_bound)]
+#![allow(dead_code)]
+
+trait Duh {}
+
+impl Duh for i32 {}
+
+trait Trait {
+    type Assoc: Duh;
+}
+
+impl<R: Duh, F: FnMut() -> R> Trait for F {
+    type Assoc = R;
+}
+
+fn foo() -> impl Trait<Assoc = impl Send> {
+    || 42
+}
+
+fn main() {}