make a help text for 'cannot find macro' actionable#102881
make a help text for 'cannot find macro' actionable#102881togami2864 wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
r? @TaKO8Ki (rust-highfive has picked a reviewer for you, use r? to override) |
|
I'll fix any other ui tests had forgot to update after reviews. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
I'm pretty sure there's a way to make this into an actual applicable suggestion, instead of just editing the message that this formats. I think that should be done instead of this.
There was a problem hiding this comment.
I have one question.
As you say, err.span_suggestions() is more appropriate instead of err.help to show a suggestion.
The output will be like this.
help: consider importing this macro
|
LL | use hey::bitflags;
|
I don't know what to do with the argument Span that I pass to err_suggestions because it is a process in a clause where use_placement_span is None.
if let (IsPattern::Yes, Some(span)) = (is_pattern, use_placement_span){
.....
} else if let Some(span) = use_placement_span {
......
}
else {
msg.push(':');
for candidate in accessible_path_strings {
msg.push('\n');
msg.push_str(&format!("use {};", &candidate.0));
}
err.help(&msg); <- I wanna replace it
}
Do you have any idea or are these any code of similar processing?
|
r? compiler-errors i'll take a look at this later |
|
r? @compiler-errors oops 😅 |
|
@togami2864: Disregard my last suggestion about |
de66eb0 to
5c8e3c0
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☔ The latest upstream changes (presumably #106984) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@togami2864 any updates on this? |
|
Closing this as inactive. Feel free to make a new pr if needed |
fix #102601