Remove non-useful code path.
It has no effect on anything in the test suite.
This commit is contained in:
parent
dbed10a6a2
commit
b7f3b714da
3 changed files with 0 additions and 19 deletions
|
@ -390,8 +390,6 @@ parse_invalid_dyn_keyword = invalid `dyn` keyword
|
||||||
parse_invalid_expression_in_let_else = a `{$operator}` expression cannot be directly assigned in `let...else`
|
parse_invalid_expression_in_let_else = a `{$operator}` expression cannot be directly assigned in `let...else`
|
||||||
parse_invalid_identifier_with_leading_number = identifiers cannot start with a number
|
parse_invalid_identifier_with_leading_number = identifiers cannot start with a number
|
||||||
|
|
||||||
parse_invalid_interpolated_expression = invalid interpolated expression
|
|
||||||
|
|
||||||
parse_invalid_literal_suffix_on_tuple_index = suffixes on a tuple index are invalid
|
parse_invalid_literal_suffix_on_tuple_index = suffixes on a tuple index are invalid
|
||||||
.label = invalid suffix `{$suffix}`
|
.label = invalid suffix `{$suffix}`
|
||||||
.tuple_exception_line_1 = `{$suffix}` is *temporarily* accepted on tuple index fields as it was incorrectly accepted on stable for a few releases
|
.tuple_exception_line_1 = `{$suffix}` is *temporarily* accepted on tuple index fields as it was incorrectly accepted on stable for a few releases
|
||||||
|
|
|
@ -850,13 +850,6 @@ pub(crate) struct StructLiteralNotAllowedHereSugg {
|
||||||
pub right: Span,
|
pub right: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Diagnostic)]
|
|
||||||
#[diag(parse_invalid_interpolated_expression)]
|
|
||||||
pub(crate) struct InvalidInterpolatedExpression {
|
|
||||||
#[primary_span]
|
|
||||||
pub span: Span,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Diagnostic)]
|
#[derive(Diagnostic)]
|
||||||
#[diag(parse_invalid_literal_suffix_on_tuple_index)]
|
#[diag(parse_invalid_literal_suffix_on_tuple_index)]
|
||||||
pub(crate) struct InvalidLiteralSuffixOnTupleIndex {
|
pub(crate) struct InvalidLiteralSuffixOnTupleIndex {
|
||||||
|
|
|
@ -2043,16 +2043,6 @@ impl<'a> Parser<'a> {
|
||||||
&mut self,
|
&mut self,
|
||||||
mk_lit_char: impl FnOnce(Symbol, Span) -> L,
|
mk_lit_char: impl FnOnce(Symbol, Span) -> L,
|
||||||
) -> PResult<'a, L> {
|
) -> PResult<'a, L> {
|
||||||
if let token::Interpolated(nt) = &self.token.kind
|
|
||||||
&& let token::NtExpr(e) | token::NtLiteral(e) = &nt.0
|
|
||||||
&& matches!(e.kind, ExprKind::Err(_))
|
|
||||||
{
|
|
||||||
let mut err = self
|
|
||||||
.dcx()
|
|
||||||
.create_err(errors::InvalidInterpolatedExpression { span: self.token.span });
|
|
||||||
err.downgrade_to_delayed_bug();
|
|
||||||
return Err(err);
|
|
||||||
}
|
|
||||||
let token = self.token.clone();
|
let token = self.token.clone();
|
||||||
let err = |self_: &Self| {
|
let err = |self_: &Self| {
|
||||||
let msg = format!("unexpected token: {}", super::token_descr(&token));
|
let msg = format!("unexpected token: {}", super::token_descr(&token));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue