Skip to content

Don't encode variant visibility#159630

Closed
camsteffen wants to merge 1 commit into
rust-lang:mainfrom
camsteffen:encode-less-visibility
Closed

Don't encode variant visibility#159630
camsteffen wants to merge 1 commit into
rust-lang:mainfrom
camsteffen:encode-less-visibility

Conversation

@camsteffen

Copy link
Copy Markdown
Contributor

See if we can save some work by not encoding variant visibility since it can be derived from its parent enum.

@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. labels Jul 21, 2026
@rustbot

rustbot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

r? @ShoyuVanilla

rustbot has assigned @ShoyuVanilla.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 74 candidates
  • Random selection from 19 candidates

@rust-log-analyzer

This comment has been minimized.

@camsteffen
camsteffen marked this pull request as draft July 21, 2026 03:35
@rustbot rustbot 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 21, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

r? @petrochenkov
(I'd really prefer not to do this, even if there are small perf benefits, but in any case let's see what the benchmark will say.)

@rustbot rustbot assigned petrochenkov and unassigned ShoyuVanilla Jul 21, 2026
@camsteffen
camsteffen force-pushed the encode-less-visibility branch from f3cd75c to e021dc1 Compare July 21, 2026 12:49
@camsteffen
camsteffen marked this pull request as ready for review July 21, 2026 13:05
@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 Jul 21, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   --> src/bootstrap/src/core/build_steps/tool.rs:507:5
    |
394 | / macro_rules! bootstrap_tool {
395 | |     ($(
396 | |         $name:ident, $path:expr, $tool_name:expr
397 | |         $(,is_external_tool = $external:expr)*
...   |
404 | |         pub enum Tool {
    | |                  ---- variants in this enum
...   |
490 | | }
---
    | |     ^^^^^^^^^
508 | |     JsonDocLint, "src/tools/jsondoclint", "jsondoclint";
    | |     ^^^^^^^^^^^
...   |
519 | |     OptimizedDist, "src/tools/opt-dist", "opt-dist", submodules = &["src/tools/rustc-perf"];
    | |     ^^^^^^^^^^^^^
520 | |     RunMakeSupport, "src/tools/run-make-support", "run_make_support", artifact_kind = ToolArtifactKind::Library;
521 | |     IntrinsicTest, "library/stdarch/crates/intrinsic-test", "intrinsic-test";
522 | | );
    | |_- in this macro invocation

@camsteffen

Copy link
Copy Markdown
Contributor Author

Hum this doesn't seem to possible to do without adding more than a few special cases.

@camsteffen camsteffen closed this Jul 21, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

5 participants