File tree 1 file changed +8
-0
lines changed
compiler/rustc_lint_defs/src
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -2819,10 +2819,18 @@ declare_lint! {
2819
2819
/// }
2820
2820
/// ```
2821
2821
///
2822
+ /// ### Explanation
2823
+ ///
2824
+ /// In the 1.77 release, the const evaluation machinery adopted some
2825
+ /// stricter rules to reject expressions with values that could
2826
+ /// end up holding mutable references to state stored in static memory
2827
+ /// (which is inherently immutable).
2828
+ ///
2822
2829
/// This is a [future-incompatible] lint to ease the transition to an error.
2823
2830
/// See [issue #122153] for more details.
2824
2831
///
2825
2832
/// [issue #122153]: https://github.com/rust-lang/rust/issues/122153
2833
+ /// [future-incompatible]: ../index.md#future-incompatible-lints
2826
2834
pub CONST_EVAL_MUTABLE_PTR_IN_FINAL_VALUE ,
2827
2835
Warn ,
2828
2836
"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