Skip to content

Commit fd3a91f

Browse files
committed
[wip] Add FIXMEs for fmease
1 parent 6fa9f51 commit fd3a91f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compiler/rustc_parse/src/parser/path.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -704,19 +704,22 @@ impl<'a> Parser<'a> {
704704
if matches!(self.token.kind, token::Comma | token::Gt) {
705705
err.span_suggestion(
706706
self.psess.source_map().next_point(eq).to(before_next),
707+
// FIXME(fmease, associated_const_equality): Also mention assoc consts here if enabled.
707708
"to constrain the associated type, add a type after `=`",
708-
" TheType",
709+
" /*Type*/",
709710
Applicability::HasPlaceholders,
710711
);
711712
err.span_suggestion(
712713
eq.to(before_next),
714+
// FIXME(fmease): Say "is meant to be a type argument"
713715
format!("remove the `=` if `{ident}` is a type"),
714716
"",
715717
Applicability::MaybeIncorrect,
716718
)
717719
} else {
718720
err.span_label(
719721
self.token.span,
722+
// FIXME(fmease, associated_const_equality): Say "type or const expression" if enabled
720723
format!("expected type, found {}", super::token_descr(&self.token)),
721724
)
722725
};

tests/ui/parser/recover/recover-assoc-eq-missing-term.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ LL | bar::<Item = >();
66
|
77
help: to constrain the associated type, add a type after `=`
88
|
9-
LL | bar::<Item = TheType>();
10-
| +++++++
9+
LL | bar::<Item = /*Type*/>();
10+
| ++++++++
1111
help: remove the `=` if `Item` is a type
1212
|
1313
LL - bar::<Item = >();

0 commit comments

Comments
 (0)