-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Refactor ppaux out of existence. #58140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
228d6f4
rustc: remove unnecessary extern_prelude logic from ty::item_path.
eddyb 382d24e
rustc: start moving util::ppaux to ty::print.
eddyb 297546e
rustc: add a 'tcx parameter to Print.
eddyb 372b1a5
rustc: uniformize all lift expect messages to "could not lift for pri…
eddyb 852fc6d
rustc: don't support `tcx.lift` returning `None` in ppaux.
eddyb c684814
rustc: don't support missing TLS TyCtxt in ty::print.
eddyb 5f3841c
rustc: rename PrintContext to PrintCx.
eddyb 0b3ab40
rustc: keep a TyCtxt in PrintCx and use it instead of ty::tls.
eddyb 01fa283
rustc: remove fmt::{Debug,Display} from ty::TyKind.
eddyb 3bad9f7
rustc: implement fmt::{Debug,Display} on Ty instead of TyS.
eddyb eb525b0
rustc: tie the 'tcx between Print and PrintCx in ty::print.
eddyb 939c69c
rustc: use define_print! to implement fmt::{Display,Debug} for Kind.
eddyb fbbc7e9
rustc: rewrite PrintCx::parameterized to be much simpler and more gen…
eddyb 1c2a3c5
rustc: support impl's in PrintCx::parameterized.
eddyb 7505bb6
rustc_codegen_utils: revert some symbol_names refactors (while keepin…
eddyb 7d211e5
rustc: rewrite ty::item_path to be more functional than mutation-orie…
eddyb 387cacf
rustc: remove ty::item_path::RootMode by moving local logic into the …
eddyb 329b8ca
rustc: always rely on '_ to be not printed by ty::Region itself.
eddyb 732b71a
rustc: add a ty::RegionKind::display_outputs_anything method to avoid…
eddyb 08d2744
rustc: move the formatter into ty::print::PrintCx.
eddyb 2386168
rustc: explicitly pass the namespace to PrintCx::parameterized.
eddyb ed2be6f
rustc: move the FORCE_IMPL_FILENAME_LINE handling into LocalPathPrinter.
eddyb 3e1cef7
rustc: pass Option<&Substs> and Namespace around in ty::item_path.
eddyb 6ca6c1a
rustc_mir: adjust the type_length_limit diagnostic to be more useful.
eddyb f1af5a7
rustc: remove TyCtxt::parent_def_id in favor of TyCtxt::parent.
eddyb e0c75ff
rustc: rename item_path to def_path (except the module in ty).
eddyb 9f8aaa0
rustc: move the contents of ty::item_path to ty::print.
eddyb b0fbca9
rustc: integrate LocalPathPrinter's behavior into FmtPrinter.
eddyb a15bfc6
rustc: merge PrintCx::parameterized and def_path printing.
eddyb aec5a48
rustc: move <...>-less impl path special-case to pretty_path_qualified.
eddyb 39fd54a
rustc: move the `FORCE_IMPL_FILENAME_LINE` hack into `print_def_path`.
eddyb df6650f
rustc: move `...::<impl ...>` printing into `pretty_path_qualified`.
eddyb 66cc029
rustc: assert `ty::print::FORCE_ABSOLUTE` isn't needed anymore.
eddyb 36f64f1
rustc: remove `ty::print::FORCE_ABSOLUTE` altogether.
eddyb 27ddf2c
rustc: replace node_path_str with uses of def_path_str.
eddyb 387ea61
rustc: make ppaux' print macro use only one closure.
eddyb 972af5e
rustc: rename ppaux' print macro to just p and make its cx input impl…
eddyb 5616ca8
rustc: uniformize ty::print's error handling by requiring Result.
eddyb 37e9185
rustc: split off most of ty::print::PrintCx's fields into a separate …
eddyb ab5d6fb
rustc: remove the closure from ppaux's p! macro (by making ? implicit).
eddyb 7c4eece
rustc: pass ty::print::PrintCx by value.
eddyb cafd83d
rustc: don't keep RegionHighlightMode in a thread-local.
eddyb fc914aa
rustc: centralize region printing in ty::RegionKind's Print impl.
eddyb 88d96b2
rustc: support overriding region printing in ty::print::Printer.
eddyb 35e5123
rustc: support overriding type printing in ty::print::Printer.
eddyb ab26b26
rustc: introduce a ty::print::PrettyPrinter helper for printing "<...>".
eddyb 5211e37
rustc: don't pass Namespace explicitly, but rather track it in FmtPri…
eddyb 6d67d68
rustc_codegen_utils: print all nominal types as paths, in symbol names.
eddyb 26f1807
rustc: move ty/print.rs to ty/print/mod.rs.
eddyb 55871aa
rustc: split out the pretty-printing parts of ty::print into a separa…
eddyb 800ddb3
rustc: remove fields from ty::print::PrintConfig available from tcx.
eddyb d0a1bf5
rustc: make util::ppaux private.
eddyb 9c42485
rustc: disconnect all the Debug functionality from ty::print.
eddyb fb53bb9
rustc: move Debug impls from ppaux to ty::structural_impls.
eddyb 030cdc9
rustc: remove obsolete hacks from ppaux, relating to normalization un…
eddyb 1a0f3a2
rustc: streamline the Print/fmt::Display impls in ppaux and move them…
eddyb 381fa7a
rustc: move ty::print::PrintConfig's fields to FmtPrinter.
eddyb 72690d2
rustc: always hide defaulted generic args, even in verbose mode.
eddyb 4deaa69
rustc: print elided regions as '_ instead of nothing, and use a separ…
eddyb ffa00d4
rustc: make `pretty_path_generic_args`' task as simple as possible.
eddyb c0c485c
rustc: don't thread existential projections through path_generic_args.
eddyb 2a65682
rustc: remove the ability for pretty-printers to override nesting.
eddyb 52b4f2d
rustc: remove PrintCx from ty::Print and rely on printers carrying Ty…
eddyb 9df7c3f
rustc: let ty::print::pretty's p! macro call arbitrary methods.
eddyb 8619ede
rustc: slice substs in ty::print instead of passing the full ones.
eddyb a54a41c
rustc: provide DisambiguatedDefPathData in ty::print.
eddyb 22d6c55
rustc: print ExistentialProjection with spaces around `=`, e.g. `dyn …
eddyb 4653ae1
we can now print on entering/leaving the topmost frame, and make sure…
RalfJung 0ee059d
Fix rebase fallout and address some review comments.
eddyb dbf19c3
rustbuild: remove obsolete fulldeps behavior from src/test/pretty tes…
eddyb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
rustc: always hide defaulted generic args, even in verbose mode.
- Loading branch information
commit 72690d24f02543f5a3c77a8506da48bb32fdc466
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a regression in the output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Zverbose
no longer control whether defaulted parameters are printed. This is because keeping the old behavior would mean no/less shared infrastracture for determining which generic arguments are used for which path segment.Also, there is no information lost, because we don't check for an "approximation" of the default, but a perfectly exact match.
SO you can always refer to the definition (of
Foo
, in this case) for the default.