mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-23 13:13:17 +00:00
Improve test
This commit is contained in:
parent
ba0e4c745d
commit
9436436d20
@ -720,8 +720,29 @@ fn main() {
|
||||
r#"
|
||||
fn foo(#[cfg(NEVER)] x: ()) {}
|
||||
|
||||
struct S;
|
||||
|
||||
impl S {
|
||||
fn method(#[cfg(NEVER)] self) {}
|
||||
fn method2(#[cfg(NEVER)] self, arg: u8) {}
|
||||
fn method3(self, #[cfg(NEVER)] arg: u8) {}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
fn fixed(fixed: u8, #[cfg(NEVER)] ...);
|
||||
fn varargs(#[cfg(not(NEVER))] ...);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
foo();
|
||||
S::method();
|
||||
S::method2(0);
|
||||
S::method3(S);
|
||||
S.method3();
|
||||
unsafe {
|
||||
fixed(0);
|
||||
varargs(1, 2, 3);
|
||||
}
|
||||
}
|
||||
"#,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user