Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning period for detecting nested impl trait #58608

Merged

Commits on Mar 8, 2019

  1. Temporarily emulate the (accidentally) omitted recursion during impl …

    …Trait check.
    
    Note that the two previous visitors were omitting slightly different
    recursive calls, so I need two flags to properly emulate them.
    pnkfelix committed Mar 8, 2019
    Configuration menu
    Copy the full SHA
    98e4017 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d6cee67 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2019

  1. 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).
    pnkfelix committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    c993033 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    837856d View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2019

  1. Configuration menu
    Copy the full SHA
    0a03ca7 View commit details
    Browse the repository at this point in the history