summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/ufcs-type-params.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/typeck/ufcs-type-params.rs')
-rw-r--r--src/test/ui/typeck/ufcs-type-params.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/typeck/ufcs-type-params.rs b/src/test/ui/typeck/ufcs-type-params.rs
new file mode 100644
index 000000000..eee2b55b2
--- /dev/null
+++ b/src/test/ui/typeck/ufcs-type-params.rs
@@ -0,0 +1,15 @@
+// run-pass
+// pretty-expanded FIXME #23616
+
+trait Foo<T> {
+ fn get(&self) -> T;
+}
+
+impl Foo<i32> for i32 {
+ fn get(&self) -> i32 { *self }
+}
+
+fn main() {
+ let x: i32 = 1;
+ Foo::<i32>::get(&x);
+}