We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here is syn's current RangeLimits enum:
syn/src/expr.rs
Lines 904 to 909 in 391c9c6
Rustc has the exact same thing: https://github.com/rust-lang/rust/blob/1.67.0/compiler/rustc_ast/src/ast.rs#L1323-L1328
pub enum RangeLimits { /// Inclusive at the beginning, exclusive at the end HalfOpen, /// Inclusive at the beginning and end Closed, }
However it's ambiguous whether "half open" means "exclusive of upper bound" vs "bounded only on one side".
The opposite approach is taken by the current Rust Reference: https://doc.rust-lang.org/1.67.0/reference/patterns.html#range-patterns
RangePattern : InclusiveRangePattern | HalfOpenRangePattern InclusiveRangePattern : RangePatternBound `..=` RangePatternBound HalfOpenRangePattern : RangePatternBound `..` | `..=` RangePatternBound
Notice how it has a ..= pattern which it refers to as half open, even though ..= is never considered half open in syn or rustc.
..=
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is syn's current RangeLimits enum:
syn/src/expr.rs
Lines 904 to 909 in 391c9c6
Rustc has the exact same thing: https://github.com/rust-lang/rust/blob/1.67.0/compiler/rustc_ast/src/ast.rs#L1323-L1328
However it's ambiguous whether "half open" means "exclusive of upper bound" vs "bounded only on one side".
The opposite approach is taken by the current Rust Reference: https://doc.rust-lang.org/1.67.0/reference/patterns.html#range-patterns
Notice how it has a
..=
pattern which it refers to as half open, even though..=
is never considered half open in syn or rustc.The text was updated successfully, but these errors were encountered: