Skip to content

Commit

Permalink
Add a test for the body of an impl
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Sep 24, 2019
1 parent 33a8869 commit a625fbe
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!();
}
}
}
}
}

0 comments on commit a625fbe

Please sign in to comment.