diff options
| author | bors <bors@rust-lang.org> | 2020-04-14 21:23:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-04-14 21:23:40 +0000 |
| commit | d12f0304839e599d498b3faaa652336b273bdcc8 (patch) | |
| tree | 427b504d391c002d04259643ba4695de2e84131a /src/test/rustdoc-ui/coverage/private.rs | |
| parent | edc02580e4e80476ac1ded2cc1008eaf8b8400e6 (diff) | |
| parent | 8bb7b7bf9c781968b44732791d52962c9a9a00fe (diff) | |
| download | rust-d12f0304839e599d498b3faaa652336b273bdcc8.tar.gz rust-d12f0304839e599d498b3faaa652336b273bdcc8.zip | |
Auto merge of #70452 - eddyb:repeat-expr-correct-generics-parent, r=nikomatsakis
typeck: always expose repeat count `AnonConst`s' parent in `generics_of`. This should reduce some of the confusion around #43408, although, if you look at the changed test outputs (for the last commit), they all hit #68436, so nothing new will start compiling. We can let counts of "repeat expressions" (`N` in `[x; N]`) always have the correct generics parenting, because they're always in a body, so nothing in the `where` clauses or `impl` trait/type of the parent can use it, and therefore no query cycles can occur. <hr/> Other potential candidates we might want to apply the same approach to, are: * ~~(easy) `enum` discriminants (see also #70453)~~ opened #70825 * (trickier) array *type* (not *expression*) lengths nested in: * bodies * types of (associated or not) `const`/`static` * RHS of `type` aliases and associated `type`s * `fn` signatures We should've done so from the start, the only reason we haven't is because I was squeamish about blacklisting some of the cases, but if we whitelist instead we should be fine. Also, lazy normalization is taking forever :disappointed:. <hr/> There's also 5 other commits here: * "typeck: track any errors injected during writeback and taint tables appropriately." - fixes #66706, as the next commit would otherwise trigger an ICE again * "typeck: workaround WF hole in `to_const`." - its purpose is to emulate most of #70107's direct effect, at least in the case of repeat expressions, where the count always goes through `to_const` * this is the reason no new code can really compile, as the WF checks require #68436 to bypass * however, this has more test changes than I hoped, so it should be reviewed separately, and maybe even landed separately (as #70107 might take a while, as it's blocked on a few of my PRs) * "ty: erase lifetimes early in `ty::Const::eval`." - first attempt at fixing #70773 * still useful, I believe the new approach is less likely to cause issues long-term * I could take this out or move it into another PR if desired or someone else could take over (cc @skinny121) * "traits/query/normalize: add some `debug!` logging for the result." - debugging aid for #70773 * "borrow_check/type_check: normalize `Aggregate` and `Call` operands." - actually fixes #70773 r? @nikomatsakis cc @pnkfelix @varkor @yodaldevoid @oli-obk @estebank
Diffstat (limited to 'src/test/rustdoc-ui/coverage/private.rs')
0 files changed, 0 insertions, 0 deletions
