Move aux types lower in test suite

This commit is contained in:
David Tolnay 2020-11-24 12:38:15 -08:00
parent 4092191f73
commit 94469c2077
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -10,58 +10,6 @@ pub mod module;
use cxx::{CxxString, CxxVector, UniquePtr};
use std::fmt::{self, Display};
mod other {
use cxx::kind::{Opaque, Trivial};
use cxx::{type_id, CxxString, ExternType};
#[repr(C)]
pub struct D {
pub d: u64,
}
#[repr(C)]
pub struct E {
e: u64,
e_str: CxxString,
}
pub mod f {
use cxx::kind::Opaque;
use cxx::{type_id, CxxString, ExternType};
#[repr(C)]
pub struct F {
e: u64,
e_str: CxxString,
}
unsafe impl ExternType for F {
type Id = type_id!("F::F");
type Kind = Opaque;
}
}
#[repr(C)]
pub struct G {
pub g: u64,
}
unsafe impl ExternType for G {
type Id = type_id!("G::G");
type Kind = Trivial;
}
unsafe impl ExternType for D {
type Id = type_id!("tests::D");
type Kind = Trivial;
}
unsafe impl ExternType for E {
type Id = type_id!("tests::E");
type Kind = Opaque;
}
}
#[cxx::bridge(namespace = "tests")]
pub mod ffi {
#[derive(Clone)]
@ -301,6 +249,58 @@ pub mod ffi {
}
}
mod other {
use cxx::kind::{Opaque, Trivial};
use cxx::{type_id, CxxString, ExternType};
#[repr(C)]
pub struct D {
pub d: u64,
}
#[repr(C)]
pub struct E {
e: u64,
e_str: CxxString,
}
pub mod f {
use cxx::kind::Opaque;
use cxx::{type_id, CxxString, ExternType};
#[repr(C)]
pub struct F {
e: u64,
e_str: CxxString,
}
unsafe impl ExternType for F {
type Id = type_id!("F::F");
type Kind = Opaque;
}
}
#[repr(C)]
pub struct G {
pub g: u64,
}
unsafe impl ExternType for G {
type Id = type_id!("G::G");
type Kind = Trivial;
}
unsafe impl ExternType for D {
type Id = type_id!("tests::D");
type Kind = Trivial;
}
unsafe impl ExternType for E {
type Id = type_id!("tests::E");
type Kind = Opaque;
}
}
#[derive(PartialEq, Debug)]
pub struct R(pub usize);