blob: 6b2928b976735a79e8f6d16ebf07cbddfb4ff858 [file] [log] [blame]
// vim: tw=80
//! static non-generic methods of generic structs shouldn't require any special
//! treatment when mocking. Prior to version 0.3.0, the struct's generic
//! parameters had to be duplicated as generic parameters of the method.
#![deny(warnings)]
use mockall::*;
mock! {
Foo<T: 'static> {
fn foo(t: T);
}
}
#[test]
fn returning() {
let ctx = MockFoo::<u32>::foo_context();
ctx.expect()
.returning(|_| ());
MockFoo::foo(42u32);
}