Uh oh!
There was an error while loading. Please reload this page.
Migrate rustc_monomorphize to use SessionDiagnostic - #100730
Conversation
rust-highfive
commented
Aug 18, 2022
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
JeanCASPAR
commented
Aug 18, 2022
You can pute the #[note] attribute on a Option<()> field. It will be displayed only when the field is Some, like I did here : |
@JeanCASPAR The problem turned out to be my relying on incorrectly-documented syntax! (It was on an |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rustbot
commented
Aug 19, 2022
|
CleanCut
commented
Aug 19, 2022
I've taken this PR out of draft status, because I'm now stuck and need a helpful reviewer to guide me forward. 😄 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
davidtwco
commented
Aug 19, 2022
Just skip this one for now and rebase after @finalchild's #100694 lands with
You can use
We support |
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
This comment was marked as resolved.
davidtwco
commented
Aug 25, 2022
I assume that the codegen failure is spurious because nothing you've changed should make a difference there - once you've rebased and fixed the conflicts, we can try merging this. Thanks for sticking with it :) |
…ough new struct, use fluent message in monomorphize
rustbot
commented
Aug 25, 2022
Some changes occurred in src/tools/cargo cc @ehuss |
CleanCut
commented
Aug 25, 2022
I hope so. The local codegen failure persists even after the rebase. |
davidtwco
left a comment
There was a problem hiding this comment.
I think we're almost ready to land this - you've pushed a submodule update for Cargo though, which shouldn't be there.
Uh oh!
There was an error while loading. Please reload this page.
CleanCut
commented
Aug 26, 2022
✅ Fixed the errant submodule change. Ready for re-review. |
davidtwco
commented
Aug 31, 2022
@bors r+ |
bors
commented
Aug 31, 2022
…phize, r=davidtwco Migrate rustc_monomorphize to use SessionDiagnostic ### Description - Migrates diagnostics in `rustc_monomorphize` to use `SessionDiagnostic` - Adds an `impl IntoDiagnosticArg for PathBuf` ### TODO / Help! - [x] I'm having trouble figuring out how to apply an optional note. 😕 Help!? - Resolved. It was bad docs. Fixed in https://github.com/rust-lang/rustc-dev-guide/pull/1437/files - [x] `errors:RecursionLimit` should be `#[fatal ...]`, but that doesn't exist so it's `#[error ...]` at the moment. - Maybe I can switch after this is merged in? --> rust-lang#100694 - Or maybe I need to manually implement `SessionDiagnostic` instead of deriving it? - [x] How does one go about converting an error inside of [a call to struct_span_lint_hir](https://github.com/rust-lang/rust/blob/8064a495086c2e63c0ef77e8e82fe3b9b5dc535f/compiler/rustc_monomorphize/src/collector.rs#L917-L927)? - [x] ~What placeholder do you use in the fluent template to refer to the value in a vector? It seems like [this code](https://github.com/rust-lang/rust/blob/0b79f758c9aa6646606662a6d623a0752286cd17/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs#L83-L114) ought to have the answer (or something near it)...but I can't figure it out.~ You can't. Punted.
klensy
commented
Aug 31, 2022
Submodule changes still in commits history, can you actually rebase? |
Rollup of 7 pull requests Successful merges: - rust-lang#90946 (Ignore `reference`s in "Type::inner_def_id") - rust-lang#100730 (Migrate rustc_monomorphize to use SessionDiagnostic) - rust-lang#100753 (translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1) - rust-lang#100831 (Migrate `symbol_mangling` module to new diagnostics structs) - rust-lang#101204 (rustdoc: Resugar async fn return type in `clean`, not `html`) - rust-lang#101216 (Use in-page links for sanitizer docs.) - rust-lang#101237 (fix into_iter on ZST) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…phize, r=davidtwco Migrate rustc_monomorphize to use SessionDiagnostic ### Description - Migrates diagnostics in `rustc_monomorphize` to use `SessionDiagnostic` - Adds an `impl IntoDiagnosticArg for PathBuf` ### TODO / Help! - [x] I'm having trouble figuring out how to apply an optional note. 😕 Help!? - Resolved. It was bad docs. Fixed in https://github.com/rust-lang/rustc-dev-guide/pull/1437/files - [x] `errors:RecursionLimit` should be `#[fatal ...]`, but that doesn't exist so it's `#[error ...]` at the moment. - Maybe I can switch after this is merged in? --> rust-lang#100694 - Or maybe I need to manually implement `SessionDiagnostic` instead of deriving it? - [x] How does one go about converting an error inside of [a call to struct_span_lint_hir](https://github.com/rust-lang/rust/blob/8064a495086c2e63c0ef77e8e82fe3b9b5dc535f/compiler/rustc_monomorphize/src/collector.rs#L917-L927)? - [x] ~What placeholder do you use in the fluent template to refer to the value in a vector? It seems like [this code](https://github.com/rust-lang/rust/blob/0b79f758c9aa6646606662a6d623a0752286cd17/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs#L83-L114) ought to have the answer (or something near it)...but I can't figure it out.~ You can't. Punted.
Description
rustc_monomorphizeto useSessionDiagnosticimpl IntoDiagnosticArg for PathBufTODO / Help!
errors:RecursionLimitshould be#[fatal ...], but that doesn't exist so it's#[error ...]at the moment.SessionDiagnosticand translatable messages (first part) #100694SessionDiagnosticinstead of deriving it?What placeholder do you use in the fluent template to refer to the value in a vector? It seems like this code ought to have the answer (or something near it)...but I can't figure it out.You can't. Punted.