]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/crashes/ice-5579.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / crashes / ice-5579.rs
CommitLineData
f20569fa
XL
1trait IsErr {
2 fn is_err(&self, err: &str) -> bool;
3}
4
5impl<T> IsErr for Option<T> {
6 fn is_err(&self, _err: &str) -> bool {
7 true
8 }
9}
10
11fn main() {
12 let t = Some(1);
13
14 if t.is_err("") {
15 t.unwrap();
16 }
17}