Skip to content

Conversation

connortsui20
Copy link
Contributor

@connortsui20 connortsui20 commented Aug 28, 2025

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
Collaborator

rustbot commented Aug 28, 2025

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

@rustbot rustbot 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
@rust-log-analyzer

This comment has been minimized.

@joboet
Copy link
Member

joboet commented Aug 29, 2025

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).

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

rustbot commented Aug 30, 2025

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.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
@connortsui20
Copy link
Contributor Author

Thanks for the help!

r? joboet

@rustbot rustbot assigned joboet and unassigned scottmcm Aug 30, 2025
@joboet
Copy link
Member

joboet commented Aug 31, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 31, 2025

📌 Commit 114c0c2 has been approved by joboet

It is now in the queue for this repository.

@bors bors 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?
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?
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:master Sep 1, 2025
10 checks passed
@rustbot rustbot 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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant 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