granite-rust/tests/ui/tag-that-dare-not-speak-its-name.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
302 B
Rust
Raw Normal View History

// Issue #876
use std::vec::Vec;
fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
2019-02-15 20:31:00 +09:00
::std::panic!();
}
fn main() {
let y;
let x : char = last(y);
2015-01-12 01:01:44 -05:00
//~^ ERROR mismatched types
//~| expected type `char`
//~| found enum `Option<_>`
//~| expected `char`, found `Option<_>`
}