diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2022-11-08 21:03:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-08 21:03:53 -0500 |
| commit | 75c239402c8fafc89246a26bd066d6ff647e3794 (patch) | |
| tree | ef05e8a161095205043a0e4c45dc46d2a9e8d178 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 7521a974d34d24203b538a2d6d0b220c7c011fa6 (diff) | |
| parent | 6d455296fde6ff0d5154d39513259a60eb73f302 (diff) | |
| download | rust-75c239402c8fafc89246a26bd066d6ff647e3794.tar.gz rust-75c239402c8fafc89246a26bd066d6ff647e3794.zip | |
Rollup merge of #103521 - chenyukang:yukang/fix-103451-avoid-hang, r=jackh726,wesleywiser
Avoid possible infinite loop when next_point reaching the end of file
Fixes #103451
If we return a span with `lo` = `hi`, `span_to_snippet` will always get `Ok("")`, which may introduce infinite loop if we don't care.
This PR make `find_width_of_character_at_span` return `width` with 1, so that `span_to_snippet` will get an `Err`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
