about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2023-08-30Rollup merge of #115272 - RalfJung:miri-error-print, r=saethlinMatthias Krüger-38/+27
miri/diagnostics: don't forget to print_backtrace when ICEing on unexpected errors This should fix the missing output encountered [here](https://github.com/rust-lang/rust/issues/115145#issuecomment-1694334410). r? `@saethlin`
2023-08-30Use conditional synchronization for LockJohn Kåre Alsaker-7/+7
2023-08-29Update cargoWeihang Lo-0/+0
2023-08-29Auto merge of #115183 - flip1995:clippyup, r=Manishearth,oli-obkbors-9600/+16423
Update Clippy r? `@oli-obk` Assigning you, because something broke with ui_test: ``` tests/ui/crashes/ice-7272.rs FAILED: command: "<unknown>" A bug in `ui_test` occurred: called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" } full stderr: ``` (and that 103 times) Thought I would ping you, before starting to investigate. Maybe you know what's going on.
2023-08-29Auto merge of #112775 - c410-f3r:t3st3ss, r=petrochenkovbors-1/+1
Move tests r? `@petrochenkov`
2023-08-29Bump ui_testOli Scherer-17/+17
2023-08-29fmtThe Miri Conjob Bot-4/+6
2023-08-29Merge from rustcThe Miri Conjob Bot-3/+34
2023-08-29Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-08-28Auto merge of #115182 - RalfJung:abi-compat-sign, r=b-naberbors-0/+27
miri ABI compatibility check: accept u32 and i32 If only the sign differs, then surely these types are compatible. (We do still check that `arg_ext` is the same, just in case.) Also I made it so that the ABI check must *imply* that size and alignment are the same, but it doesn't actively check that itself. With how crazy ABI constraints get, having equal size and align really shouldn't be used as a signal for anything I think...
2023-08-28Move testsCaio-1/+1
2023-08-28Update windows ffi bindingsChris Denton-18/+15
2023-08-28add tests for track_caller in closures and generatorsRalf Jung-5/+148
2023-08-28move basic track_caller test into their own fnRalf Jung-36/+39
2023-08-28Auto merge of #3039 - RalfJung:catch_panic, r=RalfJungbors-17/+19
tests/catch_panic: make output easier to interpret
2023-08-28tests/catch_panic: make output easier to interpretRalf Jung-17/+19
2023-08-28Rollup merge of #115280 - RalfJung:panic-cleanup-triple-backtrace, r=AmanieuMatthias Krüger-2/+1
avoid triple-backtrace due to panic-during-cleanup Supersedes https://github.com/rust-lang/rust/pull/115020 Cc https://github.com/rust-lang/rust/issues/114954 r? ``@Amanieu``
2023-08-28Rollup merge of #115278 - RalfJung:removed-error-codes, r=GuillaumeGomezMatthias Krüger-1/+6
tell people what to do when removing an error code Currently tidy and CI send developers on a wild goose chase: - you edit the code - CI/tidy tells you that an error code is gone, so you remove it from the list - CI/tidy tells you that the markdown file is stale, so you remove that as well - CI (but not tidy) tells you not to remove an error description and copy what E0001 does Let's be nice to people and directly tell them what to do rather than making them follow misleading breadcrumbs. r? ``@GuillaumeGomez``
2023-08-27also ignore doctestsRalf Jung-1/+2
2023-08-27avoid triple-backtrace due to panic-during-cleanupRalf Jung-2/+1
2023-08-27tell people what to do when removing an error codeRalf Jung-1/+5
2023-08-27miri/diagnostics: don't forget to print_backtrace when ICEing on unexpected ↵Ralf Jung-38/+27
errors then also use the new helper in a few other places
2023-08-26Update cargoWeihang Lo-0/+0
2023-08-26fmtThe Miri Conjob Bot-6/+6
2023-08-26Merge from rustcThe Miri Conjob Bot-1499/+4033
2023-08-26Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-08-25Auto merge of #115184 - saethlin:local-allocated-spans, r=RalfJungbors-5/+92
Record allocation spans inside force_allocation This expands https://github.com/rust-lang/miri/pull/2940 to cover locals r? `@RalfJung`
2023-08-25Record allocation spans inside force_allocationBen Kimock-5/+92
2023-08-25Auto merge of #115045 - RalfJung:unwind-terminate-reason, r=davidtwcobors-14/+18
when terminating during unwinding, show the reason why With this, the output on double-panic becomes something like that: ``` thread 'main' panicked at src/tools/miri/tests/fail/panic/double_panic.rs:15:5: first note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'main' panicked at src/tools/miri/tests/fail/panic/double_panic.rs:10:9: second stack backtrace: 0: 0xbe273a - std::backtrace_rs::backtrace::miri::trace_unsynchronized::<&mut [closure@std::sys_common::backtrace::_print_fmt::{closure#1}]> at /home/r/src/rust/rustc.3/library/std/src/../../backtrace/src/backtrace/miri.rs:99:5 1: 0xbe22e6 - std::backtrace_rs::backtrace::miri::trace::<&mut [closure@std::sys_common::backtrace::_print_fmt::{closure#1}]> at /home/r/src/rust/rustc.3/library/std/src/../../backtrace/src/backtrace/miri.rs:62:14 2: 0xbe1086 - std::backtrace_rs::backtrace::trace_unsynchronized::<[closure@std::sys_common::backtrace::_print_fmt::{closure#1}]> at /home/r/src/rust/rustc.3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 3: 0xba3afd - std::sys_common::backtrace::_print_fmt at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:67:5 4: 0xba2471 - <std::sys_common::backtrace::_print::DisplayBacktrace as std::fmt::Display>::fmt at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:44:22 5: 0xbcf754 - core::fmt::rt::Argument::<'_>::fmt at /home/r/src/rust/rustc.3/library/core/src/fmt/rt.rs:138:9 6: 0x9b8f81 - std::fmt::write at /home/r/src/rust/rustc.3/library/core/src/fmt/mod.rs:1094:17 7: 0x21391d - <std::sys::unix::stdio::Stderr as std::io::Write>::write_fmt at /home/r/src/rust/rustc.3/library/std/src/io/mod.rs:1714:15 8: 0xba37b1 - std::sys_common::backtrace::_print at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:47:5 9: 0xba365b - std::sys_common::backtrace::print at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:34:9 10: 0x143c67 - std::panic_hook_with_disk_dump::{closure#1} at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:278:22 11: 0x144187 - std::panic_hook_with_disk_dump at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:312:9 12: 0x143659 - std::panicking::default_hook at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:239:5 13: 0x1482a7 - std::panicking::rust_panic_with_hook at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:729:13 14: 0x1475d5 - std::rt::begin_panic::<&str>::{closure#0} at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:650:9 15: 0xba496a - std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::rt::begin_panic<&str>::{closure#0}], !> at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:170:18 16: 0x147599 - std::rt::begin_panic::<&str> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:649:12 17: 0x31916 - <Foo as std::ops::Drop>::drop at src/tools/miri/tests/fail/panic/double_panic.rs:10:9 18: 0x1a2b5e - std::ptr::drop_in_place::<Foo> - shim(Some(Foo)) at /home/r/src/rust/rustc.3/library/core/src/ptr/mod.rs:497:1 19: 0x202bf - main at src/tools/miri/tests/fail/panic/double_panic.rs:16:1 20: 0xcc6a8 - <fn() as std::ops::FnOnce<()>>::call_once - shim(fn()) at /home/r/src/rust/rustc.3/library/core/src/ops/function.rs:250:5 21: 0xba47d9 - std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()> at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:154:18 22: 0x141a6a - std::rt::lang_start::<()>::{closure#0} at /home/r/src/rust/rustc.3/library/std/src/rt.rs:166:18 23: 0xcca18 - std::ops::function::impls::<impl std::ops::FnOnce<()> for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once at /home/r/src/rust/rustc.3/library/core/src/ops/function.rs:284:13 24: 0x146469 - std::panicking::try::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:524:40 25: 0x145e09 - std::panicking::try::<i32, &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:488:19 26: 0x7b0ac - std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32> at /home/r/src/rust/rustc.3/library/std/src/panic.rs:142:14 27: 0x14189b - std::rt::lang_start_internal::{closure#2} at /home/r/src/rust/rustc.3/library/std/src/rt.rs:148:48 28: 0x146481 - std::panicking::try::do_call::<[closure@std::rt::lang_start_internal::{closure#2}], isize> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:524:40 29: 0x145e2c - std::panicking::try::<isize, [closure@std::rt::lang_start_internal::{closure#2}]> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:488:19 30: 0x7b0d5 - std::panic::catch_unwind::<[closure@std::rt::lang_start_internal::{closure#2}], isize> at /home/r/src/rust/rustc.3/library/std/src/panic.rs:142:14 31: 0x1418b0 - std::rt::lang_start_internal at /home/r/src/rust/rustc.3/library/std/src/rt.rs:148:20 32: 0x141a97 - std::rt::lang_start::<()> at /home/r/src/rust/rustc.3/library/std/src/rt.rs:165:17 thread 'main' panicked at /home/r/src/rust/rustc.3/library/core/src/panicking.rs:126:5: panic in a destructor during cleanup stack backtrace: 0: 0xe9f6d7 - std::backtrace_rs::backtrace::miri::trace_unsynchronized::<&mut [closure@std::sys_common::backtrace::_print_fmt::{closure#1}]> at /home/r/src/rust/rustc.3/library/std/src/../../backtrace/src/backtrace/miri.rs:99:5 1: 0xe9f27d - std::backtrace_rs::backtrace::miri::trace::<&mut [closure@std::sys_common::backtrace::_print_fmt::{closure#1}]> at /home/r/src/rust/rustc.3/library/std/src/../../backtrace/src/backtrace/miri.rs:62:14 2: 0xe9e016 - std::backtrace_rs::backtrace::trace_unsynchronized::<[closure@std::sys_common::backtrace::_print_fmt::{closure#1}]> at /home/r/src/rust/rustc.3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 3: 0xba3afd - std::sys_common::backtrace::_print_fmt at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:67:5 4: 0xba2471 - <std::sys_common::backtrace::_print::DisplayBacktrace as std::fmt::Display>::fmt at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:44:22 5: 0xbcf754 - core::fmt::rt::Argument::<'_>::fmt at /home/r/src/rust/rustc.3/library/core/src/fmt/rt.rs:138:9 6: 0x9b8f81 - std::fmt::write at /home/r/src/rust/rustc.3/library/core/src/fmt/mod.rs:1094:17 7: 0x4d0895 - <std::sys::unix::stdio::Stderr as std::io::Write>::write_fmt at /home/r/src/rust/rustc.3/library/std/src/io/mod.rs:1714:15 8: 0xba37b1 - std::sys_common::backtrace::_print at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:47:5 9: 0xba365b - std::sys_common::backtrace::print at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:34:9 10: 0x400bd4 - std::panic_hook_with_disk_dump::{closure#1} at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:278:22 11: 0x144187 - std::panic_hook_with_disk_dump at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:312:9 12: 0x143659 - std::panicking::default_hook at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:239:5 13: 0x1482a7 - std::panicking::rust_panic_with_hook at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:729:13 14: 0x40403b - std::panicking::begin_panic_handler::{closure#0} at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:619:13 15: 0xe618b3 - std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !> at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:170:18 16: 0x403fc8 - std::panicking::begin_panic_handler at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:617:5 17: 0xee23e9 - core::panicking::panic_nounwind_fmt at /home/r/src/rust/rustc.3/library/core/src/panicking.rs:96:14 18: 0xee29e6 - core::panicking::panic_nounwind at /home/r/src/rust/rustc.3/library/core/src/panicking.rs:126:5 19: 0xee365e - core::panicking::panic_in_cleanup at /home/r/src/rust/rustc.3/library/core/src/panicking.rs:206:5 20: 0x2028a - main at src/tools/miri/tests/fail/panic/double_panic.rs:13:1 21: 0x3895ee - <fn() as std::ops::FnOnce<()>>::call_once - shim(fn()) at /home/r/src/rust/rustc.3/library/core/src/ops/function.rs:250:5 22: 0xe61725 - std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()> at /home/r/src/rust/rustc.3/library/std/src/sys_common/backtrace.rs:154:18 23: 0x3fe9aa - std::rt::lang_start::<()>::{closure#0} at /home/r/src/rust/rustc.3/library/std/src/rt.rs:166:18 24: 0x389962 - std::ops::function::impls::<impl std::ops::FnOnce<()> for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once at /home/r/src/rust/rustc.3/library/core/src/ops/function.rs:284:13 25: 0x4033b9 - std::panicking::try::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:524:40 26: 0x402d58 - std::panicking::try::<i32, &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:488:19 27: 0x337ff7 - std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32> at /home/r/src/rust/rustc.3/library/std/src/panic.rs:142:14 28: 0x3fe7e7 - std::rt::lang_start_internal::{closure#2} at /home/r/src/rust/rustc.3/library/std/src/rt.rs:148:48 29: 0x4033d6 - std::panicking::try::do_call::<[closure@std::rt::lang_start_internal::{closure#2}], isize> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:524:40 30: 0x402d7f - std::panicking::try::<isize, [closure@std::rt::lang_start_internal::{closure#2}]> at /home/r/src/rust/rustc.3/library/std/src/panicking.rs:488:19 31: 0x338028 - std::panic::catch_unwind::<[closure@std::rt::lang_start_internal::{closure#2}], isize> at /home/r/src/rust/rustc.3/library/std/src/panic.rs:142:14 32: 0x1418b0 - std::rt::lang_start_internal at /home/r/src/rust/rustc.3/library/std/src/rt.rs:148:20 33: 0x3fe9dc - std::rt::lang_start::<()> at /home/r/src/rust/rustc.3/library/std/src/rt.rs:165:17 thread caused non-unwinding panic. aborting. ``` If we also land https://github.com/rust-lang/rust/pull/115020, the 2nd backtrace disappears, hopefully making the "panic in a destructor during cleanup" easier to see. Fixes https://github.com/rust-lang/rust/issues/114954.
2023-08-24Rollup merge of #115154 - olanti-p:move-issues-24-08-2023, r=compiler-errorsWeihang Lo-2/+2
Move some ui tests to subdirectories cc #73494 issue-2804 -> `macros/` (there's already the minified `issue-2804-2` there) issue-17431 -> `structs-enums/struct-rec` and new `structs-enums/enum-rec` (original issue pertains to detection of recursive enums and structs) issue-29181 and issue-66768 - moved according to the classifier tool
2023-08-24Merge commit '080b587854a73f2a8cbaecff1884860a78e2ff37' into clippyupPhilipp Krones-9601/+16424
2023-08-24miri ABI compatibility check: accept u32 and i32Ralf Jung-0/+27
2023-08-24Move issue 29181, 2804, 17431, 66768Olanti-2/+2
2023-08-24attempt to better normalize remote-test-client output for testsRalf Jung-9/+13
2023-08-24Auto merge of #115131 - frank-king:feature/unnamed-fields-lite, r=petrochenkovbors-0/+21
Parse unnamed fields and anonymous structs or unions (no-recovery) It is part of #114782 which implements #49804. Only parse anonymous structs or unions in struct field definition positions. r? `@petrochenkov`
2023-08-24when terminating during unwinding, show the reason whyRalf Jung-5/+5
2023-08-24Auto merge of #115094 - Mark-Simulacrum:bootstrap-update, r=ozkanonurbors-15/+3
Update bootstrap compiler to 1.73.0 beta
2023-08-24Auto merge of #115078 - camelid:tydef-to-alias, r=aDotInTheVoid,GuillaumeGomezbors-11/+11
rustdoc: Rename typedef to type alias This matches the name used by the [Rust Reference][1], which is also what people usually call these items. [1]: https://doc.rust-lang.org/reference/items/type-aliases.html r? `@GuillaumeGomez`
2023-08-24Parse unnamed fields and anonymous structs or unionsFrank King-0/+21
Anonymous structs or unions are only allowed in struct field definitions. Co-authored-by: carbotaniuman <41451839+carbotaniuman@users.noreply.github.com>
2023-08-23Bump cfg(bootstrap)Mark Rousskov-15/+3
2023-08-23rustdoc: Rename typedef to type alias in jsondoclintNoah Lev-10/+10
2023-08-23Rollup merge of #115122 - estebank:fix-clippy, r=ManishearthDylan DPC-3/+23
Fix clippy lint for identical `if`/`else` contraining `?` expressions Follow up to #114819.
2023-08-23Fix clippy lint for identical `if`/`else` contraining `?` expressionsEsteban Küber-3/+23
Follow up to #114819.
2023-08-23Update cargoWeihang Lo-0/+0
2023-08-22Rollup merge of #115011 - compiler-errors:warn-on-elided-assoc-ct-lt, r=cjgillotMichael Goulet-1/+1
Warn on elided lifetimes in associated constants (`ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT`) Elided lifetimes in associated constants (in impls) erroneously resolve to fresh lifetime parameters on the impl since #97313. This is not correct behavior (see #38831). I originally opened #114716 to fix this, but given the time that has passed, the crater results seem pretty bad: https://github.com/rust-lang/rust/pull/114716#issuecomment-1682091952 This PR alternatively implements a lint against this behavior, and I'm hoping to bump this to deny in a few versions.
2023-08-22fix some bad regex capture group references in test normalizationRalf Jung-14/+14
2023-08-22Auto merge of #115095 - RalfJung:miri, r=RalfJungbors-74/+299
update Miri r? `@ghost`
2023-08-22Auto merge of #3036 - RalfJung:josh-autostart, r=RalfJungbors-26/+214
automatically start and stop josh in rustc-pull/push Let's make use of the fact that this is not a shell script any more. :)
2023-08-22miri-script: start and stop josh automaticallyRalf Jung-25/+212
2023-08-22make sure './miri many-seeds ./miri run' does not re-invoke the auto-opsRalf Jung-1/+2