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

Fix non-constant value ICE (#90878) #90930

Merged
merged 4 commits into from
Nov 20, 2021

Commits on Nov 15, 2021

  1. Fix non-constant value ICE (rust-lang#90878)

    This also fixes the same suggestion, which was kind of broken, because it just searched for the last occurence of `const` to replace with a `let`. This works great in some cases, but when there is no const and a leading space to the file, it doesn't work and panic with overflow because it thought that it had found a const.
    
    I also changed the suggestion to only trigger if the `const` and the non-constant value are on the same line, because if they aren't, the suggestion is very likely to be wrong.
    
    Also don't trigger the suggestion if the found `const` is on line 0, because that triggers the ICE.
    Noratrieb committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    d64aea6 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2021

  1. Fix case where ICE rust-lang#90878 was still triggered by a leading n…

    …ewline
    
    I cannot provide a test for that thanks to tidy.
    Noratrieb committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    7c7f58d View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2021

  1. Configuration menu
    Copy the full SHA
    495d8ed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96c37c8 View commit details
    Browse the repository at this point in the history