Decouple rustc_hir::print into rustc_hir_pretty#70344
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The printing stuff isn't quite my wheelhouse. r? @eddyb |
| &mut |db| { | ||
| db.span_label( | ||
| fn_decl.output.span(), | ||
| format!("expected `{}` because of this return type", fn_decl.output,), |
There was a problem hiding this comment.
I wonder if this was always meant to print a Ty but accidentally printed HIR.
| return self.get_fn_decl(hir_id).map(|(fn_decl, _)| { | ||
| ( | ||
| fn_decl.output.span(), | ||
| format!("expected `{}` because of this return type", fn_decl.output), |
There was a problem hiding this comment.
This also looks like it might be meant to be a Ty not HIR.
| violations | ||
| } | ||
|
|
||
| fn trait_bound_spans<'tcx>( |
There was a problem hiding this comment.
Yea I wasn't really satisfied with the current name, yours is better.
|
r=me after addressing #70344 (comment), the |
|
@bors r=eddyb |
|
📌 Commit b514c42 has been approved by |
|
⌛ Testing commit b514c42 with merge dbc53eff3922c88a47237fef10fe21d9e39e61a5... |
Decouple `rustc_hir::print` into `rustc_hir_pretty` High level summary: - The HIR pretty printer, `rustc_hir::print` is moved into a new crate `rustc_hir_pretty`. - `rustc_ast_pretty` and `rustc_errors` are dropped as `rustc_hir` dependencies. - The dependence on HIR pretty is generally reduced, leaving `rustc_save_analysis`, `rustdoc`, `rustc_metadata`, and `rustc_driver` as the remaining clients. The main goal here is to reduce `rustc_hir`'s dependencies and its size such that it can start and finish earlier, thereby working towards rust-lang#65031. r? @Zoxc
|
@bors retry |
|
Failed in #70425 (comment), @bors r- |
|
@bors r=eddyb |
|
📌 Commit b2f7a95 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#69644 (Remove framework in `dataflow/mod.rs` in favor of "generic" one) - rust-lang#69936 (Fix cycle error when emitting suggestion for mismatched `fn` type) - rust-lang#70048 (Allow obtaining &mut OsStr) - rust-lang#70344 (Decouple `rustc_hir::print` into `rustc_hir_pretty`) - rust-lang#70435 (Add regression test for rust-lang#66706) Failed merges: r? @ghost
Changes: ```` remove redundant import rustup rust-lang#68404 rustup rust-lang#69644 rustup rust-lang#70344 Move verbose_file_reads to restriction move redundant_pub_crate to nursery readme: explain how to run only a single lint on a codebase Remove dependency on `matches` crate Move useless_transmute to nursery nursery group -> style Update for PR feedback Auto merge of rust-lang#5314 - ehuss:remove-git2, r=flip1995 Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them ```` Fixes rust-lang#70456
submodules: update clippy from 1ff81c1 to 70b93aa Changes: ```` remove redundant import rustup rust-lang#68404 rustup rust-lang#69644 rustup rust-lang#70344 Move verbose_file_reads to restriction move redundant_pub_crate to nursery readme: explain how to run only a single lint on a codebase Remove dependency on `matches` crate Move useless_transmute to nursery nursery group -> style Update for PR feedback Auto merge of rust-lang#5314 - ehuss:remove-git2, r=flip1995 Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them ```` Fixes rust-lang#70456
Changes: ```` remove redundant import rustup rust-lang/rust#68404 rustup rust-lang/rust#69644 rustup rust-lang/rust#70344 Move verbose_file_reads to restriction move redundant_pub_crate to nursery readme: explain how to run only a single lint on a codebase Remove dependency on `matches` crate Move useless_transmute to nursery nursery group -> style Update for PR feedback Auto merge of rust-lang#5314 - ehuss:remove-git2, r=flip1995 Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them ```` Fixes #70456
High level summary:
rustc_hir::printis moved into a new craterustc_hir_pretty.rustc_ast_prettyandrustc_errorsare dropped asrustc_hirdependencies.rustc_save_analysis,rustdoc,rustc_metadata, andrustc_driveras the remaining clients.The main goal here is to reduce
rustc_hir's dependencies and its size such that it can start and finish earlier, thereby working towards #65031.r? @Zoxc