]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-57741-1.rs
Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc
[rust.git] / src / test / ui / issues / issue-57741-1.rs
1 #![allow(warnings)]
2
3 // This tests that the `help: consider dereferencing the boxed value` suggestion isn't made
4 // because the box doesn't deref to the type of the arm.
5
6 enum S {
7     A { a: usize },
8     B { b: usize },
9 }
10
11 fn main() {
12     let x = Box::new(3u32);
13     let y = match x {
14         S::A { a } | S::B { b: a } => a,
15         //~^ ERROR mismatched types [E0308]
16         //~^^ ERROR mismatched types [E0308]
17     };
18 }