mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Add moved-out-of-ref
diagnostic
This commit is contained in:
parent
09d1265e1e
commit
b55fbd3ad7
11 changed files with 352 additions and 10 deletions
|
@ -142,6 +142,8 @@ fn main() {
|
|||
fn missing_unsafe_diagnostic_with_static_mut() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
//- minicore: copy
|
||||
|
||||
struct Ty {
|
||||
a: u8,
|
||||
}
|
||||
|
@ -256,6 +258,7 @@ fn main() {
|
|||
fn add_unsafe_block_when_accessing_mutable_static() {
|
||||
check_fix(
|
||||
r#"
|
||||
//- minicore: copy
|
||||
struct Ty {
|
||||
a: u8,
|
||||
}
|
||||
|
@ -374,6 +377,7 @@ fn main() {
|
|||
fn unsafe_expr_as_right_hand_side_of_assignment() {
|
||||
check_fix(
|
||||
r#"
|
||||
//- minicore: copy
|
||||
static mut STATIC_MUT: u8 = 0;
|
||||
|
||||
fn main() {
|
||||
|
@ -396,6 +400,7 @@ fn main() {
|
|||
fn unsafe_expr_in_binary_plus() {
|
||||
check_fix(
|
||||
r#"
|
||||
//- minicore: copy
|
||||
static mut STATIC_MUT: u8 = 0;
|
||||
|
||||
fn main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue