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

"where Self: Sized" shouldn't make a method generic #414

Closed
asomers opened this issue Sep 29, 2022 · 0 comments · Fixed by #415
Closed

"where Self: Sized" shouldn't make a method generic #414

asomers opened this issue Sep 29, 2022 · 0 comments · Fixed by #415
Labels
bug Something isn't working

Comments

@asomers
Copy link
Owner

asomers commented Sep 29, 2022

Mockall is currently treating methods like the following as generic because of the where clause. But it shouldn't, because Self isn't really a generic parameter.

#[automock]
pub trait Server {
    fn version() -> Option<&'static str> where Self: Sized;
}
@asomers asomers added the bug Something isn't working label Sep 29, 2022
asomers added a commit that referenced this issue Oct 1, 2022
Previously they were treated as generic.  Among other effects, this
prevents "unused method expect" warnings from the latest nightly
compiler.

Fixes #414
asomers added a commit that referenced this issue Oct 1, 2022
Previously they were treated as generic.  Among other effects, this
prevents "unused method expect" warnings from the latest nightly
compiler.

Fixes #414
asomers added a commit that referenced this issue Oct 18, 2022
Previously they were treated as generic.  Among other effects, this
prevents "unused method expect" warnings from the latest nightly
compiler.

Fixes #414
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant