1. 11 3月, 2019 2 次提交
    • F
    • F
      Revised warning-downgrade strategy for nested impl trait. · c9930335
      Felix S. Klock II 提交于
      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).
      c9930335
  2. 08 3月, 2019 4 次提交
  3. 07 3月, 2019 13 次提交
  4. 06 3月, 2019 21 次提交