| error[E0308]: mismatched types |
| --> $DIR/const-pats-do-not-mislead-inference.rs:33:12 |
| | |
| LL | if let b"..." = &&x {} |
| | ^^^^^^ --- this expression has type `&&_` |
| | | |
| | expected `&&_`, found `&[u8; 3]` |
| | |
| = note: expected reference `&&_` |
| found reference `&'static [u8; 3]` |
| |
| error[E0308]: mismatched types |
| --> $DIR/const-pats-do-not-mislead-inference.rs:39:12 |
| | |
| LL | if let "..." = &Box::new(x) {} |
| | ^^^^^ ------------ this expression has type `&Box<_>` |
| | | |
| | expected `&Box<_>`, found `&str` |
| | |
| = note: expected reference `&Box<_>` |
| found reference `&'static str` |
| help: consider dereferencing to access the inner value using the Deref trait |
| | |
| LL | if let "..." = &*Box::new(x) {} |
| | + |
| |
| error[E0308]: mismatched types |
| --> $DIR/const-pats-do-not-mislead-inference.rs:45:12 |
| | |
| LL | if let b"..." = Box::new(&x) {} |
| | ^^^^^^ ------------ this expression has type `Box<&_>` |
| | | |
| | expected `Box<&_>`, found `&[u8; 3]` |
| | |
| = note: expected struct `Box<&_>` |
| found reference `&'static [u8; 3]` |
| help: consider dereferencing to access the inner value using the Deref trait |
| | |
| LL | if let b"..." = *Box::new(&x) {} |
| | + |
| |
| error[E0308]: mismatched types |
| --> $DIR/const-pats-do-not-mislead-inference.rs:51:12 |
| | |
| LL | if let "..." = &mut x {} |
| | ^^^^^ ------ this expression has type `&mut _` |
| | | |
| | types differ in mutability |
| | |
| = note: expected mutable reference `&mut _` |
| found reference `&'static str` |
| |
| error: aborting due to 4 previous errors |
| |
| For more information about this error, try `rustc --explain E0308`. |