Skip to content

Add Bound::copied - #145968

Merged
bors merged 3 commits into
rust-lang:masterfrom
connortsui20:bound-copied
Sep 1, 2025
Merged

Add Bound::copied#145968
bors merged 3 commits into
rust-lang:masterfrom
connortsui20:bound-copied

Conversation

@connortsui20

@connortsui20connortsui20 commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

Tracking Issue: #145966

Some questions:

  • Should I update the documentation for cloned to actual used a Clone type instead of an integer?
  • I removed the must_use since this is a cheap copy, does that make sense?

@rustbot

Copy link
Copy Markdown
Collaborator

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 28, 2025
@connortsui20connortsui20 mentioned this pull request Aug 28, 2025
4 tasks
@rust-log-analyzer

This comment has been minimized.

@joboet

joboet commented Aug 29, 2025

Copy link
Copy Markdown
Member

Should I update the documentation for cloned to actual used a Clone type instead of an integer?

Sure, that might be good.

removed the must_use since this is a cheap copy, does that make sense?

A call to copied whose result is unused is a noop and definitely a bug in the program, so #[must_use] is better (see the relevant section in the std-dev-guide for a longer explanation).

connortsui20and others added 2 commits August 30, 2025 10:48
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@rustbot

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Comment threadlibrary/core/src/ops/range.rs Outdated
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
@connortsui20

Copy link
Copy Markdown
ContributorAuthor

Thanks for the help!

r? joboet

@rustbotrustbot assigned joboet and unassigned scottmcmAug 30, 2025
@joboet

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Aug 31, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 114c0c2 has been approved by joboet

It is now in the queue for this repository.

@borsbors 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 31, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 31, 2025
Add `Bound::copied`
Tracking Issue: rust-lang#145966
Some questions:
- [x] Should I update the documentation for `cloned` to actual used a `Clone` type instead of an integer?
- [x] I removed the `must_use` since this is a cheap copy, does that make sense?
@jhprattjhpratt mentioned this pull request Aug 31, 2025
bors added a commit that referenced this pull request Aug 31, 2025
Rollup of 3 pull requests
Successful merges:
- #145968 (Add `Bound::copied`)
- #146046 (Suggest method name with maybe ty mismatch)
- #146051 (Change std f32 test to pass under Miri)
r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 1, 2025
Add `Bound::copied`
Tracking Issue: rust-lang#145966
Some questions:
- [x] Should I update the documentation for `cloned` to actual used a `Clone` type instead of an integer?
- [x] I removed the `must_use` since this is a cheap copy, does that make sense?
@ZalatharZalathar mentioned this pull request Sep 1, 2025
bors added a commit that referenced this pull request Sep 1, 2025
Rollup of 6 pull requests
Successful merges:
- #145421 (`dump_mir` cleanups)
- #145968 (Add `Bound::copied`)
- #146004 (resolve: Refactor `struct ExternPreludeEntry`)
- #146042 (Detect negative literal inferred to unsigned integer)
- #146046 (Suggest method name with maybe ty mismatch)
- #146051 (Change std f32 test to pass under Miri)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 0fa8265 into rust-lang:masterSep 1, 2025
10 checks passed
@rustbotrustbot added this to the 1.91.0 milestone Sep 1, 2025
rust-timer added a commit that referenced this pull request Sep 1, 2025
Rollup merge of #145968 - connortsui20:bound-copied, r=joboet
Add `Bound::copied`
Tracking Issue: #145966
Some questions:
- [x] Should I update the documentation for `cloned` to actual used a `Clone` type instead of an integer?
- [x] I removed the `must_use` since this is a cheap copy, does that make sense?
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Sep 9, 2025
Add `Bound::copied`
Tracking Issue: rust-lang#145966
Some questions:
- [x] Should I update the documentation for `cloned` to actual used a `Clone` type instead of an integer?
- [x] I removed the `must_use` since this is a cheap copy, does that make sense?
@connortsui20
connortsui20 deleted the bound-copied branch October 28, 2025 15:48
Kobzol pushed a commit to Kobzol/rustc_codegen_cranelift that referenced this pull request Dec 29, 2025
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#145421 (`dump_mir` cleanups)
- rust-lang/rust#145968 (Add `Bound::copied`)
- rust-lang/rust#146004 (resolve: Refactor `struct ExternPreludeEntry`)
- rust-lang/rust#146042 (Detect negative literal inferred to unsigned integer)
- rust-lang/rust#146046 (Suggest method name with maybe ty mismatch)
- rust-lang/rust#146051 (Change std f32 test to pass under Miri)
r? `@ghost`
`@rustbot` modify labels: rollup
christian-schilling pushed a commit to christian-schilling/rustc_codegen_cranelift that referenced this pull request Jan 27, 2026
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#145421 (`dump_mir` cleanups)
- rust-lang/rust#145968 (Add `Bound::copied`)
- rust-lang/rust#146004 (resolve: Refactor `struct ExternPreludeEntry`)
- rust-lang/rust#146042 (Detect negative literal inferred to unsigned integer)
- rust-lang/rust#146046 (Suggest method name with maybe ty mismatch)
- rust-lang/rust#146051 (Change std f32 test to pass under Miri)
r? `@ghost`
`@rustbot` modify labels: rollup
christian-schilling pushed a commit to christian-schilling/rustc_codegen_cranelift that referenced this pull request Jan 27, 2026
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#145421 (`dump_mir` cleanups)
- rust-lang/rust#145968 (Add `Bound::copied`)
- rust-lang/rust#146004 (resolve: Refactor `struct ExternPreludeEntry`)
- rust-lang/rust#146042 (Detect negative literal inferred to unsigned integer)
- rust-lang/rust#146046 (Suggest method name with maybe ty mismatch)
- rust-lang/rust#146051 (Change std f32 test to pass under Miri)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libsRelevant to the library 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

@connortsui20@rustbot@rust-log-analyzer@joboet@bors@scottmcm