Skip to content

Commit 653d32e

Browse files
committed
improper_ctypes test: use unsized trait for trait object
1 parent 579627b commit 653d32e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/compile-fail/lint-ctypes.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub type RustFn = fn();
2828
pub type RustBadRet = extern fn() -> Box<u32>;
2929
pub type CVoidRet = ();
3030
pub struct Foo;
31+
pub trait Bar {}
3132

3233
extern {
3334
pub fn ptr_type1(size: *const Foo); //~ ERROR: found struct without
@@ -36,7 +37,7 @@ extern {
3637
pub fn str_type(p: &str); //~ ERROR: found Rust type
3738
pub fn box_type(p: Box<u32>); //~ ERROR found Rust type
3839
pub fn char_type(p: char); //~ ERROR found Rust type
39-
pub fn trait_type(p: &Clone); //~ ERROR found Rust trait type
40+
pub fn trait_type(p: &Bar); //~ ERROR found Rust trait type
4041
pub fn tuple_type(p: (i32, i32)); //~ ERROR found Rust tuple type
4142
pub fn tuple_type2(p: I32Pair); //~ ERROR found Rust tuple type
4243
pub fn zero_size(p: ZeroSize); //~ ERROR found zero-size struct

0 commit comments

Comments
 (0)