Skip to content

Commit 0a32ca9

Browse files
committedJun 29, 2023
Auto merge of rust-lang#113146 - matthiaskrgr:rollup-bxtr51e, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#112670 (privacy: Type privacy lints fixes and cleanups) - rust-lang#112929 (Test that we require implementing trait items whose bounds don't hold in the current impl) - rust-lang#113054 (Make `rustc_on_unimplemented` std-agnostic) - rust-lang#113137 (don't suggest `move` for borrows that aren't closures) - rust-lang#113139 (style-guide: Clarify let-else further) - rust-lang#113140 (style-guide: Add an example of formatting a multi-line attribute) - rust-lang#113143 (style-guide: Narrow guidance about references and dereferencing) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 75726ca + 7a7ffce commit 0a32ca9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+569
-204
lines changed
 

‎compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,18 +1730,19 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
17301730
(
17311731
Some(name),
17321732
BorrowExplanation::UsedLater(LaterUseKind::ClosureCapture, var_or_use_span, _),
1733-
) => self.report_escaping_closure_capture(
1734-
borrow_spans,
1735-
borrow_span,
1736-
&RegionName {
1737-
name: self.synthesize_region_name(),
1738-
source: RegionNameSource::Static,
1739-
},
1740-
ConstraintCategory::CallArgument(None),
1741-
var_or_use_span,
1742-
&format!("`{}`", name),
1743-
"block",
1744-
),
1733+
) if borrow_spans.for_generator() || borrow_spans.for_closure() => self
1734+
.report_escaping_closure_capture(
1735+
borrow_spans,
1736+
borrow_span,
1737+
&RegionName {
1738+
name: self.synthesize_region_name(),
1739+
source: RegionNameSource::Static,
1740+
},
1741+
ConstraintCategory::CallArgument(None),
1742+
var_or_use_span,
1743+
&format!("`{}`", name),
1744+
"block",
1745+
),
17451746
(
17461747
Some(name),
17471748
BorrowExplanation::MustBeValidFor {
@@ -1754,7 +1755,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
17541755
span,
17551756
..
17561757
},
1757-
) if borrow_spans.for_generator() | borrow_spans.for_closure() => self
1758+
) if borrow_spans.for_generator() || borrow_spans.for_closure() => self
17581759
.report_escaping_closure_capture(
17591760
borrow_spans,
17601761
borrow_span,

‎compiler/rustc_feature/src/active.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,8 @@ declare_features! (
543543
/// Allows creation of instances of a struct by moving fields that have
544544
/// not changed from prior instances of the same struct (RFC #2528)
545545
(active, type_changing_struct_update, "1.58.0", Some(86555), None),
546+
/// Allows using type privacy lints (`private_interfaces`, `private_bounds`, `unnameable_types`).
547+
(active, type_privacy_lints, "CURRENT_RUSTC_VERSION", Some(48054), None),
546548
/// Enables rustc to generate code that instructs libstd to NOT ignore SIGPIPE.
547549
(active, unix_sigpipe, "1.65.0", Some(97889), None),
548550
/// Allows unsized fn parameters.

0 commit comments

Comments
 (0)
Please sign in to comment.