]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tag-that-dare-not-speak-its-name.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / tag-that-dare-not-speak-its-name.rs
1 // Issue #876
2
3 #![no_implicit_prelude]
4 use std::vec::Vec;
5
6 fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
7     panic!();
8 }
9
10 fn main() {
11     let y;
12     let x : char = last(y);
13     //~^ ERROR mismatched types
14     //~| expected type `char`
15     //~| found type `std::option::Option<_>`
16     //~| expected char, found enum `std::option::Option`
17 }