mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-31 20:09:01 +00:00
chore: Bump Edition::CURRENT to 2024
This commit is contained in:
parent
23e8d13531
commit
a505420751
24 changed files with 277 additions and 244 deletions
|
|
@ -137,13 +137,13 @@ struct HasUnsafe;
|
|||
impl HasUnsafe {
|
||||
unsafe fn unsafe_fn(&self) {
|
||||
let x = &5_usize as *const usize;
|
||||
let _y = *x;
|
||||
let _y = unsafe {*x};
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn unsafe_fn() {
|
||||
let x = &5_usize as *const usize;
|
||||
let _y = *x;
|
||||
let _y = unsafe {*x};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
@ -337,7 +337,7 @@ struct S(usize);
|
|||
impl S {
|
||||
unsafe fn func(&self) {
|
||||
let x = &self.0 as *const usize;
|
||||
let _z = *x;
|
||||
let _z = unsafe { *x };
|
||||
}
|
||||
}
|
||||
fn main() {
|
||||
|
|
@ -350,7 +350,7 @@ struct S(usize);
|
|||
impl S {
|
||||
unsafe fn func(&self) {
|
||||
let x = &self.0 as *const usize;
|
||||
let _z = *x;
|
||||
let _z = unsafe { *x };
|
||||
}
|
||||
}
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -1258,7 +1258,7 @@ fn foo(mut foo: Foo) {
|
|||
|
||||
pub struct A {}
|
||||
pub unsafe fn foo(a: *mut A) {
|
||||
let mut b = || -> *mut A { &mut *a };
|
||||
let mut b = || -> *mut A { unsafe { &mut *a } };
|
||||
//^^^^^ 💡 warn: variable does not need to be mutable
|
||||
let _ = b();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue