about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-14 10:21:05 +0100
committerGitHub <noreply@github.com>2021-12-14 10:21:05 +0100
commitb50bb65c2a2e1814099f16f56a6e787eda1da09a (patch)
tree4ddbb2df075c13aab1fd12de0e0018835324e19a /src/test
parent75e8d65ccde2f4c238770db19adaf9c50a4c559c (diff)
parentf3ecd64c617585e79956a3bba265e22ff1cad1e4 (diff)
Rollup merge of #91875 - b-naber:mir-transform-norm-erase-reg, r=Aaron1011
Use try_normalize_erasing_regions in RevealAllVisitor

Fixes https://github.com/rust-lang/rust/issues/91745

Thanks to ``@Aaron1011`` for [pointing out the problem](https://github.com/rust-lang/rust/issues/91745#issuecomment-991996008).

r? ``@Aaron1011``
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/mir/issue-91745.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/mir/issue-91745.rs b/src/test/ui/mir/issue-91745.rs
new file mode 100644
index 00000000000..ca3d66b1c8e
--- /dev/null
+++ b/src/test/ui/mir/issue-91745.rs
@@ -0,0 +1,21 @@
+// check-pass
+
+pub trait Foo {
+    type Bar;
+}
+
+pub trait Broken {
+    type Assoc;
+    fn broken(&self) where Self::Assoc: Foo;
+}
+
+impl<T> Broken for T {
+    type Assoc = ();
+    fn broken(&self) where Self::Assoc: Foo {
+        let _x: <Self::Assoc as Foo>::Bar;
+    }
+}
+
+fn main() {
+    let _m: &dyn Broken<Assoc=()> = &();
+}