forked from dtolnay/cxx
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit d2727ef
committed
Ignore ref_as_ptr pedantic clippy lint
warning: reference as raw pointer
--> gen/build/src/cargo.rs:99:21
|
99 | unsafe { &*(name as *const str as *const Self) }
| ^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref::<str>(name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
= note: `-W clippy::ref-as-ptr` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ref_as_ptr)]`
warning: reference as raw pointer
--> src/cxx_vector.rs:96:20
|
96 | let this = self as *const CxxVector<T> as *mut CxxVector<T>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<CxxVector<T>>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
= note: `-W clippy::ref-as-ptr` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ref_as_ptr)]`
warning: reference as raw pointer
--> src/cxx_vector.rs:136:24
|
136 | let this = self as *const CxxVector<T> as *mut CxxVector<T>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<CxxVector<T>>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_string.rs:20:21
|
20 | unsafe { &*(s as *const String as *const RustString) }
| ^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<String>(s)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_string.rs:24:25
|
24 | unsafe { &mut *(s as *mut String as *mut RustString) }
| ^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_mut::<String>(s)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_string.rs:32:21
|
32 | unsafe { &*(self as *const RustString as *const String) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<RustString>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_string.rs:36:25
|
36 | unsafe { &mut *(self as *mut RustString as *mut String) }
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_mut::<RustString>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_vec.rs:29:21
|
29 | unsafe { &*(v as *const Vec<T> as *const RustVec<T>) }
| ^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<Vec<T>>(v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_vec.rs:33:25
|
33 | unsafe { &mut *(v as *mut Vec<T> as *mut RustVec<T>) }
| ^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_mut::<Vec<T>>(v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_vec.rs:41:21
|
41 | unsafe { &*(self as *const RustVec<T> as *const Vec<T>) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<RustVec<T>>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_vec.rs:45:25
|
45 | unsafe { &mut *(self as *mut RustVec<T> as *mut Vec<T>) }
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_mut::<RustVec<T>>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_vec.rs:87:36
|
87 | Self::from_ref(unsafe { &*(v as *const Vec<String> as *const Vec<RustString>) })
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<Vec<String>>(v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_vec.rs:91:40
|
91 | Self::from_mut(unsafe { &mut *(v as *mut Vec<String> as *mut Vec<RustString>) })
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_mut::<Vec<String>>(v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_vec.rs:103:21
|
103 | unsafe { &*(self as *const RustVec<RustString> as *const Vec<String>) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<RustVec<RustString>>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/rust_vec.rs:107:25
|
107 | unsafe { &mut *(self as *mut RustVec<RustString> as *mut Vec<String>) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_mut::<RustVec<RustString>>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/shared_ptr.rs:57:20
|
57 | let this = self as *const Self as *const c_void;
| ^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<Self>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/shared_ptr.rs:65:20
|
65 | let this = self as *const Self as *const c_void;
| ^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<Self>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/shared_ptr.rs:78:20
|
78 | let this = self as *const Self as *const c_void;
| ^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<Self>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/shared_ptr.rs:98:20
|
98 | let this = self as *const Self as *mut c_void;
| ^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<Self>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/shared_ptr.rs:115:20
|
115 | let this = self as *mut Self as *mut c_void;
| ^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_mut::<Self>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/weak_ptr.rs:47:20
|
47 | let this = self as *const Self as *const c_void;
| ^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<Self>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/weak_ptr.rs:67:20
|
67 | let this = self as *const Self as *mut c_void;
| ^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<Self>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> src/weak_ptr.rs:80:20
|
80 | let this = self as *mut Self as *mut c_void;
| ^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_mut::<Self>(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr1 parent dac5629 commit d2727efCopy full SHA for d2727ef
Expand file treeCollapse file tree
2 files changed
+2
-0
lines changed+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| 67 | + | |
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
|
+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
392 | 392 |
| |
393 | 393 |
| |
394 | 394 |
| |
| 395 | + | |
395 | 396 |
| |
396 | 397 |
| |
397 | 398 |
| |
|
0 commit comments