]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tag-that-dare-not-speak-its-name.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / 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 }