summaryrefslogtreecommitdiffstats
path: root/tests/ui/tag-that-dare-not-speak-its-name.rs
blob: 36e22f0b5f1a7a94e21ee5efc3590f952b8ebcdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Issue #876

use std::vec::Vec;

fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
    ::std::panic!();
}

fn main() {
    let y;
    let x : char = last(y);
    //~^ ERROR mismatched types
    //~| expected type `char`
    //~| found enum `Option<_>`
    //~| expected `char`, found enum `Option`
}