Skip to content

Commit

Permalink
Update flex-array implementation to work with Rust 1.80
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 30, 2024
1 parent 66b6551 commit 7ea3f36
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
25 changes: 20 additions & 5 deletions bindgen-tests/tests/expectations/tests/flexarray.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2723,7 +2723,7 @@ impl CompInfo {
pub fn layout(len: usize) -> ::#prefix::alloc::Layout {
// SAFETY: Null pointers are OK if we don't deref them
unsafe {
let p: *const Self = ::#prefix::ptr::from_raw_parts(::#prefix::ptr::null(), len);
let p: *const Self = ::#prefix::ptr::from_raw_parts(::#prefix::ptr::null::<()>(), len);
::#prefix::alloc::Layout::for_value_raw(p)
}
}
Expand Down

0 comments on commit 7ea3f36

Please sign in to comment.