summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-42956.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-42956.rs')
-rw-r--r--src/test/ui/issues/issue-42956.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-42956.rs b/src/test/ui/issues/issue-42956.rs
new file mode 100644
index 000000000..e6b3f9ffa
--- /dev/null
+++ b/src/test/ui/issues/issue-42956.rs
@@ -0,0 +1,26 @@
+// check-pass
+#![allow(dead_code)]
+#![allow(stable_features)]
+#![feature(associated_consts)]
+
+impl A for i32 {
+ type Foo = u32;
+}
+impl B for u32 {
+ const BAR: i32 = 0;
+}
+
+trait A {
+ type Foo: B;
+}
+
+trait B {
+ const BAR: i32;
+}
+
+fn generic<T: A>() {
+ // This panics if the universal function call syntax is used as well
+ println!("{}", T::Foo::BAR);
+}
+
+fn main() {}