Skip to content

Commit a625fbe

Browse files
committed
Add a test for the body of an impl
1 parent 33a8869 commit a625fbe

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/lib.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,25 @@ mod tests {
152152
assert_eq!(10, 5+5);
153153
}}
154154
}
155+
156+
trait Trait {
157+
fn blah(&self);
158+
}
159+
160+
#[allow(dead_code)]
161+
struct Struct;
162+
163+
impl Trait for Struct {
164+
cfg_if! {
165+
if #[cfg(feature = "blah")] {
166+
fn blah(&self) {
167+
unimplemented!();
168+
}
169+
} else {
170+
fn blah(&self) {
171+
unimplemented!();
172+
}
173+
}
174+
}
175+
}
155176
}

0 commit comments

Comments
 (0)