Skip to content

Renaming a struct field does not catch all usages #6546

Closed
@jyn514

Description

@jyn514

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-unactionableIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions