Add a test for the body of an impl

This commit is contained in:
Alex Crichton 2019-09-24 08:24:57 -07:00
parent 33a8869d16
commit a625fbe0ac

View File

@ -152,4 +152,25 @@ mod tests {
assert_eq!(10, 5+5);
}}
}
trait Trait {
fn blah(&self);
}
#[allow(dead_code)]
struct Struct;
impl Trait for Struct {
cfg_if! {
if #[cfg(feature = "blah")] {
fn blah(&self) {
unimplemented!();
}
} else {
fn blah(&self) {
unimplemented!();
}
}
}
}
}