]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-89856.rs
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
[rust.git] / src / test / ui / typeck / issue-89856.rs
1 fn take_str_maybe(x: Option<&str>) -> Option<&str> { None }
2
3 fn main() {
4     let string = String::from("Hello, world");
5     let option = Some(&string);
6     take_str_maybe(option);
7     //~^ ERROR: mismatched types [E0308]
8 }