1 // Diagnostic enhancement explained in issue #75418.
2 // Point at the last statement in the block if there's no tail expression,
3 // and suggest removing the semicolon if appropriate.
6 let _ = match Some(42) {
12 //~^ ERROR incompatible types
13 //~| HELP consider removing this semicolon
17 let _ = if let Some(x) = Some(42) {
21 //~^ ERROR incompatible types
22 //~| HELP consider removing this semicolon
25 let _ = match Some(42) {
31 //~^ ERROR incompatible types
35 let _ = match Some(42) {
39 None => { //~ ERROR incompatible types
43 let _ = match Some(42) {
44 Some(x) => "rust-lang.org"
47 .chain(Some(x as u8 as char))
49 .any(char::is_alphanumeric),
50 None => {} //~ ERROR incompatible types