mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 17:28:09 +00:00
Improve test
This commit is contained in:
parent
ba0e4c745d
commit
9436436d20
1 changed files with 21 additions and 0 deletions
|
@ -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 a new issue