Files
rust/tests/ui/inner-attrs-on-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
336 B
Rust
Raw Normal View History

//@ run-pass
struct Foo;
impl Foo {
2025-03-29 17:24:03 +00:00
#![cfg(false)]
fn method(&self) -> bool { false }
}
impl Foo {
#![cfg(not(FALSE))]
// check that we don't eat attributes too eagerly.
2025-03-29 17:24:03 +00:00
#[cfg(false)]
fn method(&self) -> bool { false }
fn method(&self) -> bool { true }
}
pub fn main() {
assert!(Foo.method());
}