1
Fork 0

Rollup merge of #136328 - estebank:long-ty-path, r=jieyouxu,lqd

Rework "long type names" printing logic

Make it so more type-system types can be printed in a shortened version (like `Predicate`s).

Centralize printing the information about the "full type name path".

Make the "long type path" for the file where long types are written part of `Diag`, so that it becomes easier to keep track of it, and ensure it will always will be printed out last in the diagnostic by making its addition to the output implicit.

Tweak the shortening of types in "expected/found" labels.

Remove dead file `note.rs`.
This commit is contained in:
Matthias Krüger 2025-02-02 12:31:56 +01:00 committed by GitHub
commit 39efaa09d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 332 additions and 741 deletions

View file

@ -839,10 +839,6 @@ pub(crate) struct BorrowOfMovedValue {
pub(crate) ty: String,
#[suggestion(code = "ref ", applicability = "machine-applicable")]
pub(crate) suggest_borrowing: Option<Span>,
#[note(mir_build_full_type_name)]
#[note(mir_build_consider_verbose)]
pub(crate) has_path: bool,
pub(crate) path: String,
}
#[derive(Diagnostic)]