mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-22 01:52:56 +00:00
Add inlay hint for exclusive ranges
Adds an inlay hint containing a '<' character to exclusive range expressions and patterns that specify an upper bound.
This commit is contained in:
parent
f595e60b6d
commit
3c378b9c70
14 changed files with 209 additions and 17 deletions
|
@ -136,6 +136,16 @@ where
|
|||
{
|
||||
}
|
||||
|
||||
/// Trait to describe operations common to both `RangeExpr` and `RangePat`.
|
||||
pub trait RangeItem {
|
||||
type Bound;
|
||||
|
||||
fn start(&self) -> Option<Self::Bound>;
|
||||
fn end(&self) -> Option<Self::Bound>;
|
||||
fn op_kind(&self) -> Option<RangeOp>;
|
||||
fn op_token(&self) -> Option<SyntaxToken>;
|
||||
}
|
||||
|
||||
mod support {
|
||||
use super::{AstChildren, AstNode, SyntaxKind, SyntaxNode, SyntaxToken};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue