rust/src/librustc_passes
Felix S. Klock II c99303351d Revised warning-downgrade strategy for nested impl trait.
Instead of a sticky-boolean flag that would downgrade errors to
warnings during further recursion into the type (which is overly broad
because we were not missing errors at arbitrarily deep levels), this
instead tracks state closer to what the original bug actually was.

In particular, the actual original bug was that we were failing to
record the existence of an outer `impl Trait` solely when it occurred
as an *immediate child* during the walk of the child types in
`visit_generic_args`.

Therefore, the correct way to precisely model when that bug would
manifest itself (and thus downgrade the error-to-warning accordingly)
is to track when those outer `impl Trait` cases were previously
unrecorded.

That's what this code does, by storing a flag with the recorded outer
`impl Trait` indicating at which point in the compiler's control flow
it had been stored.

I will note that this commit passes the current test suite. A
follow-up commit will also include tests illustrating the cases that
this commit gets right (and were handled incorrectly by the previous
sticky boolean).
2019-03-11 15:14:24 +01:00
..
ast_validation.rs Revised warning-downgrade strategy for nested impl trait. 2019-03-11 15:14:24 +01:00
Cargo.toml librustc_passes => 2018 2019-02-08 20:40:49 +09:00
diagnostics.rs Deny async fn in 2015 edition 2019-02-24 16:33:12 +00:00
hir_stats.rs passes: HirIdify Id 2019-02-24 07:50:45 +01:00
layout_test.rs hir: remove NodeId from Item 2019-03-02 07:48:52 +01:00
lib.rs Rollup merge of #58247 - taiki-e:librustc_passes-2018, r=Centril 2019-02-09 00:15:53 +01:00
loops.rs librustc_passes => 2018 2019-02-08 20:40:49 +09:00
rvalue_promotion.rs hir: remove NodeId from Pat and FieldPat 2019-03-02 07:48:52 +01:00