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

Renaming a struct field does not catch all usages #6546

Closed
jyn514 opened this issue Nov 14, 2020 · 3 comments
Closed

Renaming a struct field does not catch all usages #6546

jyn514 opened this issue Nov 14, 2020 · 3 comments
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@jyn514
Copy link
Member

jyn514 commented Nov 14, 2020

In https://github.com/rust-lang/rust/blob/50d3c2a3cb96b6af2b5e3b9d08578a556ac70ede/src/librustdoc/clean/types.rs#L84, rename inner to kind. Most usages are updated, but not all.

    Checking rustdoc v0.0.0 (/home/joshua/rustc2/src/librustdoc)
error[E0609]: no field `inner` on type `&types::Item`
    --> src/librustdoc/html/render/mod.rs:3100:25
     |
3100 |                 match v.inner {
     |                         ^^^^^ unknown field
     |
     = note: available fields are: `source`, `name`, `attrs`, `kind`, `visibility` ... and 3 others

error[E0609]: no field `inner` on type `&types::Item`
    --> src/librustdoc/html/render/mod.rs:3150:58
     |
3150 |             if let clean::VariantItem(ref var) = variant.inner {
     |                                                          ^^^^^ unknown field
     |
     = note: available fields are: `source`, `name`, `attrs`, `kind`, `visibility` ... and 3 others

error[E0609]: no field `inner` on type `&types::Item`
    --> src/librustdoc/html/render/mod.rs:3182:60
     |
3182 |                     if let StructFieldItem(ref ty) = field.inner {
     |                                                            ^^^^^ unknown field
     |
     = note: available fields are: `source`, `name`, `attrs`, `kind`, `visibility` ... and 3 others

error[E0609]: no field `inner` on type `&types::Item`
    --> src/librustdoc/html/render/mod.rs:3592:70
     |
3592 |                         if let clean::TypedefItem(ref tydef, _) = it.inner {
     |                                                                      ^^^^^ unknown field
     |
     = note: available fields are: `source`, `name`, `attrs`, `kind`, `visibility` ... and 3 others

error[E0609]: no field `inner` on type `&types::Item`
    --> src/librustdoc/html/render/mod.rs:4183:80
     |
4183 |                     impl_.inner_impl().items.iter().find_map(|item| match item.inner {
     |                                                                                ^^^^^ unknown field
     |
     = note: available fields are: `source`, `name`, `attrs`, `kind`, `visibility` ... and 3 others

error[E0609]: no field `inner` on type `types::Item`
   --> src/librustdoc/passes/collect_intra_doc_links.rs:691:78
    |
691 | ...                   trace!("considering associated item {:?}", assoc.inner);
    |                                                                        ^^^^^ unknown field
    |
    = note: available fields are: `source`, `name`, `attrs`, `kind`, `visibility` ... and 3 others

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0609`.
error: could not compile `rustdoc`

Sorry not to provide an MCVE.

@jyn514
Copy link
Member Author

jyn514 commented Nov 14, 2020

Maybe the issue is just that rust-analyzer can't infer the types from the closures?

@flodiebold flodiebold added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Dec 21, 2020
@flodiebold
Copy link
Member

Yeah, probably an inference problem.

@Veykril
Copy link
Member

Veykril commented Oct 30, 2021

I don't think there is much to gain from this issue anymore, since the cause was most likely an inference problem which will be fixed(and found again) eventually.

@Veykril Veykril closed this as completed Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests

3 participants