summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-14382.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-14382.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-14382.rs b/src/test/ui/issues/issue-14382.rs
new file mode 100644
index 000000000..dca24d0be
--- /dev/null
+++ b/src/test/ui/issues/issue-14382.rs
@@ -0,0 +1,15 @@
+// run-pass
+#[derive(Debug)]
+struct Matrix4<S>(#[allow(unused_tuple_struct_fields)] S);
+trait POrd<S> {}
+
+fn translate<S: POrd<S>>(s: S) -> Matrix4<S> { Matrix4(s) }
+
+impl POrd<f32> for f32 {}
+impl POrd<f64> for f64 {}
+
+fn main() {
+ let x = 1.0;
+ let m : Matrix4<f32> = translate(x);
+ println!("m: {:?}", m);
+}