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

Store do_not_recommend-ness in impl header #128912

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 10, 2024

An erroneous #[diagnostic::do_not_recommend] in a crate without #[feature(do_not_recommend)] only emits a lint, but in a downstream crate will be parsed and applied as if it were enabled. This only affects the error path, but it's still strange and probably not something we want users to rely on implicitly.

Alternative to #128674

It's less flexible, but also less invasive. Hopefully it's also performant. I'd recommend we think separately about the design for how to gate arbitrary diagnostic attributes moving forward.

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rustbot
Copy link
Collaborator

rustbot commented Aug 10, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Aug 10, 2024
@rust-timer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Aug 10, 2024

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 10, 2024
@compiler-errors compiler-errors marked this pull request as draft August 10, 2024 01:26
@bors
Copy link
Contributor

bors commented Aug 10, 2024

⌛ Trying commit 4653a9d with merge 6b99ab4...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 10, 2024
…l, r=<try>

Store `do_not_recommend`-ness in impl header

Alternative to rust-lang#128674

It's less flexible, but also less invasive. Hopefully it's also performant. I'd recommend we think separately about the design for how to gate arbitrary diagnostic attributes moving forward.
@rust-log-analyzer

This comment has been minimized.

compiler-errors and others added 2 commits August 9, 2024 22:02
Co-authored-by: Georg Semmler <github@weiznich.de>
@compiler-errors
Copy link
Member Author

Sorry, left in some random other changes from another branch.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Aug 10, 2024

⌛ Trying commit 20a16bb with merge 0db3168...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 10, 2024
…l, r=<try>

Store `do_not_recommend`-ness in impl header

Alternative to rust-lang#128674

It's less flexible, but also less invasive. Hopefully it's also performant. I'd recommend we think separately about the design for how to gate arbitrary diagnostic attributes moving forward.
@bors
Copy link
Contributor

bors commented Aug 10, 2024

☀️ Try build successful - checks-actions
Build commit: 0db3168 (0db31685c8c9faf31e9c3701807f19a785fbd1c3)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0db3168): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -0.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

Results (primary 0.0%, secondary 0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.1%] 32
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.1%] 32

Bootstrap: 762.964s -> 760.544s (-0.32%)
Artifact size: 339.32 MiB -> 339.30 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 10, 2024
@compiler-errors compiler-errors marked this pull request as ready for review August 10, 2024 12:13
@lcnr
Copy link
Contributor

lcnr commented Aug 12, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 12, 2024

📌 Commit 20a16bb has been approved by lcnr

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 12, 2024
@lcnr
Copy link
Contributor

lcnr commented Aug 12, 2024

r? @lcnr

@rustbot rustbot assigned lcnr and unassigned wesleywiser Aug 12, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 12, 2024
…mpl, r=lcnr

Store `do_not_recommend`-ness in impl header

Alternative to rust-lang#128674

It's less flexible, but also less invasive. Hopefully it's also performant. I'd recommend we think separately about the design for how to gate arbitrary diagnostic attributes moving forward.
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 12, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#128712 (Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver)
 - rust-lang#128878 (Slightly refactor `Flags` in bootstrap)
 - rust-lang#128886 (Get rid of some `#[allow(rustc::untranslatable_diagnostic)]`)
 - rust-lang#128912 (Store `do_not_recommend`-ness in impl header)
 - rust-lang#128936 (Support reading thin archives in ArArchiveBuilder)
 - rust-lang#128937 (Fix warnings in rmake tests on `x86_64-unknown-linux-gnu`)
 - rust-lang#128978 (Use `assert_matches` around the compiler more)

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

Rollup of 7 pull requests

Successful merges:

 - rust-lang#128712 (Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver)
 - rust-lang#128878 (Slightly refactor `Flags` in bootstrap)
 - rust-lang#128886 (Get rid of some `#[allow(rustc::untranslatable_diagnostic)]`)
 - rust-lang#128912 (Store `do_not_recommend`-ness in impl header)
 - rust-lang#128936 (Support reading thin archives in ArArchiveBuilder)
 - rust-lang#128937 (Fix warnings in rmake tests on `x86_64-unknown-linux-gnu`)
 - rust-lang#128978 (Use `assert_matches` around the compiler more)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 12, 2024
…mpl, r=lcnr

Store `do_not_recommend`-ness in impl header

Alternative to rust-lang#128674

It's less flexible, but also less invasive. Hopefully it's also performant. I'd recommend we think separately about the design for how to gate arbitrary diagnostic attributes moving forward.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 12, 2024
…mpl, r=lcnr

Store `do_not_recommend`-ness in impl header

Alternative to rust-lang#128674

It's less flexible, but also less invasive. Hopefully it's also performant. I'd recommend we think separately about the design for how to gate arbitrary diagnostic attributes moving forward.
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 12, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#128712 (Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver)
 - rust-lang#128861 (Rework MIR inlining debuginfo so function parameters show up in debuggers.)
 - rust-lang#128912 (Store `do_not_recommend`-ness in impl header)
 - rust-lang#129000 (bootstrap: clear miri ui-test deps when miri sysroot gets rebuilt)
 - rust-lang#129013 (Remove unused script from run-make tests)
 - rust-lang#129017 (Replace `std::fmt:FormatterFn` with `std::fmt::from_fn`)

Failed merges:

 - rust-lang#128935 (More work on `zstd` compression)

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

Rollup of 5 pull requests

Successful merges:

 - rust-lang#128712 (Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver)
 - rust-lang#128912 (Store `do_not_recommend`-ness in impl header)
 - rust-lang#129000 (bootstrap: clear miri ui-test deps when miri sysroot gets rebuilt)
 - rust-lang#129013 (Remove unused script from run-make tests)
 - rust-lang#129017 (Replace `std::fmt:FormatterFn` with `std::fmt::from_fn`)

r? `@ghost`
`@rustbot` modify labels: rollup
@compiler-errors compiler-errors added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 12, 2024
@compiler-errors
Copy link
Member Author

compiler-errors commented Aug 12, 2024

Hi T-compiler. For the purposes of this beta nomination, we have 3 options with this PR:

  1. Backport it
  2. Revert all of the do_not_recommend work in the last 6 weeks since beta branched
  3. Do nothing

I'm leaning towards (3.) actually. This "bug" only affects the error path, and given that this doesn't affect the successful compilation of code, I'm actually not certain this warrants either a fix or a revert (especially since an erroneous do_not_recommend being parsed and used is likely never detrimental).

@bors bors merged commit 85eb465 into rust-lang:master Aug 13, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 13, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 13, 2024
Rollup merge of rust-lang#128912 - compiler-errors:do-not-recommend-impl, r=lcnr

Store `do_not_recommend`-ness in impl header

Alternative to rust-lang#128674

It's less flexible, but also less invasive. Hopefully it's also performant. I'd recommend we think separately about the design for how to gate arbitrary diagnostic attributes moving forward.
@apiraino
Copy link
Contributor

Beta backport declined either as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle.

@rustbot label -beta-nominated

@rustbot rustbot removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 15, 2024
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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants