Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 1 | // Part of the Crubit project, under the Apache License v2.0 with LLVM |
| 2 | // Exceptions. See /LICENSE for license information. |
| 3 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 4 | |
Lukasz Anforowicz | 19e057d | 2022-10-28 12:03:23 -0700 | [diff] [blame] | 5 | // Automatically @generated Rust bindings for the following C++ target: |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 6 | // //rs_bindings_from_cc/test/golden:private_method_cc |
Devin Jeanpierre | 6a3a2d2 | 2023-12-19 16:28:27 -0800 | [diff] [blame] | 7 | // Features: experimental, extern_c, supported |
Lukasz Anforowicz | 19e057d | 2022-10-28 12:03:23 -0700 | [diff] [blame] | 8 | |
Devin Jeanpierre | 4335643 | 2023-01-13 12:39:02 -0800 | [diff] [blame] | 9 | #![rustfmt::skip] |
Devin Jeanpierre | 46427d5 | 2023-12-08 06:50:27 -0800 | [diff] [blame] | 10 | #![feature(custom_inner_attributes, negative_impls, register_tool)] |
Lukasz Anforowicz | 16889da | 2022-10-06 13:37:48 -0700 | [diff] [blame] | 11 | #![allow(stable_features)] |
Googler | 61afe91 | 2023-03-03 13:59:15 -0800 | [diff] [blame] | 12 | #![no_std] |
Devin Jeanpierre | 162d21f | 2023-11-21 15:14:00 -0800 | [diff] [blame] | 13 | #![register_tool(__crubit)] |
Lukasz Anforowicz | 4bb78a7 | 2023-03-06 14:10:37 -0800 | [diff] [blame] | 14 | #![allow(improper_ctypes)] |
Devin Jeanpierre | 989df11 | 2024-01-30 02:06:11 -0800 | [diff] [blame] | 15 | #![allow(nonstandard_style)] |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 16 | #![deny(warnings)] |
| 17 | |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 18 | // Error while generating bindings for item 'Ptr': |
| 19 | // Class templates are not supported yet |
| 20 | |
Devin Jeanpierre | 0be4a3a | 2023-11-28 17:20:36 -0800 | [diff] [blame] | 21 | #[derive(Clone, Copy)] |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 22 | #[repr(C)] |
Devin Jeanpierre | 162d21f | 2023-11-21 15:14:00 -0800 | [diff] [blame] | 23 | #[__crubit::annotate(cc_type = "Outer")] |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 24 | pub struct Outer { |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 25 | __non_field_data: [::core::mem::MaybeUninit<u8>; 1], |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 26 | } |
Devin Jeanpierre | 46427d5 | 2023-12-08 06:50:27 -0800 | [diff] [blame] | 27 | impl !Send for Outer {} |
| 28 | impl !Sync for Outer {} |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 29 | forward_declare::unsafe_define!(forward_declare::symbol!("Outer"), crate::Outer); |
| 30 | |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 31 | // Error while generating bindings for item 'Outer::Outer': |
| 32 | // Unsafe constructors (e.g. with no elided or explicit lifetimes) are intentionally not supported |
| 33 | |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 34 | // Error while generating bindings for item 'Outer::Outer': |
| 35 | // Unsafe constructors (e.g. with no elided or explicit lifetimes) are intentionally not supported |
| 36 | |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 37 | // Error while generating bindings for item 'Outer::Outer': |
Googler | 030a2a4 | 2023-01-23 05:28:41 -0800 | [diff] [blame] | 38 | // Parameter #0 is not supported: Unsupported type 'Outer &&': Unsupported type: && without lifetime |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 39 | |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 40 | // Error while generating bindings for item 'Outer::operator=': |
| 41 | // `self` has no lifetime. Use lifetime annotations or `#pragma clang lifetime_elision` to create bindings for this function. |
| 42 | |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 43 | // Error while generating bindings for item 'Outer::operator=': |
Googler | 030a2a4 | 2023-01-23 05:28:41 -0800 | [diff] [blame] | 44 | // Parameter #0 is not supported: Unsupported type 'Outer &&': Unsupported type: && without lifetime |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 45 | |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 46 | const _: () = { |
Devin Jeanpierre | 0383d99 | 2024-02-27 13:05:38 -0800 | [diff] [blame] | 47 | assert!(::core::mem::size_of::<crate::Outer>() == 1); |
| 48 | assert!(::core::mem::align_of::<crate::Outer>() == 1); |
Devin Jeanpierre | 415c948 | 2024-02-27 14:31:06 -0800 | [diff] [blame] | 49 | static_assertions::assert_impl_all!(crate::Outer: Clone); |
| 50 | static_assertions::assert_impl_all!(crate::Outer: Copy); |
| 51 | static_assertions::assert_not_impl_any!(crate::Outer: Drop); |
Googler | 1b90d41 | 2022-09-26 08:49:05 -0700 | [diff] [blame] | 52 | }; |