Nicholas Nethercote
84ac80f192
Reformat use
declarations.
...
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
surechen
9d1ed80a8a
Change lint_dropping_copy_types to use UseLetUnderscoreIgnoreSuggestion as suggestion.
2024-05-29 18:09:20 +08:00
surechen
ac736d6d88
Let lint_forgetting_references give the suggestion if possible
2024-05-29 17:40:34 +08:00
surechen
d7f0d1f564
Let lint_forgetting_copy_types give the suggestion if possible.
2024-05-29 16:53:37 +08:00
surechen
ca68c93135
Let lint_dropping_references give the suggestion if possible.
2024-05-29 16:53:28 +08:00
bors
5870f1ccbb
Auto merge of #125433 - surechen:fix_125189, r=Urgau
...
A small diagnostic improvement for dropping_copy_types
For a value `m` which implements `Copy` trait, `drop(m);` does nothing.
We now suggest user to ignore it by a abstract and general note: `let _ = ...`.
I think we can give a clearer note here: `let _ = m;`
fixes #125189
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
2024-05-29 06:14:05 +00:00
surechen
09c8e39adb
A small diagnostic improvement for dropping_copy_types
...
fixes #125189
2024-05-24 19:31:57 +08:00
Nicholas Nethercote
e6b3e20243
Remove extern crate rustc_session
from rustc_lint
.
2024-04-29 13:57:41 +10:00
Vadim Petrochenkov
b07283815b
hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent}
2024-02-10 12:24:46 +03:00
Nicholas Nethercote
1881bfaa2b
Rename LintContext::emit_spanned_lint
as LintContext::emit_span_lint
.
2024-01-23 08:08:25 +11:00
Michael Goulet
b2d2184ede
Format all the let chains in compiler
2023-10-13 08:59:36 +00:00
Urgau
908574b5e7
Fix dropping_copy_types lint from linting in match-arm with side-effects
2023-07-01 16:05:55 +02:00
Urgau
52300bf8d8
Uplift clippy::undropped_manually_drops to rustc
2023-06-08 11:41:34 +02:00
Urgau
6b08a745a4
Rename forget_ref
lint to forgetting_references
2023-05-21 14:28:09 +02:00
Urgau
c93d9c1794
Rename drop_ref
lint to dropping_references
2023-05-21 14:16:41 +02:00
Urgau
85a1828943
Rename forget_copy
lint to forgetting_copy_types
2023-05-21 14:09:03 +02:00
Urgau
1c7ab18c08
Rename drop_copy
lint to dropping_copy_types
2023-05-21 13:37:32 +02:00
Urgau
457fa953a2
Use label instead of note to be more consistent with other lints
2023-05-10 19:36:02 +02:00
Urgau
971b9b23b5
Uplift clippy::forget_copy to rustc
2023-05-10 19:36:01 +02:00
Urgau
1ef9c163aa
Uplift clippy::forget_ref to rustc
2023-05-10 19:36:01 +02:00
Urgau
156f5563c7
Uplift clippy::drop_copy to rustc
2023-05-10 19:36:01 +02:00
Urgau
28cdbc2a64
Uplift clippy::drop_ref to rustc
2023-05-10 19:36:01 +02:00