Urgau
ee519532f6
Also add label with original type for function pointers
2023-08-03 10:57:11 +02:00
Urgau
d2b7c8028f
Rename incorrect_fn_null_checks to useless_ptr_null_checks
2023-08-01 19:35:31 +02:00
Urgau
743ae5a2eb
Expand incorrect_fn_null_check lint with reference null checking
2023-08-01 19:35:31 +02:00
Urgau
20a6b57106
Improve diagnostics of the invalid_reference_casting lint
2023-07-29 12:20:59 +02:00
Urgau
f3dafe91ff
Add support for deferred casting for the invalid_reference_casting lint
2023-07-29 12:20:59 +02:00
bors
04411507be
Auto merge of #113422 - Urgau:cast_ref_to_mut-pre-beta, r=Nilstrieb
...
Rename and allow `cast_ref_to_mut` lint
This PR is a small subset of https://github.com/rust-lang/rust/pull/112431 , that is the renaming of the lint (`cast_ref_to_mut` -> `invalid_reference_casting`).
BUT also temporarily change the default level of the lint from deny-by-default to allow-by-default until https://github.com/rust-lang/rust/pull/112431 is merged.
r? `@Nilstrieb`
2023-07-29 07:48:44 +00:00
bors
4734ac0943
Auto merge of #111916 - fee1-dead-contrib:noop-method-call-warn, r=compiler-errors
...
make `noop_method_call` warn by default
r? `@compiler-errors`
2023-07-29 01:40:50 +00:00
Deadbeef
2a76c570d6
add suggestion
2023-07-23 09:58:31 +00:00
Deadbeef
626efab67f
fix
2023-07-23 09:58:31 +00:00
David Wood
99b1897cf6
lint: refactor check_variant_for_ffi
...
Simplify this function a bit, it was quite hard to reason about.
Signed-off-by: David Wood <david@davidtw.co>
2023-07-19 09:55:10 +01:00
Urgau
3dbbf23e29
Rename cast_ref_to_mut lint to invalid_reference_casting
2023-07-13 23:01:24 +02:00
Urgau
f6d2bf63d3
Uplift clippy::fn_null_check
to rustc
2023-07-10 18:12:41 +02:00
Guillaume Gomez
db7d8374c1
Rollup merge of #112517 - fee1-dead-contrib:sus-op-no-borrow, r=compiler-errors
...
`suspicious_double_ref_op`: don't lint on `.borrow()`
closes #112489
2023-06-15 22:04:55 +02:00
Deadbeef
1caed51673
do not use stringly typed diagnostics
2023-06-13 13:53:56 +00:00
Nicky Lim
6033895ec2
Add subdiagnostic and suggestion for overflowing bin hex with sign bits
2023-06-11 18:27:26 +08:00
Urgau
3e91349c42
Uplift improved version of clippy::cmp_nan
to rustc
2023-06-10 11:12:55 +02:00
Urgau
52300bf8d8
Uplift clippy::undropped_manually_drops to rustc
2023-06-08 11:41:34 +02:00
Urgau
5da606779c
Uplift clippy::cast_ref_to_mut to rustc
2023-05-31 12:28:38 +02:00
Urgau
7f99c7d3e6
Add invalid_from_utf8 analogous to invalid_from_utf8_unchecked
2023-05-27 00:18:28 +02:00
Urgau
7f8846a9ef
Uplift clippy::invalid_utf8_in_unchecked as invalid_from_utf8_unchecked
2023-05-27 00:16:47 +02:00
clubby789
f97fddab91
Ensure Fluent messages are in alphabetical order
2023-05-25 23:49:35 +00: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
e280df556d
Add note to suggest using let _ = x
to ignore the value
2023-05-10 19:36:02 +02:00
Urgau
d23f8957ae
Improve warning message by saying that it "does nothing"
2023-05-10 19:36:02 +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
Deadbeef
475378f0c6
add match to diagnostic messages
2023-04-29 15:47:23 +00:00
Deadbeef
5c99175a9e
uplift clippy::clone_double_ref
as suspicious_double_ref_op
2023-04-28 17:24:48 +00:00
clubby789
eeb527602a
Add deny lint to prevent untranslatable diagnostics using static strings
2023-04-25 18:44:49 +01:00
kadiwa
85653831f7
typos
2023-04-17 09:16:07 +02:00
DaniPopes
677357d32b
Fix typos in compiler
2023-04-10 22:02:52 +02:00
Matthias Krüger
5937ec1915
Rollup merge of #109700 - clubby789:tidy-fluent-escape, r=compiler-errors
...
Lint against escape sequences in Fluent files
Fixes #109686 by checking for `\n`, `\"` and `\'` in Fluent files. It might be useful to have a way to opt out of this check, but all messages with violations currently do seem to be incorrect.
2023-03-29 21:19:50 +02:00
clubby789
979c265a5d
Check for escape sequences in Fluent resources
2023-03-29 18:34:29 +01:00
Mu001999
910a5ad2df
Emits suggestions for expressions with parentheses or not separately
2023-03-25 01:00:49 +08:00
Guillaume Gomez
825f0888cc
Move useless_anynous_reexport lint into unused_imports
2023-03-22 16:05:20 +01:00
Guillaume Gomez
ac4ea52980
Add test for useless_anonymous_reexport lint
2023-03-12 16:33:37 +01:00
Guillaume Gomez
2df7770d5e
Add lint for useless anonymous reexports
2023-03-12 15:12:42 +01:00
est31
7e2ecb3cd8
Simplify message paths
...
This makes it easier to open the messages file while developing on features.
The commit was the result of automatted changes:
for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done
for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-03-11 22:51:57 +01:00