]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tag-that-dare-not-speak-its-name.rs
Auto merge of #101768 - sunfishcode:sunfishcode/wasi-stdio-lock-asfd, r=joshtriplett
[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 }