Rollup merge of #114779 - MU001999:fix/114701, r=petrochenkov
Add check before suggest removing parens Fixes #114701
This commit is contained in:
commit
8f1c8116f6
3 changed files with 31 additions and 0 deletions
|
@ -599,6 +599,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
= self.typeck_results.borrow().qpath_res(qpath, callee_expr.hir_id)
|
||||
// Only suggest removing parens if there are no arguments
|
||||
&& arg_exprs.is_empty()
|
||||
&& call_expr.span.contains(callee_expr.span)
|
||||
{
|
||||
let descr = match kind {
|
||||
def::CtorOf::Struct => "struct",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue