mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Add test
This commit is contained in:
parent
af4148970a
commit
c1d37f030f
1 changed files with 24 additions and 0 deletions
|
@ -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]
|
#[test]
|
||||||
fn break_outside_of_loop() {
|
fn break_outside_of_loop() {
|
||||||
check_diagnostics(
|
check_diagnostics(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue