rust/src/librustdoc/clean
kennytm 46f504543d
Rollup merge of #55258 - Aaron1011:fix/rustdoc-blanket, r=GuillaumeGomez
Fix Rustdoc ICE when checking blanket impls

Fixes #55001, #54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
2018-10-26 18:24:59 +08:00
..
auto_trait.rs Prefer Default::default over FxHash*::default in struct constructors 2018-10-19 14:34:44 +02:00
blanket_impl.rs Fix Rustdoc ICE when checking blanket impls 2018-10-22 19:40:43 -04:00
cfg.rs Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkor 2018-08-21 17:51:49 +08:00
def_ctor.rs Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str} 2018-08-22 16:08:49 +01:00
inline.rs Prefer Default::default over FxHash*::default in struct constructors 2018-10-19 14:34:44 +02:00
mod.rs Fix tests and rustdoc 2018-10-26 09:48:44 +13:00
simplify.rs rustc: keep a Span for each predicate in ty::GenericPredicates. 2018-09-28 17:19:35 +03:00