blob: 0e76ec246d7c3871bda750252341dd16e5c5fcfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Issue #876
use std::vec::Vec;
fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
::std::panic!();
}
fn main() {
let y;
let x : char = last(y);
//~^ ERROR mismatched types
//~| expected type `char`
//~| found enum `Option<_>`
//~| expected `char`, found `Option<_>`
}
|