File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
compiler/rustc_lint_defs/src Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -2928,10 +2928,18 @@ declare_lint! {
29282928 /// }
29292929 /// ```
29302930 ///
2931+ /// ### Explanation
2932+ ///
2933+ /// In the 1.77 release, the const evaluation machinery adopted some
2934+ /// stricter rules to reject expressions with values that could
2935+ /// end up holding mutable references to state stored in static memory
2936+ /// (which is inherently immutable).
2937+ ///
29312938 /// This is a [future-incompatible] lint to ease the transition to an error.
29322939 /// See [issue #122153] for more details.
29332940 ///
29342941 /// [issue #122153]: https://github.com/rust-lang/rust/issues/122153
2942+ /// [future-incompatible]: ../index.md#future-incompatible-lints
29352943 pub CONST_EVAL_MUTABLE_PTR_IN_FINAL_VALUE ,
29362944 Warn ,
29372945 "detects a mutable pointer that has leaked into final value of a const expression" ,
You can’t perform that action at this time.
0 commit comments