From 70fe5a150d2aa28e704a30a6ce8c2219e4b98583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sat, 21 Dec 2024 19:08:30 +0000 Subject: [PATCH 1/3] Avoid ICE in borrowck Provide a fallback in `best_blame_constraint` when `find_constraint_paths_between_regions` doesn't have a result. This code is due a rework to avoid the letf-over `unwrap()`, but avoids the ICE caused by the repro. Fix #133252. --- .../rustc_borrowck/src/region_infer/mod.rs | 10 ++++-- ...entation-not-general-enough-ice-133252.rs} | 6 +++- ...ation-not-general-enough-ice-133252.stderr | 34 +++++++++++++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) rename tests/{crashes/133252.rs => ui/borrowck/implementation-not-general-enough-ice-133252.rs} (81%) create mode 100644 tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr diff --git a/compiler/rustc_borrowck/src/region_infer/mod.rs b/compiler/rustc_borrowck/src/region_infer/mod.rs index d39fbf32921ac..37e9319633511 100644 --- a/compiler/rustc_borrowck/src/region_infer/mod.rs +++ b/compiler/rustc_borrowck/src/region_infer/mod.rs @@ -1945,8 +1945,14 @@ impl<'tcx> RegionInferenceContext<'tcx> { target_test: impl Fn(RegionVid) -> bool, ) -> (BlameConstraint<'tcx>, Vec) { // Find all paths - let (path, target_region) = - self.find_constraint_paths_between_regions(from_region, target_test).unwrap(); + let (path, target_region) = self + .find_constraint_paths_between_regions(from_region, target_test) + .or_else(|| { + self.find_constraint_paths_between_regions(from_region, |r| { + self.cannot_name_placeholder(from_region, r) + }) + }) + .unwrap(); debug!( "path={:#?}", path.iter() diff --git a/tests/crashes/133252.rs b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.rs similarity index 81% rename from tests/crashes/133252.rs rename to tests/ui/borrowck/implementation-not-general-enough-ice-133252.rs index 3cecf448287bf..7ee16e62b9a74 100644 --- a/tests/crashes/133252.rs +++ b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.rs @@ -1,4 +1,4 @@ -//@ known-bug: #133252 +// Regression test for borrowck ICE #133252 //@ edition:2021 use std::future::Future; @@ -7,6 +7,8 @@ fn ice() -> impl Future { async { let not_static = 0; force_send(async_load(¬_static)); + //~^ ERROR implementation of `LoadQuery` is not general enough + //~| ERROR `not_static` does not live long enough loop {} } } @@ -41,3 +43,5 @@ impl Future for SimpleFuture { loop {} } } + +fn main() {} diff --git a/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr new file mode 100644 index 0000000000000..13c768dcbf636 --- /dev/null +++ b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr @@ -0,0 +1,34 @@ +error: implementation of `LoadQuery` is not general enough + --> $DIR/implementation-not-general-enough-ice-133252.rs:9:9 + | +LL | force_send(async_load(¬_static)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `LoadQuery` is not general enough + | + = note: `LoadQuery<'0>` would have to be implemented for the type `&u8`, for any lifetime `'0`... + = note: ...but `LoadQuery<'1>` is actually implemented for the type `&'1 u8`, for some specific lifetime `'1` + +error[E0597]: `not_static` does not live long enough + --> $DIR/implementation-not-general-enough-ice-133252.rs:9:31 + | +LL | async { + | - return type of async block is &(dyn Owned + '1) +LL | let not_static = 0; + | ---------- binding `not_static` declared here +LL | force_send(async_load(¬_static)); + | -----------^^^^^^^^^^^- + | | | + | | borrowed value does not live long enough + | argument requires that `not_static` is borrowed for `'1` +... +LL | } + | - `not_static` dropped here while still borrowed + | +note: due to current limitations in the borrow checker, this implies a `'static` lifetime + --> $DIR/implementation-not-general-enough-ice-133252.rs:16:18 + | +LL | fn force_send(_: T) {} + | ^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0597`. From f5c497529c5d06cf3171bae1c60d44a494fa0a3d Mon Sep 17 00:00:00 2001 From: "Alexis (Poliorcetics) Bourget" Date: Mon, 23 Dec 2024 23:44:45 +0100 Subject: [PATCH 2/3] nits: librustdoc::clean - librustdoc::clean::clean_lifetime doesn't need a mut doc context - librustdoc::clean::normalize doesn't need a mut doc context - move Some() wrapping up into `clean_predicate()` - simplify nested if in librustdoc::clean::record_extern_fqn() --- src/librustdoc/clean/mod.rs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 27b7d55f4d08b..3c9e0914b59d7 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -268,7 +268,7 @@ fn clean_poly_trait_ref_with_constraints<'tcx>( ) } -fn clean_lifetime(lifetime: &hir::Lifetime, cx: &mut DocContext<'_>) -> Lifetime { +fn clean_lifetime(lifetime: &hir::Lifetime, cx: &DocContext<'_>) -> Lifetime { if let Some( rbv::ResolvedArg::EarlyBound(did) | rbv::ResolvedArg::LateBound(_, _, did) @@ -362,9 +362,9 @@ pub(crate) fn clean_predicate<'tcx>( let bound_predicate = predicate.kind(); match bound_predicate.skip_binder() { ty::ClauseKind::Trait(pred) => clean_poly_trait_predicate(bound_predicate.rebind(pred), cx), - ty::ClauseKind::RegionOutlives(pred) => clean_region_outlives_predicate(pred), + ty::ClauseKind::RegionOutlives(pred) => Some(clean_region_outlives_predicate(pred)), ty::ClauseKind::TypeOutlives(pred) => { - clean_type_outlives_predicate(bound_predicate.rebind(pred), cx) + Some(clean_type_outlives_predicate(bound_predicate.rebind(pred), cx)) } ty::ClauseKind::Projection(pred) => { Some(clean_projection_predicate(bound_predicate.rebind(pred), cx)) @@ -396,32 +396,30 @@ fn clean_poly_trait_predicate<'tcx>( }) } -fn clean_region_outlives_predicate( - pred: ty::RegionOutlivesPredicate<'_>, -) -> Option { +fn clean_region_outlives_predicate(pred: ty::RegionOutlivesPredicate<'_>) -> WherePredicate { let ty::OutlivesPredicate(a, b) = pred; - Some(WherePredicate::RegionPredicate { + WherePredicate::RegionPredicate { lifetime: clean_middle_region(a).expect("failed to clean lifetime"), bounds: vec![GenericBound::Outlives( clean_middle_region(b).expect("failed to clean bounds"), )], - }) + } } fn clean_type_outlives_predicate<'tcx>( pred: ty::Binder<'tcx, ty::TypeOutlivesPredicate<'tcx>>, cx: &mut DocContext<'tcx>, -) -> Option { +) -> WherePredicate { let ty::OutlivesPredicate(ty, lt) = pred.skip_binder(); - Some(WherePredicate::BoundPredicate { + WherePredicate::BoundPredicate { ty: clean_middle_ty(pred.rebind(ty), cx, None, None), bounds: vec![GenericBound::Outlives( clean_middle_region(lt).expect("failed to clean lifetimes"), )], bound_params: Vec::new(), - }) + } } fn clean_middle_term<'tcx>( @@ -1860,7 +1858,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T /// Returns `None` if the type could not be normalized fn normalize<'tcx>( - cx: &mut DocContext<'tcx>, + cx: &DocContext<'tcx>, ty: ty::Binder<'tcx, Ty<'tcx>>, ) -> Option>> { // HACK: low-churn fix for #79459 while we wait for a trait normalization fix From e1a9affab42b4a52be942285b32c0f969bed2bb0 Mon Sep 17 00:00:00 2001 From: clubby789 Date: Mon, 25 Nov 2024 15:57:09 +0000 Subject: [PATCH 3/3] Use `check-run-results` for `run-fail` test stderr --- src/tools/tidy/src/ui_tests.rs | 2 +- tests/ui/array-slice-vec/dst-raw-slice.rs | 2 +- tests/ui/array-slice-vec/dst-raw-slice.run.stderr | 3 +++ tests/ui/array-slice-vec/vec-overrun.rs | 2 +- tests/ui/array-slice-vec/vec-overrun.run.stderr | 3 +++ .../issue-65419-async-fn-resume-after-completion.rs | 4 ++-- ...ssue-65419-async-fn-resume-after-completion.run.stderr | 3 +++ .../issue-65419-async-fn-resume-after-panic.rs | 4 ++-- .../issue-65419-async-fn-resume-after-panic.run.stderr | 5 +++++ .../issue-65419-coroutine-resume-after-completion.rs | 2 +- ...sue-65419-coroutine-resume-after-completion.run.stderr | 3 +++ tests/ui/binop/binop-fail-3.rs | 2 +- tests/ui/binop/binop-fail-3.run.stderr | 3 +++ tests/ui/binop/binop-panic.rs | 2 +- tests/ui/binop/binop-panic.run.stderr | 3 +++ tests/ui/binop/binop-panic.run.stdout | 1 + tests/ui/borrowck/borrowck-local-borrow.rs | 2 +- tests/ui/borrowck/borrowck-local-borrow.run.stderr | 3 +++ tests/ui/borrowck/issue-28934.rs | 2 +- tests/ui/borrowck/issue-28934.run.stderr | 3 +++ tests/ui/closures/diverging-closure.rs | 2 +- tests/ui/closures/diverging-closure.run.stderr | 3 +++ tests/ui/consts/issue-29798.rs | 2 +- tests/ui/consts/issue-29798.run.stderr | 3 +++ tests/ui/coroutine/coroutine-resume-after-panic.rs | 2 +- .../ui/coroutine/coroutine-resume-after-panic.run.stderr | 5 +++++ tests/ui/expr/if/expr-if-panic-fn.rs | 2 +- tests/ui/expr/if/expr-if-panic-fn.run.stderr | 3 +++ tests/ui/expr/if/expr-if-panic.rs | 2 +- tests/ui/expr/if/expr-if-panic.run.stderr | 3 +++ tests/ui/expr/if/if-check-panic.rs | 2 +- tests/ui/expr/if/if-check-panic.run.stderr | 3 +++ tests/ui/expr/if/if-cond-bot.rs | 2 +- tests/ui/expr/if/if-cond-bot.run.stderr | 3 +++ tests/ui/expr/if/if-cond-bot.run.stdout | 1 + tests/ui/extern/issue-18576.rs | 2 +- tests/ui/extern/issue-18576.run.stderr | 3 +++ tests/ui/fn/expr-fn-panic.rs | 2 +- tests/ui/fn/expr-fn-panic.run.stderr | 3 +++ tests/ui/hashmap/hashmap-capacity-overflow.rs | 1 + tests/ui/imports/glob-use-std.rs | 2 +- tests/ui/imports/glob-use-std.run.stderr | 3 +++ tests/ui/issues/issue-12920.rs | 2 +- tests/ui/issues/issue-12920.run.stderr | 3 +++ tests/ui/issues/issue-13202.rs | 2 +- tests/ui/issues/issue-13202.run.stderr | 3 +++ tests/ui/issues/issue-20971.rs | 2 +- tests/ui/issues/issue-20971.run.stderr | 3 +++ tests/ui/issues/issue-23354-2.rs | 2 +- tests/ui/issues/issue-23354-2.run.stderr | 3 +++ tests/ui/issues/issue-23354.rs | 2 +- tests/ui/issues/issue-23354.run.stderr | 3 +++ tests/ui/issues/issue-2761.rs | 2 +- tests/ui/issues/issue-2761.run.stderr | 3 +++ tests/ui/issues/issue-3029.rs | 2 +- tests/ui/issues/issue-3029.run.stderr | 3 +++ tests/ui/issues/issue-30380.rs | 2 +- tests/ui/issues/issue-30380.run.stderr | 3 +++ tests/ui/issues/issue-44216-add-instant.rs | 2 +- tests/ui/issues/issue-44216-add-instant.run.stderr | 3 +++ tests/ui/issues/issue-44216-add-system-time.rs | 2 +- tests/ui/issues/issue-44216-add-system-time.run.stderr | 3 +++ tests/ui/issues/issue-44216-sub-instant.rs | 2 +- tests/ui/issues/issue-44216-sub-instant.run.stderr | 3 +++ tests/ui/issues/issue-44216-sub-system-time.rs | 2 +- tests/ui/issues/issue-44216-sub-system-time.run.stderr | 3 +++ tests/ui/loops/for-each-loop-panic.rs | 2 +- tests/ui/loops/for-each-loop-panic.run.stderr | 3 +++ tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs | 2 +- .../ui/loops/issue-69225-SCEVAddExpr-wrap-flag.run.stderr | 3 +++ tests/ui/loops/issue-69225-layout-repeated-checked-add.rs | 2 +- .../issue-69225-layout-repeated-checked-add.run.stderr | 4 ++++ tests/ui/macros/assert-as-macro.rs | 2 +- tests/ui/macros/assert-as-macro.run.stderr | 3 +++ tests/ui/macros/assert-eq-macro-msg.rs | 6 +++--- tests/ui/macros/assert-eq-macro-msg.run.stderr | 5 +++++ tests/ui/macros/assert-eq-macro-panic.rs | 6 +++--- tests/ui/macros/assert-eq-macro-panic.run.stderr | 5 +++++ tests/ui/macros/assert-macro-explicit.rs | 2 +- tests/ui/macros/assert-macro-explicit.run.stderr | 3 +++ tests/ui/macros/assert-macro-fmt.rs | 4 ++-- tests/ui/macros/assert-macro-fmt.run.stderr | 3 +++ tests/ui/macros/assert-macro-owned.rs | 4 ++-- tests/ui/macros/assert-macro-owned.run.stderr | 3 +++ tests/ui/macros/assert-macro-static.rs | 4 ++-- tests/ui/macros/assert-macro-static.run.stderr | 3 +++ tests/ui/macros/assert-matches-macro-msg.rs | 6 +++--- tests/ui/macros/assert-matches-macro-msg.run.stderr | 5 +++++ tests/ui/macros/assert-ne-macro-msg.rs | 6 +++--- tests/ui/macros/assert-ne-macro-msg.run.stderr | 5 +++++ tests/ui/macros/assert-ne-macro-panic.rs | 6 +++--- tests/ui/macros/assert-ne-macro-panic.run.stderr | 5 +++++ tests/ui/macros/die-macro-2.rs | 2 +- tests/ui/macros/die-macro-2.run.stderr | 3 +++ tests/ui/macros/die-macro-expr.rs | 2 +- tests/ui/macros/die-macro-expr.run.stderr | 3 +++ tests/ui/macros/die-macro-pure.rs | 2 +- tests/ui/macros/die-macro-pure.run.stderr | 3 +++ tests/ui/macros/unimplemented-macro-panic.rs | 2 +- tests/ui/macros/unimplemented-macro-panic.run.stderr | 3 +++ tests/ui/macros/unreachable-fmt-msg.rs | 2 +- tests/ui/macros/unreachable-fmt-msg.run.stderr | 3 +++ tests/ui/macros/unreachable-macro-panic.rs | 2 +- tests/ui/macros/unreachable-macro-panic.run.stderr | 3 +++ tests/ui/macros/unreachable-static-msg.rs | 2 +- tests/ui/macros/unreachable-static-msg.run.stderr | 3 +++ tests/ui/macros/unreachable.rs | 2 +- tests/ui/macros/unreachable.run.stderr | 3 +++ tests/ui/match/expr-match-panic-fn.rs | 2 +- tests/ui/match/expr-match-panic-fn.run.stderr | 3 +++ tests/ui/match/expr-match-panic.rs | 2 +- tests/ui/match/expr-match-panic.run.stderr | 3 +++ tests/ui/match/match-bot-panic.rs | 2 +- tests/ui/match/match-bot-panic.run.stderr | 3 +++ tests/ui/match/match-disc-bot.rs | 2 +- tests/ui/match/match-disc-bot.run.stderr | 3 +++ tests/ui/match/match-wildcards.rs | 2 +- tests/ui/match/match-wildcards.run.stderr | 3 +++ tests/ui/mir/mir_codegen_calls_converging_drops.rs | 6 +++--- .../ui/mir/mir_codegen_calls_converging_drops.run.stderr | 5 +++++ tests/ui/mir/mir_codegen_calls_converging_drops_2.rs | 6 +++--- .../mir/mir_codegen_calls_converging_drops_2.run.stderr | 5 +++++ tests/ui/mir/mir_codegen_calls_diverging.rs | 2 +- tests/ui/mir/mir_codegen_calls_diverging.run.stderr | 3 +++ tests/ui/mir/mir_codegen_calls_diverging_drops.rs | 4 ++-- tests/ui/mir/mir_codegen_calls_diverging_drops.run.stderr | 4 ++++ tests/ui/mir/mir_drop_panics.rs | 4 ++-- tests/ui/mir/mir_drop_panics.run.stderr | 4 ++++ tests/ui/mir/mir_dynamic_drops_1.rs | 4 ++-- tests/ui/mir/mir_dynamic_drops_1.run.stderr | 5 +++++ tests/ui/mir/mir_dynamic_drops_2.rs | 2 +- tests/ui/mir/mir_dynamic_drops_2.run.stderr | 4 ++++ tests/ui/mir/mir_dynamic_drops_3.rs | 8 ++++---- tests/ui/mir/mir_dynamic_drops_3.run.stderr | 6 ++++++ tests/ui/mir/mir_indexing_oob_1.rs | 2 +- tests/ui/mir/mir_indexing_oob_1.run.stderr | 3 +++ tests/ui/mir/mir_indexing_oob_2.rs | 2 +- tests/ui/mir/mir_indexing_oob_2.run.stderr | 3 +++ tests/ui/mir/mir_indexing_oob_3.rs | 2 +- tests/ui/mir/mir_indexing_oob_3.run.stderr | 3 +++ tests/ui/never_type/return-never-coerce.rs | 2 +- tests/ui/never_type/return-never-coerce.run.stderr | 3 +++ tests/ui/nll/issue-51345-2.rs | 4 ++-- tests/ui/nll/issue-51345-2.run.stderr | 3 +++ tests/ui/numbers-arithmetic/divide-by-zero.rs | 2 +- tests/ui/numbers-arithmetic/divide-by-zero.run.stderr | 3 +++ .../ui/numbers-arithmetic/location-add-assign-overflow.rs | 2 +- .../location-add-assign-overflow.run.stderr | 3 +++ tests/ui/numbers-arithmetic/location-add-overflow.rs | 2 +- .../numbers-arithmetic/location-add-overflow.run.stderr | 3 +++ .../numbers-arithmetic/location-divide-assign-by-zero.rs | 2 +- .../location-divide-assign-by-zero.run.stderr | 3 +++ tests/ui/numbers-arithmetic/location-divide-by-zero.rs | 2 +- .../numbers-arithmetic/location-divide-by-zero.run.stderr | 3 +++ .../ui/numbers-arithmetic/location-mod-assign-by-zero.rs | 2 +- .../location-mod-assign-by-zero.run.stderr | 3 +++ tests/ui/numbers-arithmetic/location-mod-by-zero.rs | 2 +- .../ui/numbers-arithmetic/location-mod-by-zero.run.stderr | 3 +++ .../ui/numbers-arithmetic/location-mul-assign-overflow.rs | 2 +- .../location-mul-assign-overflow.run.stderr | 3 +++ tests/ui/numbers-arithmetic/location-mul-overflow.rs | 2 +- .../numbers-arithmetic/location-mul-overflow.run.stderr | 3 +++ .../ui/numbers-arithmetic/location-sub-assign-overflow.rs | 2 +- .../location-sub-assign-overflow.run.stderr | 3 +++ tests/ui/numbers-arithmetic/location-sub-overflow.rs | 2 +- .../numbers-arithmetic/location-sub-overflow.run.stderr | 3 +++ tests/ui/numbers-arithmetic/mod-zero.rs | 2 +- tests/ui/numbers-arithmetic/mod-zero.run.stderr | 3 +++ tests/ui/numbers-arithmetic/overflowing-add.rs | 4 ++-- tests/ui/numbers-arithmetic/overflowing-add.run.stderr | 3 +++ tests/ui/numbers-arithmetic/overflowing-mul.rs | 4 ++-- tests/ui/numbers-arithmetic/overflowing-mul.run.stderr | 3 +++ tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs | 2 +- .../numbers-arithmetic/overflowing-neg-nonzero.run.stderr | 3 +++ tests/ui/numbers-arithmetic/overflowing-pow-signed.rs | 4 ++-- .../numbers-arithmetic/overflowing-pow-signed.run.stderr | 3 +++ tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs | 4 ++-- .../overflowing-pow-unsigned.run.stderr | 3 +++ tests/ui/numbers-arithmetic/overflowing-sub.rs | 4 ++-- tests/ui/numbers-arithmetic/overflowing-sub.run.stderr | 3 +++ tests/ui/numbers-arithmetic/promoted_overflow.rs | 2 +- tests/ui/numbers-arithmetic/promoted_overflow.run.stderr | 3 +++ tests/ui/panic-runtime/unwind-interleaved.rs | 2 +- tests/ui/panic-runtime/unwind-interleaved.run.stderr | 3 +++ tests/ui/panic-runtime/unwind-rec.rs | 2 +- tests/ui/panic-runtime/unwind-rec.run.stderr | 3 +++ tests/ui/panic-runtime/unwind-rec2.rs | 2 +- tests/ui/panic-runtime/unwind-rec2.run.stderr | 3 +++ tests/ui/panic-runtime/unwind-unique.rs | 2 +- tests/ui/panic-runtime/unwind-unique.run.stderr | 3 +++ tests/ui/panics/args-panic.rs | 2 +- tests/ui/panics/args-panic.run.stderr | 3 +++ tests/ui/panics/doublepanic.rs | 2 +- tests/ui/panics/doublepanic.run.stderr | 3 +++ tests/ui/panics/explicit-panic-msg.rs | 2 +- tests/ui/panics/explicit-panic-msg.run.stderr | 3 +++ tests/ui/panics/explicit-panic.rs | 2 +- tests/ui/panics/explicit-panic.run.stderr | 3 +++ tests/ui/panics/fmt-panic.rs | 2 +- tests/ui/panics/fmt-panic.run.stderr | 3 +++ tests/ui/panics/main-panic.rs | 2 +- tests/ui/panics/main-panic.run.stderr | 3 +++ tests/ui/panics/panic-arg.rs | 2 +- tests/ui/panics/panic-arg.run.stderr | 3 +++ tests/ui/panics/panic-in-cleanup.rs | 2 +- tests/ui/panics/panic-in-ffi.rs | 4 ++-- tests/ui/panics/panic-in-message-fmt.rs | 2 +- tests/ui/panics/panic-macro-any-wrapped.rs | 4 ++-- tests/ui/panics/panic-macro-any-wrapped.run.stderr | 3 +++ tests/ui/panics/panic-macro-any.rs | 4 ++-- tests/ui/panics/panic-macro-any.run.stderr | 3 +++ tests/ui/panics/panic-macro-explicit.rs | 4 ++-- tests/ui/panics/panic-macro-explicit.run.stderr | 3 +++ tests/ui/panics/panic-macro-fmt.rs | 4 ++-- tests/ui/panics/panic-macro-fmt.run.stderr | 3 +++ tests/ui/panics/panic-macro-owned.rs | 4 ++-- tests/ui/panics/panic-macro-owned.run.stderr | 3 +++ tests/ui/panics/panic-macro-static.rs | 4 ++-- tests/ui/panics/panic-macro-static.run.stderr | 3 +++ tests/ui/panics/panic-main.rs | 2 +- tests/ui/panics/panic-main.run.stderr | 3 +++ tests/ui/panics/panic-parens.rs | 2 +- tests/ui/panics/panic-parens.run.stderr | 3 +++ tests/ui/panics/panic-set-handler.rs | 2 +- tests/ui/panics/panic-set-handler.run.stderr | 1 + tests/ui/panics/panic-set-unset-handler.rs | 4 ++-- tests/ui/panics/panic-set-unset-handler.run.stderr | 3 +++ tests/ui/panics/panic-take-handler-nop.rs | 4 ++-- tests/ui/panics/panic-take-handler-nop.run.stderr | 3 +++ tests/ui/panics/panic-task-name-none.rs | 4 ++-- tests/ui/panics/panic-task-name-none.run.stderr | 5 +++++ tests/ui/panics/panic-task-name-owned.rs | 4 ++-- tests/ui/panics/panic-task-name-owned.run.stderr | 5 +++++ tests/ui/panics/panic.rs | 2 +- tests/ui/panics/panic.run.stderr | 3 +++ tests/ui/panics/result-get-panic.rs | 2 +- tests/ui/panics/result-get-panic.run.stderr | 3 +++ tests/ui/panics/unique-panic.rs | 2 +- tests/ui/panics/unique-panic.run.stderr | 3 +++ tests/ui/panics/while-body-panics.rs | 2 +- tests/ui/panics/while-body-panics.run.stderr | 3 +++ tests/ui/panics/while-panic.rs | 2 +- tests/ui/panics/while-panic.run.stderr | 3 +++ tests/ui/precondition-checks/alignment.rs | 2 +- tests/ui/precondition-checks/alignment.run.stderr | 4 ++++ .../ui/precondition-checks/ascii-char-digit_unchecked.rs | 2 +- .../ascii-char-digit_unchecked.run.stderr | 4 ++++ tests/ui/precondition-checks/assert_unchecked.rs | 2 +- tests/ui/precondition-checks/assert_unchecked.run.stderr | 4 ++++ tests/ui/precondition-checks/char-from_u32_unchecked.rs | 2 +- .../char-from_u32_unchecked.run.stderr | 4 ++++ .../copy-nonoverlapping.misaligned_dst.run.stderr | 4 ++++ .../copy-nonoverlapping.misaligned_src.run.stderr | 4 ++++ .../copy-nonoverlapping.null_dst.run.stderr | 4 ++++ .../copy-nonoverlapping.null_src.run.stderr | 4 ++++ .../copy-nonoverlapping.overlapping.run.stderr | 4 ++++ tests/ui/precondition-checks/copy-nonoverlapping.rs | 2 +- .../ui/precondition-checks/copy.misaligned_dst.run.stderr | 4 ++++ .../ui/precondition-checks/copy.misaligned_src.run.stderr | 4 ++++ tests/ui/precondition-checks/copy.null_dst.run.stderr | 4 ++++ tests/ui/precondition-checks/copy.null_src.run.stderr | 4 ++++ tests/ui/precondition-checks/copy.rs | 2 +- tests/ui/precondition-checks/layout.badalign.run.stderr | 4 ++++ tests/ui/precondition-checks/layout.rs | 2 +- tests/ui/precondition-checks/layout.toolarge.run.stderr | 4 ++++ tests/ui/precondition-checks/nonnull.rs | 2 +- tests/ui/precondition-checks/nonnull.run.stderr | 4 ++++ .../ui/precondition-checks/nonzero-from_mut_unchecked.rs | 2 +- .../nonzero-from_mut_unchecked.run.stderr | 4 ++++ tests/ui/precondition-checks/nonzero-new_unchecked.rs | 2 +- .../precondition-checks/nonzero-new_unchecked.run.stderr | 4 ++++ tests/ui/precondition-checks/read.rs | 2 +- .../read_volatile.misaligned.run.stderr | 4 ++++ .../ui/precondition-checks/read_volatile.null.run.stderr | 4 ++++ tests/ui/precondition-checks/read_volatile.rs | 2 +- .../ui/precondition-checks/replace.misaligned.run.stderr | 4 ++++ tests/ui/precondition-checks/replace.null.run.stderr | 4 ++++ tests/ui/precondition-checks/replace.rs | 2 +- .../slice-from-raw-parts-mut.misaligned.run.stderr | 4 ++++ .../slice-from-raw-parts-mut.null.run.stderr | 4 ++++ tests/ui/precondition-checks/slice-from-raw-parts-mut.rs | 2 +- .../slice-from-raw-parts-mut.toolarge.run.stderr | 4 ++++ .../slice-from-raw-parts.misaligned.run.stderr | 4 ++++ .../slice-from-raw-parts.null.run.stderr | 4 ++++ tests/ui/precondition-checks/slice-from-raw-parts.rs | 2 +- .../slice-from-raw-parts.toolarge.run.stderr | 4 ++++ .../slice-get_unchecked.backwards_range.run.stderr | 4 ++++ .../slice-get_unchecked.range.run.stderr | 4 ++++ .../slice-get_unchecked.range_from.run.stderr | 4 ++++ .../slice-get_unchecked.range_to.run.stderr | 4 ++++ tests/ui/precondition-checks/slice-get_unchecked.rs | 2 +- .../slice-get_unchecked.usize.run.stderr | 4 ++++ .../slice-get_unchecked_mut.backwards_range.run.stderr | 4 ++++ .../slice-get_unchecked_mut.range.run.stderr | 4 ++++ .../slice-get_unchecked_mut.range_from.run.stderr | 4 ++++ .../slice-get_unchecked_mut.range_to.run.stderr | 4 ++++ tests/ui/precondition-checks/slice-get_unchecked_mut.rs | 2 +- .../slice-get_unchecked_mut.usize.run.stderr | 4 ++++ .../slice-swap_unchecked.oob_a.run.stderr | 3 +++ .../slice-swap_unchecked.oob_b.run.stderr | 3 +++ tests/ui/precondition-checks/slice-swap_unchecked.rs | 2 +- .../str-get_unchecked.backwards_range.run.stderr | 4 ++++ .../str-get_unchecked.range.run.stderr | 4 ++++ .../str-get_unchecked.range_from.run.stderr | 4 ++++ .../str-get_unchecked.range_to.run.stderr | 4 ++++ tests/ui/precondition-checks/str-get_unchecked.rs | 2 +- .../str-get_unchecked_mut.backwards_range.run.stderr | 4 ++++ .../str-get_unchecked_mut.range.run.stderr | 4 ++++ .../str-get_unchecked_mut.range_from.run.stderr | 4 ++++ .../str-get_unchecked_mut.range_to.run.stderr | 4 ++++ tests/ui/precondition-checks/str-get_unchecked_mut.rs | 2 +- .../swap-nonoverlapping.misaligned_dst.run.stderr | 4 ++++ .../swap-nonoverlapping.misaligned_src.run.stderr | 4 ++++ .../swap-nonoverlapping.null_dst.run.stderr | 4 ++++ .../swap-nonoverlapping.null_src.run.stderr | 4 ++++ .../swap-nonoverlapping.overlapping.run.stderr | 4 ++++ tests/ui/precondition-checks/swap-nonoverlapping.rs | 2 +- tests/ui/precondition-checks/unchecked_add.rs | 2 +- tests/ui/precondition-checks/unchecked_add.run.stderr | 4 ++++ tests/ui/precondition-checks/unchecked_mul.rs | 2 +- tests/ui/precondition-checks/unchecked_mul.run.stderr | 4 ++++ tests/ui/precondition-checks/unchecked_shl.rs | 2 +- tests/ui/precondition-checks/unchecked_shl.run.stderr | 4 ++++ tests/ui/precondition-checks/unchecked_shr.rs | 2 +- tests/ui/precondition-checks/unchecked_shr.run.stderr | 4 ++++ tests/ui/precondition-checks/unchecked_sub.rs | 2 +- tests/ui/precondition-checks/unchecked_sub.run.stderr | 4 ++++ tests/ui/precondition-checks/unreachable_unchecked.rs | 2 +- .../precondition-checks/unreachable_unchecked.run.stderr | 4 ++++ tests/ui/precondition-checks/write.rs | 2 +- tests/ui/precondition-checks/write_bytes.rs | 2 +- .../write_volatile.misaligned.run.stderr | 4 ++++ .../ui/precondition-checks/write_volatile.null.run.stderr | 4 ++++ tests/ui/precondition-checks/write_volatile.rs | 2 +- tests/ui/process/tls-exit-status.rs | 2 +- tests/ui/process/tls-exit-status.run.stderr | 3 +++ tests/ui/reachable/issue-948.rs | 2 +- tests/ui/reachable/issue-948.run.stderr | 3 +++ .../termination-trait-for-box-dyn-error-err.rs | 2 +- .../termination-trait-for-box-dyn-error-err.run.stderr | 1 + .../termination-trait-for-never.rs | 2 +- .../termination-trait-for-never.run.stderr | 3 +++ .../termination-trait-for-result-box-error_err.rs | 2 +- .../termination-trait-for-result-box-error_err.run.stderr | 1 + .../termination-trait-for-str-err.rs | 2 +- .../termination-trait-for-str-err.run.stderr | 1 + tests/ui/sanitizer/address.rs | 4 ++-- tests/ui/sanitizer/hwaddress.rs | 2 +- tests/ui/sanitizer/leak.rs | 2 +- tests/ui/sanitizer/memory-eager.rs | 6 +++--- tests/ui/sanitizer/memory.rs | 6 +++--- tests/ui/sanitizer/new-llvm-pass-manager-thin-lto.rs | 2 +- tests/ui/sanitizer/thread.rs | 6 +++--- tests/ui/sanitizer/use-after-scope.rs | 2 +- tests/ui/str/str-overrun.rs | 2 +- tests/ui/str/str-overrun.run.stderr | 3 +++ tests/ui/structs/rhs-type.rs | 2 +- tests/ui/structs/rhs-type.run.stderr | 3 +++ tests/ui/threads-sendsync/task-spawn-barefn.rs | 2 +- tests/ui/threads-sendsync/task-spawn-barefn.run.stderr | 5 +++++ tests/ui/threads-sendsync/test-tasks-invalid-value.rs | 2 +- .../threads-sendsync/test-tasks-invalid-value.run.stderr | 3 +++ 362 files changed, 873 insertions(+), 219 deletions(-) create mode 100644 tests/ui/array-slice-vec/dst-raw-slice.run.stderr create mode 100644 tests/ui/array-slice-vec/vec-overrun.run.stderr create mode 100644 tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.run.stderr create mode 100644 tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.run.stderr create mode 100644 tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.run.stderr create mode 100644 tests/ui/binop/binop-fail-3.run.stderr create mode 100644 tests/ui/binop/binop-panic.run.stderr create mode 100644 tests/ui/binop/binop-panic.run.stdout create mode 100644 tests/ui/borrowck/borrowck-local-borrow.run.stderr create mode 100644 tests/ui/borrowck/issue-28934.run.stderr create mode 100644 tests/ui/closures/diverging-closure.run.stderr create mode 100644 tests/ui/consts/issue-29798.run.stderr create mode 100644 tests/ui/coroutine/coroutine-resume-after-panic.run.stderr create mode 100644 tests/ui/expr/if/expr-if-panic-fn.run.stderr create mode 100644 tests/ui/expr/if/expr-if-panic.run.stderr create mode 100644 tests/ui/expr/if/if-check-panic.run.stderr create mode 100644 tests/ui/expr/if/if-cond-bot.run.stderr create mode 100644 tests/ui/expr/if/if-cond-bot.run.stdout create mode 100644 tests/ui/extern/issue-18576.run.stderr create mode 100644 tests/ui/fn/expr-fn-panic.run.stderr create mode 100644 tests/ui/imports/glob-use-std.run.stderr create mode 100644 tests/ui/issues/issue-12920.run.stderr create mode 100644 tests/ui/issues/issue-13202.run.stderr create mode 100644 tests/ui/issues/issue-20971.run.stderr create mode 100644 tests/ui/issues/issue-23354-2.run.stderr create mode 100644 tests/ui/issues/issue-23354.run.stderr create mode 100644 tests/ui/issues/issue-2761.run.stderr create mode 100644 tests/ui/issues/issue-3029.run.stderr create mode 100644 tests/ui/issues/issue-30380.run.stderr create mode 100644 tests/ui/issues/issue-44216-add-instant.run.stderr create mode 100644 tests/ui/issues/issue-44216-add-system-time.run.stderr create mode 100644 tests/ui/issues/issue-44216-sub-instant.run.stderr create mode 100644 tests/ui/issues/issue-44216-sub-system-time.run.stderr create mode 100644 tests/ui/loops/for-each-loop-panic.run.stderr create mode 100644 tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.run.stderr create mode 100644 tests/ui/loops/issue-69225-layout-repeated-checked-add.run.stderr create mode 100644 tests/ui/macros/assert-as-macro.run.stderr create mode 100644 tests/ui/macros/assert-eq-macro-msg.run.stderr create mode 100644 tests/ui/macros/assert-eq-macro-panic.run.stderr create mode 100644 tests/ui/macros/assert-macro-explicit.run.stderr create mode 100644 tests/ui/macros/assert-macro-fmt.run.stderr create mode 100644 tests/ui/macros/assert-macro-owned.run.stderr create mode 100644 tests/ui/macros/assert-macro-static.run.stderr create mode 100644 tests/ui/macros/assert-matches-macro-msg.run.stderr create mode 100644 tests/ui/macros/assert-ne-macro-msg.run.stderr create mode 100644 tests/ui/macros/assert-ne-macro-panic.run.stderr create mode 100644 tests/ui/macros/die-macro-2.run.stderr create mode 100644 tests/ui/macros/die-macro-expr.run.stderr create mode 100644 tests/ui/macros/die-macro-pure.run.stderr create mode 100644 tests/ui/macros/unimplemented-macro-panic.run.stderr create mode 100644 tests/ui/macros/unreachable-fmt-msg.run.stderr create mode 100644 tests/ui/macros/unreachable-macro-panic.run.stderr create mode 100644 tests/ui/macros/unreachable-static-msg.run.stderr create mode 100644 tests/ui/macros/unreachable.run.stderr create mode 100644 tests/ui/match/expr-match-panic-fn.run.stderr create mode 100644 tests/ui/match/expr-match-panic.run.stderr create mode 100644 tests/ui/match/match-bot-panic.run.stderr create mode 100644 tests/ui/match/match-disc-bot.run.stderr create mode 100644 tests/ui/match/match-wildcards.run.stderr create mode 100644 tests/ui/mir/mir_codegen_calls_converging_drops.run.stderr create mode 100644 tests/ui/mir/mir_codegen_calls_converging_drops_2.run.stderr create mode 100644 tests/ui/mir/mir_codegen_calls_diverging.run.stderr create mode 100644 tests/ui/mir/mir_codegen_calls_diverging_drops.run.stderr create mode 100644 tests/ui/mir/mir_drop_panics.run.stderr create mode 100644 tests/ui/mir/mir_dynamic_drops_1.run.stderr create mode 100644 tests/ui/mir/mir_dynamic_drops_2.run.stderr create mode 100644 tests/ui/mir/mir_dynamic_drops_3.run.stderr create mode 100644 tests/ui/mir/mir_indexing_oob_1.run.stderr create mode 100644 tests/ui/mir/mir_indexing_oob_2.run.stderr create mode 100644 tests/ui/mir/mir_indexing_oob_3.run.stderr create mode 100644 tests/ui/never_type/return-never-coerce.run.stderr create mode 100644 tests/ui/nll/issue-51345-2.run.stderr create mode 100644 tests/ui/numbers-arithmetic/divide-by-zero.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-add-assign-overflow.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-add-overflow.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-divide-assign-by-zero.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-divide-by-zero.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-mod-assign-by-zero.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-mod-by-zero.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-mul-assign-overflow.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-mul-overflow.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-sub-assign-overflow.run.stderr create mode 100644 tests/ui/numbers-arithmetic/location-sub-overflow.run.stderr create mode 100644 tests/ui/numbers-arithmetic/mod-zero.run.stderr create mode 100644 tests/ui/numbers-arithmetic/overflowing-add.run.stderr create mode 100644 tests/ui/numbers-arithmetic/overflowing-mul.run.stderr create mode 100644 tests/ui/numbers-arithmetic/overflowing-neg-nonzero.run.stderr create mode 100644 tests/ui/numbers-arithmetic/overflowing-pow-signed.run.stderr create mode 100644 tests/ui/numbers-arithmetic/overflowing-pow-unsigned.run.stderr create mode 100644 tests/ui/numbers-arithmetic/overflowing-sub.run.stderr create mode 100644 tests/ui/numbers-arithmetic/promoted_overflow.run.stderr create mode 100644 tests/ui/panic-runtime/unwind-interleaved.run.stderr create mode 100644 tests/ui/panic-runtime/unwind-rec.run.stderr create mode 100644 tests/ui/panic-runtime/unwind-rec2.run.stderr create mode 100644 tests/ui/panic-runtime/unwind-unique.run.stderr create mode 100644 tests/ui/panics/args-panic.run.stderr create mode 100644 tests/ui/panics/doublepanic.run.stderr create mode 100644 tests/ui/panics/explicit-panic-msg.run.stderr create mode 100644 tests/ui/panics/explicit-panic.run.stderr create mode 100644 tests/ui/panics/fmt-panic.run.stderr create mode 100644 tests/ui/panics/main-panic.run.stderr create mode 100644 tests/ui/panics/panic-arg.run.stderr create mode 100644 tests/ui/panics/panic-macro-any-wrapped.run.stderr create mode 100644 tests/ui/panics/panic-macro-any.run.stderr create mode 100644 tests/ui/panics/panic-macro-explicit.run.stderr create mode 100644 tests/ui/panics/panic-macro-fmt.run.stderr create mode 100644 tests/ui/panics/panic-macro-owned.run.stderr create mode 100644 tests/ui/panics/panic-macro-static.run.stderr create mode 100644 tests/ui/panics/panic-main.run.stderr create mode 100644 tests/ui/panics/panic-parens.run.stderr create mode 100644 tests/ui/panics/panic-set-handler.run.stderr create mode 100644 tests/ui/panics/panic-set-unset-handler.run.stderr create mode 100644 tests/ui/panics/panic-take-handler-nop.run.stderr create mode 100644 tests/ui/panics/panic-task-name-none.run.stderr create mode 100644 tests/ui/panics/panic-task-name-owned.run.stderr create mode 100644 tests/ui/panics/panic.run.stderr create mode 100644 tests/ui/panics/result-get-panic.run.stderr create mode 100644 tests/ui/panics/unique-panic.run.stderr create mode 100644 tests/ui/panics/while-body-panics.run.stderr create mode 100644 tests/ui/panics/while-panic.run.stderr create mode 100644 tests/ui/precondition-checks/alignment.run.stderr create mode 100644 tests/ui/precondition-checks/ascii-char-digit_unchecked.run.stderr create mode 100644 tests/ui/precondition-checks/assert_unchecked.run.stderr create mode 100644 tests/ui/precondition-checks/char-from_u32_unchecked.run.stderr create mode 100644 tests/ui/precondition-checks/copy-nonoverlapping.misaligned_dst.run.stderr create mode 100644 tests/ui/precondition-checks/copy-nonoverlapping.misaligned_src.run.stderr create mode 100644 tests/ui/precondition-checks/copy-nonoverlapping.null_dst.run.stderr create mode 100644 tests/ui/precondition-checks/copy-nonoverlapping.null_src.run.stderr create mode 100644 tests/ui/precondition-checks/copy-nonoverlapping.overlapping.run.stderr create mode 100644 tests/ui/precondition-checks/copy.misaligned_dst.run.stderr create mode 100644 tests/ui/precondition-checks/copy.misaligned_src.run.stderr create mode 100644 tests/ui/precondition-checks/copy.null_dst.run.stderr create mode 100644 tests/ui/precondition-checks/copy.null_src.run.stderr create mode 100644 tests/ui/precondition-checks/layout.badalign.run.stderr create mode 100644 tests/ui/precondition-checks/layout.toolarge.run.stderr create mode 100644 tests/ui/precondition-checks/nonnull.run.stderr create mode 100644 tests/ui/precondition-checks/nonzero-from_mut_unchecked.run.stderr create mode 100644 tests/ui/precondition-checks/nonzero-new_unchecked.run.stderr create mode 100644 tests/ui/precondition-checks/read_volatile.misaligned.run.stderr create mode 100644 tests/ui/precondition-checks/read_volatile.null.run.stderr create mode 100644 tests/ui/precondition-checks/replace.misaligned.run.stderr create mode 100644 tests/ui/precondition-checks/replace.null.run.stderr create mode 100644 tests/ui/precondition-checks/slice-from-raw-parts-mut.misaligned.run.stderr create mode 100644 tests/ui/precondition-checks/slice-from-raw-parts-mut.null.run.stderr create mode 100644 tests/ui/precondition-checks/slice-from-raw-parts-mut.toolarge.run.stderr create mode 100644 tests/ui/precondition-checks/slice-from-raw-parts.misaligned.run.stderr create mode 100644 tests/ui/precondition-checks/slice-from-raw-parts.null.run.stderr create mode 100644 tests/ui/precondition-checks/slice-from-raw-parts.toolarge.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked.backwards_range.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked.range.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked.range_from.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked.range_to.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked.usize.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked_mut.backwards_range.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked_mut.range.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked_mut.range_from.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked_mut.range_to.run.stderr create mode 100644 tests/ui/precondition-checks/slice-get_unchecked_mut.usize.run.stderr create mode 100644 tests/ui/precondition-checks/slice-swap_unchecked.oob_a.run.stderr create mode 100644 tests/ui/precondition-checks/slice-swap_unchecked.oob_b.run.stderr create mode 100644 tests/ui/precondition-checks/str-get_unchecked.backwards_range.run.stderr create mode 100644 tests/ui/precondition-checks/str-get_unchecked.range.run.stderr create mode 100644 tests/ui/precondition-checks/str-get_unchecked.range_from.run.stderr create mode 100644 tests/ui/precondition-checks/str-get_unchecked.range_to.run.stderr create mode 100644 tests/ui/precondition-checks/str-get_unchecked_mut.backwards_range.run.stderr create mode 100644 tests/ui/precondition-checks/str-get_unchecked_mut.range.run.stderr create mode 100644 tests/ui/precondition-checks/str-get_unchecked_mut.range_from.run.stderr create mode 100644 tests/ui/precondition-checks/str-get_unchecked_mut.range_to.run.stderr create mode 100644 tests/ui/precondition-checks/swap-nonoverlapping.misaligned_dst.run.stderr create mode 100644 tests/ui/precondition-checks/swap-nonoverlapping.misaligned_src.run.stderr create mode 100644 tests/ui/precondition-checks/swap-nonoverlapping.null_dst.run.stderr create mode 100644 tests/ui/precondition-checks/swap-nonoverlapping.null_src.run.stderr create mode 100644 tests/ui/precondition-checks/swap-nonoverlapping.overlapping.run.stderr create mode 100644 tests/ui/precondition-checks/unchecked_add.run.stderr create mode 100644 tests/ui/precondition-checks/unchecked_mul.run.stderr create mode 100644 tests/ui/precondition-checks/unchecked_shl.run.stderr create mode 100644 tests/ui/precondition-checks/unchecked_shr.run.stderr create mode 100644 tests/ui/precondition-checks/unchecked_sub.run.stderr create mode 100644 tests/ui/precondition-checks/unreachable_unchecked.run.stderr create mode 100644 tests/ui/precondition-checks/write_volatile.misaligned.run.stderr create mode 100644 tests/ui/precondition-checks/write_volatile.null.run.stderr create mode 100644 tests/ui/process/tls-exit-status.run.stderr create mode 100644 tests/ui/reachable/issue-948.run.stderr create mode 100644 tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.run.stderr create mode 100644 tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.run.stderr create mode 100644 tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.run.stderr create mode 100644 tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.run.stderr create mode 100644 tests/ui/str/str-overrun.run.stderr create mode 100644 tests/ui/structs/rhs-type.run.stderr create mode 100644 tests/ui/threads-sendsync/task-spawn-barefn.run.stderr create mode 100644 tests/ui/threads-sendsync/test-tasks-invalid-value.run.stderr diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 401169c838f71..a02d02086455d 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -17,7 +17,7 @@ use ignore::Walk; const ENTRY_LIMIT: u32 = 901; // FIXME: The following limits should be reduced eventually. -const ISSUES_ENTRY_LIMIT: u32 = 1667; +const ISSUES_ENTRY_LIMIT: u32 = 1679; const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs", // test source files diff --git a/tests/ui/array-slice-vec/dst-raw-slice.rs b/tests/ui/array-slice-vec/dst-raw-slice.rs index f1281f4e302f2..8430676f1068a 100644 --- a/tests/ui/array-slice-vec/dst-raw-slice.rs +++ b/tests/ui/array-slice-vec/dst-raw-slice.rs @@ -1,7 +1,7 @@ // Test bounds checking for DST raw slices //@ run-fail -//@ error-pattern:index out of bounds +//@ check-run-results:index out of bounds //@ ignore-emscripten no processes #[allow(unconditional_panic)] diff --git a/tests/ui/array-slice-vec/dst-raw-slice.run.stderr b/tests/ui/array-slice-vec/dst-raw-slice.run.stderr new file mode 100644 index 0000000000000..1948ed5c568d2 --- /dev/null +++ b/tests/ui/array-slice-vec/dst-raw-slice.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/dst-raw-slice.rs:11:18: +index out of bounds: the len is 3 but the index is 3 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/array-slice-vec/vec-overrun.rs b/tests/ui/array-slice-vec/vec-overrun.rs index 10f8350869fb8..732d56546d862 100644 --- a/tests/ui/array-slice-vec/vec-overrun.rs +++ b/tests/ui/array-slice-vec/vec-overrun.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:index out of bounds: the len is 1 but the index is 2 +//@ check-run-results:index out of bounds: the len is 1 but the index is 2 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/array-slice-vec/vec-overrun.run.stderr b/tests/ui/array-slice-vec/vec-overrun.run.stderr new file mode 100644 index 0000000000000..6f1a56845b555 --- /dev/null +++ b/tests/ui/array-slice-vec/vec-overrun.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/vec-overrun.rs:11:17: +index out of bounds: the len is 1 but the index is 2 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs index a8b05a4befa58..81d9eec61614a 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs @@ -2,8 +2,8 @@ // be talking about `async fn`s instead. //@ run-fail -//@ error-pattern: thread 'main' panicked -//@ error-pattern: `async fn` resumed after completion +//@ check-run-results: thread 'main' panicked +//@ check-run-results: `async fn` resumed after completion //@ edition:2018 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.run.stderr b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.run.stderr new file mode 100644 index 0000000000000..f4b9dfbe9a079 --- /dev/null +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-65419-async-fn-resume-after-completion.rs:11:16: +`async fn` resumed after completion +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs index 94366e662638b..7ac00042ac920 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs @@ -3,8 +3,8 @@ //@ run-fail //@ needs-unwind -//@ error-pattern: thread 'main' panicked -//@ error-pattern: `async fn` resumed after panicking +//@ check-run-results: thread 'main' panicked +//@ check-run-results: `async fn` resumed after panicking //@ edition:2018 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.run.stderr b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.run.stderr new file mode 100644 index 0000000000000..a0f0eceb552aa --- /dev/null +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.run.stderr @@ -0,0 +1,5 @@ +thread 'main' panicked at $DIR/issue-65419-async-fn-resume-after-panic.rs:15:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread 'main' panicked at $DIR/issue-65419-async-fn-resume-after-panic.rs:14:16: +`async fn` resumed after panicking diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs index 6b7dfc1235e8e..757ab8a75b17b 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs @@ -3,7 +3,7 @@ // panic when resumed after completion. //@ run-fail -//@ error-pattern:coroutine resumed after completion +//@ check-run-results:coroutine resumed after completion //@ edition:2018 #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.run.stderr b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.run.stderr new file mode 100644 index 0000000000000..8ea3512c66a35 --- /dev/null +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-65419-coroutine-resume-after-completion.rs:15:5: +coroutine resumed after completion +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/binop/binop-fail-3.rs b/tests/ui/binop/binop-fail-3.rs index b1e70a1c5961c..3170db524da1c 100644 --- a/tests/ui/binop/binop-fail-3.rs +++ b/tests/ui/binop/binop-fail-3.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:quux +//@ check-run-results:quux //@ ignore-emscripten no processes fn foo() -> ! { diff --git a/tests/ui/binop/binop-fail-3.run.stderr b/tests/ui/binop/binop-fail-3.run.stderr new file mode 100644 index 0000000000000..ded58ce52b73f --- /dev/null +++ b/tests/ui/binop/binop-fail-3.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/binop-fail-3.rs:6:5: +quux +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/binop/binop-panic.rs b/tests/ui/binop/binop-panic.rs index 8dbf62a922e45..73ade8db4a0ec 100644 --- a/tests/ui/binop/binop-panic.rs +++ b/tests/ui/binop/binop-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:quux +//@ check-run-results:quux //@ ignore-emscripten no processes fn my_err(s: String) -> ! { diff --git a/tests/ui/binop/binop-panic.run.stderr b/tests/ui/binop/binop-panic.run.stderr new file mode 100644 index 0000000000000..09fcb1a8e81a3 --- /dev/null +++ b/tests/ui/binop/binop-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/binop-panic.rs:7:5: +quux +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/binop/binop-panic.run.stdout b/tests/ui/binop/binop-panic.run.stdout new file mode 100644 index 0000000000000..b023018cabc39 --- /dev/null +++ b/tests/ui/binop/binop-panic.run.stdout @@ -0,0 +1 @@ +bye diff --git a/tests/ui/borrowck/borrowck-local-borrow.rs b/tests/ui/borrowck/borrowck-local-borrow.rs index de6ee5983c864..f742ce09a0af6 100644 --- a/tests/ui/borrowck/borrowck-local-borrow.rs +++ b/tests/ui/borrowck/borrowck-local-borrow.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:panic 1 +//@ check-run-results:panic 1 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/borrowck/borrowck-local-borrow.run.stderr b/tests/ui/borrowck/borrowck-local-borrow.run.stderr new file mode 100644 index 0000000000000..0d156ec2e7146 --- /dev/null +++ b/tests/ui/borrowck/borrowck-local-borrow.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/borrowck-local-borrow.rs:8:5: +panic 1 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/borrowck/issue-28934.rs b/tests/ui/borrowck/issue-28934.rs index a3ac663c5b5c6..aef9098a9f34b 100644 --- a/tests/ui/borrowck/issue-28934.rs +++ b/tests/ui/borrowck/issue-28934.rs @@ -2,7 +2,7 @@ // which were not being considered during the contraction phase. //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes struct Parser<'i: 't, 't>(&'i u8, &'t u8); diff --git a/tests/ui/borrowck/issue-28934.run.stderr b/tests/ui/borrowck/issue-28934.run.stderr new file mode 100644 index 0000000000000..8f1475a5ead9c --- /dev/null +++ b/tests/ui/borrowck/issue-28934.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-28934.rs:14:9: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/closures/diverging-closure.rs b/tests/ui/closures/diverging-closure.rs index dda829d8af42e..191beeccb9de1 100644 --- a/tests/ui/closures/diverging-closure.rs +++ b/tests/ui/closures/diverging-closure.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:oops +//@ check-run-results:oops //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/closures/diverging-closure.run.stderr b/tests/ui/closures/diverging-closure.run.stderr new file mode 100644 index 0000000000000..01020b04a597e --- /dev/null +++ b/tests/ui/closures/diverging-closure.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/diverging-closure.rs:7:9: +oops +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/consts/issue-29798.rs b/tests/ui/consts/issue-29798.rs index bdabbad6491f6..663fd2e877071 100644 --- a/tests/ui/consts/issue-29798.rs +++ b/tests/ui/consts/issue-29798.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:index out of bounds: the len is 5 but the index is 5 +//@ check-run-results:index out of bounds: the len is 5 but the index is 5 //@ ignore-emscripten no processes const fn test(x: usize) -> i32 { diff --git a/tests/ui/consts/issue-29798.run.stderr b/tests/ui/consts/issue-29798.run.stderr new file mode 100644 index 0000000000000..8be15d9e6c790 --- /dev/null +++ b/tests/ui/consts/issue-29798.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-29798.rs:6:5: +index out of bounds: the len is 5 but the index is 5 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/coroutine/coroutine-resume-after-panic.rs b/tests/ui/coroutine/coroutine-resume-after-panic.rs index 2745ebc61326f..7c9a53d291ae5 100644 --- a/tests/ui/coroutine/coroutine-resume-after-panic.rs +++ b/tests/ui/coroutine/coroutine-resume-after-panic.rs @@ -1,6 +1,6 @@ //@ run-fail //@ needs-unwind -//@ error-pattern:coroutine resumed after panicking +//@ check-run-results:coroutine resumed after panicking //@ ignore-emscripten no processes // Test that we get the correct message for resuming a panicked coroutine. diff --git a/tests/ui/coroutine/coroutine-resume-after-panic.run.stderr b/tests/ui/coroutine/coroutine-resume-after-panic.run.stderr new file mode 100644 index 0000000000000..26d6e8628d04c --- /dev/null +++ b/tests/ui/coroutine/coroutine-resume-after-panic.run.stderr @@ -0,0 +1,5 @@ +thread 'main' panicked at $DIR/coroutine-resume-after-panic.rs:18:9: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread 'main' panicked at $DIR/coroutine-resume-after-panic.rs:17:30: +coroutine resumed after panicking diff --git a/tests/ui/expr/if/expr-if-panic-fn.rs b/tests/ui/expr/if/expr-if-panic-fn.rs index 4f3d7fd48e36e..2aa44cb7265a9 100644 --- a/tests/ui/expr/if/expr-if-panic-fn.rs +++ b/tests/ui/expr/if/expr-if-panic-fn.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn f() -> ! { diff --git a/tests/ui/expr/if/expr-if-panic-fn.run.stderr b/tests/ui/expr/if/expr-if-panic-fn.run.stderr new file mode 100644 index 0000000000000..feafe49558a9b --- /dev/null +++ b/tests/ui/expr/if/expr-if-panic-fn.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/expr-if-panic-fn.rs:6:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/expr/if/expr-if-panic.rs b/tests/ui/expr/if/expr-if-panic.rs index 0b43d1d6b0069..6fbfada7be8f4 100644 --- a/tests/ui/expr/if/expr-if-panic.rs +++ b/tests/ui/expr/if/expr-if-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/expr/if/expr-if-panic.run.stderr b/tests/ui/expr/if/expr-if-panic.run.stderr new file mode 100644 index 0000000000000..cb7fd3ece561b --- /dev/null +++ b/tests/ui/expr/if/expr-if-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/expr-if-panic.rs:9:9: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/expr/if/if-check-panic.rs b/tests/ui/expr/if/if-check-panic.rs index 4b400deaca46f..7210441213bf5 100644 --- a/tests/ui/expr/if/if-check-panic.rs +++ b/tests/ui/expr/if/if-check-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:Number is odd +//@ check-run-results:Number is odd //@ ignore-emscripten no processes fn even(x: usize) -> bool { diff --git a/tests/ui/expr/if/if-check-panic.run.stderr b/tests/ui/expr/if/if-check-panic.run.stderr new file mode 100644 index 0000000000000..ee8294d683196 --- /dev/null +++ b/tests/ui/expr/if/if-check-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/if-check-panic.rs:19:9: +Number is odd +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/expr/if/if-cond-bot.rs b/tests/ui/expr/if/if-cond-bot.rs index ddb5559ffca7c..84b1e96a412be 100644 --- a/tests/ui/expr/if/if-cond-bot.rs +++ b/tests/ui/expr/if/if-cond-bot.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:quux +//@ check-run-results:quux //@ ignore-emscripten no processes fn my_err(s: String) -> ! { diff --git a/tests/ui/expr/if/if-cond-bot.run.stderr b/tests/ui/expr/if/if-cond-bot.run.stderr new file mode 100644 index 0000000000000..669059b57f50b --- /dev/null +++ b/tests/ui/expr/if/if-cond-bot.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/if-cond-bot.rs:7:5: +quux +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/expr/if/if-cond-bot.run.stdout b/tests/ui/expr/if/if-cond-bot.run.stdout new file mode 100644 index 0000000000000..b023018cabc39 --- /dev/null +++ b/tests/ui/expr/if/if-cond-bot.run.stdout @@ -0,0 +1 @@ +bye diff --git a/tests/ui/extern/issue-18576.rs b/tests/ui/extern/issue-18576.rs index 0a98e85e4844f..a1345979f0226 100644 --- a/tests/ui/extern/issue-18576.rs +++ b/tests/ui/extern/issue-18576.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:stop +//@ check-run-results:stop //@ ignore-emscripten no processes // #18576 diff --git a/tests/ui/extern/issue-18576.run.stderr b/tests/ui/extern/issue-18576.run.stderr new file mode 100644 index 0000000000000..7a401840fe4ba --- /dev/null +++ b/tests/ui/extern/issue-18576.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-18576.rs:11:5: +stop +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/fn/expr-fn-panic.rs b/tests/ui/fn/expr-fn-panic.rs index 23946b7533d66..67419a1393fc6 100644 --- a/tests/ui/fn/expr-fn-panic.rs +++ b/tests/ui/fn/expr-fn-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn f() -> ! { diff --git a/tests/ui/fn/expr-fn-panic.run.stderr b/tests/ui/fn/expr-fn-panic.run.stderr new file mode 100644 index 0000000000000..00b51164e4899 --- /dev/null +++ b/tests/ui/fn/expr-fn-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/expr-fn-panic.rs:6:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/hashmap/hashmap-capacity-overflow.rs b/tests/ui/hashmap/hashmap-capacity-overflow.rs index 91aebc3bbba8b..c50bb6322478f 100644 --- a/tests/ui/hashmap/hashmap-capacity-overflow.rs +++ b/tests/ui/hashmap/hashmap-capacity-overflow.rs @@ -1,6 +1,7 @@ //@ run-fail //@ error-pattern:capacity overflow //@ ignore-emscripten no processes +//@ compile-flags: --remap-path-prefix={{rust-src-base}}=remapped use std::collections::hash_map::HashMap; use std::mem::size_of; diff --git a/tests/ui/imports/glob-use-std.rs b/tests/ui/imports/glob-use-std.rs index b625543da81f5..6aff0ee78e221 100644 --- a/tests/ui/imports/glob-use-std.rs +++ b/tests/ui/imports/glob-use-std.rs @@ -1,7 +1,7 @@ // Issue #7580 //@ run-fail -//@ error-pattern:panic works +//@ check-run-results:panic works //@ ignore-emscripten no processes use std::*; diff --git a/tests/ui/imports/glob-use-std.run.stderr b/tests/ui/imports/glob-use-std.run.stderr new file mode 100644 index 0000000000000..87d7bbf8ef0fb --- /dev/null +++ b/tests/ui/imports/glob-use-std.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/glob-use-std.rs:10:5: +panic works +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-12920.rs b/tests/ui/issues/issue-12920.rs index 7f453e499d48c..9ed61b17115de 100644 --- a/tests/ui/issues/issue-12920.rs +++ b/tests/ui/issues/issue-12920.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes pub fn main() { diff --git a/tests/ui/issues/issue-12920.run.stderr b/tests/ui/issues/issue-12920.run.stderr new file mode 100644 index 0000000000000..92e8c2b22c188 --- /dev/null +++ b/tests/ui/issues/issue-12920.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-12920.rs:6:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-13202.rs b/tests/ui/issues/issue-13202.rs index 89205fc7fd1a2..d78e66ac87afd 100644 --- a/tests/ui/issues/issue-13202.rs +++ b/tests/ui/issues/issue-13202.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:bad input +//@ check-run-results:bad input //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/issues/issue-13202.run.stderr b/tests/ui/issues/issue-13202.run.stderr new file mode 100644 index 0000000000000..2edadb4becd29 --- /dev/null +++ b/tests/ui/issues/issue-13202.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-13202.rs:6:27: +bad input +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-20971.rs b/tests/ui/issues/issue-20971.rs index 377a3d9ea304b..066c8cde99081 100644 --- a/tests/ui/issues/issue-20971.rs +++ b/tests/ui/issues/issue-20971.rs @@ -1,7 +1,7 @@ // Regression test for Issue #20971. //@ run-fail -//@ error-pattern:Hello, world! +//@ check-run-results:Hello, world! //@ ignore-emscripten no processes pub trait Parser { diff --git a/tests/ui/issues/issue-20971.run.stderr b/tests/ui/issues/issue-20971.run.stderr new file mode 100644 index 0000000000000..93fa571a3ae4f --- /dev/null +++ b/tests/ui/issues/issue-20971.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-20971.rs:18:5: +Hello, world! +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-23354-2.rs b/tests/ui/issues/issue-23354-2.rs index 90de1276cc6bc..30eaeebeadbf7 100644 --- a/tests/ui/issues/issue-23354-2.rs +++ b/tests/ui/issues/issue-23354-2.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:panic evaluated +//@ check-run-results:panic evaluated //@ ignore-emscripten no processes #[allow(unused_variables)] diff --git a/tests/ui/issues/issue-23354-2.run.stderr b/tests/ui/issues/issue-23354-2.run.stderr new file mode 100644 index 0000000000000..6d896c0c8c934 --- /dev/null +++ b/tests/ui/issues/issue-23354-2.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-23354-2.rs:8:14: +panic evaluated +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-23354.rs b/tests/ui/issues/issue-23354.rs index 31783842dac00..238b38a18f49c 100644 --- a/tests/ui/issues/issue-23354.rs +++ b/tests/ui/issues/issue-23354.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:panic evaluated +//@ check-run-results:panic evaluated //@ ignore-emscripten no processes #[allow(unused_variables)] diff --git a/tests/ui/issues/issue-23354.run.stderr b/tests/ui/issues/issue-23354.run.stderr new file mode 100644 index 0000000000000..6eef0d750df75 --- /dev/null +++ b/tests/ui/issues/issue-23354.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-23354.rs:7:14: +panic evaluated +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-2761.rs b/tests/ui/issues/issue-2761.rs index b44a24e09f258..9b641288b8842 100644 --- a/tests/ui/issues/issue-2761.rs +++ b/tests/ui/issues/issue-2761.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:custom message +//@ check-run-results:custom message //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/issues/issue-2761.run.stderr b/tests/ui/issues/issue-2761.run.stderr new file mode 100644 index 0000000000000..e64e358d433c5 --- /dev/null +++ b/tests/ui/issues/issue-2761.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-2761.rs:6:5: +custom message +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-3029.rs b/tests/ui/issues/issue-3029.rs index a070578969cb2..7ab26716a7fa7 100644 --- a/tests/ui/issues/issue-3029.rs +++ b/tests/ui/issues/issue-3029.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:so long +//@ check-run-results:so long //@ ignore-emscripten no processes #![allow(unreachable_code)] diff --git a/tests/ui/issues/issue-3029.run.stderr b/tests/ui/issues/issue-3029.run.stderr new file mode 100644 index 0000000000000..aa694de134929 --- /dev/null +++ b/tests/ui/issues/issue-3029.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-3029.rs:10:5: +so long +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-30380.rs b/tests/ui/issues/issue-30380.rs index 534bb3423d0fb..322612617ca83 100644 --- a/tests/ui/issues/issue-30380.rs +++ b/tests/ui/issues/issue-30380.rs @@ -2,7 +2,7 @@ // destroyed values lying around for other destructors to observe. //@ run-fail -//@ error-pattern:panicking destructors ftw! +//@ check-run-results:panicking destructors ftw! //@ ignore-emscripten no processes struct Observer<'a>(&'a mut FilledOnDrop); diff --git a/tests/ui/issues/issue-30380.run.stderr b/tests/ui/issues/issue-30380.run.stderr new file mode 100644 index 0000000000000..8d57c1e5fdeee --- /dev/null +++ b/tests/ui/issues/issue-30380.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-30380.rs:17:13: +panicking destructors ftw! +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-44216-add-instant.rs b/tests/ui/issues/issue-44216-add-instant.rs index ca2c52b99a82a..75fc57b501364 100644 --- a/tests/ui/issues/issue-44216-add-instant.rs +++ b/tests/ui/issues/issue-44216-add-instant.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:overflow +//@ check-run-results:overflow use std::time::{Duration, Instant}; diff --git a/tests/ui/issues/issue-44216-add-instant.run.stderr b/tests/ui/issues/issue-44216-add-instant.run.stderr new file mode 100644 index 0000000000000..09d2888759438 --- /dev/null +++ b/tests/ui/issues/issue-44216-add-instant.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at library/std/src/time.rs:417:33: +overflow when adding duration to instant +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-44216-add-system-time.rs b/tests/ui/issues/issue-44216-add-system-time.rs index 207f72fade813..476fc6696e3a8 100644 --- a/tests/ui/issues/issue-44216-add-system-time.rs +++ b/tests/ui/issues/issue-44216-add-system-time.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:overflow +//@ check-run-results:overflow //@ ignore-emscripten no processes use std::time::{Duration, SystemTime}; diff --git a/tests/ui/issues/issue-44216-add-system-time.run.stderr b/tests/ui/issues/issue-44216-add-system-time.run.stderr new file mode 100644 index 0000000000000..1d377287081bb --- /dev/null +++ b/tests/ui/issues/issue-44216-add-system-time.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at library/std/src/time.rs:601:31: +overflow when adding duration to instant +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-44216-sub-instant.rs b/tests/ui/issues/issue-44216-sub-instant.rs index 2457d2aaa0446..10ca3b613d75f 100644 --- a/tests/ui/issues/issue-44216-sub-instant.rs +++ b/tests/ui/issues/issue-44216-sub-instant.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:overflow +//@ check-run-results:overflow //@ ignore-emscripten no processes use std::time::{Instant, Duration}; diff --git a/tests/ui/issues/issue-44216-sub-instant.run.stderr b/tests/ui/issues/issue-44216-sub-instant.run.stderr new file mode 100644 index 0000000000000..3bce1f8626b8d --- /dev/null +++ b/tests/ui/issues/issue-44216-sub-instant.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at library/std/src/time.rs:433:33: +overflow when subtracting duration from instant +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/issues/issue-44216-sub-system-time.rs b/tests/ui/issues/issue-44216-sub-system-time.rs index 7e33f22793374..59cb018c2c25b 100644 --- a/tests/ui/issues/issue-44216-sub-system-time.rs +++ b/tests/ui/issues/issue-44216-sub-system-time.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:overflow +//@ check-run-results:overflow //@ ignore-emscripten no processes use std::time::{Duration, SystemTime}; diff --git a/tests/ui/issues/issue-44216-sub-system-time.run.stderr b/tests/ui/issues/issue-44216-sub-system-time.run.stderr new file mode 100644 index 0000000000000..0c814b2926ab5 --- /dev/null +++ b/tests/ui/issues/issue-44216-sub-system-time.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at library/std/src/time.rs:617:31: +overflow when subtracting duration from instant +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/loops/for-each-loop-panic.rs b/tests/ui/loops/for-each-loop-panic.rs index 04784cac8f2fc..429519767025c 100644 --- a/tests/ui/loops/for-each-loop-panic.rs +++ b/tests/ui/loops/for-each-loop-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:moop +//@ check-run-results:moop //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/loops/for-each-loop-panic.run.stderr b/tests/ui/loops/for-each-loop-panic.run.stderr new file mode 100644 index 0000000000000..fb21679d10095 --- /dev/null +++ b/tests/ui/loops/for-each-loop-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/for-each-loop-panic.rs:7:9: +moop +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs index 03717c7c22d54..d2459c1fb5865 100644 --- a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs +++ b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -C opt-level=3 -//@ error-pattern: index out of bounds: the len is 0 but the index is 16777216 +//@ check-run-results: index out of bounds: the len is 0 but the index is 16777216 fn do_test(x: usize) { let mut arr = vec![vec![0u8; 3]]; diff --git a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.run.stderr b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.run.stderr new file mode 100644 index 0000000000000..b9cb5008f14d7 --- /dev/null +++ b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-69225-SCEVAddExpr-wrap-flag.rs:22:17: +index out of bounds: the len is 0 but the index is 16777216 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs b/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs index 048c7c8872c19..580a6491dfc52 100644 --- a/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs +++ b/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs @@ -3,7 +3,7 @@ //@ run-fail //@ compile-flags: -C opt-level=3 -//@ error-pattern: index out of bounds: the len is 0 but the index is 16777216 +//@ check-run-results: index out of bounds: the len is 0 but the index is 16777216 fn do_test(x: usize) { let arr = vec![vec![0u8; 3]]; diff --git a/tests/ui/loops/issue-69225-layout-repeated-checked-add.run.stderr b/tests/ui/loops/issue-69225-layout-repeated-checked-add.run.stderr new file mode 100644 index 0000000000000..c627f5e9a48b0 --- /dev/null +++ b/tests/ui/loops/issue-69225-layout-repeated-checked-add.run.stderr @@ -0,0 +1,4 @@ +0 0 3 0 +thread 'main' panicked at $DIR/issue-69225-layout-repeated-checked-add.rs:20:35: +index out of bounds: the len is 0 but the index is 16777216 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-as-macro.rs b/tests/ui/macros/assert-as-macro.rs index 391b056292f84..ffb660893a2b0 100644 --- a/tests/ui/macros/assert-as-macro.rs +++ b/tests/ui/macros/assert-as-macro.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:assertion failed: 1 == 2 +//@ check-run-results:assertion failed: 1 == 2 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/assert-as-macro.run.stderr b/tests/ui/macros/assert-as-macro.run.stderr new file mode 100644 index 0000000000000..c07fb8d7ef87c --- /dev/null +++ b/tests/ui/macros/assert-as-macro.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/assert-as-macro.rs:6:5: +assertion failed: 1 == 2 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-eq-macro-msg.rs b/tests/ui/macros/assert-eq-macro-msg.rs index 39eeefeeef90e..3cff91bc5663f 100644 --- a/tests/ui/macros/assert-eq-macro-msg.rs +++ b/tests/ui/macros/assert-eq-macro-msg.rs @@ -1,7 +1,7 @@ //@ run-fail -//@ error-pattern:assertion `left == right` failed: 1 + 1 definitely should be 3 -//@ error-pattern: left: 2 -//@ error-pattern: right: 3 +//@ check-run-results:assertion `left == right` failed: 1 + 1 definitely should be 3 +//@ check-run-results: left: 2 +//@ check-run-results: right: 3 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/assert-eq-macro-msg.run.stderr b/tests/ui/macros/assert-eq-macro-msg.run.stderr new file mode 100644 index 0000000000000..b3cf1add28886 --- /dev/null +++ b/tests/ui/macros/assert-eq-macro-msg.run.stderr @@ -0,0 +1,5 @@ +thread 'main' panicked at $DIR/assert-eq-macro-msg.rs:8:5: +assertion `left == right` failed: 1 + 1 definitely should be 3 + left: 2 + right: 3 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-eq-macro-panic.rs b/tests/ui/macros/assert-eq-macro-panic.rs index 22c3a8a634f4b..23595766610cf 100644 --- a/tests/ui/macros/assert-eq-macro-panic.rs +++ b/tests/ui/macros/assert-eq-macro-panic.rs @@ -1,7 +1,7 @@ //@ run-fail -//@ error-pattern:assertion `left == right` failed -//@ error-pattern: left: 14 -//@ error-pattern: right: 15 +//@ check-run-results:assertion `left == right` failed +//@ check-run-results: left: 14 +//@ check-run-results: right: 15 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/assert-eq-macro-panic.run.stderr b/tests/ui/macros/assert-eq-macro-panic.run.stderr new file mode 100644 index 0000000000000..6860f1c7a8903 --- /dev/null +++ b/tests/ui/macros/assert-eq-macro-panic.run.stderr @@ -0,0 +1,5 @@ +thread 'main' panicked at $DIR/assert-eq-macro-panic.rs:8:5: +assertion `left == right` failed + left: 14 + right: 15 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-macro-explicit.rs b/tests/ui/macros/assert-macro-explicit.rs index 167581d2525e1..ad331feac2688 100644 --- a/tests/ui/macros/assert-macro-explicit.rs +++ b/tests/ui/macros/assert-macro-explicit.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:assertion failed: false +//@ check-run-results:assertion failed: false //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/assert-macro-explicit.run.stderr b/tests/ui/macros/assert-macro-explicit.run.stderr new file mode 100644 index 0000000000000..42b12ebe41b3e --- /dev/null +++ b/tests/ui/macros/assert-macro-explicit.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/assert-macro-explicit.rs:6:5: +assertion failed: false +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-macro-fmt.rs b/tests/ui/macros/assert-macro-fmt.rs index 475544303796d..cd4e8681ec283 100644 --- a/tests/ui/macros/assert-macro-fmt.rs +++ b/tests/ui/macros/assert-macro-fmt.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern: panicked -//@ error-pattern: test-assert-fmt 42 rust +//@ check-run-results: panicked +//@ check-run-results: test-assert-fmt 42 rust //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/assert-macro-fmt.run.stderr b/tests/ui/macros/assert-macro-fmt.run.stderr new file mode 100644 index 0000000000000..e283fb5f46c6e --- /dev/null +++ b/tests/ui/macros/assert-macro-fmt.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/assert-macro-fmt.rs:7:5: +test-assert-fmt 42 rust +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-macro-owned.rs b/tests/ui/macros/assert-macro-owned.rs index 46a59db1390c2..e6dad778cb2f9 100644 --- a/tests/ui/macros/assert-macro-owned.rs +++ b/tests/ui/macros/assert-macro-owned.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:panicked -//@ error-pattern:test-assert-owned +//@ check-run-results:panicked +//@ check-run-results:test-assert-owned //@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/macros/assert-macro-owned.run.stderr b/tests/ui/macros/assert-macro-owned.run.stderr new file mode 100644 index 0000000000000..e6d29a57534d7 --- /dev/null +++ b/tests/ui/macros/assert-macro-owned.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/assert-macro-owned.rs:9:5: +test-assert-owned +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-macro-static.rs b/tests/ui/macros/assert-macro-static.rs index 7d9e345d516a3..9fe778fb59e88 100644 --- a/tests/ui/macros/assert-macro-static.rs +++ b/tests/ui/macros/assert-macro-static.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:panicked -//@ error-pattern:test-assert-static +//@ check-run-results:panicked +//@ check-run-results:test-assert-static //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/assert-macro-static.run.stderr b/tests/ui/macros/assert-macro-static.run.stderr new file mode 100644 index 0000000000000..48b0c3241b200 --- /dev/null +++ b/tests/ui/macros/assert-macro-static.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/assert-macro-static.rs:7:5: +test-assert-static +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-matches-macro-msg.rs b/tests/ui/macros/assert-matches-macro-msg.rs index efa4121da9232..60cc344369d30 100644 --- a/tests/ui/macros/assert-matches-macro-msg.rs +++ b/tests/ui/macros/assert-matches-macro-msg.rs @@ -1,7 +1,7 @@ //@ run-fail -//@ error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3 -//@ error-pattern: left: 2 -//@ error-pattern: right: 3 +//@ check-run-results:assertion `left matches right` failed: 1 + 1 definitely should be 3 +//@ check-run-results: left: 2 +//@ check-run-results: right: 3 //@ ignore-emscripten no processes #![feature(assert_matches)] diff --git a/tests/ui/macros/assert-matches-macro-msg.run.stderr b/tests/ui/macros/assert-matches-macro-msg.run.stderr new file mode 100644 index 0000000000000..4a8f7e475f3f3 --- /dev/null +++ b/tests/ui/macros/assert-matches-macro-msg.run.stderr @@ -0,0 +1,5 @@ +thread 'main' panicked at $DIR/assert-matches-macro-msg.rs:12:5: +assertion `left matches right` failed: 1 + 1 definitely should be 3 + left: 2 + right: 3 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-ne-macro-msg.rs b/tests/ui/macros/assert-ne-macro-msg.rs index 0a578e1baf93c..9fb50fb600a55 100644 --- a/tests/ui/macros/assert-ne-macro-msg.rs +++ b/tests/ui/macros/assert-ne-macro-msg.rs @@ -1,7 +1,7 @@ //@ run-fail -//@ error-pattern:assertion `left != right` failed: 1 + 1 definitely should not be 2 -//@ error-pattern: left: 2 -//@ error-pattern: right: 2 +//@ check-run-results:assertion `left != right` failed: 1 + 1 definitely should not be 2 +//@ check-run-results: left: 2 +//@ check-run-results: right: 2 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/assert-ne-macro-msg.run.stderr b/tests/ui/macros/assert-ne-macro-msg.run.stderr new file mode 100644 index 0000000000000..3320bfb4c62b9 --- /dev/null +++ b/tests/ui/macros/assert-ne-macro-msg.run.stderr @@ -0,0 +1,5 @@ +thread 'main' panicked at $DIR/assert-ne-macro-msg.rs:8:5: +assertion `left != right` failed: 1 + 1 definitely should not be 2 + left: 2 + right: 2 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/assert-ne-macro-panic.rs b/tests/ui/macros/assert-ne-macro-panic.rs index 9cf5f05e9f18b..07becf2a46f09 100644 --- a/tests/ui/macros/assert-ne-macro-panic.rs +++ b/tests/ui/macros/assert-ne-macro-panic.rs @@ -1,7 +1,7 @@ //@ run-fail -//@ error-pattern:assertion `left != right` failed -//@ error-pattern: left: 14 -//@ error-pattern: right: 14 +//@ check-run-results:assertion `left != right` failed +//@ check-run-results: left: 14 +//@ check-run-results: right: 14 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/assert-ne-macro-panic.run.stderr b/tests/ui/macros/assert-ne-macro-panic.run.stderr new file mode 100644 index 0000000000000..8c5bfe6d13d7c --- /dev/null +++ b/tests/ui/macros/assert-ne-macro-panic.run.stderr @@ -0,0 +1,5 @@ +thread 'main' panicked at $DIR/assert-ne-macro-panic.rs:8:5: +assertion `left != right` failed + left: 14 + right: 14 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/die-macro-2.rs b/tests/ui/macros/die-macro-2.rs index e5456bdfca0f9..187fce2ea4f53 100644 --- a/tests/ui/macros/die-macro-2.rs +++ b/tests/ui/macros/die-macro-2.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:test +//@ check-run-results:test //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/die-macro-2.run.stderr b/tests/ui/macros/die-macro-2.run.stderr new file mode 100644 index 0000000000000..01710b9a60e9c --- /dev/null +++ b/tests/ui/macros/die-macro-2.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/die-macro-2.rs:6:5: +test +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/die-macro-expr.rs b/tests/ui/macros/die-macro-expr.rs index fb92dd66e3dc3..9d423e4ced11c 100644 --- a/tests/ui/macros/die-macro-expr.rs +++ b/tests/ui/macros/die-macro-expr.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:test +//@ check-run-results:test //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/die-macro-expr.run.stderr b/tests/ui/macros/die-macro-expr.run.stderr new file mode 100644 index 0000000000000..7aa09425c6b6c --- /dev/null +++ b/tests/ui/macros/die-macro-expr.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/die-macro-expr.rs:6:26: +test +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/die-macro-pure.rs b/tests/ui/macros/die-macro-pure.rs index 484eed3d720f0..05a9ff42f9e92 100644 --- a/tests/ui/macros/die-macro-pure.rs +++ b/tests/ui/macros/die-macro-pure.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:test +//@ check-run-results:test //@ ignore-emscripten no processes fn f() { diff --git a/tests/ui/macros/die-macro-pure.run.stderr b/tests/ui/macros/die-macro-pure.run.stderr new file mode 100644 index 0000000000000..38778a2a423f4 --- /dev/null +++ b/tests/ui/macros/die-macro-pure.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/die-macro-pure.rs:6:5: +test +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/unimplemented-macro-panic.rs b/tests/ui/macros/unimplemented-macro-panic.rs index d3bff8ca10ba0..ed5f1ad83067e 100644 --- a/tests/ui/macros/unimplemented-macro-panic.rs +++ b/tests/ui/macros/unimplemented-macro-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:not implemented +//@ check-run-results:not implemented //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/unimplemented-macro-panic.run.stderr b/tests/ui/macros/unimplemented-macro-panic.run.stderr new file mode 100644 index 0000000000000..4a75d8fd00f8d --- /dev/null +++ b/tests/ui/macros/unimplemented-macro-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unimplemented-macro-panic.rs:6:5: +not implemented +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/unreachable-fmt-msg.rs b/tests/ui/macros/unreachable-fmt-msg.rs index b16394a1920eb..c53536c535985 100644 --- a/tests/ui/macros/unreachable-fmt-msg.rs +++ b/tests/ui/macros/unreachable-fmt-msg.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:internal error: entered unreachable code: 6 is not prime +//@ check-run-results:internal error: entered unreachable code: 6 is not prime //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/unreachable-fmt-msg.run.stderr b/tests/ui/macros/unreachable-fmt-msg.run.stderr new file mode 100644 index 0000000000000..321b08ecb8ef7 --- /dev/null +++ b/tests/ui/macros/unreachable-fmt-msg.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unreachable-fmt-msg.rs:6:5: +internal error: entered unreachable code: 6 is not prime +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/unreachable-macro-panic.rs b/tests/ui/macros/unreachable-macro-panic.rs index 7909bcb76242d..9888a35dd0348 100644 --- a/tests/ui/macros/unreachable-macro-panic.rs +++ b/tests/ui/macros/unreachable-macro-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:internal error: entered unreachable code +//@ check-run-results:internal error: entered unreachable code //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/unreachable-macro-panic.run.stderr b/tests/ui/macros/unreachable-macro-panic.run.stderr new file mode 100644 index 0000000000000..bb428252d63aa --- /dev/null +++ b/tests/ui/macros/unreachable-macro-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unreachable-macro-panic.rs:6:5: +internal error: entered unreachable code +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/unreachable-static-msg.rs b/tests/ui/macros/unreachable-static-msg.rs index 3e917897da458..e6f4255af863c 100644 --- a/tests/ui/macros/unreachable-static-msg.rs +++ b/tests/ui/macros/unreachable-static-msg.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:internal error: entered unreachable code: uhoh +//@ check-run-results:internal error: entered unreachable code: uhoh //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/unreachable-static-msg.run.stderr b/tests/ui/macros/unreachable-static-msg.run.stderr new file mode 100644 index 0000000000000..12bfe2a59531e --- /dev/null +++ b/tests/ui/macros/unreachable-static-msg.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unreachable-static-msg.rs:6:5: +internal error: entered unreachable code: uhoh +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/macros/unreachable.rs b/tests/ui/macros/unreachable.rs index 7909bcb76242d..9888a35dd0348 100644 --- a/tests/ui/macros/unreachable.rs +++ b/tests/ui/macros/unreachable.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:internal error: entered unreachable code +//@ check-run-results:internal error: entered unreachable code //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/macros/unreachable.run.stderr b/tests/ui/macros/unreachable.run.stderr new file mode 100644 index 0000000000000..877e104cb81ad --- /dev/null +++ b/tests/ui/macros/unreachable.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unreachable.rs:6:5: +internal error: entered unreachable code +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/match/expr-match-panic-fn.rs b/tests/ui/match/expr-match-panic-fn.rs index 82991d20df88d..8cae554e29293 100644 --- a/tests/ui/match/expr-match-panic-fn.rs +++ b/tests/ui/match/expr-match-panic-fn.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn f() -> ! { diff --git a/tests/ui/match/expr-match-panic-fn.run.stderr b/tests/ui/match/expr-match-panic-fn.run.stderr new file mode 100644 index 0000000000000..94aa4c9383c5d --- /dev/null +++ b/tests/ui/match/expr-match-panic-fn.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/expr-match-panic-fn.rs:6:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/match/expr-match-panic.rs b/tests/ui/match/expr-match-panic.rs index e332ba83b914f..0f2078717bf47 100644 --- a/tests/ui/match/expr-match-panic.rs +++ b/tests/ui/match/expr-match-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/match/expr-match-panic.run.stderr b/tests/ui/match/expr-match-panic.run.stderr new file mode 100644 index 0000000000000..f0ef21455865a --- /dev/null +++ b/tests/ui/match/expr-match-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/expr-match-panic.rs:8:17: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/match/match-bot-panic.rs b/tests/ui/match/match-bot-panic.rs index a155b5fb3f27e..62f57dedbb765 100644 --- a/tests/ui/match/match-bot-panic.rs +++ b/tests/ui/match/match-bot-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes #![allow(unreachable_code)] diff --git a/tests/ui/match/match-bot-panic.run.stderr b/tests/ui/match/match-bot-panic.run.stderr new file mode 100644 index 0000000000000..a5331ba4f469d --- /dev/null +++ b/tests/ui/match/match-bot-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/match-bot-panic.rs:13:29: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/match/match-disc-bot.rs b/tests/ui/match/match-disc-bot.rs index fdb98a0accb8f..a69f13dcbcfe1 100644 --- a/tests/ui/match/match-disc-bot.rs +++ b/tests/ui/match/match-disc-bot.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:quux +//@ check-run-results:quux //@ ignore-emscripten no processes fn f() -> ! { diff --git a/tests/ui/match/match-disc-bot.run.stderr b/tests/ui/match/match-disc-bot.run.stderr new file mode 100644 index 0000000000000..e7e2a55b1b744 --- /dev/null +++ b/tests/ui/match/match-disc-bot.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/match-disc-bot.rs:6:5: +quux +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/match/match-wildcards.rs b/tests/ui/match/match-wildcards.rs index 4fddee6666eac..ebad22b06a436 100644 --- a/tests/ui/match/match-wildcards.rs +++ b/tests/ui/match/match-wildcards.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:squirrelcupcake +//@ check-run-results:squirrelcupcake //@ ignore-emscripten no processes fn cmp() -> isize { diff --git a/tests/ui/match/match-wildcards.run.stderr b/tests/ui/match/match-wildcards.run.stderr new file mode 100644 index 0000000000000..ce90488e256c1 --- /dev/null +++ b/tests/ui/match/match-wildcards.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/match-wildcards.rs:8:13: +squirrelcupcake +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops.rs b/tests/ui/mir/mir_codegen_calls_converging_drops.rs index 5c3c8b999b2de..5145766a98db6 100644 --- a/tests/ui/mir/mir_codegen_calls_converging_drops.rs +++ b/tests/ui/mir/mir_codegen_calls_converging_drops.rs @@ -1,7 +1,7 @@ //@ run-fail -//@ error-pattern:converging_fn called -//@ error-pattern:0 dropped -//@ error-pattern:exit +//@ check-run-results:converging_fn called +//@ check-run-results:0 dropped +//@ check-run-results:exit //@ ignore-emscripten no processes struct Droppable(u8); diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops.run.stderr b/tests/ui/mir/mir_codegen_calls_converging_drops.run.stderr new file mode 100644 index 0000000000000..41f49b090eb04 --- /dev/null +++ b/tests/ui/mir/mir_codegen_calls_converging_drops.run.stderr @@ -0,0 +1,5 @@ +converging_fn called +0 dropped +thread 'main' panicked at $DIR/mir_codegen_calls_converging_drops.rs:25:5: +exit +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs b/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs index e3cb9a96de0da..6a6a221c3d157 100644 --- a/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs +++ b/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs @@ -1,7 +1,7 @@ //@ run-fail -//@ error-pattern:complex called -//@ error-pattern:dropped -//@ error-pattern:exit +//@ check-run-results:complex called +//@ check-run-results:dropped +//@ check-run-results:exit //@ ignore-emscripten no processes struct Droppable; diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops_2.run.stderr b/tests/ui/mir/mir_codegen_calls_converging_drops_2.run.stderr new file mode 100644 index 0000000000000..c0ece81a9ef23 --- /dev/null +++ b/tests/ui/mir/mir_codegen_calls_converging_drops_2.run.stderr @@ -0,0 +1,5 @@ +complex called +dropped +thread 'main' panicked at $DIR/mir_codegen_calls_converging_drops_2.rs:29:5: +exit +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/mir/mir_codegen_calls_diverging.rs b/tests/ui/mir/mir_codegen_calls_diverging.rs index c62527f01d38c..583ac76e54585 100644 --- a/tests/ui/mir/mir_codegen_calls_diverging.rs +++ b/tests/ui/mir/mir_codegen_calls_diverging.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:diverging_fn called +//@ check-run-results:diverging_fn called //@ ignore-emscripten no processes fn diverging_fn() -> ! { diff --git a/tests/ui/mir/mir_codegen_calls_diverging.run.stderr b/tests/ui/mir/mir_codegen_calls_diverging.run.stderr new file mode 100644 index 0000000000000..3086e67108f34 --- /dev/null +++ b/tests/ui/mir/mir_codegen_calls_diverging.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/mir_codegen_calls_diverging.rs:6:5: +diverging_fn called +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/mir/mir_codegen_calls_diverging_drops.rs b/tests/ui/mir/mir_codegen_calls_diverging_drops.rs index b0675a6a5a0c4..e4cfbff9e8bac 100644 --- a/tests/ui/mir/mir_codegen_calls_diverging_drops.rs +++ b/tests/ui/mir/mir_codegen_calls_diverging_drops.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:diverging_fn called -//@ error-pattern:0 dropped +//@ check-run-results:diverging_fn called +//@ check-run-results:0 dropped //@ needs-unwind this test checks that a destructor is called after panicking struct Droppable(u8); diff --git a/tests/ui/mir/mir_codegen_calls_diverging_drops.run.stderr b/tests/ui/mir/mir_codegen_calls_diverging_drops.run.stderr new file mode 100644 index 0000000000000..ecab3a699d7a3 --- /dev/null +++ b/tests/ui/mir/mir_codegen_calls_diverging_drops.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at $DIR/mir_codegen_calls_diverging_drops.rs:14:5: +diverging_fn called +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +0 dropped diff --git a/tests/ui/mir/mir_drop_panics.rs b/tests/ui/mir/mir_drop_panics.rs index ec846fc241b2a..94b7971d6428b 100644 --- a/tests/ui/mir/mir_drop_panics.rs +++ b/tests/ui/mir/mir_drop_panics.rs @@ -1,7 +1,7 @@ //@ run-fail //@ needs-unwind -//@ error-pattern:panic 1 -//@ error-pattern:drop 2 +//@ check-run-results:panic 1 +//@ check-run-results:drop 2 struct Droppable(u32); impl Drop for Droppable { diff --git a/tests/ui/mir/mir_drop_panics.run.stderr b/tests/ui/mir/mir_drop_panics.run.stderr new file mode 100644 index 0000000000000..778cd7c777a8d --- /dev/null +++ b/tests/ui/mir/mir_drop_panics.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at $DIR/mir_drop_panics.rs:10:13: +panic 1 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +drop 2 diff --git a/tests/ui/mir/mir_dynamic_drops_1.rs b/tests/ui/mir/mir_dynamic_drops_1.rs index ffb8cc26100e8..58293d77c2765 100644 --- a/tests/ui/mir/mir_dynamic_drops_1.rs +++ b/tests/ui/mir/mir_dynamic_drops_1.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:drop 1 -//@ error-pattern:drop 2 +//@ check-run-results:drop 1 +//@ check-run-results:drop 2 //@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. diff --git a/tests/ui/mir/mir_dynamic_drops_1.run.stderr b/tests/ui/mir/mir_dynamic_drops_1.run.stderr new file mode 100644 index 0000000000000..52eecd01a94d4 --- /dev/null +++ b/tests/ui/mir/mir_dynamic_drops_1.run.stderr @@ -0,0 +1,5 @@ +drop 1 +drop 2 +thread 'main' panicked at $DIR/mir_dynamic_drops_1.rs:30:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/mir/mir_dynamic_drops_2.rs b/tests/ui/mir/mir_dynamic_drops_2.rs index dc71f414673de..a0bcf0d193c09 100644 --- a/tests/ui/mir/mir_dynamic_drops_2.rs +++ b/tests/ui/mir/mir_dynamic_drops_2.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:drop 1 +//@ check-run-results:drop 1 //@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. diff --git a/tests/ui/mir/mir_dynamic_drops_2.run.stderr b/tests/ui/mir/mir_dynamic_drops_2.run.stderr new file mode 100644 index 0000000000000..b251e5f4c0339 --- /dev/null +++ b/tests/ui/mir/mir_dynamic_drops_2.run.stderr @@ -0,0 +1,4 @@ +drop 1 +thread 'main' panicked at $DIR/mir_dynamic_drops_2.rs:28:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/mir/mir_dynamic_drops_3.rs b/tests/ui/mir/mir_dynamic_drops_3.rs index fe84502ef1dc1..4b96da55f3440 100644 --- a/tests/ui/mir/mir_dynamic_drops_3.rs +++ b/tests/ui/mir/mir_dynamic_drops_3.rs @@ -1,9 +1,9 @@ //@ run-fail //@ needs-unwind -//@ error-pattern:unwind happens -//@ error-pattern:drop 3 -//@ error-pattern:drop 2 -//@ error-pattern:drop 1 +//@ check-run-results:unwind happens +//@ check-run-results:drop 3 +//@ check-run-results:drop 2 +//@ check-run-results:drop 1 //@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. diff --git a/tests/ui/mir/mir_dynamic_drops_3.run.stderr b/tests/ui/mir/mir_dynamic_drops_3.run.stderr new file mode 100644 index 0000000000000..6ae5ea71b1236 --- /dev/null +++ b/tests/ui/mir/mir_dynamic_drops_3.run.stderr @@ -0,0 +1,6 @@ +thread 'main' panicked at $DIR/mir_dynamic_drops_3.rs:23:5: +unwind happens +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +drop 3 +drop 2 +drop 1 diff --git a/tests/ui/mir/mir_indexing_oob_1.rs b/tests/ui/mir/mir_indexing_oob_1.rs index 3afc2f0b32e62..038cc1e6e0472 100644 --- a/tests/ui/mir/mir_indexing_oob_1.rs +++ b/tests/ui/mir/mir_indexing_oob_1.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ check-run-results:index out of bounds: the len is 5 but the index is 10 //@ ignore-emscripten no processes const C: [u32; 5] = [0; 5]; diff --git a/tests/ui/mir/mir_indexing_oob_1.run.stderr b/tests/ui/mir/mir_indexing_oob_1.run.stderr new file mode 100644 index 0000000000000..e6d7575328991 --- /dev/null +++ b/tests/ui/mir/mir_indexing_oob_1.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/mir_indexing_oob_1.rs:9:5: +index out of bounds: the len is 5 but the index is 10 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/mir/mir_indexing_oob_2.rs b/tests/ui/mir/mir_indexing_oob_2.rs index 6e7c1c83536f4..15c297c742efd 100644 --- a/tests/ui/mir/mir_indexing_oob_2.rs +++ b/tests/ui/mir/mir_indexing_oob_2.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ check-run-results:index out of bounds: the len is 5 but the index is 10 //@ ignore-emscripten no processes const C: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/mir/mir_indexing_oob_2.run.stderr b/tests/ui/mir/mir_indexing_oob_2.run.stderr new file mode 100644 index 0000000000000..1e4c0628c53ea --- /dev/null +++ b/tests/ui/mir/mir_indexing_oob_2.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/mir_indexing_oob_2.rs:9:5: +index out of bounds: the len is 5 but the index is 10 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/mir/mir_indexing_oob_3.rs b/tests/ui/mir/mir_indexing_oob_3.rs index 4012864c6ce63..71419ffc0a910 100644 --- a/tests/ui/mir/mir_indexing_oob_3.rs +++ b/tests/ui/mir/mir_indexing_oob_3.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ check-run-results:index out of bounds: the len is 5 but the index is 10 //@ ignore-emscripten no processes const C: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/mir/mir_indexing_oob_3.run.stderr b/tests/ui/mir/mir_indexing_oob_3.run.stderr new file mode 100644 index 0000000000000..a0732b48831d3 --- /dev/null +++ b/tests/ui/mir/mir_indexing_oob_3.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/mir_indexing_oob_3.rs:9:5: +index out of bounds: the len is 5 but the index is 10 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/never_type/return-never-coerce.rs b/tests/ui/never_type/return-never-coerce.rs index 559b7d0e985e4..4d462adae1e62 100644 --- a/tests/ui/never_type/return-never-coerce.rs +++ b/tests/ui/never_type/return-never-coerce.rs @@ -1,7 +1,7 @@ // Test that ! coerces to other types. //@ run-fail -//@ error-pattern:aah! +//@ check-run-results:aah! //@ ignore-emscripten no processes fn call_another_fn T>(f: F) -> T { diff --git a/tests/ui/never_type/return-never-coerce.run.stderr b/tests/ui/never_type/return-never-coerce.run.stderr new file mode 100644 index 0000000000000..a425ac8e7881b --- /dev/null +++ b/tests/ui/never_type/return-never-coerce.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/return-never-coerce.rs:12:5: +aah! +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/nll/issue-51345-2.rs b/tests/ui/nll/issue-51345-2.rs index f2501fdbab405..ca400a5104d3e 100644 --- a/tests/ui/nll/issue-51345-2.rs +++ b/tests/ui/nll/issue-51345-2.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked -//@ error-pattern:explicit panic +//@ check-run-results:thread 'main' panicked +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/nll/issue-51345-2.run.stderr b/tests/ui/nll/issue-51345-2.run.stderr new file mode 100644 index 0000000000000..f585a73156643 --- /dev/null +++ b/tests/ui/nll/issue-51345-2.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-51345-2.rs:8:26: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/divide-by-zero.rs b/tests/ui/numbers-arithmetic/divide-by-zero.rs index 626daf9771ded..a806520b911ee 100644 --- a/tests/ui/numbers-arithmetic/divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/divide-by-zero.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:attempt to divide by zero +//@ check-run-results:attempt to divide by zero //@ ignore-emscripten no processes #[allow(unconditional_panic)] diff --git a/tests/ui/numbers-arithmetic/divide-by-zero.run.stderr b/tests/ui/numbers-arithmetic/divide-by-zero.run.stderr new file mode 100644 index 0000000000000..3146cdb159cbc --- /dev/null +++ b/tests/ui/numbers-arithmetic/divide-by-zero.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/divide-by-zero.rs:8:14: +attempt to divide by zero +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs index 8014bae2889c4..4abad452fb589 100644 --- a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-add-assign-overflow.rs +//@ check-run-results:location-add-assign-overflow.rs fn main() { let mut a: u8 = 255; diff --git a/tests/ui/numbers-arithmetic/location-add-assign-overflow.run.stderr b/tests/ui/numbers-arithmetic/location-add-assign-overflow.run.stderr new file mode 100644 index 0000000000000..07872b28f032b --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-add-assign-overflow.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-add-assign-overflow.rs:6:5: +attempt to add with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-add-overflow.rs b/tests/ui/numbers-arithmetic/location-add-overflow.rs index 0d2e52d532efa..81a88a01d7645 100644 --- a/tests/ui/numbers-arithmetic/location-add-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-add-overflow.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-add-overflow.rs +//@ check-run-results:location-add-overflow.rs fn main() { let _: u8 = 255 + &1; diff --git a/tests/ui/numbers-arithmetic/location-add-overflow.run.stderr b/tests/ui/numbers-arithmetic/location-add-overflow.run.stderr new file mode 100644 index 0000000000000..476112d29c500 --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-add-overflow.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-add-overflow.rs:5:17: +attempt to add with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs index 63fbab5ecc49c..521e7e82769fc 100644 --- a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-divide-assign-by-zero.rs +//@ check-run-results:location-divide-assign-by-zero.rs fn main() { let mut a = 1; diff --git a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.run.stderr b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.run.stderr new file mode 100644 index 0000000000000..67ab55209f45a --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-divide-assign-by-zero.rs:6:5: +attempt to divide by zero +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs index 88c1b51c1bb4e..16809d44d2c42 100644 --- a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-divide-by-zero.rs +//@ check-run-results:location-divide-by-zero.rs // https://github.com/rust-lang/rust/issues/114814 diff --git a/tests/ui/numbers-arithmetic/location-divide-by-zero.run.stderr b/tests/ui/numbers-arithmetic/location-divide-by-zero.run.stderr new file mode 100644 index 0000000000000..d850ea8dfc00a --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-divide-by-zero.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-divide-by-zero.rs:7:13: +attempt to divide by zero +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs index ae62f5c26d9a4..f54494114f5c9 100644 --- a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-mod-assign-by-zero.rs +//@ check-run-results:location-mod-assign-by-zero.rs fn main() { let mut a = 1; diff --git a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.run.stderr b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.run.stderr new file mode 100644 index 0000000000000..2daea7843499f --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-mod-assign-by-zero.rs:6:5: +attempt to calculate the remainder with a divisor of zero +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs index 6a2e1b158bf7f..d2b8e02ec7436 100644 --- a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-mod-by-zero.rs +//@ check-run-results:location-mod-by-zero.rs fn main() { let _ = 1 % &0; diff --git a/tests/ui/numbers-arithmetic/location-mod-by-zero.run.stderr b/tests/ui/numbers-arithmetic/location-mod-by-zero.run.stderr new file mode 100644 index 0000000000000..f4d900f9c6639 --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-mod-by-zero.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-mod-by-zero.rs:5:13: +attempt to calculate the remainder with a divisor of zero +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs index 07cec7d173034..d306c9cd86d3d 100644 --- a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-mul-assign-overflow.rs +//@ check-run-results:location-mul-assign-overflow.rs fn main() { let mut a: u8 = 255; diff --git a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.run.stderr b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.run.stderr new file mode 100644 index 0000000000000..92a260e077331 --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-mul-assign-overflow.rs:6:5: +attempt to multiply with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-mul-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-overflow.rs index 0a00d3beaa786..918bed47ed918 100644 --- a/tests/ui/numbers-arithmetic/location-mul-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-mul-overflow.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-mul-overflow.rs +//@ check-run-results:location-mul-overflow.rs fn main() { let _: u8 = 255 * &2; diff --git a/tests/ui/numbers-arithmetic/location-mul-overflow.run.stderr b/tests/ui/numbers-arithmetic/location-mul-overflow.run.stderr new file mode 100644 index 0000000000000..720c7355c05bc --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-mul-overflow.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-mul-overflow.rs:5:17: +attempt to multiply with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs index 13f074b0ffef3..9363b38cc0907 100644 --- a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-sub-assign-overflow.rs +//@ check-run-results:location-sub-assign-overflow.rs fn main() { let mut a: u8 = 0; diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.run.stderr b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.run.stderr new file mode 100644 index 0000000000000..8c3d5b3a8d1a1 --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-sub-assign-overflow.rs:6:5: +attempt to subtract with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/location-sub-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-overflow.rs index 9a0fabe1cd63c..18b16990fda01 100644 --- a/tests/ui/numbers-arithmetic/location-sub-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-sub-overflow.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:location-sub-overflow.rs +//@ check-run-results:location-sub-overflow.rs fn main() { let _: u8 = 0 - &1; diff --git a/tests/ui/numbers-arithmetic/location-sub-overflow.run.stderr b/tests/ui/numbers-arithmetic/location-sub-overflow.run.stderr new file mode 100644 index 0000000000000..9c53e3ca73aee --- /dev/null +++ b/tests/ui/numbers-arithmetic/location-sub-overflow.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/location-sub-overflow.rs:5:17: +attempt to subtract with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/mod-zero.rs b/tests/ui/numbers-arithmetic/mod-zero.rs index f3cc7c9fc88f0..49115876e23ad 100644 --- a/tests/ui/numbers-arithmetic/mod-zero.rs +++ b/tests/ui/numbers-arithmetic/mod-zero.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:attempt to calculate the remainder with a divisor of zero +//@ check-run-results:attempt to calculate the remainder with a divisor of zero //@ ignore-emscripten no processes #[allow(unconditional_panic)] diff --git a/tests/ui/numbers-arithmetic/mod-zero.run.stderr b/tests/ui/numbers-arithmetic/mod-zero.run.stderr new file mode 100644 index 0000000000000..75ef2a9c300e6 --- /dev/null +++ b/tests/ui/numbers-arithmetic/mod-zero.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/mod-zero.rs:8:14: +attempt to calculate the remainder with a divisor of zero +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/overflowing-add.rs b/tests/ui/numbers-arithmetic/overflowing-add.rs index 16583f6eb749f..6190d002fcf6c 100644 --- a/tests/ui/numbers-arithmetic/overflowing-add.rs +++ b/tests/ui/numbers-arithmetic/overflowing-add.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked -//@ error-pattern:attempt to add with overflow +//@ check-run-results:thread 'main' panicked +//@ check-run-results:attempt to add with overflow //@ compile-flags: -C debug-assertions //@ ignore-emscripten no processes diff --git a/tests/ui/numbers-arithmetic/overflowing-add.run.stderr b/tests/ui/numbers-arithmetic/overflowing-add.run.stderr new file mode 100644 index 0000000000000..c87525aaacfff --- /dev/null +++ b/tests/ui/numbers-arithmetic/overflowing-add.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/overflowing-add.rs:10:14: +attempt to add with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/overflowing-mul.rs b/tests/ui/numbers-arithmetic/overflowing-mul.rs index 59575d2e86e07..5e80de33ff8a1 100644 --- a/tests/ui/numbers-arithmetic/overflowing-mul.rs +++ b/tests/ui/numbers-arithmetic/overflowing-mul.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked -//@ error-pattern:attempt to multiply with overflow +//@ check-run-results:thread 'main' panicked +//@ check-run-results:attempt to multiply with overflow //@ ignore-emscripten no processes //@ compile-flags: -C debug-assertions diff --git a/tests/ui/numbers-arithmetic/overflowing-mul.run.stderr b/tests/ui/numbers-arithmetic/overflowing-mul.run.stderr new file mode 100644 index 0000000000000..520128341c63e --- /dev/null +++ b/tests/ui/numbers-arithmetic/overflowing-mul.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/overflowing-mul.rs:10:13: +attempt to multiply with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs index 8aa0d04e500c7..37e4473287816 100644 --- a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs +++ b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:attempt to negate with overflow +//@ check-run-results:attempt to negate with overflow //@ ignore-emscripten no processes //@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.run.stderr b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.run.stderr new file mode 100644 index 0000000000000..33fe9fd91c50b --- /dev/null +++ b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $SRC_DIR/core/src/ops/arith.rs:LL:COL: +attempt to negate with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs index 69e22c2262a3a..5af28ba23c96c 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked -//@ error-pattern:attempt to multiply with overflow +//@ check-run-results:thread 'main' panicked +//@ check-run-results:attempt to multiply with overflow //@ ignore-emscripten no processes //@ compile-flags: -C debug-assertions diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-signed.run.stderr b/tests/ui/numbers-arithmetic/overflowing-pow-signed.run.stderr new file mode 100644 index 0000000000000..8e8a8c99b7070 --- /dev/null +++ b/tests/ui/numbers-arithmetic/overflowing-pow-signed.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $SRC_DIR/core/src/num/mod.rs:LL:COL: +attempt to multiply with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs index f980033c480e1..ef47bd72eaf34 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked -//@ error-pattern:attempt to multiply with overflow +//@ check-run-results:thread 'main' panicked +//@ check-run-results:attempt to multiply with overflow //@ ignore-emscripten no processes //@ compile-flags: -C debug-assertions diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.run.stderr b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.run.stderr new file mode 100644 index 0000000000000..8e8a8c99b7070 --- /dev/null +++ b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $SRC_DIR/core/src/num/mod.rs:LL:COL: +attempt to multiply with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/overflowing-sub.rs b/tests/ui/numbers-arithmetic/overflowing-sub.rs index 44aadf6b3e70e..db142a4a37d00 100644 --- a/tests/ui/numbers-arithmetic/overflowing-sub.rs +++ b/tests/ui/numbers-arithmetic/overflowing-sub.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked -//@ error-pattern:attempt to subtract with overflow +//@ check-run-results:thread 'main' panicked +//@ check-run-results:attempt to subtract with overflow //@ ignore-emscripten no processes //@ compile-flags: -C debug-assertions diff --git a/tests/ui/numbers-arithmetic/overflowing-sub.run.stderr b/tests/ui/numbers-arithmetic/overflowing-sub.run.stderr new file mode 100644 index 0000000000000..7f48e13f75a88 --- /dev/null +++ b/tests/ui/numbers-arithmetic/overflowing-sub.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/overflowing-sub.rs:10:14: +attempt to subtract with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/numbers-arithmetic/promoted_overflow.rs b/tests/ui/numbers-arithmetic/promoted_overflow.rs index 96c5f3b87e18c..06f7c3de54c67 100644 --- a/tests/ui/numbers-arithmetic/promoted_overflow.rs +++ b/tests/ui/numbers-arithmetic/promoted_overflow.rs @@ -1,7 +1,7 @@ #![allow(arithmetic_overflow)] //@ run-fail -//@ error-pattern: overflow +//@ check-run-results: overflow //@ compile-flags: -C overflow-checks=yes // for some reason, fails to match error string on // wasm32-unknown-unknown with stripped debuginfo and symbols, diff --git a/tests/ui/numbers-arithmetic/promoted_overflow.run.stderr b/tests/ui/numbers-arithmetic/promoted_overflow.run.stderr new file mode 100644 index 0000000000000..0ee2b214b2c1a --- /dev/null +++ b/tests/ui/numbers-arithmetic/promoted_overflow.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/promoted_overflow.rs:12:28: +attempt to subtract with overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panic-runtime/unwind-interleaved.rs b/tests/ui/panic-runtime/unwind-interleaved.rs index e5505cd893a11..22a4afc94b592 100644 --- a/tests/ui/panic-runtime/unwind-interleaved.rs +++ b/tests/ui/panic-runtime/unwind-interleaved.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn a() {} diff --git a/tests/ui/panic-runtime/unwind-interleaved.run.stderr b/tests/ui/panic-runtime/unwind-interleaved.run.stderr new file mode 100644 index 0000000000000..4409324c7089f --- /dev/null +++ b/tests/ui/panic-runtime/unwind-interleaved.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unwind-interleaved.rs:8:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panic-runtime/unwind-rec.rs b/tests/ui/panic-runtime/unwind-rec.rs index d4b53c8876813..e305226d26b5e 100644 --- a/tests/ui/panic-runtime/unwind-rec.rs +++ b/tests/ui/panic-runtime/unwind-rec.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn build() -> Vec { diff --git a/tests/ui/panic-runtime/unwind-rec.run.stderr b/tests/ui/panic-runtime/unwind-rec.run.stderr new file mode 100644 index 0000000000000..432e56323f57c --- /dev/null +++ b/tests/ui/panic-runtime/unwind-rec.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unwind-rec.rs:6:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panic-runtime/unwind-rec2.rs b/tests/ui/panic-runtime/unwind-rec2.rs index 6ac9a5a580547..747342f951735 100644 --- a/tests/ui/panic-runtime/unwind-rec2.rs +++ b/tests/ui/panic-runtime/unwind-rec2.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn build1() -> Vec { diff --git a/tests/ui/panic-runtime/unwind-rec2.run.stderr b/tests/ui/panic-runtime/unwind-rec2.run.stderr new file mode 100644 index 0000000000000..30ff71e50c764 --- /dev/null +++ b/tests/ui/panic-runtime/unwind-rec2.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unwind-rec2.rs:10:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panic-runtime/unwind-unique.rs b/tests/ui/panic-runtime/unwind-unique.rs index a6cd59690ca92..3d92780390e4a 100644 --- a/tests/ui/panic-runtime/unwind-unique.rs +++ b/tests/ui/panic-runtime/unwind-unique.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit panic +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn failfn() { diff --git a/tests/ui/panic-runtime/unwind-unique.run.stderr b/tests/ui/panic-runtime/unwind-unique.run.stderr new file mode 100644 index 0000000000000..7a3a541cf8823 --- /dev/null +++ b/tests/ui/panic-runtime/unwind-unique.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unwind-unique.rs:6:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/args-panic.rs b/tests/ui/panics/args-panic.rs index 091ced9b47917..8eb69279c2a00 100644 --- a/tests/ui/panics/args-panic.rs +++ b/tests/ui/panics/args-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:meep +//@ check-run-results:meep //@ ignore-emscripten no processes fn f(_a: isize, _b: isize, _c: Box) { diff --git a/tests/ui/panics/args-panic.run.stderr b/tests/ui/panics/args-panic.run.stderr new file mode 100644 index 0000000000000..905b1657522b3 --- /dev/null +++ b/tests/ui/panics/args-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/args-panic.rs:10:10: +meep +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/doublepanic.rs b/tests/ui/panics/doublepanic.rs index 51945ea708c2e..b37137358f360 100644 --- a/tests/ui/panics/doublepanic.rs +++ b/tests/ui/panics/doublepanic.rs @@ -1,7 +1,7 @@ #![allow(unreachable_code)] //@ run-fail -//@ error-pattern:One +//@ check-run-results:One //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/doublepanic.run.stderr b/tests/ui/panics/doublepanic.run.stderr new file mode 100644 index 0000000000000..ce9f1c5646182 --- /dev/null +++ b/tests/ui/panics/doublepanic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/doublepanic.rs:8:5: +One +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/explicit-panic-msg.rs b/tests/ui/panics/explicit-panic-msg.rs index ef0c5b39f0990..aa9dab759d777 100644 --- a/tests/ui/panics/explicit-panic-msg.rs +++ b/tests/ui/panics/explicit-panic-msg.rs @@ -3,7 +3,7 @@ #![allow(non_fmt_panics)] //@ run-fail -//@ error-pattern:wooooo +//@ check-run-results:wooooo //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/explicit-panic-msg.run.stderr b/tests/ui/panics/explicit-panic-msg.run.stderr new file mode 100644 index 0000000000000..8f85273e15a77 --- /dev/null +++ b/tests/ui/panics/explicit-panic-msg.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/explicit-panic-msg.rs:14:5: +wooooo +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/explicit-panic.rs b/tests/ui/panics/explicit-panic.rs index 34e952ef68f9b..eac94041053f9 100644 --- a/tests/ui/panics/explicit-panic.rs +++ b/tests/ui/panics/explicit-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:explicit +//@ check-run-results:explicit //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/explicit-panic.run.stderr b/tests/ui/panics/explicit-panic.run.stderr new file mode 100644 index 0000000000000..8e4918eaeeb6e --- /dev/null +++ b/tests/ui/panics/explicit-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/explicit-panic.rs:6:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/fmt-panic.rs b/tests/ui/panics/fmt-panic.rs index 032f65cb2e4b3..c324a0d81d174 100644 --- a/tests/ui/panics/fmt-panic.rs +++ b/tests/ui/panics/fmt-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:meh +//@ check-run-results:meh //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/fmt-panic.run.stderr b/tests/ui/panics/fmt-panic.run.stderr new file mode 100644 index 0000000000000..74b05cd33297a --- /dev/null +++ b/tests/ui/panics/fmt-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/fmt-panic.rs:7:5: +meh +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/main-panic.rs b/tests/ui/panics/main-panic.rs index b69f1656ca491..55eb1d5cb5bd8 100644 --- a/tests/ui/panics/main-panic.rs +++ b/tests/ui/panics/main-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked at +//@ check-run-results:thread 'main' panicked at //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/main-panic.run.stderr b/tests/ui/panics/main-panic.run.stderr new file mode 100644 index 0000000000000..4ae51faf33f1f --- /dev/null +++ b/tests/ui/panics/main-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/main-panic.rs:6:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-arg.rs b/tests/ui/panics/panic-arg.rs index 10be6d5ff6ce1..602af92fd4242 100644 --- a/tests/ui/panics/panic-arg.rs +++ b/tests/ui/panics/panic-arg.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:woe +//@ check-run-results:woe //@ ignore-emscripten no processes fn f(a: isize) { diff --git a/tests/ui/panics/panic-arg.run.stderr b/tests/ui/panics/panic-arg.run.stderr new file mode 100644 index 0000000000000..250c500df3548 --- /dev/null +++ b/tests/ui/panics/panic-arg.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-arg.rs:10:7: +woe +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-in-cleanup.rs b/tests/ui/panics/panic-in-cleanup.rs index 8cddeb37348d0..9d25564499a6a 100644 --- a/tests/ui/panics/panic-in-cleanup.rs +++ b/tests/ui/panics/panic-in-cleanup.rs @@ -1,7 +1,7 @@ //@ run-fail //@ exec-env:RUST_BACKTRACE=0 //@ check-run-results -//@ error-pattern: panic in a destructor during cleanup +//@ check-run-results: panic in a destructor during cleanup //@ normalize-stderr: "\n +[0-9]+:[^\n]+" -> "" //@ normalize-stderr: "\n +at [^\n]+" -> "" //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" diff --git a/tests/ui/panics/panic-in-ffi.rs b/tests/ui/panics/panic-in-ffi.rs index 6068e4fdc59be..8ad5b106353b2 100644 --- a/tests/ui/panics/panic-in-ffi.rs +++ b/tests/ui/panics/panic-in-ffi.rs @@ -1,8 +1,8 @@ //@ run-fail //@ exec-env:RUST_BACKTRACE=0 //@ check-run-results -//@ error-pattern: panic in a function that cannot unwind -//@ error-pattern: Noisy Drop +//@ check-run-results: panic in a function that cannot unwind +//@ check-run-results: Noisy Drop //@ normalize-stderr: "\n +[0-9]+:[^\n]+" -> "" //@ normalize-stderr: "\n +at [^\n]+" -> "" //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" diff --git a/tests/ui/panics/panic-in-message-fmt.rs b/tests/ui/panics/panic-in-message-fmt.rs index 1e9bbaf45c54f..502924f8c86c4 100644 --- a/tests/ui/panics/panic-in-message-fmt.rs +++ b/tests/ui/panics/panic-in-message-fmt.rs @@ -3,7 +3,7 @@ //@ run-fail //@ exec-env:RUST_BACKTRACE=0 //@ check-run-results -//@ error-pattern: panicked while processing panic +//@ check-run-results panicked while processing panic //@ normalize-stderr: "\n +[0-9]+:[^\n]+" -> "" //@ normalize-stderr: "\n +at [^\n]+" -> "" //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" diff --git a/tests/ui/panics/panic-macro-any-wrapped.rs b/tests/ui/panics/panic-macro-any-wrapped.rs index 7c6790e35fd16..2c3d5be28b136 100644 --- a/tests/ui/panics/panic-macro-any-wrapped.rs +++ b/tests/ui/panics/panic-macro-any-wrapped.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:panicked -//@ error-pattern:Box +//@ check-run-results:panicked +//@ check-run-results:Box //@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-any-wrapped.run.stderr b/tests/ui/panics/panic-macro-any-wrapped.run.stderr new file mode 100644 index 0000000000000..26b1216d67d2b --- /dev/null +++ b/tests/ui/panics/panic-macro-any-wrapped.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-macro-any-wrapped.rs:9:5: +Box +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-macro-any.rs b/tests/ui/panics/panic-macro-any.rs index 75397333fa4a3..b7c829bd89de2 100644 --- a/tests/ui/panics/panic-macro-any.rs +++ b/tests/ui/panics/panic-macro-any.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:panicked -//@ error-pattern:Box +//@ check-run-results:panicked +//@ check-run-results:Box //@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-any.run.stderr b/tests/ui/panics/panic-macro-any.run.stderr new file mode 100644 index 0000000000000..3a036ddae025b --- /dev/null +++ b/tests/ui/panics/panic-macro-any.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-macro-any.rs:9:5: +Box +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-macro-explicit.rs b/tests/ui/panics/panic-macro-explicit.rs index 2c7b84d99fea2..d89a7babfadc9 100644 --- a/tests/ui/panics/panic-macro-explicit.rs +++ b/tests/ui/panics/panic-macro-explicit.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:panicked -//@ error-pattern:explicit panic +//@ check-run-results:panicked +//@ check-run-results:explicit panic //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-macro-explicit.run.stderr b/tests/ui/panics/panic-macro-explicit.run.stderr new file mode 100644 index 0000000000000..ca60392cf6101 --- /dev/null +++ b/tests/ui/panics/panic-macro-explicit.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-macro-explicit.rs:7:5: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-macro-fmt.rs b/tests/ui/panics/panic-macro-fmt.rs index 1a63a06c75ad3..e9280e16b4bfa 100644 --- a/tests/ui/panics/panic-macro-fmt.rs +++ b/tests/ui/panics/panic-macro-fmt.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:panicked -//@ error-pattern:test-fail-fmt 42 rust +//@ check-run-results:panicked +//@ check-run-results:test-fail-fmt 42 rust //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-macro-fmt.run.stderr b/tests/ui/panics/panic-macro-fmt.run.stderr new file mode 100644 index 0000000000000..8d1ea8a82da09 --- /dev/null +++ b/tests/ui/panics/panic-macro-fmt.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-macro-fmt.rs:7:5: +test-fail-fmt 42 rust +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-macro-owned.rs b/tests/ui/panics/panic-macro-owned.rs index 1878f3d52abde..b63c1eb5d6e5f 100644 --- a/tests/ui/panics/panic-macro-owned.rs +++ b/tests/ui/panics/panic-macro-owned.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:panicked -//@ error-pattern:test-fail-owned +//@ check-run-results:panicked +//@ check-run-results:test-fail-owned //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-macro-owned.run.stderr b/tests/ui/panics/panic-macro-owned.run.stderr new file mode 100644 index 0000000000000..25d816ca08ffc --- /dev/null +++ b/tests/ui/panics/panic-macro-owned.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-macro-owned.rs:7:5: +test-fail-owned +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-macro-static.rs b/tests/ui/panics/panic-macro-static.rs index 018166e60cfab..791d8a27070db 100644 --- a/tests/ui/panics/panic-macro-static.rs +++ b/tests/ui/panics/panic-macro-static.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:panicked -//@ error-pattern:test-fail-static +//@ check-run-results:panicked +//@ check-run-results:test-fail-static //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-macro-static.run.stderr b/tests/ui/panics/panic-macro-static.run.stderr new file mode 100644 index 0000000000000..0f11b47c8a955 --- /dev/null +++ b/tests/ui/panics/panic-macro-static.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-macro-static.rs:7:5: +test-fail-static +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-main.rs b/tests/ui/panics/panic-main.rs index d71fca0754e9e..274c82be340d5 100644 --- a/tests/ui/panics/panic-main.rs +++ b/tests/ui/panics/panic-main.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:moop +//@ check-run-results:moop //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic-main.run.stderr b/tests/ui/panics/panic-main.run.stderr new file mode 100644 index 0000000000000..4139a2971af45 --- /dev/null +++ b/tests/ui/panics/panic-main.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-main.rs:6:5: +moop +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-parens.rs b/tests/ui/panics/panic-parens.rs index 271d0363cab8a..8b4d124828253 100644 --- a/tests/ui/panics/panic-parens.rs +++ b/tests/ui/panics/panic-parens.rs @@ -2,7 +2,7 @@ // certain positions //@ run-fail -//@ error-pattern:oops +//@ check-run-results:oops //@ ignore-emscripten no processes fn bigpanic() { diff --git a/tests/ui/panics/panic-parens.run.stderr b/tests/ui/panics/panic-parens.run.stderr new file mode 100644 index 0000000000000..1043e7f7ff702 --- /dev/null +++ b/tests/ui/panics/panic-parens.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-parens.rs:9:12: +oops +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-set-handler.rs b/tests/ui/panics/panic-set-handler.rs index 39286ca865ba5..825583c068009 100644 --- a/tests/ui/panics/panic-set-handler.rs +++ b/tests/ui/panics/panic-set-handler.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:greetings from the panic handler +//@ check-run-results:greetings from the panic handler //@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-set-handler.run.stderr b/tests/ui/panics/panic-set-handler.run.stderr new file mode 100644 index 0000000000000..f9e95ee965e45 --- /dev/null +++ b/tests/ui/panics/panic-set-handler.run.stderr @@ -0,0 +1 @@ +greetings from the panic handler diff --git a/tests/ui/panics/panic-set-unset-handler.rs b/tests/ui/panics/panic-set-unset-handler.rs index 02f1599338b66..97cc1c08fc15c 100644 --- a/tests/ui/panics/panic-set-unset-handler.rs +++ b/tests/ui/panics/panic-set-unset-handler.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked -//@ error-pattern:foobar +//@ check-run-results:thread 'main' panicked +//@ check-run-results:foobar //@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-set-unset-handler.run.stderr b/tests/ui/panics/panic-set-unset-handler.run.stderr new file mode 100644 index 0000000000000..46ff1ba7de891 --- /dev/null +++ b/tests/ui/panics/panic-set-unset-handler.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-set-unset-handler.rs:13:5: +foobar +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-take-handler-nop.rs b/tests/ui/panics/panic-take-handler-nop.rs index 89e1d234df138..935097a3b8ea6 100644 --- a/tests/ui/panics/panic-take-handler-nop.rs +++ b/tests/ui/panics/panic-take-handler-nop.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'main' panicked -//@ error-pattern:foobar +//@ check-run-results:thread 'main' panicked +//@ check-run-results:foobar //@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-take-handler-nop.run.stderr b/tests/ui/panics/panic-take-handler-nop.run.stderr new file mode 100644 index 0000000000000..8003f35c21bb8 --- /dev/null +++ b/tests/ui/panics/panic-take-handler-nop.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic-take-handler-nop.rs:10:5: +foobar +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/panic-task-name-none.rs b/tests/ui/panics/panic-task-name-none.rs index 8695771ff5eaa..d590485507f02 100644 --- a/tests/ui/panics/panic-task-name-none.rs +++ b/tests/ui/panics/panic-task-name-none.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread '' panicked -//@ error-pattern:test +//@ check-run-results:thread '' panicked +//@ check-run-results:test //@ needs-threads use std::thread; diff --git a/tests/ui/panics/panic-task-name-none.run.stderr b/tests/ui/panics/panic-task-name-none.run.stderr new file mode 100644 index 0000000000000..d024c90f48257 --- /dev/null +++ b/tests/ui/panics/panic-task-name-none.run.stderr @@ -0,0 +1,5 @@ +thread '' panicked at $DIR/panic-task-name-none.rs:10:32: +test +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread 'main' panicked at $DIR/panic-task-name-none.rs:13:5: +assertion failed: r.is_ok() diff --git a/tests/ui/panics/panic-task-name-owned.rs b/tests/ui/panics/panic-task-name-owned.rs index 42ae33b5d351b..d4395606a88c4 100644 --- a/tests/ui/panics/panic-task-name-owned.rs +++ b/tests/ui/panics/panic-task-name-owned.rs @@ -1,6 +1,6 @@ //@ run-fail -//@ error-pattern:thread 'owned name' panicked -//@ error-pattern:test +//@ check-run-results:thread 'owned name' panicked +//@ check-run-results:test //@ needs-threads use std::thread::Builder; diff --git a/tests/ui/panics/panic-task-name-owned.run.stderr b/tests/ui/panics/panic-task-name-owned.run.stderr new file mode 100644 index 0000000000000..29bb3cd498a3e --- /dev/null +++ b/tests/ui/panics/panic-task-name-owned.run.stderr @@ -0,0 +1,5 @@ +thread 'owned name' panicked at $DIR/panic-task-name-owned.rs:12:25: +test +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread 'main' panicked at $DIR/panic-task-name-owned.rs:17:22: +called `Result::unwrap()` on an `Err` value: Any { .. } diff --git a/tests/ui/panics/panic.rs b/tests/ui/panics/panic.rs index b9721ac8230f7..54cfc6bee424f 100644 --- a/tests/ui/panics/panic.rs +++ b/tests/ui/panics/panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:1 == 2 +//@ check-run-results:1 == 2 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/panic.run.stderr b/tests/ui/panics/panic.run.stderr new file mode 100644 index 0000000000000..d4993dd6527dd --- /dev/null +++ b/tests/ui/panics/panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/panic.rs:6:5: +assertion failed: 1 == 2 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/result-get-panic.rs b/tests/ui/panics/result-get-panic.rs index d7f6dfe8406da..af4810c39449a 100644 --- a/tests/ui/panics/result-get-panic.rs +++ b/tests/ui/panics/result-get-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:called `Result::unwrap()` on an `Err` value +//@ check-run-results:called `Result::unwrap()` on an `Err` value //@ ignore-emscripten no processes use std::result::Result::Err; diff --git a/tests/ui/panics/result-get-panic.run.stderr b/tests/ui/panics/result-get-panic.run.stderr new file mode 100644 index 0000000000000..7a46648e54cd4 --- /dev/null +++ b/tests/ui/panics/result-get-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/result-get-panic.rs:8:62: +called `Result::unwrap()` on an `Err` value: "kitty" +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/unique-panic.rs b/tests/ui/panics/unique-panic.rs index 63ff38b6d1287..131fa40cb0443 100644 --- a/tests/ui/panics/unique-panic.rs +++ b/tests/ui/panics/unique-panic.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern: panic +//@ check-run-results: panic // for some reason, fails to match error string on // wasm32-unknown-unknown with stripped debuginfo and symbols, // so don't strip it diff --git a/tests/ui/panics/unique-panic.run.stderr b/tests/ui/panics/unique-panic.run.stderr new file mode 100644 index 0000000000000..e528d7e115f34 --- /dev/null +++ b/tests/ui/panics/unique-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/unique-panic.rs:9:14: +explicit panic +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/while-body-panics.rs b/tests/ui/panics/while-body-panics.rs index bddcd5d50ce4c..571e4cdae5524 100644 --- a/tests/ui/panics/while-body-panics.rs +++ b/tests/ui/panics/while-body-panics.rs @@ -1,7 +1,7 @@ #![allow(while_true)] //@ run-fail -//@ error-pattern:quux +//@ check-run-results:quux //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/while-body-panics.run.stderr b/tests/ui/panics/while-body-panics.run.stderr new file mode 100644 index 0000000000000..529f0737296bf --- /dev/null +++ b/tests/ui/panics/while-body-panics.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/while-body-panics.rs:10:13: +quux +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/panics/while-panic.rs b/tests/ui/panics/while-panic.rs index 2961e8599c356..cc1189d8ab83b 100644 --- a/tests/ui/panics/while-panic.rs +++ b/tests/ui/panics/while-panic.rs @@ -1,7 +1,7 @@ #![allow(while_true)] //@ run-fail -//@ error-pattern:giraffe +//@ check-run-results:giraffe //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/panics/while-panic.run.stderr b/tests/ui/panics/while-panic.run.stderr new file mode 100644 index 0000000000000..d8462f2856e33 --- /dev/null +++ b/tests/ui/panics/while-panic.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/while-panic.rs:10:13: +giraffe +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/precondition-checks/alignment.rs b/tests/ui/precondition-checks/alignment.rs index 92400528fa07f..a5ea4e06a09c9 100644 --- a/tests/ui/precondition-checks/alignment.rs +++ b/tests/ui/precondition-checks/alignment.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: Alignment::new_unchecked requires +//@ check-run-results: unsafe precondition(s) violated: Alignment::new_unchecked requires #![feature(ptr_alignment_type)] diff --git a/tests/ui/precondition-checks/alignment.run.stderr b/tests/ui/precondition-checks/alignment.run.stderr new file mode 100644 index 0000000000000..367f1c7ef156a --- /dev/null +++ b/tests/ui/precondition-checks/alignment.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: Alignment::new_unchecked requires a power of two +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs b/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs index 30c6f79fb08f0..f518a691e2f39 100644 --- a/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs +++ b/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: `ascii::Char::digit_unchecked` input cannot exceed 9 +//@ check-run-results: unsafe precondition(s) violated: `ascii::Char::digit_unchecked` #![feature(ascii_char)] diff --git a/tests/ui/precondition-checks/ascii-char-digit_unchecked.run.stderr b/tests/ui/precondition-checks/ascii-char-digit_unchecked.run.stderr new file mode 100644 index 0000000000000..c06f81958b5f5 --- /dev/null +++ b/tests/ui/precondition-checks/ascii-char-digit_unchecked.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: `ascii::Char::digit_unchecked` input cannot exceed 9. +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/assert_unchecked.rs b/tests/ui/precondition-checks/assert_unchecked.rs index 22b2b41455021..0c27f486024f5 100644 --- a/tests/ui/precondition-checks/assert_unchecked.rs +++ b/tests/ui/precondition-checks/assert_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: hint::assert_unchecked must never be called when the condition is false +//@ check-run-results: unsafe precondition(s) violated: hint::assert_unchecked must never fn main() { unsafe { diff --git a/tests/ui/precondition-checks/assert_unchecked.run.stderr b/tests/ui/precondition-checks/assert_unchecked.run.stderr new file mode 100644 index 0000000000000..e93a37813fa2f --- /dev/null +++ b/tests/ui/precondition-checks/assert_unchecked.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: hint::assert_unchecked must never be called when the condition is false +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/char-from_u32_unchecked.rs b/tests/ui/precondition-checks/char-from_u32_unchecked.rs index d950f20c77208..a1652299ffa15 100644 --- a/tests/ui/precondition-checks/char-from_u32_unchecked.rs +++ b/tests/ui/precondition-checks/char-from_u32_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: invalid value for `char` +//@ check-run-results: unsafe precondition(s) violated: invalid value for `char` fn main() { unsafe { diff --git a/tests/ui/precondition-checks/char-from_u32_unchecked.run.stderr b/tests/ui/precondition-checks/char-from_u32_unchecked.run.stderr new file mode 100644 index 0000000000000..10bb0f961bee4 --- /dev/null +++ b/tests/ui/precondition-checks/char-from_u32_unchecked.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: invalid value for `char` +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy-nonoverlapping.misaligned_dst.run.stderr b/tests/ui/precondition-checks/copy-nonoverlapping.misaligned_dst.run.stderr new file mode 100644 index 0000000000000..e1ff4665e71ef --- /dev/null +++ b/tests/ui/precondition-checks/copy-nonoverlapping.misaligned_dst.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy-nonoverlapping.misaligned_src.run.stderr b/tests/ui/precondition-checks/copy-nonoverlapping.misaligned_src.run.stderr new file mode 100644 index 0000000000000..e1ff4665e71ef --- /dev/null +++ b/tests/ui/precondition-checks/copy-nonoverlapping.misaligned_src.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy-nonoverlapping.null_dst.run.stderr b/tests/ui/precondition-checks/copy-nonoverlapping.null_dst.run.stderr new file mode 100644 index 0000000000000..e1ff4665e71ef --- /dev/null +++ b/tests/ui/precondition-checks/copy-nonoverlapping.null_dst.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy-nonoverlapping.null_src.run.stderr b/tests/ui/precondition-checks/copy-nonoverlapping.null_src.run.stderr new file mode 100644 index 0000000000000..e1ff4665e71ef --- /dev/null +++ b/tests/ui/precondition-checks/copy-nonoverlapping.null_src.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy-nonoverlapping.overlapping.run.stderr b/tests/ui/precondition-checks/copy-nonoverlapping.overlapping.run.stderr new file mode 100644 index 0000000000000..e1ff4665e71ef --- /dev/null +++ b/tests/ui/precondition-checks/copy-nonoverlapping.overlapping.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy-nonoverlapping.rs b/tests/ui/precondition-checks/copy-nonoverlapping.rs index 81018e4bff3e5..057710aa4b61c 100644 --- a/tests/ui/precondition-checks/copy-nonoverlapping.rs +++ b/tests/ui/precondition-checks/copy-nonoverlapping.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::copy_nonoverlapping requires +//@ check-run-results: unsafe precondition(s) violated: ptr::copy_nonoverlapping requires //@ revisions: null_src null_dst misaligned_src misaligned_dst overlapping use std::ptr; diff --git a/tests/ui/precondition-checks/copy.misaligned_dst.run.stderr b/tests/ui/precondition-checks/copy.misaligned_dst.run.stderr new file mode 100644 index 0000000000000..ac9e5fa9b5455 --- /dev/null +++ b/tests/ui/precondition-checks/copy.misaligned_dst.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy requires that both pointer arguments are aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy.misaligned_src.run.stderr b/tests/ui/precondition-checks/copy.misaligned_src.run.stderr new file mode 100644 index 0000000000000..ac9e5fa9b5455 --- /dev/null +++ b/tests/ui/precondition-checks/copy.misaligned_src.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy requires that both pointer arguments are aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy.null_dst.run.stderr b/tests/ui/precondition-checks/copy.null_dst.run.stderr new file mode 100644 index 0000000000000..ac9e5fa9b5455 --- /dev/null +++ b/tests/ui/precondition-checks/copy.null_dst.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy requires that both pointer arguments are aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy.null_src.run.stderr b/tests/ui/precondition-checks/copy.null_src.run.stderr new file mode 100644 index 0000000000000..ac9e5fa9b5455 --- /dev/null +++ b/tests/ui/precondition-checks/copy.null_src.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::copy requires that both pointer arguments are aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/copy.rs b/tests/ui/precondition-checks/copy.rs index 694853f950ab5..10ed5acbecbe3 100644 --- a/tests/ui/precondition-checks/copy.rs +++ b/tests/ui/precondition-checks/copy.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::copy requires +//@ check-run-results: unsafe precondition(s) violated: ptr::copy requires //@ revisions: null_src null_dst misaligned_src misaligned_dst use std::ptr; diff --git a/tests/ui/precondition-checks/layout.badalign.run.stderr b/tests/ui/precondition-checks/layout.badalign.run.stderr new file mode 100644 index 0000000000000..c1831f06d048e --- /dev/null +++ b/tests/ui/precondition-checks/layout.badalign.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: Layout::from_size_align_unchecked requires that align is a power of 2 and the rounded-up allocation size does not exceed isize::MAX +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/layout.rs b/tests/ui/precondition-checks/layout.rs index 4ee66cc932886..32b498c986f09 100644 --- a/tests/ui/precondition-checks/layout.rs +++ b/tests/ui/precondition-checks/layout.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: Layout::from_size_align_unchecked requires +//@ check-run-results: unsafe precondition(s) violated: Layout::from_size_align_unchecked requires //@ revisions: toolarge badalign fn main() { diff --git a/tests/ui/precondition-checks/layout.toolarge.run.stderr b/tests/ui/precondition-checks/layout.toolarge.run.stderr new file mode 100644 index 0000000000000..c1831f06d048e --- /dev/null +++ b/tests/ui/precondition-checks/layout.toolarge.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: Layout::from_size_align_unchecked requires that align is a power of 2 and the rounded-up allocation size does not exceed isize::MAX +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/nonnull.rs b/tests/ui/precondition-checks/nonnull.rs index 6b8edd4e5825e..4bc9508cd6984 100644 --- a/tests/ui/precondition-checks/nonnull.rs +++ b/tests/ui/precondition-checks/nonnull.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: NonNull::new_unchecked requires +//@ check-run-results: unsafe precondition(s) violated: NonNull::new_unchecked requires fn main() { unsafe { diff --git a/tests/ui/precondition-checks/nonnull.run.stderr b/tests/ui/precondition-checks/nonnull.run.stderr new file mode 100644 index 0000000000000..d2e97ab96387d --- /dev/null +++ b/tests/ui/precondition-checks/nonnull.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: NonNull::new_unchecked requires that the pointer is non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs b/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs index 46ce7dc356fe2..6552da9c73e08 100644 --- a/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs +++ b/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: NonZero::from_mut_unchecked requires +//@ check-run-results: unsafe precondition(s) violated: NonZero::from_mut_unchecked requires #![feature(nonzero_from_mut)] diff --git a/tests/ui/precondition-checks/nonzero-from_mut_unchecked.run.stderr b/tests/ui/precondition-checks/nonzero-from_mut_unchecked.run.stderr new file mode 100644 index 0000000000000..fb294a6c9da11 --- /dev/null +++ b/tests/ui/precondition-checks/nonzero-from_mut_unchecked.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: NonZero::from_mut_unchecked requires the argument to dereference as non-zero +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/nonzero-new_unchecked.rs b/tests/ui/precondition-checks/nonzero-new_unchecked.rs index 7827a42844fd4..4b0eb7e01008b 100644 --- a/tests/ui/precondition-checks/nonzero-new_unchecked.rs +++ b/tests/ui/precondition-checks/nonzero-new_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: NonZero::new_unchecked requires +//@ check-run-results: unsafe precondition(s) violated: NonZero::new_unchecked requires fn main() { unsafe { diff --git a/tests/ui/precondition-checks/nonzero-new_unchecked.run.stderr b/tests/ui/precondition-checks/nonzero-new_unchecked.run.stderr new file mode 100644 index 0000000000000..4c19cc82237e9 --- /dev/null +++ b/tests/ui/precondition-checks/nonzero-new_unchecked.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: NonZero::new_unchecked requires the argument to be non-zero +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/read.rs b/tests/ui/precondition-checks/read.rs index ab9921a0ceebe..bf8063a680961 100644 --- a/tests/ui/precondition-checks/read.rs +++ b/tests/ui/precondition-checks/read.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::read requires +//@ check-run-results: unsafe precondition(s) violated: ptr::read requires //@ revisions: null misaligned //@ ignore-test diff --git a/tests/ui/precondition-checks/read_volatile.misaligned.run.stderr b/tests/ui/precondition-checks/read_volatile.misaligned.run.stderr new file mode 100644 index 0000000000000..07e316b1a81aa --- /dev/null +++ b/tests/ui/precondition-checks/read_volatile.misaligned.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::read_volatile requires that the pointer argument is aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/read_volatile.null.run.stderr b/tests/ui/precondition-checks/read_volatile.null.run.stderr new file mode 100644 index 0000000000000..07e316b1a81aa --- /dev/null +++ b/tests/ui/precondition-checks/read_volatile.null.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::read_volatile requires that the pointer argument is aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/read_volatile.rs b/tests/ui/precondition-checks/read_volatile.rs index e14881d029037..15bd31d059e7a 100644 --- a/tests/ui/precondition-checks/read_volatile.rs +++ b/tests/ui/precondition-checks/read_volatile.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::read_volatile requires +//@ check-run-results: unsafe precondition(s) violated: ptr::read_volatile requires //@ revisions: null misaligned use std::ptr; diff --git a/tests/ui/precondition-checks/replace.misaligned.run.stderr b/tests/ui/precondition-checks/replace.misaligned.run.stderr new file mode 100644 index 0000000000000..e9f35666f6dec --- /dev/null +++ b/tests/ui/precondition-checks/replace.misaligned.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::replace requires that the pointer argument is aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/replace.null.run.stderr b/tests/ui/precondition-checks/replace.null.run.stderr new file mode 100644 index 0000000000000..e9f35666f6dec --- /dev/null +++ b/tests/ui/precondition-checks/replace.null.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::replace requires that the pointer argument is aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/replace.rs b/tests/ui/precondition-checks/replace.rs index 2808cee7b64b1..64a5a36fe6097 100644 --- a/tests/ui/precondition-checks/replace.rs +++ b/tests/ui/precondition-checks/replace.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::replace requires +//@ check-run-results: unsafe precondition(s) violated: ptr::replace requires //@ revisions: null misaligned use std::ptr; diff --git a/tests/ui/precondition-checks/slice-from-raw-parts-mut.misaligned.run.stderr b/tests/ui/precondition-checks/slice-from-raw-parts-mut.misaligned.run.stderr new file mode 100644 index 0000000000000..01dfe395a190b --- /dev/null +++ b/tests/ui/precondition-checks/slice-from-raw-parts-mut.misaligned.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::from_raw_parts_mut requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-from-raw-parts-mut.null.run.stderr b/tests/ui/precondition-checks/slice-from-raw-parts-mut.null.run.stderr new file mode 100644 index 0000000000000..01dfe395a190b --- /dev/null +++ b/tests/ui/precondition-checks/slice-from-raw-parts-mut.null.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::from_raw_parts_mut requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs b/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs index 3801639e2551b..f3063b8e3de95 100644 --- a/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs +++ b/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts_mut requires +//@ check-run-results: unsafe precondition(s) violated: slice::from_raw_parts_mut requires //@ revisions: null misaligned toolarge fn main() { diff --git a/tests/ui/precondition-checks/slice-from-raw-parts-mut.toolarge.run.stderr b/tests/ui/precondition-checks/slice-from-raw-parts-mut.toolarge.run.stderr new file mode 100644 index 0000000000000..01dfe395a190b --- /dev/null +++ b/tests/ui/precondition-checks/slice-from-raw-parts-mut.toolarge.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::from_raw_parts_mut requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-from-raw-parts.misaligned.run.stderr b/tests/ui/precondition-checks/slice-from-raw-parts.misaligned.run.stderr new file mode 100644 index 0000000000000..f049bb2481e61 --- /dev/null +++ b/tests/ui/precondition-checks/slice-from-raw-parts.misaligned.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-from-raw-parts.null.run.stderr b/tests/ui/precondition-checks/slice-from-raw-parts.null.run.stderr new file mode 100644 index 0000000000000..f049bb2481e61 --- /dev/null +++ b/tests/ui/precondition-checks/slice-from-raw-parts.null.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-from-raw-parts.rs b/tests/ui/precondition-checks/slice-from-raw-parts.rs index a3690fa045eb7..da20be554b869 100644 --- a/tests/ui/precondition-checks/slice-from-raw-parts.rs +++ b/tests/ui/precondition-checks/slice-from-raw-parts.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts requires +//@ check-run-results: unsafe precondition(s) violated: slice::from_raw_parts requires //@ revisions: null misaligned toolarge fn main() { diff --git a/tests/ui/precondition-checks/slice-from-raw-parts.toolarge.run.stderr b/tests/ui/precondition-checks/slice-from-raw-parts.toolarge.run.stderr new file mode 100644 index 0000000000000..f049bb2481e61 --- /dev/null +++ b/tests/ui/precondition-checks/slice-from-raw-parts.toolarge.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked.backwards_range.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked.backwards_range.run.stderr new file mode 100644 index 0000000000000..599a843b3f239 --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked.backwards_range.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked requires that the range is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked.range.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked.range.run.stderr new file mode 100644 index 0000000000000..599a843b3f239 --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked.range.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked requires that the range is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked.range_from.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked.range_from.run.stderr new file mode 100644 index 0000000000000..599a843b3f239 --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked.range_from.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked requires that the range is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked.range_to.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked.range_to.run.stderr new file mode 100644 index 0000000000000..599a843b3f239 --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked.range_to.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked requires that the range is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked.rs b/tests/ui/precondition-checks/slice-get_unchecked.rs index 1d8188fb9531a..cebfb02a96ce5 100644 --- a/tests/ui/precondition-checks/slice-get_unchecked.rs +++ b/tests/ui/precondition-checks/slice-get_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: slice::get_unchecked requires +//@ check-run-results: unsafe precondition(s) violated: slice::get_unchecked requires //@ revisions: usize range range_to range_from backwards_range fn main() { diff --git a/tests/ui/precondition-checks/slice-get_unchecked.usize.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked.usize.run.stderr new file mode 100644 index 0000000000000..3e246ce178fc0 --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked.usize.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked requires that the index is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked_mut.backwards_range.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked_mut.backwards_range.run.stderr new file mode 100644 index 0000000000000..64a56457e3dfa --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked_mut.backwards_range.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked_mut requires that the range is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked_mut.range.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked_mut.range.run.stderr new file mode 100644 index 0000000000000..64a56457e3dfa --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked_mut.range.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked_mut requires that the range is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked_mut.range_from.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked_mut.range_from.run.stderr new file mode 100644 index 0000000000000..64a56457e3dfa --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked_mut.range_from.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked_mut requires that the range is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked_mut.range_to.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked_mut.range_to.run.stderr new file mode 100644 index 0000000000000..64a56457e3dfa --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked_mut.range_to.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked_mut requires that the range is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-get_unchecked_mut.rs b/tests/ui/precondition-checks/slice-get_unchecked_mut.rs index 34c1454af438d..519a795e62ea3 100644 --- a/tests/ui/precondition-checks/slice-get_unchecked_mut.rs +++ b/tests/ui/precondition-checks/slice-get_unchecked_mut.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: slice::get_unchecked_mut requires +//@ check-run-results: unsafe precondition(s) violated: slice::get_unchecked_mut requires //@ revisions: usize range range_to range_from backwards_range fn main() { diff --git a/tests/ui/precondition-checks/slice-get_unchecked_mut.usize.run.stderr b/tests/ui/precondition-checks/slice-get_unchecked_mut.usize.run.stderr new file mode 100644 index 0000000000000..8e55b674d2c79 --- /dev/null +++ b/tests/ui/precondition-checks/slice-get_unchecked_mut.usize.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: slice::get_unchecked_mut requires that the index is within the slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/slice-swap_unchecked.oob_a.run.stderr b/tests/ui/precondition-checks/slice-swap_unchecked.oob_a.run.stderr new file mode 100644 index 0000000000000..0bad0666c1055 --- /dev/null +++ b/tests/ui/precondition-checks/slice-swap_unchecked.oob_a.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/slice-swap_unchecked.rs:10:14: +index out of bounds: the len is 2 but the index is 2 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/precondition-checks/slice-swap_unchecked.oob_b.run.stderr b/tests/ui/precondition-checks/slice-swap_unchecked.oob_b.run.stderr new file mode 100644 index 0000000000000..2692f28a1b1d6 --- /dev/null +++ b/tests/ui/precondition-checks/slice-swap_unchecked.oob_b.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/slice-swap_unchecked.rs:12:14: +index out of bounds: the len is 2 but the index is 2 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/precondition-checks/slice-swap_unchecked.rs b/tests/ui/precondition-checks/slice-swap_unchecked.rs index 227a49091ec22..f48d7b2fec7b3 100644 --- a/tests/ui/precondition-checks/slice-swap_unchecked.rs +++ b/tests/ui/precondition-checks/slice-swap_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: index out of bounds: the len is 2 but the index is 2 +//@ check-run-results: index out of bounds: the len is 2 but the index is 2 //@ revisions: oob_a oob_b fn main() { diff --git a/tests/ui/precondition-checks/str-get_unchecked.backwards_range.run.stderr b/tests/ui/precondition-checks/str-get_unchecked.backwards_range.run.stderr new file mode 100644 index 0000000000000..bea6d067cb4aa --- /dev/null +++ b/tests/ui/precondition-checks/str-get_unchecked.backwards_range.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: str::get_unchecked requires that the range is within the string slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/str-get_unchecked.range.run.stderr b/tests/ui/precondition-checks/str-get_unchecked.range.run.stderr new file mode 100644 index 0000000000000..bea6d067cb4aa --- /dev/null +++ b/tests/ui/precondition-checks/str-get_unchecked.range.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: str::get_unchecked requires that the range is within the string slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/str-get_unchecked.range_from.run.stderr b/tests/ui/precondition-checks/str-get_unchecked.range_from.run.stderr new file mode 100644 index 0000000000000..bea6d067cb4aa --- /dev/null +++ b/tests/ui/precondition-checks/str-get_unchecked.range_from.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: str::get_unchecked requires that the range is within the string slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/str-get_unchecked.range_to.run.stderr b/tests/ui/precondition-checks/str-get_unchecked.range_to.run.stderr new file mode 100644 index 0000000000000..bea6d067cb4aa --- /dev/null +++ b/tests/ui/precondition-checks/str-get_unchecked.range_to.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: str::get_unchecked requires that the range is within the string slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/str-get_unchecked.rs b/tests/ui/precondition-checks/str-get_unchecked.rs index 14d17f997ec9b..e1404bb25e04d 100644 --- a/tests/ui/precondition-checks/str-get_unchecked.rs +++ b/tests/ui/precondition-checks/str-get_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: str::get_unchecked requires +//@ check-run-results: unsafe precondition(s) violated: str::get_unchecked requires //@ revisions: range range_to range_from backwards_range fn main() { diff --git a/tests/ui/precondition-checks/str-get_unchecked_mut.backwards_range.run.stderr b/tests/ui/precondition-checks/str-get_unchecked_mut.backwards_range.run.stderr new file mode 100644 index 0000000000000..7781d8f1ee225 --- /dev/null +++ b/tests/ui/precondition-checks/str-get_unchecked_mut.backwards_range.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: str::get_unchecked_mut requires that the range is within the string slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/str-get_unchecked_mut.range.run.stderr b/tests/ui/precondition-checks/str-get_unchecked_mut.range.run.stderr new file mode 100644 index 0000000000000..7781d8f1ee225 --- /dev/null +++ b/tests/ui/precondition-checks/str-get_unchecked_mut.range.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: str::get_unchecked_mut requires that the range is within the string slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/str-get_unchecked_mut.range_from.run.stderr b/tests/ui/precondition-checks/str-get_unchecked_mut.range_from.run.stderr new file mode 100644 index 0000000000000..7781d8f1ee225 --- /dev/null +++ b/tests/ui/precondition-checks/str-get_unchecked_mut.range_from.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: str::get_unchecked_mut requires that the range is within the string slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/str-get_unchecked_mut.range_to.run.stderr b/tests/ui/precondition-checks/str-get_unchecked_mut.range_to.run.stderr new file mode 100644 index 0000000000000..7781d8f1ee225 --- /dev/null +++ b/tests/ui/precondition-checks/str-get_unchecked_mut.range_to.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: str::get_unchecked_mut requires that the range is within the string slice +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/str-get_unchecked_mut.rs b/tests/ui/precondition-checks/str-get_unchecked_mut.rs index ca1b169005559..fdcdbb1f9a21f 100644 --- a/tests/ui/precondition-checks/str-get_unchecked_mut.rs +++ b/tests/ui/precondition-checks/str-get_unchecked_mut.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: str::get_unchecked_mut requires +//@ check-run-results: unsafe precondition(s) violated: str::get_unchecked_mut requires //@ revisions: range range_to range_from backwards_range fn main() { diff --git a/tests/ui/precondition-checks/swap-nonoverlapping.misaligned_dst.run.stderr b/tests/ui/precondition-checks/swap-nonoverlapping.misaligned_dst.run.stderr new file mode 100644 index 0000000000000..17a1c923740e6 --- /dev/null +++ b/tests/ui/precondition-checks/swap-nonoverlapping.misaligned_dst.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/swap-nonoverlapping.misaligned_src.run.stderr b/tests/ui/precondition-checks/swap-nonoverlapping.misaligned_src.run.stderr new file mode 100644 index 0000000000000..17a1c923740e6 --- /dev/null +++ b/tests/ui/precondition-checks/swap-nonoverlapping.misaligned_src.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/swap-nonoverlapping.null_dst.run.stderr b/tests/ui/precondition-checks/swap-nonoverlapping.null_dst.run.stderr new file mode 100644 index 0000000000000..17a1c923740e6 --- /dev/null +++ b/tests/ui/precondition-checks/swap-nonoverlapping.null_dst.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/swap-nonoverlapping.null_src.run.stderr b/tests/ui/precondition-checks/swap-nonoverlapping.null_src.run.stderr new file mode 100644 index 0000000000000..17a1c923740e6 --- /dev/null +++ b/tests/ui/precondition-checks/swap-nonoverlapping.null_src.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/swap-nonoverlapping.overlapping.run.stderr b/tests/ui/precondition-checks/swap-nonoverlapping.overlapping.run.stderr new file mode 100644 index 0000000000000..17a1c923740e6 --- /dev/null +++ b/tests/ui/precondition-checks/swap-nonoverlapping.overlapping.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/swap-nonoverlapping.rs b/tests/ui/precondition-checks/swap-nonoverlapping.rs index 52e4a3c870be5..02caa9fad70af 100644 --- a/tests/ui/precondition-checks/swap-nonoverlapping.rs +++ b/tests/ui/precondition-checks/swap-nonoverlapping.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::swap_nonoverlapping requires +//@ check-run-results: unsafe precondition(s) violated: ptr::swap_nonoverlapping requires //@ revisions: null_src null_dst misaligned_src misaligned_dst overlapping use std::ptr; diff --git a/tests/ui/precondition-checks/unchecked_add.rs b/tests/ui/precondition-checks/unchecked_add.rs index f44a6ea32ad8f..a94aa1f80ef38 100644 --- a/tests/ui/precondition-checks/unchecked_add.rs +++ b/tests/ui/precondition-checks/unchecked_add.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_add cannot overflow +//@ check-run-results: unsafe precondition(s) violated: u8::unchecked_add cannot overflow fn main() { unsafe { diff --git a/tests/ui/precondition-checks/unchecked_add.run.stderr b/tests/ui/precondition-checks/unchecked_add.run.stderr new file mode 100644 index 0000000000000..3b30bad3b4f1b --- /dev/null +++ b/tests/ui/precondition-checks/unchecked_add.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: u8::unchecked_add cannot overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/unchecked_mul.rs b/tests/ui/precondition-checks/unchecked_mul.rs index 66655dda136e9..87861574fcea0 100644 --- a/tests/ui/precondition-checks/unchecked_mul.rs +++ b/tests/ui/precondition-checks/unchecked_mul.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_add cannot overflow +//@ check-run-results: unsafe precondition(s) violated: u8::unchecked_add cannot overflow fn main() { unsafe { diff --git a/tests/ui/precondition-checks/unchecked_mul.run.stderr b/tests/ui/precondition-checks/unchecked_mul.run.stderr new file mode 100644 index 0000000000000..3b30bad3b4f1b --- /dev/null +++ b/tests/ui/precondition-checks/unchecked_mul.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: u8::unchecked_add cannot overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/unchecked_shl.rs b/tests/ui/precondition-checks/unchecked_shl.rs index 1c96db0b1ec71..9292610d678a8 100644 --- a/tests/ui/precondition-checks/unchecked_shl.rs +++ b/tests/ui/precondition-checks/unchecked_shl.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_shl cannot overflow +//@ check-run-results: unsafe precondition(s) violated: u8::unchecked_shl cannot overflow #![feature(unchecked_shifts)] diff --git a/tests/ui/precondition-checks/unchecked_shl.run.stderr b/tests/ui/precondition-checks/unchecked_shl.run.stderr new file mode 100644 index 0000000000000..c133bf2d1c8fb --- /dev/null +++ b/tests/ui/precondition-checks/unchecked_shl.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: u8::unchecked_shl cannot overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/unchecked_shr.rs b/tests/ui/precondition-checks/unchecked_shr.rs index 4a6d9ffb1d35b..5c3a3aa2df9c5 100644 --- a/tests/ui/precondition-checks/unchecked_shr.rs +++ b/tests/ui/precondition-checks/unchecked_shr.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_shr cannot overflow +//@ check-run-results: unsafe precondition(s) violated: u8::unchecked_shr cannot overflow #![feature(unchecked_shifts)] diff --git a/tests/ui/precondition-checks/unchecked_shr.run.stderr b/tests/ui/precondition-checks/unchecked_shr.run.stderr new file mode 100644 index 0000000000000..513d796809b80 --- /dev/null +++ b/tests/ui/precondition-checks/unchecked_shr.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: u8::unchecked_shr cannot overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/unchecked_sub.rs b/tests/ui/precondition-checks/unchecked_sub.rs index 545dde0e27809..2a621e3cb9ac2 100644 --- a/tests/ui/precondition-checks/unchecked_sub.rs +++ b/tests/ui/precondition-checks/unchecked_sub.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_sub cannot overflow +//@ check-run-results: unsafe precondition(s) violated: u8::unchecked_sub cannot overflow fn main() { unsafe { diff --git a/tests/ui/precondition-checks/unchecked_sub.run.stderr b/tests/ui/precondition-checks/unchecked_sub.run.stderr new file mode 100644 index 0000000000000..1956fe13126c9 --- /dev/null +++ b/tests/ui/precondition-checks/unchecked_sub.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: u8::unchecked_sub cannot overflow +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/unreachable_unchecked.rs b/tests/ui/precondition-checks/unreachable_unchecked.rs index 2435450c4b5a1..6e788cca01f39 100644 --- a/tests/ui/precondition-checks/unreachable_unchecked.rs +++ b/tests/ui/precondition-checks/unreachable_unchecked.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: hint::unreachable_unchecked must never be reached +//@ check-run-results: unsafe precondition(s) violated: hint::unreachable_unchecked must never fn main() { unsafe { diff --git a/tests/ui/precondition-checks/unreachable_unchecked.run.stderr b/tests/ui/precondition-checks/unreachable_unchecked.run.stderr new file mode 100644 index 0000000000000..728e9a1b6b5a2 --- /dev/null +++ b/tests/ui/precondition-checks/unreachable_unchecked.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: hint::unreachable_unchecked must never be reached +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/write.rs b/tests/ui/precondition-checks/write.rs index f76e776fcf35d..98ba5f9ca357c 100644 --- a/tests/ui/precondition-checks/write.rs +++ b/tests/ui/precondition-checks/write.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::write requires +//@ check-run-results: unsafe precondition(s) violated: ptr::write requires //@ revisions: null misaligned //@ ignore-test diff --git a/tests/ui/precondition-checks/write_bytes.rs b/tests/ui/precondition-checks/write_bytes.rs index 3f64be9d1ee14..d3ab696d48b4d 100644 --- a/tests/ui/precondition-checks/write_bytes.rs +++ b/tests/ui/precondition-checks/write_bytes.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::write requires +//@ check-run-results: unsafe precondition(s) violated: ptr::write requires //@ revisions: null misaligned //@ ignore-test diff --git a/tests/ui/precondition-checks/write_volatile.misaligned.run.stderr b/tests/ui/precondition-checks/write_volatile.misaligned.run.stderr new file mode 100644 index 0000000000000..56e4f85ee146a --- /dev/null +++ b/tests/ui/precondition-checks/write_volatile.misaligned.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::write_volatile requires that the pointer argument is aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/write_volatile.null.run.stderr b/tests/ui/precondition-checks/write_volatile.null.run.stderr new file mode 100644 index 0000000000000..56e4f85ee146a --- /dev/null +++ b/tests/ui/precondition-checks/write_volatile.null.run.stderr @@ -0,0 +1,4 @@ +thread 'main' panicked at library/core/src/panicking.rs:218:5: +unsafe precondition(s) violated: ptr::write_volatile requires that the pointer argument is aligned and non-null +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread caused non-unwinding panic. aborting. diff --git a/tests/ui/precondition-checks/write_volatile.rs b/tests/ui/precondition-checks/write_volatile.rs index ac0b89b5ecf2a..b2aadf49aa532 100644 --- a/tests/ui/precondition-checks/write_volatile.rs +++ b/tests/ui/precondition-checks/write_volatile.rs @@ -1,6 +1,6 @@ //@ run-fail //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes -//@ error-pattern: unsafe precondition(s) violated: ptr::write_volatile requires +//@ check-run-results: unsafe precondition(s) violated: ptr::write_volatile requires //@ revisions: null misaligned use std::ptr; diff --git a/tests/ui/process/tls-exit-status.rs b/tests/ui/process/tls-exit-status.rs index cddcf369da0bd..5ac65b8f5770a 100644 --- a/tests/ui/process/tls-exit-status.rs +++ b/tests/ui/process/tls-exit-status.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:nonzero +//@ check-run-results:nonzero //@ exec-env:RUST_NEWRT=1 //@ ignore-wasm32 no processes diff --git a/tests/ui/process/tls-exit-status.run.stderr b/tests/ui/process/tls-exit-status.run.stderr new file mode 100644 index 0000000000000..bdd3065c3bb61 --- /dev/null +++ b/tests/ui/process/tls-exit-status.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/tls-exit-status.rs:10:5: +please have a nonzero exit status +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/reachable/issue-948.rs b/tests/ui/reachable/issue-948.rs index 8e239a1115eb4..67429d29ac283 100644 --- a/tests/ui/reachable/issue-948.rs +++ b/tests/ui/reachable/issue-948.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:beep boop +//@ check-run-results:beep boop //@ ignore-emscripten no processes #![allow(unused_variables)] diff --git a/tests/ui/reachable/issue-948.run.stderr b/tests/ui/reachable/issue-948.run.stderr new file mode 100644 index 0000000000000..31d94665dd6e1 --- /dev/null +++ b/tests/ui/reachable/issue-948.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/issue-948.rs:14:32: +beep boop +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs index fb6718e55b286..ad84bcd131a3c 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:returned Box from main() +//@ check-run-results:returned Box from main() //@ failure-status: 1 //@ ignore-emscripten no processes diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.run.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.run.stderr new file mode 100644 index 0000000000000..f7e7dc62094c1 --- /dev/null +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.run.stderr @@ -0,0 +1 @@ +Error: Custom { kind: Other, error: "returned Box from main()" } diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs index 91be3afbe225a..88cc7a01ad803 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:oh, dear +//@ check-run-results:oh, dear //@ ignore-emscripten no processes fn main() -> ! { diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.run.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.run.stderr new file mode 100644 index 0000000000000..feaf2d8df826f --- /dev/null +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/termination-trait-for-never.rs:6:5: +oh, dear +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs index f1d972b3c5503..5cafc3e35f116 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:returned Box from main() +//@ check-run-results:returned Box from main() //@ failure-status: 1 //@ ignore-emscripten no processes diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.run.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.run.stderr new file mode 100644 index 0000000000000..d6152237f91df --- /dev/null +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.run.stderr @@ -0,0 +1 @@ +Error: Custom { kind: Other, error: "returned Box from main()" } diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs index acf3da2d55f36..730bd359fe3db 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern: An error message for you +//@ check-run-results: An error message for you //@ failure-status: 1 //@ ignore-emscripten no processes diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.run.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.run.stderr new file mode 100644 index 0000000000000..a66e6db7506fb --- /dev/null +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.run.stderr @@ -0,0 +1 @@ +Error: "An error message for you" diff --git a/tests/ui/sanitizer/address.rs b/tests/ui/sanitizer/address.rs index 7a5e767687cf1..d12191061318c 100644 --- a/tests/ui/sanitizer/address.rs +++ b/tests/ui/sanitizer/address.rs @@ -5,8 +5,8 @@ //@ compile-flags: -Z sanitizer=address -O -g // //@ run-fail -//@ error-pattern: AddressSanitizer: stack-buffer-overflow -//@ error-pattern: 'xs' (line 14) <== Memory access at offset +//@ check-run-results: AddressSanitizer: stack-buffer-overflow +//@ check-run-results: 'xs' (line 14) <== Memory access at offset use std::hint::black_box; diff --git a/tests/ui/sanitizer/hwaddress.rs b/tests/ui/sanitizer/hwaddress.rs index e5939eb734b66..2aa5d1529e439 100644 --- a/tests/ui/sanitizer/hwaddress.rs +++ b/tests/ui/sanitizer/hwaddress.rs @@ -8,7 +8,7 @@ //@ compile-flags: -Z sanitizer=hwaddress -O -g -C codegen-units=16 // //@ run-fail -//@ error-pattern: HWAddressSanitizer: tag-mismatch +//@ check-run-results: HWAddressSanitizer: tag-mismatch use std::hint::black_box; diff --git a/tests/ui/sanitizer/leak.rs b/tests/ui/sanitizer/leak.rs index 65915ec24b723..50069e5c7ab84 100644 --- a/tests/ui/sanitizer/leak.rs +++ b/tests/ui/sanitizer/leak.rs @@ -4,7 +4,7 @@ //@ compile-flags: -Z sanitizer=leak -O // //@ run-fail -//@ error-pattern: LeakSanitizer: detected memory leaks +//@ check-run-results: LeakSanitizer: detected memory leaks use std::hint::black_box; use std::mem; diff --git a/tests/ui/sanitizer/memory-eager.rs b/tests/ui/sanitizer/memory-eager.rs index 9e7889fa1bc09..bd42738e052a8 100644 --- a/tests/ui/sanitizer/memory-eager.rs +++ b/tests/ui/sanitizer/memory-eager.rs @@ -7,9 +7,9 @@ //@ [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins // //@ run-fail -//@ error-pattern: MemorySanitizer: use-of-uninitialized-value -//@ error-pattern: Uninitialized value was created by an allocation -//@ error-pattern: in the stack frame +//@ check-run-results: MemorySanitizer: use-of-uninitialized-value +//@ check-run-results: Uninitialized value was created by an allocation +//@ check-run-results: in the stack frame // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. diff --git a/tests/ui/sanitizer/memory.rs b/tests/ui/sanitizer/memory.rs index bd2d67717495f..164f41878c00b 100644 --- a/tests/ui/sanitizer/memory.rs +++ b/tests/ui/sanitizer/memory.rs @@ -7,9 +7,9 @@ //@ [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins // //@ run-fail -//@ error-pattern: MemorySanitizer: use-of-uninitialized-value -//@ error-pattern: Uninitialized value was created by an allocation -//@ error-pattern: in the stack frame +//@ check-run-results: MemorySanitizer: use-of-uninitialized-value +//@ check-run-results: Uninitialized value was created by an allocation +//@ check-run-results: in the stack frame // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. diff --git a/tests/ui/sanitizer/new-llvm-pass-manager-thin-lto.rs b/tests/ui/sanitizer/new-llvm-pass-manager-thin-lto.rs index b7dd4a437821a..66777ac2c9afa 100644 --- a/tests/ui/sanitizer/new-llvm-pass-manager-thin-lto.rs +++ b/tests/ui/sanitizer/new-llvm-pass-manager-thin-lto.rs @@ -12,7 +12,7 @@ //@[opt0]compile-flags: -Copt-level=0 //@[opt1]compile-flags: -Copt-level=1 //@ run-fail -//@ error-pattern: ERROR: AddressSanitizer: stack-use-after-scope +//@ check-run-results: ERROR: AddressSanitizer: stack-use-after-scope static mut P: *mut usize = std::ptr::null_mut(); diff --git a/tests/ui/sanitizer/thread.rs b/tests/ui/sanitizer/thread.rs index 566774d6b1d64..30de8cc13acd9 100644 --- a/tests/ui/sanitizer/thread.rs +++ b/tests/ui/sanitizer/thread.rs @@ -16,9 +16,9 @@ //@ compile-flags: -Z sanitizer=thread -O // //@ run-fail -//@ error-pattern: WARNING: ThreadSanitizer: data race -//@ error-pattern: Location is heap block of size 4 -//@ error-pattern: allocated by main thread +//@ check-run-results: WARNING: ThreadSanitizer: data race +//@ check-run-results: Location is heap block of size 4 +//@ check-run-results: allocated by main thread #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/sanitizer/use-after-scope.rs b/tests/ui/sanitizer/use-after-scope.rs index 4d7f6f6c2f2b5..890e4d8fc8420 100644 --- a/tests/ui/sanitizer/use-after-scope.rs +++ b/tests/ui/sanitizer/use-after-scope.rs @@ -4,7 +4,7 @@ // //@ compile-flags: -Zsanitizer=address //@ run-fail -//@ error-pattern: ERROR: AddressSanitizer: stack-use-after-scope +//@ check-run-results: ERROR: AddressSanitizer: stack-use-after-scope static mut P: *mut usize = std::ptr::null_mut(); diff --git a/tests/ui/str/str-overrun.rs b/tests/ui/str/str-overrun.rs index b8e245475da92..49c41efb654db 100644 --- a/tests/ui/str/str-overrun.rs +++ b/tests/ui/str/str-overrun.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:index out of bounds: the len is 5 but the index is 5 +//@ check-run-results:index out of bounds: the len is 5 but the index is 5 //@ ignore-emscripten no processes fn main() { diff --git a/tests/ui/str/str-overrun.run.stderr b/tests/ui/str/str-overrun.run.stderr new file mode 100644 index 0000000000000..d341da2814d8a --- /dev/null +++ b/tests/ui/str/str-overrun.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/str-overrun.rs:9:16: +index out of bounds: the len is 5 but the index is 5 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/structs/rhs-type.rs b/tests/ui/structs/rhs-type.rs index fde5c16a0680e..ceb52684dce5e 100644 --- a/tests/ui/structs/rhs-type.rs +++ b/tests/ui/structs/rhs-type.rs @@ -2,7 +2,7 @@ // as a _|_-typed thing, not a str-typed thing //@ run-fail -//@ error-pattern:bye +//@ check-run-results:bye //@ ignore-emscripten no processes #![allow(unreachable_code)] diff --git a/tests/ui/structs/rhs-type.run.stderr b/tests/ui/structs/rhs-type.run.stderr new file mode 100644 index 0000000000000..256eb580bcce3 --- /dev/null +++ b/tests/ui/structs/rhs-type.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at $DIR/rhs-type.rs:16:15: +bye +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/threads-sendsync/task-spawn-barefn.rs b/tests/ui/threads-sendsync/task-spawn-barefn.rs index a97e92206e206..48d1779d4ffad 100644 --- a/tests/ui/threads-sendsync/task-spawn-barefn.rs +++ b/tests/ui/threads-sendsync/task-spawn-barefn.rs @@ -1,5 +1,5 @@ //@ run-fail -//@ error-pattern:Ensure that the child thread runs by panicking +//@ check-run-results:Ensure that the child thread runs by panicking //@ needs-threads use std::thread; diff --git a/tests/ui/threads-sendsync/task-spawn-barefn.run.stderr b/tests/ui/threads-sendsync/task-spawn-barefn.run.stderr new file mode 100644 index 0000000000000..2ebaa3870892e --- /dev/null +++ b/tests/ui/threads-sendsync/task-spawn-barefn.run.stderr @@ -0,0 +1,5 @@ +thread '' panicked at $DIR/task-spawn-barefn.rs:17:5: +assertion failed: "Ensure that the child thread runs by panicking".is_empty() +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +thread 'main' panicked at $DIR/task-spawn-barefn.rs:12:9: +explicit panic diff --git a/tests/ui/threads-sendsync/test-tasks-invalid-value.rs b/tests/ui/threads-sendsync/test-tasks-invalid-value.rs index 127086743ca82..78b21bb8186b5 100644 --- a/tests/ui/threads-sendsync/test-tasks-invalid-value.rs +++ b/tests/ui/threads-sendsync/test-tasks-invalid-value.rs @@ -2,7 +2,7 @@ // properly. //@ run-fail -//@ error-pattern:should be a positive integer +//@ check-run-results:should be a positive integer //@ compile-flags: --test //@ exec-env:RUST_TEST_THREADS=foo //@ needs-threads diff --git a/tests/ui/threads-sendsync/test-tasks-invalid-value.run.stderr b/tests/ui/threads-sendsync/test-tasks-invalid-value.run.stderr new file mode 100644 index 0000000000000..a2236e694a837 --- /dev/null +++ b/tests/ui/threads-sendsync/test-tasks-invalid-value.run.stderr @@ -0,0 +1,3 @@ +thread 'main' panicked at library/test/src/helpers/concurrency.rs:11:18: +RUST_TEST_THREADS is `foo`, should be a positive integer. +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace