rust/src/test
Dylan DPC a900677eb9
Rollup merge of #82525 - RalfJung:unaligned-ref-warn, r=petrochenkov
make unaligned_references future-incompat lint warn-by-default

and also remove the safe_packed_borrows lint that it replaces.

`std::ptr::addr_of!` has hit beta now and will hit stable in a month, so I propose we start fixing https://github.com/rust-lang/rust/issues/27060 for real: creating a reference to a field of a packed struct needs to eventually become a hard error; this PR makes it a warn-by-default future-incompat lint. (The lint already existed, this just raises its default level.) At the same time I removed the corresponding code from unsafety checking; really there's no reason an `unsafe` block should make any difference here.

For references to packed fields outside `unsafe` blocks, this means `unaligned_refereces` replaces the previous `safe_packed_borrows` warning with a link to https://github.com/rust-lang/rust/issues/82523 (and no more talk about unsafe blocks making any difference). So behavior barely changes, the warning is just worded differently. For references to packed fields inside `unsafe` blocks, this PR shows a new future-incompat warning.

Closes https://github.com/rust-lang/rust/issues/46043 because that lint no longer exists.
2021-03-27 20:37:05 +01:00
..
assembly Mark inline asm tests as requiring LLVM 10.0.1 2021-03-25 20:21:58 +00:00
auxiliary
codegen Mark inline asm tests as requiring LLVM 10.0.1 2021-03-25 20:21:58 +00:00
codegen-units Deprecate items that accidentally weren't deprecated 2021-03-09 19:09:20 -05:00
debuginfo Update tests for extern block linting 2021-01-13 07:49:16 -05:00
incremental Use EvaluatedToOkModuloRegions whenever we erase regions 2021-03-24 16:01:37 -04:00
mir-opt Auto merge of #78618 - workingjubilee:ieee754-fmt, r=m-ou-se 2021-03-27 10:40:16 +00:00
pretty Update test/pretty output for edition preludes. 2021-02-25 13:43:11 +01:00
run-make only run RemoveZsts at mir-opt-level 3 and above 2021-03-22 18:30:56 -04:00
run-make-fulldeps Fix #83045 by moving some crate loading verification code to a better place. 2021-03-26 09:59:10 +01:00
run-pass-valgrind Update tests for extern block linting 2021-01-13 07:49:16 -05:00
rustdoc Auto merge of #82838 - Amanieu:rustdoc_asm, r=nagisa 2021-03-16 10:05:46 +00:00
rustdoc-gui Rollup merge of #83420 - GuillaumeGomez:rustdoc-gui-tests-doc, r=CraftSpider 2021-03-25 09:07:27 +09:00
rustdoc-js Add test for primitive search 2021-02-01 15:56:51 +01:00
rustdoc-js-std Add search index test for primitive types 2021-01-27 10:05:06 +01:00
rustdoc-json Rename span to source 2021-03-24 19:44:23 +00:00
rustdoc-ui Update char::escape_debug_ext to handle different escapes in strings vs. chars 2021-03-26 11:23:51 +03:00
rustfix
ui Rollup merge of #82525 - RalfJung:unaligned-ref-warn, r=petrochenkov 2021-03-27 20:37:05 +01:00
ui-fulldeps ast: Reduce size of ExprKind by boxing fields of ExprKind::Struct 2021-03-16 11:41:24 +03:00
COMPILER_TESTS.md