diff options
| author | Michael Goulet <michael@errs.io> | 2024-07-30 12:29:02 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-08-03 07:57:31 -0400 |
| commit | d29818c9f552d6941bc00770e7aa1e2768e02e07 (patch) | |
| tree | 69d1a541f809491dbffce2d871502128406cf91f /tests/ui | |
| parent | 22da61624590a413c98df5087ff4454fcc618dbf (diff) | |
| download | rust-d29818c9f552d6941bc00770e7aa1e2768e02e07.tar.gz rust-d29818c9f552d6941bc00770e7aa1e2768e02e07.zip | |
Revert "Rollup merge of #126315 - mu001999-contrib:fix/126289, r=petrochenkov"
This reverts commit 977c5fd419ade52467f7de79d5bfc25c0c893275, reversing changes made to 24c94f0e4f5aa333c665fbbba423172c30176624.
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/lint/dead-code/allow-unconstructed-pub-struct.rs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/ui/lint/dead-code/allow-unconstructed-pub-struct.rs b/tests/ui/lint/dead-code/allow-unconstructed-pub-struct.rs deleted file mode 100644 index 8cd1524045b..00000000000 --- a/tests/ui/lint/dead-code/allow-unconstructed-pub-struct.rs +++ /dev/null @@ -1,33 +0,0 @@ -//@ check-pass - -mod ffi { - use super::*; - - extern "C" { - pub fn DomPromise_AddRef(promise: *const Promise); - pub fn DomPromise_Release(promise: *const Promise); - } -} - -#[repr(C)] -#[allow(unused)] -pub struct Promise { - private: [u8; 0], - __nosync: ::std::marker::PhantomData<::std::rc::Rc<u8>>, -} - -pub unsafe trait RefCounted { - unsafe fn addref(&self); - unsafe fn release(&self); -} - -unsafe impl RefCounted for Promise { - unsafe fn addref(&self) { - ffi::DomPromise_AddRef(self) - } - unsafe fn release(&self) { - ffi::DomPromise_Release(self) - } -} - -fn main() {} |
