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

[WIP] Make less anon consts/Do a little min_generic_const_exprs #111111

Closed
wants to merge 8 commits into from

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented May 2, 2023

Avoid creating anon consts for some arguments/attempt to implement parts of min_generic_const_exprs

not ready for review just opening so that i can see the list of comments and whole diff easier

@rustbot
Copy link
Collaborator

rustbot commented May 2, 2023

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@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 May 2, 2023
@BoxyUwU
Copy link
Member Author

BoxyUwU commented May 2, 2023

r? @ghost

@rustbot
Copy link
Collaborator

rustbot commented May 2, 2023

Failed to set assignee to ghost: invalid assignee

Note: Only org members, users with write permissions, or people who have commented on the PR may be assigned.

@BoxyUwU BoxyUwU changed the title Make less anon consts [WIP] Make less anon consts/Do a little min_generic_const_exprs May 2, 2023
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 4, 2023

☔ The latest upstream changes (presumably #111174) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling basic-toml v0.1.2
   Compiling askama_derive v0.12.1
    Checking askama v0.12.0
    Checking rustdoc v0.0.0 (/checkout/src/librustdoc)
error[E0433]: failed to resolve: could not find `ArrayLen` in `hir`
    --> src/librustdoc/clean/mod.rs:1673:22
     |
1673 |                 hir::ArrayLen::Infer(_, _) => "_".to_string(),
     |                      ^^^^^^^^ could not find `ArrayLen` in `hir`

error[E0433]: failed to resolve: could not find `ArrayLen` in `hir`
    --> src/librustdoc/clean/mod.rs:1674:22
     |
1674 |                 hir::ArrayLen::Body(anon_const) => {
     |                      ^^^^^^^^ could not find `ArrayLen` in `hir`
error: hidden lifetime parameters in types are deprecated
   --> src/librustdoc/clean/mod.rs:249:49
    |
    |
249 | pub(crate) fn clean_const<'tcx>(constant: &hir::ConstArg, cx: &mut DocContext<'tcx>) -> Constant {
    |                                            |
    |                                            expected lifetime parameter
    |
    |
    = note: `-D elided-lifetimes-in-paths` implied by `-D warnings`
help: indicate the anonymous lifetime
    |
249 | pub(crate) fn clean_const<'tcx>(constant: &hir::ConstArg<'_>, cx: &mut DocContext<'tcx>) -> Constant {


error[E0609]: no field `value` on type `&ConstArg<'_>`
   --> src/librustdoc/clean/mod.rs:250:58
    |
250 |     let def_id = cx.tcx.hir().body_owner_def_id(constant.value.body).to_def_id();
    |
    = note: available fields are: `kind`


error[E0609]: no field `value` on type `&ConstArg<'_>`
   --> src/librustdoc/clean/mod.rs:257:56
    |
257 |         kind: ConstantKind::Anonymous { body: constant.value.body },
    |
    = note: available fields are: `kind`


error[E0609]: no field `def_id` on type `&ConstArg<'_>`
   --> src/librustdoc/clean/mod.rs:605:78
    |
605 |                     .map(|ct| Box::new(ty::Const::from_anon_const(cx.tcx, ct.def_id).to_string())),
    |
    = note: available fields are: `kind`

Some errors have detailed explanations: E0433, E0609.

@bors
Copy link
Contributor

bors commented May 15, 2023

☔ The latest upstream changes (presumably #111570) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC
Copy link
Member

Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks

@Dylan-DPC Dylan-DPC closed this Aug 9, 2023
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. 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