Auto merge of #106866 - matthiaskrgr:rollup-r063s44, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #105526 (libcore: make result of iter::from_generator Clone) - #106563 (Fix `unused_braces` on generic const expr macro call) - #106661 (Stop probing for statx unless necessary) - #106820 (Deprioritize fulfillment errors that come from expansions.) - #106828 (rustdoc: remove `docblock` class from notable trait popover) - #106849 (Allocate one less vec while parsing arrays) - #106855 (rustdoc: few small cleanups) - #106860 (Remove various double spaces in the libraries.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
afaf3e07aa
61 changed files with 221 additions and 161 deletions
|
@ -1105,6 +1105,7 @@ impl UnusedDelimLint for UnusedBraces {
|
|||
|| matches!(expr.kind, ast::ExprKind::Lit(_)))
|
||||
&& !cx.sess().source_map().is_multiline(value.span)
|
||||
&& value.attrs.is_empty()
|
||||
&& !expr.span.from_expansion()
|
||||
&& !value.span.from_expansion()
|
||||
&& !inner.span.from_expansion()
|
||||
{
|
||||
|
|
|
@ -1475,9 +1475,8 @@ impl<'a> Parser<'a> {
|
|||
} else if self.eat(&token::Comma) {
|
||||
// Vector with two or more elements.
|
||||
let sep = SeqSep::trailing_allowed(token::Comma);
|
||||
let (remaining_exprs, _) = self.parse_seq_to_end(close, sep, |p| p.parse_expr())?;
|
||||
let mut exprs = vec![first_expr];
|
||||
exprs.extend(remaining_exprs);
|
||||
let (mut exprs, _) = self.parse_seq_to_end(close, sep, |p| p.parse_expr())?;
|
||||
exprs.insert(0, first_expr);
|
||||
ExprKind::Array(exprs)
|
||||
} else {
|
||||
// Vector with one element
|
||||
|
|
|
@ -454,9 +454,11 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
for (error, suppressed) in iter::zip(errors, is_suppressed) {
|
||||
if !suppressed {
|
||||
self.report_fulfillment_error(error, body_id);
|
||||
for from_expansion in [false, true] {
|
||||
for (error, suppressed) in iter::zip(errors, &is_suppressed) {
|
||||
if !suppressed && error.obligation.cause.span.from_expansion() == from_expansion {
|
||||
self.report_fulfillment_error(error, body_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue