Skip to content
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

Allow to customize // TODO: comment for deprecated safe autofix #127857

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

tbu-
Copy link
Contributor

@tbu- tbu- commented Jul 17, 2024

Relevant for the deprecation of CommandExt::before_exit in #125970.

Tracking:

@rustbot
Copy link
Collaborator

rustbot commented Jul 17, 2024

r? @estebank

rustbot has assigned @estebank.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 17, 2024
@rust-log-analyzer

This comment has been minimized.

@tbu- tbu- force-pushed the pr_deprecated_safe_todo branch from b2e98da to 44d3664 Compare July 17, 2024 12:00
@rust-log-analyzer

This comment has been minimized.

@tbu- tbu- force-pushed the pr_deprecated_safe_todo branch from 44d3664 to 5502eec Compare July 17, 2024 12:10
@rust-log-analyzer

This comment has been minimized.

@tbu- tbu- force-pushed the pr_deprecated_safe_todo branch from 5502eec to c719526 Compare July 17, 2024 12:19
@rust-log-analyzer

This comment has been minimized.

@tbu- tbu- force-pushed the pr_deprecated_safe_todo branch from c719526 to bf612e9 Compare July 17, 2024 14:38
@bors

This comment was marked as resolved.

@tbu- tbu- force-pushed the pr_deprecated_safe_todo branch from bf612e9 to a253f11 Compare July 29, 2024 08:40
@RalfJung
Copy link
Member

We haven't heard from the reviewer in 2 weeks and this is edition-critical.

r? compiler

@rustbot rustbot assigned petrochenkov and unassigned estebank Jul 29, 2024
fn parse_rustc_deprecated_safe_2024_attr(attr: &Attribute) -> Option<Symbol> {
for item in attr.meta_item_list().unwrap_or_default() {
if item.has_name(sym::audit_that) {
return Some(item.value_str().expect(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return Some(item.value_str().expect(
if let Some(msg) = item.value_str() {

The current code will most likely ICE if the value is not actually string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds better to me than silently ignoring the attribute value in that case. It's an internal attribute after all. I've seen the pattern of abusing ICE instead of generating proper errors in other internal attributes as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not a good practice, but not a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have verified that this indeed ICEs. I'd still prefer the ICE over silently ignoring the attribute value. The compiler error says:

error: the compiler unexpectedly panicked. this is a bug.

note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

@petrochenkov petrochenkov 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 Jul 29, 2024
@tbu- tbu- force-pushed the pr_deprecated_safe_todo branch from 445595b to 9ad9819 Compare August 8, 2024 14:37
@tbu-
Copy link
Contributor Author

tbu- commented Aug 8, 2024

@rustbot ready

@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 Aug 8, 2024
@petrochenkov petrochenkov 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 Aug 9, 2024
tbu- added 2 commits August 13, 2024 11:32
Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.
…er error

This doesn't work for translated compiler error messages.
@tbu- tbu- force-pushed the pr_deprecated_safe_todo branch from 9ad9819 to 811d7dd Compare August 13, 2024 09:33
@tbu-
Copy link
Contributor Author

tbu- commented Aug 13, 2024

@rustbot ready

@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 Aug 13, 2024
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 13, 2024

📌 Commit 811d7dd has been approved by petrochenkov

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 13, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 13, 2024
…trochenkov

Allow to customize `// TODO:` comment for deprecated safe autofix

Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.

Tracking:
- rust-lang#124866
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 13, 2024
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#127857 (Allow to customize `// TODO:` comment for deprecated safe autofix)
 - rust-lang#128410 (Migrate `remap-path-prefix-dwarf` `run-make` test to rmake)
 - rust-lang#128828 (`-Znext-solver` caching)
 - rust-lang#128873 (Add windows-targets crate to std's sysroot)
 - rust-lang#129034 (Add `#[must_use]` attribute to `Coroutine` trait)
 - rust-lang#129049 (compiletest: Don't panic on unknown JSON-like output lines)
 - rust-lang#129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 13, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#122884 (Optimize integer `pow` by removing the exit branch)
 - rust-lang#127857 (Allow to customize `// TODO:` comment for deprecated safe autofix)
 - rust-lang#129034 (Add `#[must_use]` attribute to `Coroutine` trait)
 - rust-lang#129049 (compiletest: Don't panic on unknown JSON-like output lines)
 - rust-lang#129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML)
 - rust-lang#129056 (Fix one usage of target triple in bootstrap)
 - rust-lang#129058 (Add mw back to review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 14, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#122884 (Optimize integer `pow` by removing the exit branch)
 - rust-lang#127857 (Allow to customize `// TODO:` comment for deprecated safe autofix)
 - rust-lang#129034 (Add `#[must_use]` attribute to `Coroutine` trait)
 - rust-lang#129049 (compiletest: Don't panic on unknown JSON-like output lines)
 - rust-lang#129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML)
 - rust-lang#129056 (Fix one usage of target triple in bootstrap)
 - rust-lang#129058 (Add mw back to review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 14, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#122884 (Optimize integer `pow` by removing the exit branch)
 - rust-lang#127857 (Allow to customize `// TODO:` comment for deprecated safe autofix)
 - rust-lang#129034 (Add `#[must_use]` attribute to `Coroutine` trait)
 - rust-lang#129049 (compiletest: Don't panic on unknown JSON-like output lines)
 - rust-lang#129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML)
 - rust-lang#129056 (Fix one usage of target triple in bootstrap)
 - rust-lang#129058 (Add mw back to review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f68a28d into rust-lang:master Aug 14, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 14, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 14, 2024
Rollup merge of rust-lang#127857 - tbu-:pr_deprecated_safe_todo, r=petrochenkov

Allow to customize `// TODO:` comment for deprecated safe autofix

Relevant for the deprecation of `CommandExt::before_exit` in rust-lang#125970.

Tracking:
- rust-lang#124866
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

None yet

7 participants