]>
Commit | Line | Data |
---|---|---|
223e47cc LB |
1 | // Issue #876 |
2 | ||
1a4d82fc | 3 | use std::vec::Vec; |
223e47cc | 4 | |
1a4d82fc | 5 | fn last<T>(v: Vec<&T> ) -> std::option::Option<T> { |
532ac7d7 | 6 | ::std::panic!(); |
223e47cc LB |
7 | } |
8 | ||
9 | fn main() { | |
10 | let y; | |
11 | let x : char = last(y); | |
85aaf69f | 12 | //~^ ERROR mismatched types |
a7813a04 | 13 | //~| expected type `char` |
1b1a35ee XL |
14 | //~| found enum `Option<_>` |
15 | //~| expected `char`, found enum `Option` | |
223e47cc | 16 | } |