Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5b2c61e
Document guarantees of poisoning
purplesyringa Jul 19, 2025
45231fa
[rustdoc] Display unsafe attrs with edition 2024 `unsafe()` wrappers.
obi1kenobi Jul 23, 2025
5ae2d42
get rid of some false negatives in rustdoc::broken_intra_doc_links
lolbinarycat Nov 7, 2024
87d7d80
adjust more unit tests to reflect more aggressive intra-doc linting
lolbinarycat Nov 8, 2024
a7da4b8
rustdoc::broken_intra_doc_links: no backticks = use old behavior
lolbinarycat Apr 18, 2025
0413481
rustdoc: update tests to match new lint behavior
lolbinarycat Apr 18, 2025
6a7d488
rustdoc::broken_intra_doc_links: only be lenient with shortcut links
lolbinarycat Apr 19, 2025
bd85df1
move bad-intra-doc test into intra-doc dir
lolbinarycat Apr 19, 2025
a73d7e3
fix up issues with internal compiler docs revealed by stricter lint
lolbinarycat Jul 24, 2025
da4687b
Link to Mutex poisoning docs from RwLock docs
purplesyringa Jul 25, 2025
5b8c614
Add a list of failure conditions for poisoning
purplesyringa Jul 25, 2025
c1d06cc
Add a note on foreign exceptions
purplesyringa Jul 25, 2025
3352dfc
Skip formatting for some compiler documentation code
joshtriplett Jul 26, 2025
7150880
Improve and regularize comment placement in doc code
joshtriplett Jul 26, 2025
b6c54a9
Avoid placing `// FIXME` comments inside doc code blocks
joshtriplett Jul 26, 2025
56c5b1d
Add parentheses around expression arguments to `..`
joshtriplett Jul 26, 2025
1e2d587
Avoid making the start of a doc code block conditional
joshtriplett Jul 26, 2025
91bccd6
use `minicore` for fortanix assembly tests
folkertdev Jul 24, 2025
8b90847
update fortanix run-make test
folkertdev Jul 24, 2025
0e53d85
Fortify RemoveUnneededDrops test.
cjgillot Jun 16, 2025
ede338c
WIP: auth using GitHub app
Kobzol Jul 29, 2025
7e4ded4
Remove `bot-pull-requests` triagebot config
Kobzol Jul 29, 2025
ad28843
Merge pull request #2521 from rust-lang/ci-gh-app
Kobzol Jul 29, 2025
6a40a17
Use main branch of josh-sync for CI workflow
Kobzol Jul 29, 2025
dc17d35
Merge pull request #2523 from Kobzol/ci-main
Kobzol Jul 29, 2025
951a6f7
Remove outdated ci.py reference
Kobzol Jul 30, 2025
bfdef36
Merge pull request #2525 from Kobzol/remove-ci-py
Kobzol Jul 30, 2025
ee0118f
[test][AIX] ignore extern_weak linkage test
daltenty Jul 30, 2025
7d37819
Prepare for merging from rust-lang/rust
invalid-email-address Jul 31, 2025
7cab27d
Merge ref '32e7a4b92b10' from rust-lang/rust
invalid-email-address Jul 31, 2025
cab1643
improve linking in the "Auxilirary builds" section of directive index
lolbinarycat Jul 31, 2025
5aec437
detect infinite recursion with tail calls in ctfe
WaffleLapkin Jul 31, 2025
040f71e
loop match: error on `#[const_continue]` outside `#[loop_match]`
folkertdev Jul 25, 2025
f909918
Add human readable name "Cygwin"
Berrysoft Aug 1, 2025
9377e0a
Constify additional Result functions
Randl Aug 1, 2025
f7267cc
Merge pull request #2527 from lolbinarycat/patch-5
jieyouxu Aug 1, 2025
4f60c90
rarw
lcnr Aug 1, 2025
c277f4e
Merge pull request #2529 from lcnr/type-system-invariants
lcnr Aug 1, 2025
bd7b8b3
Properly pass path to staged `rustc` to `compiletest` self-tests
jieyouxu Aug 1, 2025
ba57bba
rarw
lcnr Aug 1, 2025
219e4c1
Merge pull request #2530 from lcnr/type-system-invariants
lcnr Aug 1, 2025
d5ffb06
compiletest: Improve diagnostics for line annotation mismatches 2
petrochenkov Jul 31, 2025
32cf3d4
Cleanup the definition of `group_type`
JonathanBrouwer Aug 1, 2025
21ab47e
Add my previous commit name to .mailmap
scrabsha Aug 1, 2025
4c7c9de
Fix safety comment for new_unchecked in niche_types
nilehmann Aug 1, 2025
171c247
Merge pull request #2526 from rust-lang/rustc-pull
tshepang Aug 1, 2025
fc4b3fa
Rollup merge of #132748 - lolbinarycat:rustdoc-intra-doc-link-warn-mo…
samueltardieu Aug 2, 2025
93917ea
Rollup merge of #143360 - folkertdev:const-continue-outside-loop-matc…
samueltardieu Aug 2, 2025
4eddebd
Rollup merge of #143662 - obi1kenobi:pg/unsafe-attribute-wrappers, r=…
samueltardieu Aug 2, 2025
96b3b83
Rollup merge of #143771 - Randl:const-result, r=tgross35
samueltardieu Aug 2, 2025
ce1961b
Rollup merge of #144185 - purplesyringa:poisoning-wording, r=Amanieu
samueltardieu Aug 2, 2025
cafd9fb
Rollup merge of #144395 - folkertdev:fortanix-run-make-test, r=jieyouxu
samueltardieu Aug 2, 2025
d082ff4
Rollup merge of #144478 - joshtriplett:doc-code-formatting-prep, r=Am…
samueltardieu Aug 2, 2025
37ec453
Rollup merge of #144614 - cjgillot:fortify-unneeded, r=scottmcm
samueltardieu Aug 2, 2025
751ee2a
Rollup merge of #144703 - daltenty:daltenty/extern-weak, r=Noratrieb
samueltardieu Aug 2, 2025
7e8ef3a
Rollup merge of #144747 - petrochenkov:annusexp2, r=RalfJung
samueltardieu Aug 2, 2025
179b4b6
Rollup merge of #144756 - WaffleLapkin:inf-rec-etc-ctfe, r=lqd
samueltardieu Aug 2, 2025
5b81184
Rollup merge of #144766 - Berrysoft:patch-1, r=GuillaumeGomez
samueltardieu Aug 2, 2025
7a64c13
Rollup merge of #144782 - jieyouxu:compiletest-selftests, r=Kobzol
samueltardieu Aug 2, 2025
c4b0fb7
Rollup merge of #144786 - JonathanBrouwer:cleanup-group-type, r=jdons…
samueltardieu Aug 2, 2025
5bcc7c2
Rollup merge of #144796 - scrabsha:push-lsnwwpwpnpxr, r=jdonszelmann
samueltardieu Aug 2, 2025
5e1ea9c
Rollup merge of #144797 - nilehmann:safety-comment-niche, r=Noratrieb
samueltardieu Aug 2, 2025
0fcfb8b
Rollup merge of #144803 - tshepang:rdg-sync, r=jieyouxu
samueltardieu Aug 2, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- // MIR for `cannot_opt_generic` before RemoveUnneededDrops
+ // MIR for `cannot_opt_generic` after RemoveUnneededDrops

fn cannot_opt_generic(_1: T) -> () {
let mut _0: ();

bb0: {
drop(_1) -> [return: bb1, unwind unreachable];
}

bb1: {
return;
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- // MIR for `dont_opt` before RemoveUnneededDrops
+ // MIR for `dont_opt` after RemoveUnneededDrops

fn dont_opt(_1: Vec<bool>) -> () {
let mut _0: ();

bb0: {
drop(_1) -> [return: bb1, unwind unreachable];
}

bb1: {
return;
}
}

This file was deleted.

This file was deleted.

15 changes: 15 additions & 0 deletions tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- // MIR for `opt` before RemoveUnneededDrops
+ // MIR for `opt` after RemoveUnneededDrops

fn opt(_1: bool) -> () {
let mut _0: ();

bb0: {
- drop(_1) -> [return: bb1, unwind unreachable];
- }
-
- bb1: {
return;
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- // MIR for `opt_generic_copy` before RemoveUnneededDrops
+ // MIR for `opt_generic_copy` after RemoveUnneededDrops

fn opt_generic_copy(_1: T) -> () {
let mut _0: ();

bb0: {
- drop(_1) -> [return: bb1, unwind unreachable];
- }
-
- bb1: {
return;
}
}

This file was deleted.

This file was deleted.

40 changes: 34 additions & 6 deletions tests/mir-opt/remove_unneeded_drops.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,56 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ test-mir-pass: RemoveUnneededDrops

#![feature(custom_mir, core_intrinsics)]
use std::intrinsics::mir::*;

// EMIT_MIR remove_unneeded_drops.opt.RemoveUnneededDrops.diff
#[custom_mir(dialect = "runtime")]
fn opt(x: bool) {
drop(x);
// CHECK-LABEL: fn opt(
// CHECK-NOT: drop(
mir! {
{ Drop(x, ReturnTo(bb1), UnwindUnreachable()) }
bb1 = { Return() }
}
}

// EMIT_MIR remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
#[custom_mir(dialect = "runtime")]
fn dont_opt(x: Vec<bool>) {
drop(x);
// CHECK-LABEL: fn dont_opt(
// CHECK: drop(
mir! {
{ Drop(x, ReturnTo(bb1), UnwindUnreachable()) }
bb1 = { Return() }
}
}

// EMIT_MIR remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
#[custom_mir(dialect = "runtime")]
fn opt_generic_copy<T: Copy>(x: T) {
drop(x);
// CHECK-LABEL: fn opt_generic_copy(
// CHECK-NOT: drop(
mir! {
{ Drop(x, ReturnTo(bb1), UnwindUnreachable()) }
bb1 = { Return() }
}
}

// EMIT_MIR remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
// since the pass is not running on monomorphisized code,
// we can't (but probably should) optimize this
#[custom_mir(dialect = "runtime")]
fn cannot_opt_generic<T>(x: T) {
drop(x);
// CHECK-LABEL: fn cannot_opt_generic(
// CHECK: drop(
mir! {
{ Drop(x, ReturnTo(bb1), UnwindUnreachable()) }
bb1 = { Return() }
}
}

fn main() {
// CHECK-LABEL: fn main(
opt(true);
opt_generic_copy(42);
cannot_opt_generic(42);
Expand Down