mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
24 lines
336 B
Rust
24 lines
336 B
Rust
//@ run-pass
|
|
|
|
struct Foo;
|
|
|
|
impl Foo {
|
|
#![cfg(FALSE)]
|
|
|
|
fn method(&self) -> bool { false }
|
|
}
|
|
|
|
impl Foo {
|
|
#![cfg(not(FALSE))]
|
|
|
|
// check that we don't eat attributes too eagerly.
|
|
#[cfg(FALSE)]
|
|
fn method(&self) -> bool { false }
|
|
|
|
fn method(&self) -> bool { true }
|
|
}
|
|
|
|
|
|
pub fn main() {
|
|
assert!(Foo.method());
|
|
}
|