2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2019-07-27 00:54:25 +03:00
|
|
|
|
2013-11-24 11:48:46 +11:00
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Foo {
|
2024-04-07 00:43:00 +02:00
|
|
|
#![cfg(FALSE)]
|
2013-11-24 11:48:46 +11:00
|
|
|
|
|
|
|
fn method(&self) -> bool { false }
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo {
|
2024-04-07 00:43:00 +02:00
|
|
|
#![cfg(not(FALSE))]
|
2013-11-24 11:48:46 +11:00
|
|
|
|
|
|
|
// check that we don't eat attributes too eagerly.
|
2024-04-07 00:43:00 +02:00
|
|
|
#[cfg(FALSE)]
|
2013-11-24 11:48:46 +11:00
|
|
|
fn method(&self) -> bool { false }
|
|
|
|
|
|
|
|
fn method(&self) -> bool { true }
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
assert!(Foo.method());
|
|
|
|
}
|