-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only emit pointer-like metadata for BZST-allocator Box
- Loading branch information
1 parent
67b3e81
commit 307ee94
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/test/ui/debuginfo/debuginfo-box-with-large-allocator.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// build-pass | ||
// compile-flags: -Cdebuginfo=2 | ||
// fixes issue #94725 | ||
|
||
#![feature(allocator_api)] | ||
|
||
use std::alloc::{AllocError, Allocator, Layout}; | ||
use std::ptr::NonNull; | ||
|
||
struct ZST; | ||
|
||
unsafe impl Allocator for &ZST { | ||
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> { | ||
todo!() | ||
} | ||
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) { | ||
todo!() | ||
} | ||
} | ||
|
||
fn main() { | ||
let _ = Box::<i32, &ZST>::new_in(43, &ZST); | ||
} |
2 changes: 1 addition & 1 deletion
2
src/test/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// check-pass | ||
// build-pass | ||
// compile-flags: -Cdebuginfo=2 | ||
// fixes issue #94149 | ||
|
||
|