Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing Handle in implementation #55

Open
asomers opened this issue Aug 4, 2019 · 0 comments
Open

missing Handle in implementation #55

asomers opened this issue Aug 4, 2019 · 0 comments

Comments

@asomers
Copy link
Contributor

asomers commented Aug 4, 2019

When I tried to upgrade mock_shoout from Mockers 0.13.4 to 0.20.0, every place I used #[mocked] began to fail with the error missing Handle in implementation. This appears to be unrelated to the only documented breaking change; create_mock_for now returns a tuple of mock and handle instead of a single value. Can you please tell me what I'm doing wrong? One example of the breakage looks like this:

    fn derive(){
        #[mocked]
        pub trait A {
            fn foo(&self, key: i16);
        }

        let scenario = Scenario::new();
        let _mock = scenario.create_mock_for::<A>();
    }
error[E0046]: not all trait items implemented, missing: `Handle`
   --> src/t_mockers.rs:140:9
    |
140 |         #[mocked]
    |         ^^^^^^^^^ missing `Handle` in implementation
    |
    = note: `Handle` from trait: `type Handle;`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant