mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 11:24:24 +00:00
Parse and infer tuple indices
This commit is contained in:
parent
0372eca5b2
commit
ca40ca93a5
13 changed files with 210 additions and 14 deletions
|
@ -95,6 +95,7 @@ pub enum SyntaxErrorKind {
|
|||
InvalidSuffix,
|
||||
InvalidBlockAttr,
|
||||
InvalidMatchInnerAttr,
|
||||
InvalidTupleIndexFormat,
|
||||
}
|
||||
|
||||
impl fmt::Display for SyntaxErrorKind {
|
||||
|
@ -139,6 +140,9 @@ impl fmt::Display for SyntaxErrorKind {
|
|||
InvalidMatchInnerAttr => {
|
||||
write!(f, "Inner attributes are only allowed directly after the opening brace of the match expression")
|
||||
}
|
||||
InvalidTupleIndexFormat => {
|
||||
write!(f, "Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix")
|
||||
}
|
||||
ParseError(msg) => write!(f, "{}", msg.0),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue