blob: cee29df13713e184d7390a85ef95d1fbc0193ffa [file] [log] [blame]
// vim: tw=80
//! A method that returns "impl Trait"
#![deny(warnings)]
use mockall::*;
use std::fmt::Debug;
#[allow(unused)]
pub struct Foo {}
#[automock]
impl Foo {
#[allow(unused)]
fn foo(&self) -> impl Debug + Send { unimplemented!()}
}
#[test]
fn returning() {
let mut mock = MockFoo::new();
mock.expect_foo().returning(|| Box::new(4));
format!("{:?}", mock.foo());
}