Vendor dependencies
Let's see how I like this workflow.
This commit is contained in:
parent
34d1830413
commit
9c435dc440
7500 changed files with 1665121 additions and 99 deletions
94
vendor/cxx/tests/ui/deny_missing_docs.rs
vendored
Normal file
94
vendor/cxx/tests/ui/deny_missing_docs.rs
vendored
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
// TODO: More work is needed so that the missing_docs lints produced by rustc
|
||||
// are properly positioned inside of the bridge.
|
||||
|
||||
//! ...
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
/// ...
|
||||
#[cxx::bridge]
|
||||
pub mod ffi {
|
||||
pub struct UndocumentedStruct {
|
||||
pub undocumented_field: u8,
|
||||
}
|
||||
|
||||
/// ...
|
||||
pub struct DocumentedStruct {
|
||||
/// ...
|
||||
pub documented_field: u8,
|
||||
}
|
||||
|
||||
pub enum UndocumentedEnum {
|
||||
UndocumentedVariant = 0,
|
||||
}
|
||||
|
||||
/// ...
|
||||
pub enum DocumentedEnum {
|
||||
/// ...
|
||||
DocumentedVariant = 0,
|
||||
}
|
||||
|
||||
extern "Rust" {
|
||||
pub type UndocumentedRustType;
|
||||
|
||||
/// ...
|
||||
pub type DocumentedRustType;
|
||||
|
||||
pub fn undocumented_rust_fn() -> u8;
|
||||
|
||||
/// ...
|
||||
pub fn documented_rust_fn() -> u8;
|
||||
}
|
||||
|
||||
unsafe extern "C++" {
|
||||
pub type UndocumentedForeignType;
|
||||
|
||||
/// ...
|
||||
pub type DocumentedForeignType;
|
||||
|
||||
pub type UndocumentedTypeAlias = crate::bindgen::UndocumentedTypeAlias;
|
||||
|
||||
/// ...
|
||||
pub type DocumentedTypeAlias = crate::bindgen::DocumentedTypeAlias;
|
||||
|
||||
pub fn undocumented_foreign_fn() -> u8;
|
||||
|
||||
/// ...
|
||||
pub fn documented_foreign_fn() -> u8;
|
||||
}
|
||||
|
||||
#[allow(missing_docs)]
|
||||
pub struct SuppressUndocumentedStruct {
|
||||
pub undocumented_field: u8,
|
||||
}
|
||||
}
|
||||
|
||||
struct UndocumentedRustType;
|
||||
struct DocumentedRustType;
|
||||
|
||||
mod bindgen {
|
||||
use cxx::{type_id, ExternType};
|
||||
|
||||
pub struct UndocumentedTypeAlias;
|
||||
pub struct DocumentedTypeAlias;
|
||||
|
||||
unsafe impl ExternType for UndocumentedTypeAlias {
|
||||
type Id = type_id!("UndocumentedTypeAlias");
|
||||
type Kind = cxx::kind::Opaque;
|
||||
}
|
||||
|
||||
unsafe impl ExternType for DocumentedTypeAlias {
|
||||
type Id = type_id!("DocumentedTypeAlias");
|
||||
type Kind = cxx::kind::Opaque;
|
||||
}
|
||||
}
|
||||
|
||||
fn undocumented_rust_fn() -> u8 {
|
||||
0
|
||||
}
|
||||
|
||||
fn documented_rust_fn() -> u8 {
|
||||
0
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue