Suggest only Span without source changes when source code is unavailable by xizheyin · Pull Request #144585 · rust-lang/rust (original) (raw)

For further explanation, I moved the comments here.

When fixing the problems listed in #142403, we found that the bug could not be reproduced in ui test. After investigation, I found that span suggestion and span note are not realized in the same way, so I submitted this pr to make std visible in ui tests.

In daily use, the source of std should be visible, and execution will fall to the else branch, so these will not be displayed.

This new test is a bug recorded in #142403, only for verifying this code change, I will fix it in later pr.