We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c91bdc commit 88d64a0Copy full SHA for 88d64a0
src/librustc_parse/parser/path.rs
@@ -71,15 +71,15 @@ impl<'a> Parser<'a> {
71
debug!("parse_qpath: (decrement) count={:?}", self.unmatched_angle_bracket_count);
72
}
73
74
- let lo_colon = self.token.span;
75
- if self.eat(&token::Colon) {
+ if self.token.kind == token::Colon {
76
// <Bar as Baz<T>>:Qux
77
// ^
78
- let span = lo_colon.to(self.prev_span);
+ self.bump();
+
79
self.diagnostic()
80
- .struct_span_err(span, "found single colon where type path was expected")
+ .struct_span_err(self.prev_span, "found single colon where type path was expected")
81
.span_suggestion(
82
- span,
+ self.prev_span,
83
"use double colon",
84
"::".to_string(),
85
Applicability::MachineApplicable,
0 commit comments