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 @@ -2928,10 +2928,18 @@ declare_lint! {
2928
2928
/// }
2929
2929
/// ```
2930
2930
///
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
+ ///
2931
2938
/// This is a [future-incompatible] lint to ease the transition to an error.
2932
2939
/// See [issue #122153] for more details.
2933
2940
///
2934
2941
/// [issue #122153]: https://github.com/rust-lang/rust/issues/122153
2942
+ /// [future-incompatible]: ../index.md#future-incompatible-lints
2935
2943
pub CONST_EVAL_MUTABLE_PTR_IN_FINAL_VALUE ,
2936
2944
Warn ,
2937
2945
"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