]> git.lizzy.rs Git - rust.git/commit
Implement -Z hir-stats for nested foreign items
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Thu, 18 Feb 2021 00:00:00 +0000 (00:00 +0000)
committerTomasz Miąsko <tomasz.miasko@gmail.com>
Thu, 18 Feb 2021 00:00:00 +0000 (00:00 +0000)
commitbf09e0499e30a39426695c149c8a45c0c06bf715
treec976049f3ff4985c1029c219211ba7e8b6160f66
parentcb2effd44e667d133e31ef334e30d10195218ce6
Implement -Z hir-stats for nested foreign items

An attempt to compute HIR stats for crates with nested foreign items results in an ICE.

```
fn main() {
    extern "C" { fn f(); }
}
```

```
thread 'rustc' panicked at 'visit_nested_xxx must be manually implemented in this visitor'
```

Provide required implementation of visitor method.
compiler/rustc_passes/src/hir_stats.rs