Martin Nordholts
5d32fd1b06
Add regression test for invalid unused const in method
...
The warning can be reproduced with 1.63 but not with 1.64.
$ rustc +1.63 tests/ui/lint/unused/const-local-var.rs
warning: constant `F` is never used
--> tests/ui/lint/unused/const-local-var.rs:14:9
|
14 | const F: i32 = 2;
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
$ rustc +1.64 tests/ui/lint/unused/const-local-var.rs
Add a regression test to prevent the problem from re-appearing.
2023-07-25 12:49:19 +02:00
许杰友 Jieyou Xu (Joe)
72b3b58efc
Extend unused_must_use
to cover block exprs
2023-06-15 17:59:13 +08:00
许杰友 Jieyou Xu (Joe)
edafbaffb2
Adjust UI tests for unit_bindings
...
- Either explicitly annotate `let x: () = expr;` where `x` has unit
type, or remove the unit binding to leave only `expr;` instead.
- Fix disjoint-capture-in-same-closure test
2023-06-12 20:24:48 +08:00
Michael Goulet
926e874fd1
Dont check must_use
on nested impl Future
from fn
2023-05-12 02:08:43 +00:00
Lukas Markeffsky
69c71dacda
fix false negative for unused_mut
2023-04-28 19:35:40 +02:00
Oli Scherer
334423263a
Run check_match
and check_liveness
when MIR is built instead of having an explicit phase for them
2023-04-21 22:32:38 +00:00
Lukas Markeffsky
0d0949d87f
emit unused_parens
for break
if it is not immediately followed by a block
2023-04-13 18:09:47 +02:00
Lukas Markeffsky
8df1f41b9c
fix false positives for unused_parens
around unary and binary operations
2023-04-13 18:08:52 +02:00
Michael Goulet
4560b61cd1
Broken tests
2023-04-11 17:45:42 +00:00
Ezra Shaw
35103fe8ab
error-msg: expand suggestion for unused lint
2023-03-15 23:30:12 +13:00
Maybe Waffle
a90abd64fb
Remove feature(box_syntax)
from unused allocation list test
2023-03-03 19:02:35 +00:00
Maybe Waffle
ff5f784140
Add a test for unused_allocation
lint
...
(how come we didn't have one already??)
2023-03-03 17:47:40 +00:00
bors
044a28a409
Auto merge of #103761 - chenyukang:yukang/fix-103320-must-use, r=compiler-errors
...
Add explanatory message for [#must_use] in ops
Fixes #103320
2023-02-06 12:57:37 +00:00
yukang
cb55d10eb2
Fix #103320 , add explanatory message for [#must_use]
2023-02-04 00:27:03 +08:00
Aidan Olsen
c3a71ede7c
Emit warnings on unused parens/braces in index expressions
2023-02-02 12:46:31 -07:00
yukang
9d74bb832f
comments feedback
2023-01-16 20:44:14 +08:00
yukang
644ee8d250
add test case for issue 105601
2023-01-14 17:11:05 +08:00
yukang
7d99866bfc
fix #105061 , Fix unused_parens issue for higher ranked function pointers
2023-01-14 17:11:04 +08:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests
2023-01-11 09:32:08 +00:00