Migrate typeck::outlives::mod.rs to SessionDiagnostic#100659
Migrate typeck::outlives::mod.rs to SessionDiagnostic#100659ameknite wants to merge 1 commit intorust-lang:masterfrom ameknite:master
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @TaKO8Ki (or someone else) soon. Please see the contribution instructions for more information. |
|
@rustbot label +A-translation |
| pub pred: Vec<String>, | ||
| } | ||
|
|
||
| impl SessionDiagnostic<'_> for RustcOutlives { |
There was a problem hiding this comment.
This should not use a manual implementation of SessionDiagnostic but instead be using the derive macro, I think.
There was a problem hiding this comment.
Yeah, you will be able to simplify this with a diagnostic derive, you can see examples in the blog post.
|
r? @davidtwco |
| pred.sort(); | ||
|
|
||
| let span = tcx.def_span(item_def_id); | ||
| let mut err = tcx.sess.struct_span_err(span, "rustc_outlives"); |
There was a problem hiding this comment.
pre-existing: this is a bizarre error message.. and the blame is from many years ago.
|
☔ The latest upstream changes (presumably #100708) made this pull request unmergeable. Please resolve the merge conflicts. |
Migration of a part of the outlive module to Session Diagnostic.
This is my first PR, I hope is ok
r? rust-lang/diagnostics