diff options
| author | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-05 09:13:28 +0100 |
|---|---|---|
| committer | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-11 09:32:08 +0000 |
| commit | cf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch) | |
| tree | 40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/codegen/auxiliary | |
| parent | ca855e6e42787ecd062d81d53336fe6788ef51a9 (diff) | |
| download | rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip | |
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/codegen/auxiliary')
| -rw-r--r-- | src/test/ui/codegen/auxiliary/issue-97708-aux.rs | 41 | ||||
| -rw-r--r-- | src/test/ui/codegen/auxiliary/llvm_pr32379.rs | 5 |
2 files changed, 0 insertions, 46 deletions
diff --git a/src/test/ui/codegen/auxiliary/issue-97708-aux.rs b/src/test/ui/codegen/auxiliary/issue-97708-aux.rs deleted file mode 100644 index e296bd39113..00000000000 --- a/src/test/ui/codegen/auxiliary/issue-97708-aux.rs +++ /dev/null @@ -1,41 +0,0 @@ -use std::{ptr::NonNull, task::Poll}; - -struct TaskRef; - -struct Header { - vtable: &'static Vtable, -} - -struct Vtable { - poll: unsafe fn(TaskRef) -> Poll<()>, - deallocate: unsafe fn(NonNull<Header>), -} - -// in the "Header" type, which is a private type in maitake -impl Header { - pub(crate) const fn new_stub() -> Self { - unsafe fn nop(_ptr: TaskRef) -> Poll<()> { - Poll::Pending - } - - unsafe fn nop_deallocate(ptr: NonNull<Header>) { - unreachable!("stub task ({ptr:p}) should never be deallocated!"); - } - - Self { vtable: &Vtable { poll: nop, deallocate: nop_deallocate } } - } -} - -// This is a public type in `maitake` -#[repr(transparent)] -#[cfg_attr(loom, allow(dead_code))] -pub struct TaskStub { - hdr: Header, -} - -impl TaskStub { - /// Create a new unique stub [`Task`]. - pub const fn new() -> Self { - Self { hdr: Header::new_stub() } - } -} diff --git a/src/test/ui/codegen/auxiliary/llvm_pr32379.rs b/src/test/ui/codegen/auxiliary/llvm_pr32379.rs deleted file mode 100644 index 8e429767095..00000000000 --- a/src/test/ui/codegen/auxiliary/llvm_pr32379.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub fn pr32379(mut data: u64, f1: bool, f2: bool) -> u64 { - if f1 { data &= !2; } - if f2 { data |= 2; } - data -} |
