]> git.proxmox.com Git - rustc.git/blame - src/test/ui/tag-that-dare-not-speak-its-name.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / tag-that-dare-not-speak-its-name.rs
CommitLineData
223e47cc
LB
1// Issue #876
2
1a4d82fc 3use std::vec::Vec;
223e47cc 4
1a4d82fc 5fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
532ac7d7 6 ::std::panic!();
223e47cc
LB
7}
8
9fn main() {
10 let y;
11 let x : char = last(y);
85aaf69f 12 //~^ ERROR mismatched types
a7813a04 13 //~| expected type `char`
1b1a35ee
XL
14 //~| found enum `Option<_>`
15 //~| expected `char`, found enum `Option`
223e47cc 16}