Skip to content

Unhelpful error for different impl method signature vs trait #3006

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

Closed
jdm opened this issue Jul 24, 2012 · 1 comment
Closed

Unhelpful error for different impl method signature vs trait #3006

jdm opened this issue Jul 24, 2012 · 1 comment
Labels
A-type-system Area: Type system E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone

Comments

@jdm
Copy link
Contributor

jdm commented Jul 24, 2012

error: method new_object has an incompatible type: () vs enum core::result::result

It took me a while to figure out that this was talking about the expected return type from the trait versus what the impl method was declaring. We should work the words trait and impl into that error somehow.

@catamorphism
Copy link
Contributor

Closing, I think this is fixed, but if it's not, please reopen with the specific code example causing the error.

bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 6, 2023
miri-script and cargo-miri cleanups

At least in an initial test, `cmd!(Shell::new()?, "env")` does show the full environment. Let's see what CI says.

`@osiewicz` why did you add this code to forward the host environment?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants