about summary refs log tree commit diff
path: root/compiler/rustc_lint_defs/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-03-27 12:42:19 -0400
committerRalf Jung <post@ralfj.de>2022-04-14 21:16:42 -0400
commite30d6d9096e23a6206b6950b8f28a85d327a42fc (patch)
tree16864816e4083d8ef9bf32c56e149fd3c9020d3e /compiler/rustc_lint_defs/src
parentde392c7d31602ddf0fae1143c5ad822a1abe89df (diff)
downloadrust-e30d6d9096e23a6206b6950b8f28a85d327a42fc.tar.gz
rust-e30d6d9096e23a6206b6950b8f28a85d327a42fc.zip
make unaligned_references lint deny-by-default
Diffstat (limited to 'compiler/rustc_lint_defs/src')
-rw-r--r--compiler/rustc_lint_defs/src/builtin.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs
index 89ce307d12c..0953e5eeb14 100644
--- a/compiler/rustc_lint_defs/src/builtin.rs
+++ b/compiler/rustc_lint_defs/src/builtin.rs
@@ -1110,8 +1110,6 @@ declare_lint! {
     /// ### Example
     ///
     /// ```rust,compile_fail
-    /// #![deny(unaligned_references)]
-    ///
     /// #[repr(packed)]
     /// pub struct Foo {
     ///     field1: u64,
@@ -1139,7 +1137,7 @@ declare_lint! {
     /// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
     /// [issue #82523]: https://github.com/rust-lang/rust/issues/82523
     pub UNALIGNED_REFERENCES,
-    Warn,
+    Deny,
     "detects unaligned references to fields of packed structs",
     @future_incompatible = FutureIncompatibleInfo {
         reference: "issue #82523 <https://github.com/rust-lang/rust/issues/82523>",