Skip to content

Rollup of 11 pull requests #117405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
351d532
interpret: call caller_location logic the same way codegen does, and …
RalfJung Oct 28, 2023
04fa124
share the track_caller handling within a mir::Body
RalfJung Oct 28, 2023
552abdc
Rename a few remaining references to abort terminator
tmiasko Oct 29, 2023
82b447a
Add support for mipsel-unknown-netbsd, 32-bit LE mips.
he32 Oct 29, 2023
5e6c313
mipsel_unknown_netbsd.rs: fix indentation.
he32 Oct 29, 2023
28e60de
Remove `memoffset` dependency from `rustc_query_impl`.
nnethercote Oct 23, 2023
8ff624a
Clean up `rustc_*/Cargo.toml`.
nnethercote Oct 20, 2023
8c04999
On object safety error, mention new enum as alternative
estebank Oct 24, 2023
678e01a
Delay parsing of `--cfg` and `--check-cfg` options.
nnethercote Oct 30, 2023
bfcff79
Reduce exposure of cfg parsers.
nnethercote Oct 30, 2023
8e4ac98
Change cfg parsers to produce symbols instead of strings.
nnethercote Oct 30, 2023
5c6a12c
Make `Cfg` and `CheckCfg` non-generic.
nnethercote Oct 30, 2023
371f972
Improve readability of `parse_check_cfg`.
nnethercote Oct 30, 2023
85e56e8
Remove out-of-date comment.
nnethercote Oct 30, 2023
a60d643
Wrap some overlong comments.
nnethercote Oct 30, 2023
95b0088
Remove `check_output`.
nnethercote Oct 30, 2023
4b14048
improve and fix x install
onur-ozkan Oct 30, 2023
be8fd8b
Streamline `collect_crate_types`.
nnethercote Oct 30, 2023
90862f6
Remove an unnecessary `drop`.
nnethercote Oct 30, 2023
0c381ec
Streamline some `use` items.
nnethercote Oct 30, 2023
a2486db
Fix missing leading space in suggestion
gurry Oct 30, 2023
82f34fd
Fix #117284, Fix unused variables lint issue for args in macro
chenyukang Oct 30, 2023
8508e65
Fix bad-c-variadic error being emitted multiple times
nicholasbishop Oct 29, 2023
f91b5ce
Explicitly reject const C-variadic functions
nicholasbishop Oct 29, 2023
58a80c8
rustdoc: elide cross-crate default generic arguments
fmease Jun 9, 2023
b9dce53
Rollup merge of #112463 - fmease:rustdoc-elide-x-crate-def-gen-args, …
GuillaumeGomez Oct 30, 2023
824e367
Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser
GuillaumeGomez Oct 30, 2023
95de91b
Rollup merge of #117132 - estebank:issue-80194, r=petrochenkov
GuillaumeGomez Oct 30, 2023
73100d8
Rollup merge of #117317 - RalfJung:track-caller, r=oli-obk
GuillaumeGomez Oct 30, 2023
99b032f
Rollup merge of #117356 - he32:netbsd-mipsel, r=oli-obk
GuillaumeGomez Oct 30, 2023
5ac999f
Rollup merge of #117357 - tmiasko:terminate, r=wesleywiser
GuillaumeGomez Oct 30, 2023
784f04b
Rollup merge of #117370 - nicholasbishop:bishop-better-c-variadic-err…
GuillaumeGomez Oct 30, 2023
d96bdbe
Rollup merge of #117376 - nnethercote:rustc_interface-more, r=oli-obk
GuillaumeGomez Oct 30, 2023
c994bdb
Rollup merge of #117383 - onur-ozkan:fix-x-install, r=albertlarsan68
GuillaumeGomez Oct 30, 2023
02d32d2
Rollup merge of #117390 - chenyukang:yukang-fix-117284-unused-macro, …
GuillaumeGomez Oct 30, 2023
9e4ab9f
Rollup merge of #117395 - gurry:117380-wrong-parent-sugg, r=Nilstrieb
GuillaumeGomez Oct 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ impl EarlyLintPass for UnusedParens {

fn check_stmt(&mut self, cx: &EarlyContext<'_>, s: &ast::Stmt) {
if let StmtKind::Local(ref local) = s.kind {
self.check_unused_parens_pat(cx, &local.pat, true, false, (false, false));
self.check_unused_parens_pat(cx, &local.pat, true, false, (true, false));
}

<Self as UnusedDelimLint>::check_stmt(self, cx, s)
Expand Down
8 changes: 8 additions & 0 deletions tests/ui/lint/lint-unnecessary-parens.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ fn main() {
_a = 0; //~ ERROR unnecessary parentheses around assigned value
_a += 1; //~ ERROR unnecessary parentheses around assigned value

let mut _a = 3; //~ ERROR unnecessary parentheses around pattern
let mut _a = 3; //~ ERROR unnecessary parentheses around pattern
let mut _a = 3; //~ ERROR unnecessary parentheses around pattern

let _a = 3; //~ ERROR unnecessary parentheses around pattern
let _a = 3; //~ ERROR unnecessary parentheses around pattern
let _a = 3; //~ ERROR unnecessary parentheses around pattern

let _a = baz!(3, 4);
let _b = baz!(3);
}
8 changes: 8 additions & 0 deletions tests/ui/lint/lint-unnecessary-parens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ fn main() {
_a = (0); //~ ERROR unnecessary parentheses around assigned value
_a += (1); //~ ERROR unnecessary parentheses around assigned value

let(mut _a) = 3; //~ ERROR unnecessary parentheses around pattern
let (mut _a) = 3; //~ ERROR unnecessary parentheses around pattern
let( mut _a) = 3; //~ ERROR unnecessary parentheses around pattern

let(_a) = 3; //~ ERROR unnecessary parentheses around pattern
let (_a) = 3; //~ ERROR unnecessary parentheses around pattern
let( _a) = 3; //~ ERROR unnecessary parentheses around pattern

let _a = baz!(3, 4);
let _b = baz!(3);
}
74 changes: 73 additions & 1 deletion tests/ui/lint/lint-unnecessary-parens.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,77 @@ LL - _a += (1);
LL + _a += 1;
|

error: aborting due to 22 previous errors
error: unnecessary parentheses around pattern
--> $DIR/lint-unnecessary-parens.rs:87:8
|
LL | let(mut _a) = 3;
| ^ ^
|
help: remove these parentheses
|
LL - let(mut _a) = 3;
LL + let mut _a = 3;
|

error: unnecessary parentheses around pattern
--> $DIR/lint-unnecessary-parens.rs:88:9
|
LL | let (mut _a) = 3;
| ^ ^
|
help: remove these parentheses
|
LL - let (mut _a) = 3;
LL + let mut _a = 3;
|

error: unnecessary parentheses around pattern
--> $DIR/lint-unnecessary-parens.rs:89:8
|
LL | let( mut _a) = 3;
| ^^ ^
|
help: remove these parentheses
|
LL - let( mut _a) = 3;
LL + let mut _a = 3;
|

error: unnecessary parentheses around pattern
--> $DIR/lint-unnecessary-parens.rs:91:8
|
LL | let(_a) = 3;
| ^ ^
|
help: remove these parentheses
|
LL - let(_a) = 3;
LL + let _a = 3;
|

error: unnecessary parentheses around pattern
--> $DIR/lint-unnecessary-parens.rs:92:9
|
LL | let (_a) = 3;
| ^ ^
|
help: remove these parentheses
|
LL - let (_a) = 3;
LL + let _a = 3;
|

error: unnecessary parentheses around pattern
--> $DIR/lint-unnecessary-parens.rs:93:8
|
LL | let( _a) = 3;
| ^^ ^
|
help: remove these parentheses
|
LL - let( _a) = 3;
LL + let _a = 3;
|

error: aborting due to 28 previous errors