diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/test/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs b/src/test/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs deleted file mode 100644 index d2b0c0154..000000000 --- a/src/test/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs +++ /dev/null @@ -1,16 +0,0 @@ -// run-pass - - -fn want_slice(v: &[isize]) -> isize { - let mut sum = 0; - for i in v { sum += *i; } - sum -} - -fn has_mut_vec(v: Vec<isize> ) -> isize { - want_slice(&v) -} - -pub fn main() { - assert_eq!(has_mut_vec(vec![1, 2, 3]), 6); -} |