diff options
| author | bors <bors@rust-lang.org> | 2022-05-06 12:32:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-06 12:32:44 +0000 |
| commit | 9a251644fa2adde5f46eea8d342b7e60e4716039 (patch) | |
| tree | 7017ac2f53456a2a7df4338f7a5186ead387f3e0 /compiler/rustc_lint_defs/src | |
| parent | 8c4fc9d9a45b0577f583abda870386f1f940c706 (diff) | |
| parent | 2300401fb0a44966a2159dd0a69762b18fd89345 (diff) | |
| download | rust-9a251644fa2adde5f46eea8d342b7e60e4716039.tar.gz rust-9a251644fa2adde5f46eea8d342b7e60e4716039.zip | |
Auto merge of #96268 - jackh726:remove-mutable_borrow_reservation_conflict-lint, r=nikomatsakis
Remove mutable_borrow_reservation_conflict lint and allow the code pattern This was the only breaking issue with the NLL stabilization PR. Lang team decided to go ahead and allow this. r? `@nikomatsakis` Closes #59159 Closes #56254
Diffstat (limited to 'compiler/rustc_lint_defs/src')
| -rw-r--r-- | compiler/rustc_lint_defs/src/builtin.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index a42e3d5d957..34412795aef 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -2346,40 +2346,6 @@ declare_lint! { } declare_lint! { - /// The `mutable_borrow_reservation_conflict` lint detects the reservation - /// of a two-phased borrow that conflicts with other shared borrows. - /// - /// ### Example - /// - /// ```rust - /// let mut v = vec![0, 1, 2]; - /// let shared = &v; - /// v.push(shared.len()); - /// ``` - /// - /// {{produces}} - /// - /// ### Explanation - /// - /// This is a [future-incompatible] lint to transition this to a hard error - /// in the future. See [issue #59159] for a complete description of the - /// problem, and some possible solutions. - /// - /// [issue #59159]: https://github.com/rust-lang/rust/issues/59159 - /// [future-incompatible]: ../index.md#future-incompatible-lints - pub MUTABLE_BORROW_RESERVATION_CONFLICT, - Warn, - "reservation of a two-phased borrow conflicts with other shared borrows", - @future_incompatible = FutureIncompatibleInfo { - reason: FutureIncompatibilityReason::Custom( - "this borrowing pattern was not meant to be accepted, \ - and may become a hard error in the future" - ), - reference: "issue #59159 <https://github.com/rust-lang/rust/issues/59159>", - }; -} - -declare_lint! { /// The `soft_unstable` lint detects unstable features that were /// unintentionally allowed on stable. /// @@ -3179,7 +3145,6 @@ declare_lint_pass! { META_VARIABLE_MISUSE, DEPRECATED_IN_FUTURE, AMBIGUOUS_ASSOCIATED_ITEMS, - MUTABLE_BORROW_RESERVATION_CONFLICT, INDIRECT_STRUCTURAL_MATCH, POINTER_STRUCTURAL_MATCH, NONTRIVIAL_STRUCTURAL_MATCH, |
