Auto merge of #128796 - matthiaskrgr:rollup-r7l68ph, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #128221 (Add implied target features to target_feature attribute) - #128261 (impl `Default` for collection iterators that don't already have it) - #128353 (Change generate-copyright to generate HTML, with cargo dependencies included) - #128679 (codegen: better centralize function declaration attribute computation) - #128732 (make `import.vis` is immutable) - #128755 (Integrate crlf directly into related test file instead via of .gitattributes) - #128772 (rustc_codegen_ssa: Set architecture for object crate for 32-bit SPARC) - #128782 (unused_parens: do not lint against parens around &raw) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
8b3870784f
56 changed files with 1316 additions and 678 deletions
|
@ -675,6 +675,13 @@ trait UnusedDelimLint {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Do not lint against parentheses around `&raw [const|mut] expr`.
|
||||
// These parentheses will have to be added e.g. when calling a method on the result of this
|
||||
// expression, and we want to avoid churn wrt adding and removing parentheses.
|
||||
if matches!(inner.kind, ast::ExprKind::AddrOf(ast::BorrowKind::Raw, ..)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if LHS needs parens to prevent false-positives in cases like
|
||||
// `fn x() -> u8 { ({ 0 } + 1) }`.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue