about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-06-20 17:01:03 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-07-15 10:54:05 -0400
commit1b8accb7497e6fe66be331e40f8663d198a6b648 (patch)
tree90f57dafaad4deccde2a8e14b7eecd9437c97ed3 /src/rustllvm/RustWrapper.cpp
parentb3187aabd20637e0bb9a930b4b930a079b785ca9 (diff)
downloadrust-1b8accb7497e6fe66be331e40f8663d198a6b648.tar.gz
rust-1b8accb7497e6fe66be331e40f8663d198a6b648.zip
Add an option not to report resolution errors for rustdoc
- Remove unnecessary `should_loop` variable
- Report errors for trait implementations

These should give resolution errors because they are visible outside the
current scope. Without these errors, rustdoc will give ICEs:

```
thread 'rustc' panicked at 'attempted .def_id() on invalid res: Err', /home/joshua/src/rust/src/libstd/macros.rs:16:9
  15: rustc_hir::def::Res<Id>::def_id
             at /home/joshua/src/rust/src/librustc_hir/def.rs:382
  16: rustdoc::clean::utils::register_res
             at src/librustdoc/clean/utils.rs:627
  17: rustdoc::clean::utils::resolve_type
             at src/librustdoc/clean/utils.rs:587
```

- Add much more extensive tests
  + fn -> impl -> fn
  + fn -> impl -> fn -> macro
  + errors in function parameters
  + errors in trait bounds
  + errors in the type implementing the trait
  + unknown bounds for the type
  + unknown types in function bodies
  + errors generated by macros

- Use explicit state instead of trying to reconstruct it from random info
- Use an enum instead of a boolean
- Add example of ignored error
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions