Skip to content

Let String pass #[track_caller] to its Vec calls #142728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kornelski
Copy link
Contributor

I've added #[track_caller] to String methods that delegate to Vec methods that already have #[track_caller].

I've also added #[track_caller] to methods that have assert! or panic! due to invalid inputs.

@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2025

r? @tgross35

rustbot has assigned @tgross35.
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 Jun 19, 2025
@tgross35
Copy link
Contributor

Since this sometimes increases compile times

@bors2 try
@rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rust-bors
Copy link

rust-bors bot commented Jun 19, 2025

⌛ Trying commit c109b28 with merge 075cf9a

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 19, 2025
Let String pass #[track_caller] to its Vec calls

I've added `#[track_caller]` to `String` methods that delegate to `Vec` methods that already have `#[track_caller]`.

I've also added `#[track_caller]` to methods that have `assert!` or `panic!` due to invalid inputs.
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 19, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 19, 2025

☀️ Try build successful (CI)
Build commit: 075cf9a (075cf9a3e6ff4d06acf01becd0b8e06b926329e1, parent: 2fcf1776b9ccef89993dfe40e9f5c4908e2d2d48)

@rust-timer
Copy link
Collaborator

Queued 075cf9a with parent 2fcf177, future comparison URL.
There are currently 6 preceding artifacts in the queue.
It will probably take at least ~8.7 hours until the benchmark run finishes.

@tgross35
Copy link
Contributor

Mind posting a difference in output with and without this change for reference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-perf Status: Waiting on a perf run to be completed. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants