Closed
Description
Compiling the following simple code triggers an internal compiler error. You can reproduce this issue also on the Rust playground website, with all "stable", "beta" and "nightly" channels.
use std::{ffi::OsStr, path::Path};
fn main() {
match Path::new("test.log").extension() {
Some(OsStr::new("log")) => println!("log"),
_ => println!("not log"),
}
}