Skip to content

Add behavior tests for Arc and Rc - #164851

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
EFanZh:add-rc-behavior-tests
Oct 31, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
EFanZh:add-rc-behavior-tests

Conversation

@EFanZh

@EFanZh EFanZh commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 24, 2026
@rustbot

rustbot commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

tgross35 is currently at their maximum review capacity.
They may take a while to respond.

@EFanZh EFanZh changed the title Add behavior tests for Arc and `Rc Add behavior tests for Arc and Rc Oct 24, 2026
@EFanZh
EFanZh force-pushed the add-rc-behavior-tests branch from d4cc2de to 48c24e4 Compare October 24, 2026 12:12
@EFanZh EFanZh mentioned this pull request Oct 24, 2026
18 tasks
@EFanZh
EFanZh force-pushed the add-rc-behavior-tests branch 2 times, most recently from bd89710 to 71516d2 Compare October 24, 2026 14:00
@EFanZh
EFanZh marked this pull request as ready for review October 24, 2026 16:03
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 24, 2026

@tgross35 tgross35 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things that I think make this more robust, then LGTM

View changes since this review

Comment thread tests/assembly-llvm/x86_64-rc-arc.rs Resolved
Comment thread tests/assembly-llvm/x86_64-rc-arc.rs Resolved
Comment thread tests/assembly-llvm/x86_64-rc-arc.rs Resolved
@tgross35

Copy link
Copy Markdown
Member

@rustbot author

Just for the CHECK-DAG, assuming it works

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 26, 2026
@rustbot

rustbot commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@EFanZh
EFanZh force-pushed the add-rc-behavior-tests branch from 71516d2 to 0c567bf Compare October 27, 2026 00:55
Comment thread tests/assembly-llvm/x86_64-rc-arc.rs Outdated
Comment on lines +4 to +6
//@ needs-llvm-components: x86
//@ compile-flags: --crate-type=lib -Z merge-functions=disabled -C opt-level=3 --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//@ assembly-output: emit-asm

@tgross35 tgross35 Oct 27, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should probably be reverted to how they were earlier, since needs-llvm-components: x86 does get hit even when std might not be built for x86_64-unknown-linux-gnu. (Might see this failure in CI)

View changes since the review

@rust-log-analyzer

This comment has been minimized.

@EFanZh
EFanZh force-pushed the add-rc-behavior-tests branch from 0c567bf to 808a955 Compare October 27, 2026 02:34

@tgross35 tgross35 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 808a955 has been tentatively approved by tgross35

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 27, 2026
tgross35 added a commit to tgross35/rust that referenced this pull request Oct 27, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Rollup of 8 pull requests

Successful merges:

 - #164168 (Add tests for unsoundness involving alias liveness)
 - #164608 (core: Constify `resumable_breakpoint` and re-export it in `std`)
 - #164787 (cg_llvm: Use an invariant lifetime brand for LLVM contexts )
 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #164966 (x86-64-linux-gnu seems to have working f128 now)
 - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error)
 - #164895 (Disable recovery when attribute parser shouldn't emit)
 - #165004 (docs: Nitpick change in `HashMap`'s `.insert_entry()` doc example)
@tgross35

Copy link
Copy Markdown
Member

@bors r- #165018 (comment)

Probably should just set //@ min-llvm-version: 23 to avoid this

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 27, 2026
@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 29, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 29, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 29, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #165079 (Remove GenericArgRef)
 - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - #165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - #163802 (fix RegionEq direction in canonical query responses)
 - #163986 (omit unconditionally invoking crate level limits query)
 - #164920 (Point at prior token on `let` when expression is expected)
 - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - #165114 (use native interpreter impl for funnel shifts intrinsics)
 - #165119 (remove unnecessary fast path from borrowck)
 - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - #165129 (Fix ICE in prelude edition lint)

> [!WARNING]
> This rollup conflicts with pending auto build #165130 and may need to be recreated if the pending build succeeds.
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #165079 (Remove GenericArgRef)
 - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - #165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - #163802 (fix RegionEq direction in canonical query responses)
 - #163986 (omit unconditionally invoking crate level limits query)
 - #164920 (Point at prior token on `let` when expression is expected)
 - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - #165114 (use native interpreter impl for funnel shifts intrinsics)
 - #165119 (remove unnecessary fast path from borrowck)
 - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - #165129 (Fix ICE in prelude edition lint)

> [!WARNING]
> This rollup conflicts with pending auto build #165130 and may need to be recreated if the pending build succeeds.
rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #165079 (Remove GenericArgRef)
 - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - #165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - #163802 (fix RegionEq direction in canonical query responses)
 - #163986 (omit unconditionally invoking crate level limits query)
 - #164920 (Point at prior token on `let` when expression is expected)
 - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - #165114 (use native interpreter impl for funnel shifts intrinsics)
 - #165119 (remove unnecessary fast path from borrowck)
 - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - #165129 (Fix ICE in prelude edition lint)

> [!WARNING]
> This rollup conflicts with pending auto build #165130 and may need to be recreated if the pending build succeeds.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 30, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 30, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 30, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #164989 (rustdoc: Fix performance regression for private documented items)
 - #165079 (Remove GenericArgRef)
 - #161781 (Don't emit InlineAsm terminator if input operand is `!`.)
 - #162754 (optimize large elements for slice rotating)
 - #163252 (Remove windows-targets dependency from the root workspace)
 - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - #165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - #165132 (Implement `advance_back_by` on `Fuse`)
 - #165142 (Remove the unused generic Graphviz writer)
 - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - #163802 (fix RegionEq direction in canonical query responses)
 - #163986 (omit unconditionally invoking crate level limits query)
 - #164920 (Point at prior token on `let` when expression is expected)
 - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - #165114 (use native interpreter impl for funnel shifts intrinsics)
 - #165119 (remove unnecessary fast path from borrowck)
 - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - #165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`)
 - #165129 (Fix ICE in prelude edition lint)

