Commit graph

27 commits

Author SHA1 Message Date
SabrinaJewson
d6f05c6a89
Don't warn int-to-char transmutes in const contexts 2022-03-30 18:47:50 +01:00
Federico Guerinoni
3298de7f66 Add borrow_as_ptr lint
Closes: #6995

Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
Co-authored-by: Paolo Barbolini <paolo@paolo565.org>
2022-01-11 09:53:29 +01:00
Nixon Enraght-Moony
58969807ab Add lint transmute_num_to_bytes
Closes #7803

changelog: [`transmute_num_to_bytes`] new lint
2021-10-13 20:05:05 +01:00
Jacob Pratt
5331fea875 Update tests 2021-07-27 16:26:50 -04:00
flip1995
282c59820b Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
Yuki Okushi
67d0f443b3 Split up transmute ui test 2020-01-20 11:16:50 +09:00
Andre Bogus
27fa2b7944 New lint: unsound_collection_transmute 2019-10-02 21:18:00 +02:00
Lzu Tao
4fa498a3eb Fix warnings about unnecessary lifetime bounds
Rustup https://github.com/rust-lang/rust/pull/61172
2019-06-20 01:36:23 +07:00
Philipp Hansch
38d4ac7cea
Remove all copyright license headers
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2019-01-08 21:46:39 +01:00
Matthias Krüger
435299be30 rustfmt tests 2018-12-09 23:26:16 +01:00
Oliver Scherer
b8654eaa6c Stabilize tool lints 2018-10-11 12:16:22 +02:00
Manish Goregaokar
e9c025ea70 Add license header to Rust files 2018-10-06 09:43:08 -07:00
flip1995
1b6f6051a8 Adapt ui-tests to the tool_lints 2018-08-29 11:08:29 -07:00
Devon Hollowood
8134863c13 Fix behavior with generic lifetime parameters 2018-05-29 09:18:49 -07:00
Devon Hollowood
96b11a5888 Test that we allow non-static lifetime transmutes 2018-05-29 09:18:49 -07:00
Devon Hollowood
2a606b5220 Don't lint lifetime-only transmutes 2018-05-29 09:18:49 -07:00
Devon Hollowood
b77d74030b Deprecate misaligned_transmute 2018-04-11 02:50:04 -07:00
Devon Hollowood
c6bc682325 Fix misaligned_transmute lint
This is done by adding two new lints: cast_ptr_alignment and
transmute_ptr_to_ptr. These will replace misaligned_transmute.
2018-04-11 02:17:59 -07:00
Devon Hollowood
0413b3f6cf Add misaligned_transmute lint 2018-01-25 00:48:36 -08:00
sinkuu
7fa27d9387 Lint transmute::<&[u8], &str> 2017-11-01 18:05:46 +09:00
PizzaIter
47df717229 Add lints transmute_int_to_* 2017-10-03 14:27:42 +02:00
Oliver Schneider
50ffaca4c9
Reduce the hackiness of cargo-clippy 2017-10-03 12:07:24 +02:00
Oliver Schneider
4465bc3e3f Make most tests an example so we can run them one by one 2017-05-17 14:19:44 +02:00
Luis de Bethencourt
81ee7f752e clean tests/ui/transmute.rs
Cleaning the empty lines for clarity.
2017-05-11 16:22:32 +01:00
Andre Bogus
2f7babba82 New zero_ptr lint.
This fixes #1047. I did not bother to add a full suggestion,
because replacing with `std::ptr::null()` may still lead to
inference failures.
2017-02-21 04:36:59 +01:00
Oliver Schneider
1f2c97a291 remove all //~ from tests 2017-02-08 14:58:07 +01:00
Oliver Schneider
fd1351f6e3 rustup and compile-fail -> ui test move 2017-02-07 21:05:30 +01:00
Renamed from tests/compile-fail/transmute.rs (Browse further)