rust-lang / rust-lang/impl-trait-utils
Support syn::Pat::Wild pattern in method signatures
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 134
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
This issue relevant after #20 merges, but is not a result of the PR.
Assuming #20, the following fails to compile:
enum Abort {
Yes,
No,
}
#[trait_variant::make(Example: Send)]
trait LocalExample {
async fn should_abort(_: String) -> Abort {
Abort::No
}
}
The reason is the unsupported pattern _, tracing back to this error:
Giving the variable a name is possible, of course, but leads to the slight inconvenience of requiring allow(clippy::no_effect_underscore_binding) and allow(clippy::used_underscore_binding).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
After #20 merges, reproduce the failing example and start at trait-variant/src/variant.rs around line 199, where the unsupported pattern is reported. Trace how method-signature patterns are handled and verify that the example with _ compiles successfully, adding focused coverage if the existing tests expose the relevant path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100