Remove a suggestion that is redundant
This commit is contained in:
parent
c763f833d1
commit
6018e21d8a
7 changed files with 5 additions and 35 deletions
|
@ -780,7 +780,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
ref prior_non_diverging_arms,
|
||||
opt_suggest_box_span,
|
||||
scrut_span,
|
||||
scrut_hir_id,
|
||||
..
|
||||
}) => match source {
|
||||
hir::MatchSource::TryDesugar(scrut_hir_id) => {
|
||||
|
@ -848,18 +847,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
) {
|
||||
err.subdiagnostic(subdiag);
|
||||
}
|
||||
if let hir::Node::Expr(m) = self.tcx.parent_hir_node(scrut_hir_id)
|
||||
&& let hir::Node::Stmt(stmt) = self.tcx.parent_hir_node(m.hir_id)
|
||||
&& let hir::StmtKind::Expr(_) = stmt.kind
|
||||
{
|
||||
err.span_suggestion_verbose(
|
||||
stmt.span.shrink_to_hi(),
|
||||
"consider using a semicolon here, but this will discard any values \
|
||||
in the match arms",
|
||||
";",
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
}
|
||||
if let Some(ret_sp) = opt_suggest_box_span {
|
||||
// Get return type span and point to it.
|
||||
self.suggest_boxing_for_return_impl_trait(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue