Add test
This commit is contained in:
parent
af4148970a
commit
c1d37f030f
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user