This commit is contained in:
Laurențiu Nicola 2021-02-20 12:43:52 +02:00
parent af4148970a
commit c1d37f030f

View File

@ -681,6 +681,30 @@ fn baz(s: S) -> i32 {
)
}
#[test]
fn missing_record_pat_field_box() {
check_diagnostics(
r"
struct S { s: Box<u32> }
fn x(a: S) {
let S { box s } = a;
}
",
)
}
#[test]
fn missing_record_pat_field_ref() {
check_diagnostics(
r"
struct S { s: u32 }
fn x(a: S) {
let S { ref s } = a;
}
",
)
}
#[test]
fn break_outside_of_loop() {
check_diagnostics(