aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/validation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax/src/validation.rs')
-rw-r--r--crates/syntax/src/validation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/syntax/src/validation.rs b/crates/syntax/src/validation.rs
index bfa2dc4ba..7901580ee 100644
--- a/crates/syntax/src/validation.rs
+++ b/crates/syntax/src/validation.rs
@@ -256,7 +256,7 @@ fn validate_path_keywords(segment: ast::PathSegment, errors: &mut Vec<SyntaxErro
256 )); 256 ));
257 } 257 }
258 } else if let Some(token) = segment.super_token() { 258 } else if let Some(token) = segment.super_token() {
259 if !all_supers(&path) { 259 if segment.coloncolon_token().is_some() || !all_supers(&path) {
260 errors.push(SyntaxError::new( 260 errors.push(SyntaxError::new(
261 "The `super` keyword may only be preceded by other `super`s", 261 "The `super` keyword may only be preceded by other `super`s",
262 token.text_range(), 262 token.text_range(),