Merge branch 'ref-as-ptr' into 'master'

add clippy lint ref_as_ptr

See merge request redox-os/relibc!966
This commit is contained in:
Jeremy Soller
2026-02-06 14:50:10 -07:00
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -22,10 +22,12 @@ exclude = ["tests", "dlmalloc-rs"]
[workspace.lints.clippy]
ptr_as_ptr = "warn"
ptr_cast_constness = "warn"
ref_as_ptr = "warn"
[lints.clippy]
ptr_as_ptr = "warn"
ptr_cast_constness = "warn"
ref_as_ptr = "warn"
[build-dependencies]
cc = "1"
+2 -2
View File
@@ -99,8 +99,8 @@ impl LinkMap {
Box::into_raw(map)
}
fn link(&mut self, map: &mut LinkMap) {
map.l_prev = self as *mut LinkMap;
self.l_next = map as *mut LinkMap;
map.l_prev = ptr::from_mut::<LinkMap>(self);
self.l_next = ptr::from_mut::<LinkMap>(map);
}
fn new_with_args(l_addr: usize, name: &str, l_ld: usize) -> *mut Self {
let map = LinkMap::new();