1
Fork 0
rust/src/librustdoc/clean
Mara Bos 73162aabc7
Rollup merge of #88573 - camelid:rustdoc-assoc-panic, r=GuillaumeGomez
rustdoc: Don't panic on ambiguous inherent associated types

Instead, return `Type::Infer` since compilation should fail anyway.
That's how rustdoc handles `hir::TyKind::Err`s, so this just extends
that behavior to `ty::Err`s when analyzing associated types.

For some reason, the error is printed twice with rustdoc (though only
once with rustc). I'm not sure why that is, but it's better than
panicking.

This commit also makes rustdoc fail early in the non-projection,
non-error case, instead of returning a `Res::Err` that would likely
cause rustdoc to panic later on. This change is originally from #88379.

r? `@GuillaumeGomez`
2021-09-02 19:10:21 +02:00
..
cfg Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
utils Valid underscores in hex/octal/binary literal docs 2021-05-03 20:11:09 -04:00
auto_trait.rs Remove unhelpful expect() message 2021-08-31 20:32:19 -07:00
blanket_impl.rs remove box_syntax uses from cranelift and tools 2021-08-18 09:31:51 +02:00
cfg.rs Remove the insta-stable cfg(wasm) 2021-04-07 23:09:56 +03:00
inline.rs rustdoc: Stop using resolver for macro loading 2021-08-29 18:30:16 +03:00
mod.rs Rollup merge of #88573 - camelid:rustdoc-assoc-panic, r=GuillaumeGomez 2021-09-02 19:10:21 +02:00
simplify.rs Box GenericArgs::Parenthesized.output 2021-08-31 20:32:17 -07:00
types.rs Auto merge of #88522 - camelid:box-paren-output, r=jyn514 2021-09-02 00:12:21 +00:00
utils.rs make unevaluated const substs optional 2021-08-26 11:00:30 +02:00