]> git.lizzy.rs Git - rust.git/blob - tests/ui/tag-that-dare-not-speak-its-name.rs
add tests for 107090
[rust.git] / tests / ui / tag-that-dare-not-speak-its-name.rs
1 // Issue #876
2
3 use std::vec::Vec;
4
5 fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
6     ::std::panic!();
7 }
8
9 fn main() {
10     let y;
11     let x : char = last(y);
12     //~^ ERROR mismatched types
13     //~| expected type `char`
14     //~| found enum `Option<_>`
15     //~| expected `char`, found enum `Option`
16 }