diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/nested-ty-params.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/nested-ty-params.rs b/src/test/ui/nested-ty-params.rs new file mode 100644 index 000000000..85413acdb --- /dev/null +++ b/src/test/ui/nested-ty-params.rs @@ -0,0 +1,8 @@ +// error-pattern:can't use generic parameters from outer function +fn hd<U>(v: Vec<U> ) -> U { + fn hd1(w: [U]) -> U { return w[0]; } + + return hd1(v); +} + +fn main() {} |