where clause is permitted to be empty
Nobody has claimed this yet.
- Dominant language
- reStructuredText
- Stars
- 497
- Forks
- 41
- Avg merge
- 3h 52m
- Merged PRs (30d)
- 4
Description
WhereClause is permitted to be empty (i.e. a bare where) in baseline Rust. The following statements all compile:
struct Struct where {
}
enum Enum where {
}
type TypeAlias where = Struct;
trait Trait where {
}
fn function() where {
}
impl Struct where {
}
impl Trait for Struct where {
}
In the Ferrocene spec, 12.2 "Where Clauses" specifies that a WhereClause contains a WhereClausePredicateList which must be a non-empty list. However, Rust permits an empty list (which has the same effect as if where was not specified at all). The specification should probably be amended to reflect the actual grammar.
Contributor guide
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
Read section 12.2, “Where Clauses,” and compare its requirement for a non-empty WhereClausePredicateList with the Rust examples in the issue. Amend the specification grammar to permit an empty predicate list, while preserving the existing behavior for non-empty clauses; the examples should then be consistent with the specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100