diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-03-05 21:44:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-05 21:44:37 +0100 |
| commit | 92861c79276cee63e53ed4c63111cd37560c458c (patch) | |
| tree | 6ff6c7c2b59c66572b44986909a15d6ccf800784 /compiler/rustc_mir/src/transform/coverage/graph.rs | |
| parent | 8fd946c63a6c3aae9788bd459d278cb2efa77099 (diff) | |
| parent | 286a3570454b08fbf7fae890f19500190f55e0dc (diff) | |
| download | rust-92861c79276cee63e53ed4c63111cd37560c458c.tar.gz rust-92861c79276cee63e53ed4c63111cd37560c458c.zip | |
Rollup merge of #80845 - GuillaumeGomez:item-kind-transition, r=jyn514
Make ItemKind::ExternCrate looks like hir::ItemKind::ExternCrate to make transition over hir::ItemKind simpler It was surprisingly difficult to make this change, mostly because of two issues: * We now store the `ExternCrate` name in the parent struct (`clean::Item`), which forced me to modify the json conversion code a bit more than expected. * The second problem was that, since we now have a `Some(name)`, it was trying to render it, ending up in a panic because we ended up in a `unreachable` statement. The solution was simply to add `!item.is_extern_crate()` in `formats::renderer` before calling `cx.item(item, &cache)?;`. I'll continue to replace all the `clean::ItemKind` variants one by one until it looks exactly like `hir::ItemKind`. Then we'll simply discard the rustdoc type. Once this done, we'll be able to discard `clean::Item` too to use `hir::Item`. r? ``@jyn514``
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/graph.rs')
0 files changed, 0 insertions, 0 deletions
