Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 869b3cc

Browse files
committed
Auto merge of rust-lang#134879 - Zalathar:rollup-olayokx, r=Zalathar
Rollup of 3 pull requests Successful merges: - rust-lang#133460 (Use `check-run-results` for `run-fail` test stderr) - rust-lang#134627 (Avoid ICE in borrowck) - rust-lang#134799 (nits: Cleanups in `librustdoc::clean`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 480eec0 + 8dc9921 commit 869b3cc

File tree

366 files changed

+930
-234
lines changed

Some content is hidden

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

366 files changed

+930
-234
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,8 +1950,14 @@ impl<'tcx> RegionInferenceContext<'tcx> {
19501950
target_test: impl Fn(RegionVid) -> bool,
19511951
) -> (BlameConstraint<'tcx>, Vec<ExtraConstraintInfo>) {
19521952
// Find all paths
1953-
let (path, target_region) =
1954-
self.find_constraint_paths_between_regions(from_region, target_test).unwrap();
1953+
let (path, target_region) = self
1954+
.find_constraint_paths_between_regions(from_region, target_test)
1955+
.or_else(|| {
1956+
self.find_constraint_paths_between_regions(from_region, |r| {
1957+
self.cannot_name_placeholder(from_region, r)
1958+
})
1959+
})
1960+
.unwrap();
19551961
debug!(
19561962
"path={:#?}",
19571963
path.iter()

src/librustdoc/clean/mod.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ fn clean_poly_trait_ref_with_constraints<'tcx>(
268268
)
269269
}
270270

271-
fn clean_lifetime(lifetime: &hir::Lifetime, cx: &mut DocContext<'_>) -> Lifetime {
271+
fn clean_lifetime(lifetime: &hir::Lifetime, cx: &DocContext<'_>) -> Lifetime {
272272
if let Some(
273273
rbv::ResolvedArg::EarlyBound(did)
274274
| rbv::ResolvedArg::LateBound(_, _, did)
@@ -362,9 +362,9 @@ pub(crate) fn clean_predicate<'tcx>(
362362
let bound_predicate = predicate.kind();
363363
match bound_predicate.skip_binder() {
364364
ty::ClauseKind::Trait(pred) => clean_poly_trait_predicate(bound_predicate.rebind(pred), cx),
365-
ty::ClauseKind::RegionOutlives(pred) => clean_region_outlives_predicate(pred),
365+
ty::ClauseKind::RegionOutlives(pred) => Some(clean_region_outlives_predicate(pred)),
366366
ty::ClauseKind::TypeOutlives(pred) => {
367-
clean_type_outlives_predicate(bound_predicate.rebind(pred), cx)
367+
Some(clean_type_outlives_predicate(bound_predicate.rebind(pred), cx))
368368
}
369369
ty::ClauseKind::Projection(pred) => {
370370
Some(clean_projection_predicate(bound_predicate.rebind(pred), cx))
@@ -396,32 +396,30 @@ fn clean_poly_trait_predicate<'tcx>(
396396
})
397397
}
398398

399-
fn clean_region_outlives_predicate(
400-
pred: ty::RegionOutlivesPredicate<'_>,
401-
) -> Option<WherePredicate> {
399+
fn clean_region_outlives_predicate(pred: ty::RegionOutlivesPredicate<'_>) -> WherePredicate {
402400
let ty::OutlivesPredicate(a, b) = pred;
403401

404-
Some(WherePredicate::RegionPredicate {
402+
WherePredicate::RegionPredicate {
405403
lifetime: clean_middle_region(a).expect("failed to clean lifetime"),
406404
bounds: vec![GenericBound::Outlives(
407405
clean_middle_region(b).expect("failed to clean bounds"),
408406
)],
409-
})
407+
}
410408
}
411409

412410
fn clean_type_outlives_predicate<'tcx>(
413411
pred: ty::Binder<'tcx, ty::TypeOutlivesPredicate<'tcx>>,
414412
cx: &mut DocContext<'tcx>,
415-
) -> Option<WherePredicate> {
413+
) -> WherePredicate {
416414
let ty::OutlivesPredicate(ty, lt) = pred.skip_binder();
417415

418-
Some(WherePredicate::BoundPredicate {
416+
WherePredicate::BoundPredicate {
419417
ty: clean_middle_ty(pred.rebind(ty), cx, None, None),
420418
bounds: vec![GenericBound::Outlives(
421419
clean_middle_region(lt).expect("failed to clean lifetimes"),
422420
)],
423421
bound_params: Vec::new(),
424-
})
422+
}
425423
}
426424

427425
fn clean_middle_term<'tcx>(
@@ -1860,7 +1858,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T
18601858

18611859
/// Returns `None` if the type could not be normalized
18621860
fn normalize<'tcx>(
1863-
cx: &mut DocContext<'tcx>,
1861+
cx: &DocContext<'tcx>,
18641862
ty: ty::Binder<'tcx, Ty<'tcx>>,
18651863
) -> Option<ty::Binder<'tcx, Ty<'tcx>>> {
18661864
// HACK: low-churn fix for #79459 while we wait for a trait normalization fix

src/tools/tidy/src/ui_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use ignore::Walk;
1717
const ENTRY_LIMIT: u32 = 901;
1818
// FIXME: The following limits should be reduced eventually.
1919

20-
const ISSUES_ENTRY_LIMIT: u32 = 1667;
20+
const ISSUES_ENTRY_LIMIT: u32 = 1679;
2121

2222
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
2323
"rs", // test source files

tests/ui/array-slice-vec/dst-raw-slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test bounds checking for DST raw slices
22

33
//@ run-fail
4-
//@ error-pattern:index out of bounds
4+
//@ check-run-results:index out of bounds
55
//@ ignore-emscripten no processes
66

77
#[allow(unconditional_panic)]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/dst-raw-slice.rs:11:18:
2+
index out of bounds: the len is 3 but the index is 3
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/array-slice-vec/vec-overrun.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:index out of bounds: the len is 1 but the index is 2
2+
//@ check-run-results:index out of bounds: the len is 1 but the index is 2
33
//@ ignore-emscripten no processes
44

55
fn main() {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/vec-overrun.rs:11:17:
2+
index out of bounds: the len is 1 but the index is 2
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// be talking about `async fn`s instead.
33

44
//@ run-fail
5-
//@ error-pattern: thread 'main' panicked
6-
//@ error-pattern: `async fn` resumed after completion
5+
//@ check-run-results: thread 'main' panicked
6+
//@ check-run-results: `async fn` resumed after completion
77
//@ edition:2018
88

99
#![feature(coroutines, coroutine_trait)]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-65419-async-fn-resume-after-completion.rs:11:16:
2+
`async fn` resumed after completion
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
//@ run-fail
55
//@ needs-unwind
6-
//@ error-pattern: thread 'main' panicked
7-
//@ error-pattern: `async fn` resumed after panicking
6+
//@ check-run-results: thread 'main' panicked
7+
//@ check-run-results: `async fn` resumed after panicking
88
//@ edition:2018
99

1010
#![feature(coroutines, coroutine_trait)]

0 commit comments

Comments
 (0)