]> git.proxmox.com Git - rustc.git/blob - src/test/ui/tag-that-dare-not-speak-its-name.rs
New upstream version 1.41.1+dfsg1
[rustc.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 `std::option::Option<_>`
15 //~| expected `char`, found enum `std::option::Option`
16 }