diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2021-11-15 20:40:29 +0100 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2021-11-15 20:40:29 +0100 |
| commit | d64aea65ad3b994ed0e1503f836d82a9896ab468 (patch) | |
| tree | 3199ceb46387dfbcbd8f8c73bc686dc9f6d9d6b5 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | eab2d7519a3f1c11ddaff3d19f8b7727354c6362 (diff) | |
| download | rust-d64aea65ad3b994ed0e1503f836d82a9896ab468.tar.gz rust-d64aea65ad3b994ed0e1503f836d82a9896ab468.zip | |
Fix `non-constant value` ICE (#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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
