@@ -3002,8 +3002,7 @@ declare_lint! {
30023002
30033003declare_lint ! {
30043004 /// 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.
30073006 /// It can also detect when a variable implements a trait, but one of its field does not and
30083007 /// the field is captured by a closure and used with the assumption that said field implements
30093008 /// the same trait as the root variable.
@@ -3040,16 +3039,16 @@ declare_lint! {
30403039 ///
30413040 /// ### Explanation
30423041 ///
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 .
30453044 ///
30463045 /// ### Example of auto-trait
30473046 ///
30483047 /// ```rust,compile_fail
30493048 /// #![deny(disjoint_capture_migration)]
30503049 /// use std::thread;
30513050 ///
3052- /// struct Pointer (*mut i32);
3051+ /// struct Pointer(*mut i32);
30533052 /// unsafe impl Send for Pointer {}
30543053 ///
30553054 /// fn main() {
@@ -3065,12 +3064,16 @@ declare_lint! {
30653064 ///
30663065 /// ### Explanation
30673066 ///
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 .
30693068 /// The field is of type *mut i32 which doesn't implement Send, making the code invalid as the
30703069 /// field cannot be sent between thread safely.
30713070 pub DISJOINT_CAPTURE_MIGRATION ,
30723071 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+ } ;
30743077}
30753078
30763079declare_lint_pass ! ( UnusedDocComment => [ UNUSED_DOC_COMMENTS ] ) ;
0 commit comments