diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-10436.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-10436.rs b/src/test/ui/issues/issue-10436.rs new file mode 100644 index 000000000..a7a20bad5 --- /dev/null +++ b/src/test/ui/issues/issue-10436.rs @@ -0,0 +1,11 @@ +// run-pass +fn works<T>(x: T) -> Vec<T> { vec![x] } + +fn also_works<T: Clone>(x: T) -> Vec<T> { vec![x] } + +fn main() { + let _: Vec<usize> = works(0); + let _: Vec<usize> = also_works(0); + let _ = works(0); + let _ = also_works(0); +} |