@@ -3002,8 +3002,7 @@ declare_lint! {
3002
3002
3003
3003
declare_lint ! {
3004
3004
/// The `disjoint_capture_migration` lint detects variables that aren't completely
3005
- /// captured when the feature `capture_disjoint_fields` is enabled and it affects the Drop
3006
- /// order of at least one path starting at this variable.
3005
+ /// captured in Rust 2021 and affect the Drop order of at least one path starting at this variable.
3007
3006
/// It can also detect when a variable implements a trait, but one of its field does not and
3008
3007
/// the field is captured by a closure and used with the assumption that said field implements
3009
3008
/// the same trait as the root variable.
@@ -3040,16 +3039,16 @@ declare_lint! {
3040
3039
///
3041
3040
/// ### Explanation
3042
3041
///
3043
- /// In the above example `p.y` will be dropped at the end of `f` instead of with `c` if
3044
- /// the feature `capture_disjoint_fields` is enabled .
3042
+ /// In the above example, `p.y` will be dropped at the end of `f` instead of
3043
+ /// with `c` in Rust 2021 .
3045
3044
///
3046
3045
/// ### Example of auto-trait
3047
3046
///
3048
3047
/// ```rust,compile_fail
3049
3048
/// #![deny(disjoint_capture_migration)]
3050
3049
/// use std::thread;
3051
3050
///
3052
- /// struct Pointer (*mut i32);
3051
+ /// struct Pointer(*mut i32);
3053
3052
/// unsafe impl Send for Pointer {}
3054
3053
///
3055
3054
/// fn main() {
@@ -3065,12 +3064,16 @@ declare_lint! {
3065
3064
///
3066
3065
/// ### Explanation
3067
3066
///
3068
- /// In the above example `fptr.0` is captured when feature `capture_disjoint_fields` is enabled .
3067
+ /// In the above example, only `fptr.0` is captured in Rust 2021 .
3069
3068
/// The field is of type *mut i32 which doesn't implement Send, making the code invalid as the
3070
3069
/// field cannot be sent between thread safely.
3071
3070
pub DISJOINT_CAPTURE_MIGRATION ,
3072
3071
Allow ,
3073
- "Drop reorder and auto traits error because of `capture_disjoint_fields`"
3072
+ "detects closures affected by Rust 2021 changes" ,
3073
+ @future_incompatible = FutureIncompatibleInfo {
3074
+ reason: FutureIncompatibilityReason :: EditionSemanticsChange ( Edition :: Edition2021 ) ,
3075
+ explain_reason: false ,
3076
+ } ;
3074
3077
}
3075
3078
3076
3079
declare_lint_pass ! ( UnusedDocComment => [ UNUSED_DOC_COMMENTS ] ) ;
0 commit comments