Skip to content

Add #[track_caller] to bug! and register_renamed #80500

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 31, 2020

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Dec 30, 2020

Before:

thread 'rustc' panicked at 'compiler/rustc_lint/src/context.rs:267:18: invalid lint renaming of broken_intra_doc_links to rustdoc::broken_intra_doc_links', compiler/rustc_middle/src/util/bug.rs:34:26

After:

thread 'rustc' panicked at 'src/librustdoc/core.rs:455:24: invalid lint renaming of broken_intra_doc_links to rustdoc::broken_intra_doc_links', compiler/rustc_middle/src/util/bug.rs:35:26

The reason I added it to register_renamed too is that any panic in
that function will be the caller's fault.

Before:

```
thread 'rustc' panicked at 'compiler/rustc_lint/src/context.rs:267:18: invalid lint renaming of broken_intra_doc_links to rustdoc::broken_intra_doc_links', compiler/rustc_middle/src/util/bug.rs:34:26
```

After:

```
thread 'rustc' panicked at 'src/librustdoc/core.rs:455:24: invalid lint renaming of broken_intra_doc_links to rustdoc::broken_intra_doc_links', compiler/rustc_middle/src/util/bug.rs:35:26
```

The reason I added it to `register_renamed` too is that any panic in
that function will be the caller's fault.
@jyn514 jyn514 added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust labels Dec 30, 2020
@rust-highfive
Copy link
Contributor

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 30, 2020
@nagisa
Copy link
Member

nagisa commented Dec 31, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 31, 2020

📌 Commit 56ea926 has been approved by nagisa

@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 Dec 31, 2020
@nagisa
Copy link
Member

nagisa commented Dec 31, 2020

@bors rollup=iffy

(just so that we are more likely to get timing information for this PR in isolation)

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 31, 2020
Add `#[track_caller]` to `bug!` and `register_renamed`

Before:

```
thread 'rustc' panicked at 'compiler/rustc_lint/src/context.rs:267:18: invalid lint renaming of broken_intra_doc_links to rustdoc::broken_intra_doc_links', compiler/rustc_middle/src/util/bug.rs:34:26
```

After:

```
thread 'rustc' panicked at 'src/librustdoc/core.rs:455:24: invalid lint renaming of broken_intra_doc_links to rustdoc::broken_intra_doc_links', compiler/rustc_middle/src/util/bug.rs:35:26
```

The reason I added it to `register_renamed` too is that any panic in
that function will be the caller's fault.
@bors
Copy link
Collaborator

bors commented Dec 31, 2020

⌛ Testing commit 56ea926 with merge 923e3d2...

@bors
Copy link
Collaborator

bors commented Dec 31, 2020

☀️ Test successful - checks-actions
Approved by: nagisa
Pushing 923e3d2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 31, 2020
@bors bors merged commit 923e3d2 into rust-lang:master Dec 31, 2020
@rustbot rustbot added this to the 1.51.0 milestone Dec 31, 2020
@jyn514 jyn514 deleted the track-caller branch December 31, 2020 14:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust merged-by-bors This PR was explicitly merged by bors. 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