Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
652 commits
Select commit Hold shift + click to select a range
f5b9eaf
Don't unnecessarily change `SIGPIPE` disposition in unix_sigpipe tests
Enselic Feb 24, 2024
613cb32
compiler: use `addr_of!`
GrigorenkoPV Feb 24, 2024
c7be443
Windows miri-script execution egronomics
RossSmyth Feb 24, 2024
2f1c9db
Auto merge of #3316 - RossSmyth:windows-script, r=RalfJung
bors Feb 24, 2024
3e7c2e1
Add "cargo miri clean" command
rsmyth-ecmi Feb 23, 2024
cd36cda
compiletest: call cargo-miri directly rather than via 'cargo run'
RalfJung Feb 24, 2024
4db9a36
Auto merge of #3312 - RossSmyth:miri-clean, r=RalfJung
bors Feb 24, 2024
6bdb8a4
Auto merge of #121523 - matthiaskrgr:comp_comp, r=Nilstrieb
bors Feb 24, 2024
55dcf9c
Auto merge of #3318 - RalfJung:compiletest-rebuilds, r=oli-obk
bors Feb 24, 2024
81d7069
Add `#[rustc_no_mir_inline]` for standard library UB checks
Noratrieb Feb 14, 2024
93ec0e6
Stabilize `cfg_target_abi`
ChrisDenton Jan 4, 2024
381d699
Auto merge of #121549 - matthiaskrgr:rollup-1hvu3lb, r=matthiaskrgr
bors Feb 24, 2024
ed75229
Rollup merge of #121343 - Takashiidobe:takashi/examples-for-slice, r=…
matthiaskrgr Feb 24, 2024
f4ba47f
Rollup merge of #121374 - Nadrieril:factor-explain, r=matthewjasper
matthiaskrgr Feb 24, 2024
59a2cd4
Rollup merge of #121474 - jieyouxu:ignore-directives-migration, r=Mar…
matthiaskrgr Feb 24, 2024
a189c89
Rollup merge of #121515 - RalfJung:fallible-promotion, r=oli-obk
matthiaskrgr Feb 24, 2024
106e30e
Rollup merge of #121530 - wgslr:master, r=Mark-Simulacrum
matthiaskrgr Feb 24, 2024
9975e84
Rollup merge of #121551 - nbdd0121:ffi_unwind, r=RalfJung
matthiaskrgr Feb 24, 2024
4c40153
Rollup merge of #121556 - GrigorenkoPV:addr_of, r=Nilstrieb
matthiaskrgr Feb 24, 2024
2401ae1
Make most bootstrap step types !Copy
Noratrieb Feb 24, 2024
24aa348
Add test cases for inlining compiler-private items
notriddle Feb 24, 2024
2ae1bb6
Auto merge of #121569 - matthiaskrgr:rollup-awglrax, r=matthiaskrgr
bors Feb 24, 2024
0da1b71
Add test case for primitive links in alias js
notriddle Feb 24, 2024
89d8e31
Auto merge of #120650 - clubby789:switchint-const, r=saethlin
bors Feb 25, 2024
3bcef2d
Fix issues in suggesting importing extern crate paths
chenyukang Feb 17, 2024
e9f9594
Auto merge of #121114 - Nilstrieb:no-inline!, r=saethlin
bors Feb 25, 2024
3093b29
WIP: empty doc span is still broken
lucarlig Feb 25, 2024
a2f3c0c
Auto merge of #117107 - zachs18:mapped-mutex-guard, r=Amanieu
bors Feb 25, 2024
5a63cd8
FIX(12243): redundant_guard
Feb 23, 2024
cc3df0a
remove platform-intrinsics ABI; make SIMD intrinsics be regular intri…
RalfJung Feb 23, 2024
c1d0e48
fix use of platform_intrinsics in tests
RalfJung Feb 23, 2024
9577051
bump rustc-build-sysroot
RalfJung Feb 25, 2024
4a2588a
Merge commit '4a8d0f7f565b6df45da5522dd7366a4df3460cd7' into sync-fro…
lnicola Feb 25, 2024
9caeabe
Add missing imports
lnicola Feb 25, 2024
5ee6a5d
Avoid using cfg(FALSE)
lnicola Feb 25, 2024
710048f
Auto merge of #121579 - RalfJung:miri, r=RalfJung
bors Feb 25, 2024
6b7700e
Pause PR assignments for xFrednet :)
xFrednet Feb 25, 2024
0d1ba48
Auto merge of #12345 - xFrednet:00000-some-healthy-life-choices, r=xF…
bors Feb 25, 2024
cdaccd7
bump itertools to 0.12
klensy Feb 25, 2024
43fdd49
Auto merge of #121581 - lnicola:sync-from-ra, r=lnicola
bors Feb 25, 2024
8ef1b73
Auto merge of #12346 - klensy:itertools-bump, r=llogiq
bors Feb 25, 2024
5b7786c
make non-PartialEq-typed consts as patterns a hard error
RalfJung Feb 8, 2024
76e4864
Auto merge of #12339 - GuillaumeGomez:add-unnecessary_get_then_check,…
bors Feb 25, 2024
b2fbb8a
Use generic `NonZero` in tests.
reitermarkus Feb 22, 2024
84219f4
working naive with outside check_attrs
lucarlig Feb 25, 2024
26cd5d8
Auto merge of #118724 - onur-ozkan:refactor-x-install, r=Mark-Simulacrum
bors Feb 25, 2024
fa75571
Don't use `unwrap()` in `ArrayIntoIter` lint when typeck fails
gurry Feb 25, 2024
09c7c5d
fix bug in check_exprs
lucarlig Feb 25, 2024
a3fea80
bless tests
lucarlig Feb 25, 2024
08caefb
Windows: Use ProcessPrng for random keys
ChrisDenton Dec 20, 2023
8f89cbd
Add ProcessPrng shim to Miri
ChrisDenton Feb 20, 2024
9ac6125
add extra variant because no more than 3 bools
lucarlig Feb 25, 2024
843eaf2
Cranelift: Don't use raw-dylib in std
ChrisDenton Feb 20, 2024
0ea4495
pop before trimming
lucarlig Feb 25, 2024
ee0cbea
ignore empty comment in semicolon_if_nothing_returned
lucarlig Feb 25, 2024
97e4c57
fix lint doc
lucarlig Feb 25, 2024
5a50ced
add single letter test
lucarlig Feb 25, 2024
34aab62
Auto merge of #121337 - ChrisDenton:ProcessPrng, r=Mark-Simulacrum
bors Feb 25, 2024
c469cb0
Auto merge of #12336 - not-elm:fix/issue-12243, r=y21
bors Feb 25, 2024
3af67bb
Correctly handle if rustdoc JS script hash changed
GuillaumeGomez Feb 25, 2024
e13f454
Rollup merge of #119590 - ChrisDenton:cfg-target-abi, r=Nilstrieb
matthiaskrgr Feb 25, 2024
c99902e
Rollup merge of #120805 - RalfJung:const-pat-partial-eq, r=oli-obk
matthiaskrgr Feb 25, 2024
7c88ea2
Rollup merge of #121060 - clubby789:bool-newtypes, r=cjgillot
matthiaskrgr Feb 25, 2024
f780824
Rollup merge of #121284 - notriddle:notriddle/issue-106421, r=Mark-Si…
matthiaskrgr Feb 25, 2024
86a35c0
Rollup merge of #121324 - Nadrieril:unspecialize, r=cjgillot
matthiaskrgr Feb 25, 2024
4d442f5
Rollup merge of #121409 - compiler-errors:atb-cycle, r=cjgillot
matthiaskrgr Feb 25, 2024
f548636
Rollup merge of #121513 - nshyrei:fix_tests_module, r=cuviper
matthiaskrgr Feb 25, 2024
3d5fd9d
Rollup merge of #121570 - Nilstrieb:!copy, r=clubby789
matthiaskrgr Feb 25, 2024
a442388
Rollup merge of #121586 - gurry:121532-ice-unwrap-on-none, r=cjgillot
matthiaskrgr Feb 25, 2024
9a56153
[`single_call_fn`]: merge post-crate visitor into lint pass
y21 Jan 21, 2024
8c0b1fc
Auto merge of #121591 - matthiaskrgr:rollup-8wfhh3v, r=matthiaskrgr
bors Feb 25, 2024
bee4111
Remove `clippy_utils::get_parent_node`
Alexendoo Feb 25, 2024
f32e92c
add 1 more test and dont trim other code
lucarlig Feb 25, 2024
d7ad85f
move the the check into check_atr function
lucarlig Feb 25, 2024
f066be7
use span of fragments
lucarlig Feb 25, 2024
10c9903
Auto merge of #12348 - Alexendoo:remove-get-parent-node, r=y21
bors Feb 25, 2024
d84d9d3
lint on variant and fields as well
lucarlig Feb 25, 2024
ee50d5d
correct wrong doc syntax
lucarlig Feb 25, 2024
b0d3e04
Auto merge of #120393 - Urgau:rfc3373-non-local-defs, r=WaffleLapkin
bors Feb 25, 2024
5152050
move lint directly into check_attrs
lucarlig Feb 25, 2024
30ee7af
style: sync GitHub Corner colors
hamirmahal Feb 25, 2024
0ecbd06
Auto merge of #121182 - majaha:mingw_ci_new, r=Mark-Simulacrum
bors Feb 25, 2024
a3fce72
Add `ast::ExprKind::Dummy`
ShE3py Feb 25, 2024
c440a5b
Add `ErrorGuaranteed` to `ast::ExprKind::Err`
ShE3py Feb 25, 2024
34eae07
Remove `ast::` & `base::` prefixes from some builtin macros
ShE3py Feb 25, 2024
7353bd0
Auto merge of #12256 - y21:single_call_fn_rm_visitor, r=llogiq
bors Feb 25, 2024
ec29b0d
lint implied bounds in *all* opaque `impl Trait` types
y21 Feb 17, 2024
bbfe1c1
lint implied bounds in APIT
y21 Feb 17, 2024
aa2c94e
Auto merge of #12308 - y21:more_implied_bounds, r=xFrednet
bors Feb 25, 2024
bf7d1b5
Move `emit_stashed_diagnostic` call in rustfmt.
nnethercote Feb 25, 2024
edda2a7
Revert some `span_bug`s to `span_delayed_bug`.
nnethercote Feb 25, 2024
0250ef2
Auto merge of #121461 - reitermarkus:generic-nonzero-tests, r=dtolnay
bors Feb 26, 2024
35421c7
Add synchronization library to run-make flags
ChrisDenton Feb 26, 2024
ff07f55
Actually use the right closure kind when checking async Fn goals
compiler-errors Feb 26, 2024
8bccceb
separate messages for individual categories
HTGAzureX1212 Feb 9, 2024
93deced
change rs doc to no_run
lucarlig Feb 26, 2024
dc00e8c
Auto merge of #121317 - ChrisDenton:win10-sync, r=Mark-Simulacrum
bors Feb 26, 2024
3ef693c
refactor: remove CSS variables that are now unused
hamirmahal Feb 26, 2024
b09fb8a
Auto merge of #12350 - hamirmahal:style/sync-GitHub-Corner-colors, r=…
bors Feb 26, 2024
eeeb9b4
add additional logging
lcnr Feb 26, 2024
1b3164f
always emit `AliasRelate` goals when relating aliases
lcnr Feb 26, 2024
0e08be5
Rollup merge of #120656 - Zalathar:filecheck-flags, r=wesleywiser
GuillaumeGomez Feb 26, 2024
91d337d
Rollup merge of #120840 - HTGAzureX1212:HTGAzureX1212/unicode-identif…
GuillaumeGomez Feb 26, 2024
5bd9092
Rollup merge of #121554 - Enselic:sigaction, r=oli-obk
GuillaumeGomez Feb 26, 2024
a1593a6
Rollup merge of #121590 - GuillaumeGomez:rustdoc-js-changed, r=notriddle
GuillaumeGomez Feb 26, 2024
76f303d
Rollup merge of #121620 - nnethercote:fix-even-more-121208-fallout, r…
GuillaumeGomez Feb 26, 2024
297abc3
fix some references to no-longer-existing ReprOptions.layout_seed
RalfJung Feb 26, 2024
ee933f6
Auto merge of #121627 - GuillaumeGomez:rollup-udp3m0k, r=GuillaumeGomez
bors Feb 26, 2024
633c92c
Do not const pop unions
gurry Feb 26, 2024
a788be0
use fulfillment in `Coerce::unify'
lcnr Feb 26, 2024
2c7ede8
update tests
lcnr Feb 26, 2024
1c264ca
add regression tests
lcnr Feb 26, 2024
b4ca582
rename 'try' intrinsic to 'catch_unwind'
RalfJung Feb 25, 2024
a3c0f3a
miri: rename miri_start_panic → miri_start_unwind
RalfJung Feb 25, 2024
3b3514a
consider placeholders in `fn term_is_fully_unconstrained`
lcnr Feb 26, 2024
b8de591
Auto merge of #119106 - lcnr:decrement-universes, r=BoxyUwU
bors Feb 26, 2024
0c082b7
remove useless lifetime of ArchiveBuilder
823984418 Feb 26, 2024
b79db43
Auto merge of #120586 - ShE3py:exprkind-err, r=fmease
bors Feb 26, 2024
80bafa5
add cargo.toml lint section way of adding lints
lucarlig Feb 26, 2024
6700714
Rollup merge of #121389 - klensy:llvm-warn-fix, r=nikic
matthiaskrgr Feb 26, 2024
6e3ece3
Rollup merge of #121493 - surechen:edit_attribute_only_local, r=lcnr
matthiaskrgr Feb 26, 2024
9d5ab73
Rollup merge of #121615 - nnethercote:fix-121517, r=oli-obk
matthiaskrgr Feb 26, 2024
4f167b4
Rollup merge of #121617 - compiler-errors:async-closure-kind-check, r…
matthiaskrgr Feb 26, 2024
218be27
Rollup merge of #121628 - gurry:121534-ice-asymm-binop, r=oli-obk
matthiaskrgr Feb 26, 2024
81eddb3
Rollup merge of #121629 - RalfJung:field-shuffle-seed, r=oli-obk
matthiaskrgr Feb 26, 2024
fca77c0
docs and imports
lucarlig Feb 26, 2024
6d0b70e
Clean up Allowing/Denying Lints section
flip1995 Feb 26, 2024
a11875b
Auto merge of #12353 - lucarlig:book, r=flip1995
bors Feb 26, 2024
97dc4b2
[`box_default`]: Preserve required path segments
Ethiraric Feb 26, 2024
67bd410
Update books
rustbot Feb 26, 2024
829308e
Auto merge of #121636 - matthiaskrgr:rollup-1tt2o5n, r=matthiaskrgr
bors Feb 26, 2024
d718995
Auto merge of #12355 - Ethiraric:fix-11927, r=Alexendoo
bors Feb 26, 2024
1c50948
Auto merge of #12342 - lucarlig:empty-docs, r=llogiq
bors Feb 26, 2024
580b003
fix race between block initialization and receiver disconnection
ibraheemdev Feb 26, 2024
cfddd91
[`read_line_without_trim`]: catch string eq checks
y21 Jul 10, 2023
fd85db3
restructure lint code, update description, more cases
y21 Jul 10, 2023
a1b93e8
Rearrange `Vec::from_raw_parts{,_in}` doc argument order to match cod…
jieyouxu Feb 26, 2024
26bdf29
Rearrange `String::from_raw_parts` doc argument order to match code a…
jieyouxu Feb 26, 2024
dd24a46
Document args returned from `Vec::into_raw_parts{,_with_alloc}`
jieyouxu Feb 26, 2024
bfeea29
Document args returned from `String::into_raw_parts`
jieyouxu Feb 26, 2024
fc3800f
Auto merge of #121646 - ibraheemdev:patch-17, r=ChrisDenton
bors Feb 26, 2024
1658ca0
Properly emit `expected ;` on `#[attr] expr`
ShE3py Feb 26, 2024
1e3c55e
Remove redundant uncertain_counts
teor2345 Feb 26, 2024
5c786a7
Auto merge of #121516 - RalfJung:platform-intrinsics-begone, r=oli-obk
bors Feb 26, 2024
d12b53e
Auto merge of #12116 - J-ZhengLi:issue12101, r=Alexendoo
bors Feb 26, 2024
d95c321
Rollup merge of #121598 - RalfJung:catch_unwind, r=oli-obk
matthiaskrgr Feb 26, 2024
e47d814
Rollup merge of #121639 - rustbot:docs-update, r=ehuss
matthiaskrgr Feb 26, 2024
94609db
Rollup merge of #121648 - jieyouxu:from-into-raw-parts-docs, r=Nilstrieb
matthiaskrgr Feb 26, 2024
ec5c5b7
Rollup merge of #121651 - ShE3py:issue-121647, r=estebank
matthiaskrgr Feb 26, 2024
2ea3322
syms for legacy numeric constants diag items
pitaj Feb 27, 2024
71ffdf7
Auto merge of #121655 - matthiaskrgr:rollup-qpx3kks, r=matthiaskrgr
bors Feb 27, 2024
03a10a9
Changing some attributes to only_local.
surechen Feb 27, 2024
91cae1d
Auto merge of #121635 - 823984418:remove_archive_builder_lifetime_a, …
bors Feb 27, 2024
fb06081
Auto merge of #11136 - y21:enhance_read_line_without_trim, r=dswij
bors Feb 27, 2024
2fc94ce
Remove an unnecessary `span_delayed_bug` call.
nnethercote Feb 15, 2024
c743e4a
Refactor `LoweringContext::get_delegation_sig_id`.
nnethercote Feb 15, 2024
d0267cb
Remove an unnecessary `span_delayed_bug` in `Resolver::valid_res_from…
nnethercote Feb 16, 2024
b2d1d6f
Avoid `span_delayed_bug` on one path in `AdtDef::eval_explicit_discr`.
nnethercote Feb 16, 2024
e33cba5
Auto merge of #12126 - teor2345:patch-1, r=llogiq
bors Feb 27, 2024
9f82563
Avoid a `span_delayed_bug` in `TypeErrCtxt::report_region_errors`.
nnethercote Feb 16, 2024
62b4e55
Avoid a `span_delayed_bug` in `compute_regions`.
nnethercote Feb 18, 2024
a8a486c
Refactor `take_for_recovery` call sites.
nnethercote Feb 18, 2024
1c28a2c
Auto merge of #121667 - pitaj:diag_items-legacy_numeric_constants, r=…
bors Feb 27, 2024
53ed660
Auto merge of #120411 - erikdesjardins:netbsdcall, r=Nilstrieb
bors Feb 27, 2024
9afdb8d
Auto merge of #121285 - nnethercote:delayed_bug-audit, r=lcnr
bors Feb 27, 2024
bd3ea3e
ffi_unwind_calls: treat RustIntrinsic like regular Rust calls
RalfJung Feb 24, 2024
f5c80dc
intrinsics.rs: add some notes on unwinding
RalfJung Feb 24, 2024
b6e4299
Auto merge of #121548 - RalfJung:ffi-unwind-intrinsics, r=davidtwco
bors Feb 27, 2024
592fe89
lower `bstr` version requirement to `1.6.0`
oli-obk Feb 27, 2024
1013617
Auto merge of #12363 - oli-obk:bump_ui_test, r=flip1995
bors Feb 27, 2024
ad7513e
Merge commit '10136170fe9ed01e46aeb4f4479175b79eb0e3c7' into clippy-s…
flip1995 Feb 27, 2024
f99056b
Update Cargo.lock
flip1995 Feb 27, 2024
f115064
Add the wasm32-wasi-preview2 target
rylev Jan 31, 2024
5e9bed7
Rename wasm32-wasi-preview2 to wasm32-wasip2
rylev Feb 21, 2024
8719b74
Fix link generation for locate foreign macro in jump to definition fe…
GuillaumeGomez Feb 27, 2024
4dd05e6
Add regression test for link generation on foreign macro in jump to d…
GuillaumeGomez Feb 27, 2024
8790c3c
Auto merge of #119636 - devnexen:linux_tcp_defer_accept, r=m-ou-se
bors Feb 27, 2024
5df9593
Prevent inclusion of whitespace character after macro_rules ident
GuillaumeGomez Feb 27, 2024
5d59d0c
have `String` use `SliceIndex` impls from `str`
pitaj Jan 24, 2024
7e10a5c
handle unavailable creation time as `io::ErrorKind::Unsupported`
janstarke Feb 27, 2024
1feef44
rename RPITIT from opaque to synthetic
compiler-errors Feb 27, 2024
b57ddfe
Print RPITIT like an opaque
compiler-errors Feb 27, 2024
8a6d353
Split rustc_type_ir to avoid rustc_ast from depending on it
oli-obk Feb 27, 2024
1e4f9e3
Auto merge of #121677 - flip1995:clippy-subtree-update, r=Manishearth
bors Feb 27, 2024
c7476f8
CFI: Fix typo in test file names
rcvalle Feb 27, 2024
cc584ba
Process alias-relate obligations in CoerceUnsized loop
compiler-errors Feb 27, 2024
ef32456
Auto merge of #119616 - rylev:wasm32-wasi-preview2, r=petrochenkov,m-…
bors Feb 27, 2024
6588f5b
Rename `Diagnostic` as `DiagInner`.
nnethercote Feb 22, 2024
366536b
Rename `DelayedDiagnostic` as `DelayedDiagInner`.
nnethercote Feb 22, 2024
4e1f9bd
Rename `SubDiagnostic` as `Subdiag`.
nnethercote Feb 22, 2024
2dbdb8a
Update cargo
weihanglo Feb 27, 2024
899cb40
Rename `DiagnosticBuilder` as `Diag`.
nnethercote Feb 22, 2024
8199632
Rename `DiagnosticArg{,Map,Name,Value}` as `DiagArg{,Map,Name,Value}`.
nnethercote Feb 23, 2024
d0ef108
Rename `DiagnosticArgFromDisplay` as `DiagArgFromDisplay`.
nnethercote Feb 23, 2024
e3c19a2
Rename `DiagnosticLocation` as `DiagLocation`.
nnethercote Feb 23, 2024
6280a8c
Rename `DiagnosticSymbolList` as `DiagSymbolList`.
nnethercote Feb 23, 2024
9b3520e
Rename `DiagnosticStyledString` as `DiagStyledString`.
nnethercote Feb 23, 2024
8f3b007
Rename `DiagnosticImportance` as `DiagImportance`.
nnethercote Feb 23, 2024
5e29e26
Remove the `UntranslatableDiagnosticTrivial` lint.
nnethercote Feb 5, 2024
951f2d9
Use `LitKind::Err` for floats with empty exponents.
nnethercote Feb 28, 2024
7976609
Reformat `float-field.rs` test.
nnethercote Feb 28, 2024
840c8d3
Use `LitKind::Err` for floats with unsupported bases.
nnethercote Feb 28, 2024
12b991d
Don't panic when encountering unexpected constructor
Nadrieril Feb 28, 2024
11f9489
Changing some attributes to only_local.
surechen Feb 28, 2024
d377991
Auto merge of #121699 - weihanglo:update-cargo, r=weihanglo
bors Feb 28, 2024
d840408
Rollup merge of #120051 - riverbl:os-str-display, r=m-ou-se
GuillaumeGomez Feb 28, 2024
c5dafe6
Rollup merge of #121226 - chenyukang:yukang-fix-import-alias, r=david…
GuillaumeGomez Feb 28, 2024
587d828
Rollup merge of #121423 - nnethercote:rm-UntranslatableDiagnosticTriv…
GuillaumeGomez Feb 28, 2024
d8e6550
Rollup merge of #121527 - Enselic:unix_sigpipe-tests-fixes, r=davidtwco
GuillaumeGomez Feb 28, 2024
65b190d
Rollup merge of #121572 - notriddle:notriddle/test-case-121106, r=Gui…
GuillaumeGomez Feb 28, 2024
796af69
Rollup merge of #121661 - surechen:change_attribute_to_local_20240226…
GuillaumeGomez Feb 28, 2024
b609afe
Rollup merge of #121680 - GuillaumeGomez:foreign-macro-jump-to-def, r…
GuillaumeGomez Feb 28, 2024
a0027e8
Rollup merge of #121686 - compiler-errors:rpitit-printing, r=lcnr
GuillaumeGomez Feb 28, 2024
2492f93
Rollup merge of #121691 - janstarke:handle-missing-creation-time-as-u…
GuillaumeGomez Feb 28, 2024
a62cfe0
Rollup merge of #121695 - oli-obk:split_ty_utils, r=compiler-errors
GuillaumeGomez Feb 28, 2024
ca69a1f
Rollup merge of #121698 - rcvalle:rust-cfi-fix-typo, r=compiler-errors
GuillaumeGomez Feb 28, 2024
1b08d1a
Rollup merge of #121702 - compiler-errors:coerce-alias-relate, r=lcnr
GuillaumeGomez Feb 28, 2024
632d26a
Add regression test for inclusion of whitespace characters in rustdoc…
GuillaumeGomez Feb 27, 2024
5cdbe83
Opportunistically resolve regions when processing region outlives obl…
compiler-errors Feb 27, 2024
75e15f7
Deeply normalize obligations in refining_impl_trait
compiler-errors Feb 28, 2024
bf9c7a6
Auto merge of #121741 - GuillaumeGomez:rollup-msrsrnk, r=GuillaumeGomez
bors Feb 28, 2024
c475e23
Auto merge of #121489 - nnethercote:diag-renaming, r=davidtwco
bors Feb 28, 2024
5512945
Implement unwind safety for Condvar
ecton Feb 28, 2024
332b9be
Rollup merge of #110543 - joboet:reentrant_lock, r=m-ou-se
matthiaskrgr Feb 28, 2024
843920f
Rollup merge of #121689 - GuillaumeGomez:rustdoc-highlighting-whitesp…
matthiaskrgr Feb 28, 2024
686a4b1
Rollup merge of #121724 - nnethercote:LitKind-Err-for-floats, r=fmease
matthiaskrgr Feb 28, 2024
eca6a24
Rollup merge of #121735 - Nadrieril:no-panic-on-type-error, r=compile…
matthiaskrgr Feb 28, 2024
9f9daed
Rollup merge of #121743 - compiler-errors:opportunistically-resolve-r…
matthiaskrgr Feb 28, 2024
3fbdec4
Add a comment about how `IntoDiagnostic` should be impl'd.
nnethercote Feb 27, 2024
199be46
Refactor `DiagCtxtInner::flush_delayed`.
nnethercote Feb 27, 2024
d3d145e
Auto merge of #121770 - matthiaskrgr:rollup-wdher8r, r=matthiaskrgr
bors Feb 29, 2024
9dfe5ef
Fix typo in `rustc_passes/messages.ftl`
sisungo Feb 29, 2024
9c6a076
document potential memory leak in unbounded channel
ibraheemdev Feb 29, 2024
1850ba7
Remove unused diagnostic struct
mu001999 Feb 29, 2024
7c9fa95
fix typos
ibraheemdev Feb 29, 2024
da37c8f
Fix tests that are affected by this change
sisungo Feb 29, 2024
ad4c932
Restore the standard library review rotation to its former glory
Amanieu Feb 28, 2024
06d4878
Rollup merge of #119748 - tgross35:suggest-path-split, r=Amanieu
jhpratt Feb 29, 2024
6d86503
Rollup merge of #120291 - pitaj:string-sliceindex, r=Amanieu
jhpratt Feb 29, 2024
b098b17
Rollup merge of #121723 - nnethercote:two-diagnostic-things, r=oli-obk
jhpratt Feb 29, 2024
6971629
Rollup merge of #121740 - surechen:change_attribute_to_local_20240228…
jhpratt Feb 29, 2024
2335138
Rollup merge of #121745 - compiler-errors:refining-impl-trait-deeply-…
jhpratt Feb 29, 2024
b55347a
Rollup merge of #121748 - Amanieu:restore-libs-rotation, r=Amanieu
jhpratt Feb 29, 2024
769eb2c
Rollup merge of #121768 - ecton:condvar-unwindsafe, r=m-ou-se
jhpratt Feb 29, 2024
d6e0f5c
Rollup merge of #121777 - sisungo:master, r=oli-obk
jhpratt Feb 29, 2024
20a1bf6
Rollup merge of #121778 - ibraheemdev:patch-19, r=RalfJung
jhpratt Feb 29, 2024
698cec8
Rollup merge of #121779 - mu001999:clean, r=Nilstrieb
jhpratt Feb 29, 2024
71a7b66
Auto merge of #121790 - jhpratt:rollup-yocg203, r=jhpratt
bors Feb 29, 2024
f030d49
Expose `Freeze` trait again
oli-obk Feb 23, 2024
7849230
Forbid implementing `Freeze` even if the trait is stabilized
oli-obk Feb 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use rustc_middle::ty::layout::{HasParamEnv, ValidityRequirement};
use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
use rustc_middle::ty::GenericArgsRef;
use rustc_span::source_map::Spanned;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::symbol::{sym, Symbol};

pub(crate) use self::llvm::codegen_llvm_intrinsic_call;
use crate::prelude::*;
Expand Down Expand Up @@ -1132,7 +1132,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
ret.write_cvalue(fx, val);
}

kw::Try => {
sym::catch_unwind => {
intrinsic_args!(fx, args => (f, data, catch_fn); intrinsic);
let f = f.load_scalar(fx);
let data = data.load_scalar(fx);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/src/intrinsic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use rustc_middle::ty::{self, Instance, Ty};
use rustc_middle::ty::layout::LayoutOf;
#[cfg(feature="master")]
use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt};
use rustc_span::{Span, Symbol, symbol::kw, sym};
use rustc_span::{Span, Symbol, sym};
use rustc_target::abi::HasDataLayout;
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
use rustc_target::spec::PanicStrategy;
Expand Down Expand Up @@ -129,7 +129,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
let res = self.context.new_call(None, builtin, &[a]);
self.icmp(IntPredicate::IntEQ, res, self.const_i32(0))
}
kw::Try => {
sym::catch_unwind => {
try_intrinsic(
self,
args[0].immediate(),
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use rustc_hir as hir;
use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt, LayoutOf};
use rustc_middle::ty::{self, GenericArgsRef, Ty};
use rustc_middle::{bug, span_bug};
use rustc_span::{sym, symbol::kw, Span, Symbol};
use rustc_span::{sym, Span, Symbol};
use rustc_target::abi::{self, Align, HasDataLayout, Primitive};
use rustc_target::spec::{HasTargetSpec, PanicStrategy};

Expand Down Expand Up @@ -133,8 +133,8 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> {
}
sym::unlikely => self
.call_intrinsic("llvm.expect.i1", &[args[0].immediate(), self.const_bool(false)]),
kw::Try => {
try_intrinsic(
sym::catch_unwind => {
catch_unwind_intrinsic(
self,
args[0].immediate(),
args[1].immediate(),
Expand Down Expand Up @@ -457,7 +457,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> {
}
}

fn try_intrinsic<'ll>(
fn catch_unwind_intrinsic<'ll>(
bx: &mut Builder<'_, 'll, '_>,
try_func: &'ll Value,
data: &'ll Value,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir_analysis/src/check/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rustc_hir as hir;
use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_span::def_id::LocalDefId;
use rustc_span::symbol::{kw, sym};
use rustc_span::symbol::sym;
use rustc_span::{Span, Symbol};
use rustc_target::spec::abi::Abi;

Expand Down Expand Up @@ -445,7 +445,7 @@ pub fn check_intrinsic_type(
)
}

kw::Try => {
sym::catch_unwind => {
let mut_u8 = Ty::new_mut_ptr(tcx, tcx.types.u8);
let try_fn_ty = ty::Binder::dummy(tcx.mk_fn_sig(
[mut_u8],
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ symbols! {
call_once,
caller_location,
capture_disjoint_fields,
catch_unwind,
cause,
cdylib,
ceilf32,
Expand Down
25 changes: 18 additions & 7 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
unsafe { crate::ptr::drop_in_place(to_drop) }
}

#[cfg(bootstrap)]
pub use self::r#try as catch_unwind;

extern "rust-intrinsic" {
// N.B., these intrinsics take raw pointers because they mutate aliased
// memory, which is not valid for either `&` or `&mut`.
Expand Down Expand Up @@ -2382,16 +2385,24 @@ extern "rust-intrinsic" {
#[rustc_nounwind]
pub fn variant_count<T>() -> usize;

/// Rust's "try catch" construct which invokes the function pointer `try_fn`
/// with the data pointer `data`.
///
/// The third argument is a function called if a panic occurs. This function
/// takes the data pointer and a pointer to the target-specific exception
/// object that was caught. For more information see the compiler's
/// source as well as std's catch implementation.
/// Rust's "try catch" construct for unwinding. Invokes the function pointer `try_fn` with the
/// data pointer `data`, and calls `catch_fn` if unwinding occurs while `try_fn` runs.
///
/// `catch_fn` must not unwind.
///
/// The third argument is a function called if an unwind occurs (both Rust unwinds and foreign
/// unwinds). This function takes the data pointer and a pointer to the target-specific
/// exception object that was caught. For more information, see the compiler's source as well as
/// std's `catch_unwind` implementation.
///
/// The stable version of this intrinsic is `std::panic::catch_unwind`.
#[rustc_nounwind]
#[cfg(not(bootstrap))]
pub fn catch_unwind(try_fn: fn(*mut u8), data: *mut u8, catch_fn: fn(*mut u8, *mut u8)) -> i32;

/// For bootstrap only, see `catch_unwind`.
#[rustc_nounwind]
#[cfg(bootstrap)]
pub fn r#try(try_fn: fn(*mut u8), data: *mut u8, catch_fn: fn(*mut u8, *mut u8)) -> i32;

/// Emits a `!nontemporal` store according to LLVM (see their docs).
Expand Down
6 changes: 3 additions & 3 deletions library/panic_unwind/src/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ type Payload = Box<Box<dyn Any + Send>>;

extern "Rust" {
/// Miri-provided extern function to begin unwinding.
fn miri_start_panic(payload: *mut u8) -> !;
fn miri_start_unwind(payload: *mut u8) -> !;
}

pub unsafe fn panic(payload: Box<dyn Any + Send>) -> u32 {
// The payload we pass to `miri_start_panic` will be exactly the argument we get
// The payload we pass to `miri_start_unwind` will be exactly the argument we get
// in `cleanup` below. So we just box it up once, to get something pointer-sized.
let payload_box: Payload = Box::new(payload);
miri_start_panic(Box::into_raw(payload_box) as *mut u8)
miri_start_unwind(Box::into_raw(payload_box) as *mut u8)
}

pub unsafe fn cleanup(payload_box: *mut u8) -> Box<dyn Any + Send> {
Expand Down
8 changes: 4 additions & 4 deletions library/std/src/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,12 @@ pub unsafe fn r#try<R, F: FnOnce() -> R>(f: F) -> Result<R, Box<dyn Any + Send>>
// Access to the union's fields: this is `std` and we know that the `r#try`
// intrinsic fills in the `r` or `p` union field based on its return value.
//
// The call to `intrinsics::r#try` is made safe by:
// The call to `intrinsics::catch_unwind` is made safe by:
// - `do_call`, the first argument, can be called with the initial `data_ptr`.
// - `do_catch`, the second argument, can be called with the `data_ptr` as well.
// See their safety preconditions for more information
unsafe {
return if intrinsics::r#try(do_call::<F, R>, data_ptr, do_catch::<F, R>) == 0 {
return if intrinsics::catch_unwind(do_call::<F, R>, data_ptr, do_catch::<F, R>) == 0 {
Ok(ManuallyDrop::into_inner(data.r))
} else {
Err(ManuallyDrop::into_inner(data.p))
Expand All @@ -540,7 +540,7 @@ pub unsafe fn r#try<R, F: FnOnce() -> R>(f: F) -> Result<R, Box<dyn Any + Send>>
// Its must contains a valid `f` (type: F) value that can be use to fill
// `data.r`.
//
// This function cannot be marked as `unsafe` because `intrinsics::r#try`
// This function cannot be marked as `unsafe` because `intrinsics::catch_unwind`
// expects normal function pointers.
#[inline]
fn do_call<F: FnOnce() -> R, R>(data: *mut u8) {
Expand All @@ -562,7 +562,7 @@ pub unsafe fn r#try<R, F: FnOnce() -> R>(f: F) -> Result<R, Box<dyn Any + Send>>
// Since this uses `cleanup` it also hinges on a correct implementation of
// `__rustc_panic_cleanup`.
//
// This function cannot be marked as `unsafe` because `intrinsics::r#try`
// This function cannot be marked as `unsafe` because `intrinsics::catch_unwind`
// expects normal function pointers.
#[inline]
#[rustc_nounwind] // `intrinsic::r#try` requires catch fn to be nounwind
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/src/concurrency/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub struct Thread<'mir, 'tcx> {
join_status: ThreadJoinStatus,

/// Stack of active panic payloads for the current thread. Used for storing
/// the argument of the call to `miri_start_panic` (the panic payload) when unwinding.
/// the argument of the call to `miri_start_unwind` (the panic payload) when unwinding.
/// This is pointer-sized, and matches the `Payload` type in `src/libpanic_unwind/miri.rs`.
///
/// In real unwinding, the payload gets passed as an argument to the landing pad,
Expand Down
6 changes: 3 additions & 3 deletions src/tools/miri/src/shims/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
let ret = match ret {
None =>
match link_name.as_str() {
"miri_start_panic" => {
// `check_shim` happens inside `handle_miri_start_panic`.
this.handle_miri_start_panic(abi, link_name, args, unwind)?;
"miri_start_unwind" => {
// `check_shim` happens inside `handle_miri_start_unwind`.
this.handle_miri_start_unwind(abi, link_name, args, unwind)?;
return Ok(None);
}
// This matches calls to the foreign item `panic_impl`.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/src/shims/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {

// Some intrinsics are special and need the "ret".
match intrinsic_name {
"try" => return this.handle_try(args, dest, ret),
"catch_unwind" => return this.handle_catch_unwind(args, dest, ret),
_ => {}
}

Expand Down
16 changes: 8 additions & 8 deletions src/tools/miri/src/shims/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
//! The core pieces of the runtime are:
//! - An implementation of `__rust_maybe_catch_panic` that pushes the invoked stack frame with
//! some extra metadata derived from the panic-catching arguments of `__rust_maybe_catch_panic`.
//! - A hack in `libpanic_unwind` that calls the `miri_start_panic` intrinsic instead of the
//! - A hack in `libpanic_unwind` that calls the `miri_start_unwind` intrinsic instead of the
//! target-native panic runtime. (This lives in the rustc repo.)
//! - An implementation of `miri_start_panic` that stores its argument (the panic payload), and then
//! - An implementation of `miri_start_unwind` that stores its argument (the panic payload), and then
//! immediately returns, but on the *unwind* edge (not the normal return edge), thus initiating unwinding.
//! - A hook executed each time a frame is popped, such that if the frame pushed by `__rust_maybe_catch_panic`
//! gets popped *during unwinding*, we take the panic payload and store it according to the extra
Expand Down Expand Up @@ -44,9 +44,9 @@ impl VisitProvenance for CatchUnwindData<'_> {

impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {}
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
/// Handles the special `miri_start_panic` intrinsic, which is called
/// Handles the special `miri_start_unwind` intrinsic, which is called
/// by libpanic_unwind to delegate the actual unwinding process to Miri.
fn handle_miri_start_panic(
fn handle_miri_start_unwind(
&mut self,
abi: Abi,
link_name: Symbol,
Expand All @@ -55,7 +55,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
) -> InterpResult<'tcx> {
let this = self.eval_context_mut();

trace!("miri_start_panic: {:?}", this.frame().instance);
trace!("miri_start_unwind: {:?}", this.frame().instance);

// Get the raw pointer stored in arg[0] (the panic payload).
let [payload] = this.check_shim(abi, Abi::Rust, link_name, args)?;
Expand All @@ -69,7 +69,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
}

/// Handles the `try` intrinsic, the underlying implementation of `std::panicking::try`.
fn handle_try(
fn handle_catch_unwind(
&mut self,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
Expand All @@ -85,7 +85,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
// what that is), and returns 1.
// The `payload` is passed (by libstd) to `__rust_panic_cleanup`, which is then expected to
// return a `Box<dyn Any + Send + 'static>`.
// In Miri, `miri_start_panic` is passed exactly that type, so we make the `payload` simply
// In Miri, `miri_start_unwind` is passed exactly that type, so we make the `payload` simply
// a pointer to `Box<dyn Any + Send + 'static>`.

// Get all the arguments.
Expand Down Expand Up @@ -141,7 +141,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
// We set the return value of `try` to 1, since there was a panic.
this.write_scalar(Scalar::from_i32(1), &catch_unwind.dest)?;

// The Thread's `panic_payload` holds what was passed to `miri_start_panic`.
// The Thread's `panic_payload` holds what was passed to `miri_start_unwind`.
// This is exactly the second argument we need to pass to `catch_fn`.
let payload = this.active_thread_mut().panic_payloads.pop().unwrap();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn main() {
unsafe {
// Make sure we check the ABI when Miri itself invokes a function
// as part of a shim implementation.
std::intrinsics::r#try(
std::intrinsics::catch_unwind(
//~^ ERROR: calling a function with ABI C using caller ABI Rust
std::mem::transmute::<extern "C" fn(*mut u8), _>(try_fn),
std::ptr::null_mut(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: Undefined Behavior: calling a function with ABI C using caller ABI Rust
--> $DIR/check_callback_abi.rs:LL:CC
|
LL | / std::intrinsics::r#try(
LL | / std::intrinsics::catch_unwind(
LL | |
LL | | std::mem::transmute::<extern "C" fn(*mut u8), _>(try_fn),
LL | | std::ptr::null_mut(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#![feature(c_unwind)]

extern "C" {
fn miri_start_panic(payload: *mut u8) -> !;
fn miri_start_unwind(payload: *mut u8) -> !;
}

fn main() {
unsafe { miri_start_panic(&mut 0) }
unsafe { miri_start_unwind(&mut 0) }
//~^ ERROR: unwinding past a stack frame that does not allow unwinding
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
WARNING: the flag `-Zmiri-disable-abi-check` is deprecated and planned to be removed.
If you have a use-case for it, please file an issue.
error: Undefined Behavior: unwinding past a stack frame that does not allow unwinding
--> $DIR/bad_miri_start_panic.rs:LL:CC
--> $DIR/bad_miri_start_unwind.rs:LL:CC
|
LL | unsafe { miri_start_panic(&mut 0) }
| ^^^^^^^^^^^^^^^^^^^^^^^^ unwinding past a stack frame that does not allow unwinding
LL | unsafe { miri_start_unwind(&mut 0) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^ unwinding past a stack frame that does not allow unwinding
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: inside `main` at $DIR/bad_miri_start_panic.rs:LL:CC
= note: inside `main` at $DIR/bad_miri_start_unwind.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/tests/fail/panic/unwind_panic_abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
//! Unwinding despite `-C panic=abort` is an error.

extern "Rust" {
fn miri_start_panic(payload: *mut u8) -> !;
fn miri_start_unwind(payload: *mut u8) -> !;
}

fn main() {
unsafe {
miri_start_panic(&mut 0); //~ ERROR: unwinding past a stack frame that does not allow unwinding
miri_start_unwind(&mut 0); //~ ERROR: unwinding past a stack frame that does not allow unwinding
}
}
4 changes: 2 additions & 2 deletions src/tools/miri/tests/fail/panic/unwind_panic_abort.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: unwinding past a stack frame that does not allow unwinding
--> $DIR/unwind_panic_abort.rs:LL:CC
|
LL | miri_start_panic(&mut 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^ unwinding past a stack frame that does not allow unwinding
LL | miri_start_unwind(&mut 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ unwinding past a stack frame that does not allow unwinding
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
unsafe {
let _ = malloc(0);
std::mem::transmute::<fn(), extern "C" fn()>(foo)();
std::intrinsics::r#try(
std::intrinsics::catch_unwind(
std::mem::transmute::<extern "C" fn(*mut u8), _>(try_fn),
std::ptr::null_mut(),
|_, _| unreachable!(),
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/utils/miri_extern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extern "Rust" {
///
/// This is internal and unstable and should not be used; we give it here
/// just to be complete.
pub fn miri_start_panic(payload: *mut u8) -> !;
pub fn miri_start_unwind(payload: *mut u8) -> !;

/// Miri-provided extern function to get the internal unique identifier for the allocation that a pointer
/// points to. If this pointer is invalid (not pointing to an allocation), interpretation will abort.
Expand Down
2 changes: 1 addition & 1 deletion tests/assembly/wasm_exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn test_cleanup() {
#[no_mangle]
pub fn test_rtry() {
unsafe {
core::intrinsics::r#try(|_| {
core::intrinsics::catch_unwind(|_| {
may_panic();
}, core::ptr::null_mut(), |data, exception| {
log_number(data as usize);
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/wasm_exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn test_cleanup() {
#[no_mangle]
pub fn test_rtry() {
unsafe {
core::intrinsics::r#try(|_| {
core::intrinsics::catch_unwind(|_| {
may_panic();
}, core::ptr::null_mut(), |data, exception| {
log_number(data as usize);
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/wasm-exceptions-nostd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub extern "C" fn start() -> usize {
let data = 0x1234usize as *mut u8; // Something to recognize

unsafe {
core::intrinsics::r#try(|data: *mut u8| {
core::intrinsics::catch_unwind(|data: *mut u8| {
let _log_on_drop = LogOnDrop;

logging::log_str(&alloc::format!("`r#try` called with ptr {:?}", data));
Expand Down
Loading