rust/tests/ui/tag-that-dare-not-speak-its-name.rs
Esteban Küber 62ba3e70a1 Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00

17 lines
302 B
Rust

// 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 `Option<_>`
}