Failed merges:

 - #164981 (Reflection add TypeId::name)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 30, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 30, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #164989 (rustdoc: Fix performance regression for private documented items)
 - #165079 (Remove GenericArgRef)
 - #161781 (Don't emit InlineAsm terminator if input operand is `!`.)
 - #162754 (optimize large elements for slice rotating)
 - #163252 (Remove windows-targets dependency from the root workspace)
 - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - #165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - #165132 (Implement `advance_back_by` on `Fuse`)
 - #165142 (Remove the unused generic Graphviz writer)
 - #165148 (ci: increase free disk space on macos-26 jobs)
 - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - #163802 (fix RegionEq direction in canonical query responses)
 - #163986 (omit unconditionally invoking crate level limits query)
 - #164920 (Point at prior token on `let` when expression is expected)
 - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - #165114 (use native interpreter impl for funnel shifts intrinsics)
 - #165119 (remove unnecessary fast path from borrowck)
 - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - #165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`)
 - #165129 (Fix ICE in prelude edition lint)

Failed merges:

 - #164981 (Reflection add TypeId::name)

> [!WARNING]
> This rollup conflicts with pending auto build #165205 and may need to be recreated if the pending build succeeds.
rust-bors Bot pushed a commit that referenced this pull request Oct 31, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #164989 (rustdoc: Fix performance regression for private documented items)
 - #165079 (Remove GenericArgRef)
 - #161781 (Don't emit InlineAsm terminator if input operand is `!`.)
 - #162754 (optimize large elements for slice rotating)
 - #163252 (Remove windows-targets dependency from the root workspace)
 - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - #165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - #165132 (Implement `advance_back_by` on `Fuse`)
 - #165142 (Remove the unused generic Graphviz writer)
 - #165148 (ci: increase free disk space on macos-26 jobs)
 - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - #163802 (fix RegionEq direction in canonical query responses)
 - #163986 (omit unconditionally invoking crate level limits query)
 - #164920 (Point at prior token on `let` when expression is expected)
 - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - #165114 (use native interpreter impl for funnel shifts intrinsics)
 - #165119 (remove unnecessary fast path from borrowck)
 - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - #165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`)
 - #165129 (Fix ICE in prelude edition lint)

Failed merges:

 - #164981 (Reflection add TypeId::name)

> [!WARNING]
> This rollup conflicts with pending auto build #165205 and may need to be recreated if the pending build succeeds.
rust-bors Bot pushed a commit that referenced this pull request Oct 31, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #164989 (rustdoc: Fix performance regression for private documented items)
 - #165079 (Remove GenericArgRef)
 - #161781 (Don't emit InlineAsm terminator if input operand is `!`.)
 - #162754 (optimize large elements for slice rotating)
 - #163252 (Remove windows-targets dependency from the root workspace)
 - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - #165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - #165132 (Implement `advance_back_by` on `Fuse`)
 - #165142 (Remove the unused generic Graphviz writer)
 - #165148 (ci: increase free disk space on macos-26 jobs)
 - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - #163802 (fix RegionEq direction in canonical query responses)
 - #163986 (omit unconditionally invoking crate level limits query)
 - #164920 (Point at prior token on `let` when expression is expected)
 - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - #165114 (use native interpreter impl for funnel shifts intrinsics)
 - #165119 (remove unnecessary fast path from borrowck)
 - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - #165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`)
 - #165129 (Fix ICE in prelude edition lint)

Failed merges:

 - #164981 (Reflection add TypeId::name)

> [!WARNING]
> This rollup conflicts with pending auto build #165205 and may need to be recreated if the pending build succeeds.
rust-bors Bot pushed a commit that referenced this pull request Oct 31, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #164989 (rustdoc: Fix performance regression for private documented items)
 - #165079 (Remove GenericArgRef)
 - #161781 (Don't emit InlineAsm terminator if input operand is `!`.)
 - #162754 (optimize large elements for slice rotating)
 - #163252 (Remove windows-targets dependency from the root workspace)
 - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - #165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - #165132 (Implement `advance_back_by` on `Fuse`)
 - #165142 (Remove the unused generic Graphviz writer)
 - #165233 (Remove test-aarch64-apple-* jobs temporarily)
 - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - #163802 (fix RegionEq direction in canonical query responses)
 - #163986 (omit unconditionally invoking crate level limits query)
 - #164920 (Point at prior token on `let` when expression is expected)
 - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - #165114 (use native interpreter impl for funnel shifts intrinsics)
 - #165119 (remove unnecessary fast path from borrowck)
 - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - #165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`)
 - #165129 (Fix ICE in prelude edition lint)

> [!WARNING]
> This rollup conflicts with pending auto build #165217 and may need to be recreated if the pending build succeeds.
rust-bors Bot pushed a commit that referenced this pull request Oct 31, 2026
Rollup merge of #164851 - EFanZh:add-rc-behavior-tests, r=tgross35

Add behavior tests for `Arc` and `Rc`

See <#141348 (comment)>.

r? @tgross35
@rust-bors
rust-bors Bot merged commit 03ab306 into rust-lang:main Oct 31, 2026
15 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 31, 2026
@rust-timer

Copy link
Copy Markdown
Collaborator

Note

This PR was benchmarked as part of triage of its containing rollup: triage URL.

Finished benchmarking commit (dd2f985): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 4
Improvements ✅
(primary)
-0.2% [-0.2%, -0.1%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.2%, -0.1%] 5

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (primary 1.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.7% [1.7%, 1.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.7% [1.7%, 1.7%] 1

Binary size

This perf run didn't have relevant results for this metric.

Artifact size: 406.61 MiB -> 406.74 MiB (0.03%)

@rustbot rustbot added the perf-regression Performance regression. label Oct 31, 2026
@EFanZh
EFanZh deleted the add-rc-behavior-tests branch November 1, 2026 00:09
eduardorittner pushed a commit to eduardorittner/miri that referenced this pull request Nov 2, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - rust-lang/rust#164851 (Add behavior tests for `Arc` and `Rc`)
 - rust-lang/rust#164989 (rustdoc: Fix performance regression for private documented items)
 - rust-lang/rust#165079 (Remove GenericArgRef)
 - rust-lang/rust#161781 (Don't emit InlineAsm terminator if input operand is `!`.)
 - rust-lang/rust#162754 (optimize large elements for slice rotating)
 - rust-lang/rust#163252 (Remove windows-targets dependency from the root workspace)
 - rust-lang/rust#163839 (Fix the floating point clobbers of RISC-V `clobber_abi`)
 - rust-lang/rust#165104 (Use getrandom instead of /scheme/rand on Redox OS)
 - rust-lang/rust#165132 (Implement `advance_back_by` on `Fuse`)
 - rust-lang/rust#165142 (Remove the unused generic Graphviz writer)
 - rust-lang/rust#165233 (Remove test-aarch64-apple-* jobs temporarily)
 - rust-lang/rust#163371 (Don't suggest replacing foreign format specifiers in `concat!` output)
 - rust-lang/rust#163802 (fix RegionEq direction in canonical query responses)
 - rust-lang/rust#163986 (omit unconditionally invoking crate level limits query)
 - rust-lang/rust#164920 (Point at prior token on `let` when expression is expected)
 - rust-lang/rust#164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop)
 - rust-lang/rust#165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols)
 - rust-lang/rust#165114 (use native interpreter impl for funnel shifts intrinsics)
 - rust-lang/rust#165119 (remove unnecessary fast path from borrowck)
 - rust-lang/rust#165122 (fix MaybeDangling validity logic for ZST at usize::MAX)
 - rust-lang/rust#165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`)
 - rust-lang/rust#165129 (Fix ICE in prelude edition lint)

> [!WARNING]
> This rollup conflicts with pending auto build #165217 and may need to be recreated if the pending build succeeds.
@JonathanBrouwer

Copy link
Copy Markdown
Member

@rustbot label: +perf-regression-triaged
Noise

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants