about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/print
AgeCommit message (Collapse)AuthorLines
2024-05-13split out AliasTy -> AliasTermMichael Goulet-15/+23
2024-05-11Apply nits, uplift ExistentialPredicate tooMichael Goulet-10/+10
2024-05-11Uplift `NormalizesTo`, `CoercePredicate`, and `SubtypePredicate`Michael Goulet-18/+18
2024-05-11Uplift `ExistentialTraitRef`, `ExistentialProjection`, `ProjectionPredicate`Michael Goulet-14/+14
2024-05-11Uplift `TraitPredicate`Michael Goulet-10/+11
2024-05-10Also debugMichael Goulet-0/+4
2024-05-10Lift `TraitRef` into `rustc_type_ir`Michael Goulet-8/+26
2024-05-10Auto merge of #124961 - matthiaskrgr:rollup-1jj65p6, r=matthiaskrgrbors-1/+1
Rollup of 7 pull requests Successful merges: - #124551 (Add benchmarks for `impl Debug for str`) - #124915 (`rustc_target` cleanups) - #124918 (Eliminate some `FIXME(lcnr)` comments) - #124927 (opt-dist: use xz2 instead of xz crate) - #124936 (analyse visitor: build proof tree in probe) - #124943 (always use `GenericArgsRef`) - #124955 (Use fewer origins when creating type variables.) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-09Rename Generics::params to Generics::own_paramsMichael Goulet-1/+1
2024-05-09always use `GenericArgsRef`lcnr-1/+1
2024-04-29Remove `extern crate rustc_macros` from `rustc_middle`.Nicholas Nethercote-0/+1
2024-04-19Stop taking ParamTy/ParamConst/EarlyParamRegion/AliasTy by refMichael Goulet-2/+2
2024-04-10introduce `Mutability::ptr_str`Kalle Wachsmuth-7/+1
2024-04-08Actually create ranged int types in the type system.Oli Scherer-1/+4
2024-04-03rustc_index: Add a `ZERO` constant to index typesVadim Petrochenkov-1/+1
It is commonly used.
2024-03-27Remove `Partial/Ord` from `BoundRegion`Oli Scherer-5/+5
2024-03-25In `pretty_print_type()`, print `async fn` futures' paths instead of spans.Kevin Reid-5/+13
This makes `-Zprint-type-sizes`'s output easier to read, because the name of an `async fn` is more immediately recognizable than its span. I also deleted the comment "FIXME(eddyb) should use `def_span`." because it appears to have already been fixed by commit 67727aa7c31a24ea73a91a9134c3653fae8209ab.
2024-03-22Auto merge of #122900 - matthiaskrgr:rollup-nls90mb, r=matthiaskrgrbors-12/+12
Rollup of 8 pull requests Successful merges: - #114009 (compiler: allow transmute of ZST arrays with generics) - #122195 (Note that the caller chooses a type for type param) - #122651 (Suggest `_` for missing generic arguments in turbofish) - #122784 (Add `tag_for_variant` query) - #122839 (Split out `PredicatePolarity` from `ImplPolarity`) - #122873 (Merge my contributor emails into one using mailmap) - #122885 (Adjust better spastorino membership to triagebot's adhoc_groups) - #122888 (add a couple more tests) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-22Split out ImplPolarity and PredicatePolarityMichael Goulet-12/+12
2024-03-22Make RawPtr take Ty and Mutbl separatelyMichael Goulet-4/+4
2024-03-22Programmatically convert some of the pat ctorsMichael Goulet-1/+1
2024-03-17added pretty_print_const_exprwill-2/+152
2024-03-12Change `DefKind::Static` to a struct variantOli Scherer-1/+1
2024-03-11Rename `IntoDiagnosticArg` as `IntoDiagArg`.Nicholas Nethercote-6/+6
Also rename `into_diagnostic_arg` as `into_diag_arg`, and `NotIntoDiagnosticArg` as `NotInotDiagArg`.
2024-03-05Convert `TypeVisitor` and `DefIdVisitor` to use `VisitorResult`Jason Newcomb-9/+3
2024-03-03Add a proper `with_no_queries` to printingJohn Kåre Alsaker-8/+18
2024-02-28Auto merge of #121489 - nnethercote:diag-renaming, r=davidtwcobors-2/+2
Diagnostic renaming Renaming various diagnostic types from `Diagnostic*` to `Diag*`. Part of https://github.com/rust-lang/compiler-team/issues/722. There are more to do but this is enough for one PR. r? `@davidtwco`
2024-02-28Rename `DiagnosticArg{,Map,Name,Value}` as `DiagArg{,Map,Name,Value}`.Nicholas Nethercote-2/+2
2024-02-27Print RPITIT like an opaqueMichael Goulet-8/+12
2024-02-23compiler: clippy::complexity fixesMatthias Krüger-1/+1
2024-02-22drive-by fmt cleanupEsteban Küber-1/+1
2024-02-13Remove `good_path_delayed_bug`.Nicholas Nethercote-6/+5
It's only has a single remaining purpose: to ensure that a diagnostic is printed when `trimmed_def_paths` is used. It's an annoying mechanism: weak, with odd semantics, badly named, and gets in the way of other changes. This commit replaces it with a simpler `must_produce_diag` mechanism, getting rid of a diagnostic `Level` along the way.
2024-02-10Print kind of coroutine closureMichael Goulet-1/+18
2024-02-07address review comments and add more testsLukas Markeffsky-10/+15
2024-02-07improve pretty printing for trait objectsLukas Markeffsky-12/+41
2024-02-06Fix drop shim for AsyncFnOnce closure, AsyncFnMut shim for AsyncFn closureMichael Goulet-2/+19
2024-02-06Bless tests, add commentsMichael Goulet-1/+1
2024-02-06Add CoroutineClosure to TyKind, AggregateKind, UpvarArgsMichael Goulet-0/+43
2024-01-30Remove the lifetime from `DiagnosticArgValue`.Nicholas Nethercote-2/+2
Because it's almost always static. This makes `impl IntoDiagnosticArg for DiagnosticArgValue` trivial, which is nice. There are a few diagnostics constructed in `compiler/rustc_mir_build/src/check_unsafety.rs` and `compiler/rustc_mir_transform/src/errors.rs` that now need symbols converted to `String` with `to_string` instead of `&str` with `as_str`, but that' no big deal, and worth it for the simplifications elsewhere.
2024-01-23Rollup merge of #120270 - compiler-errors:randos, r=lcnrLeón Orell Valerian Liehr-24/+14
A bunch of random modifications r? oli-obk Kitchen sink of changes that I didn't know where to put elsewhere. Documentation tweaks mostly, but also removing some unreachable code and simplifying the pretty printing for closures/coroutines.
2024-01-23Random type checker changesMichael Goulet-24/+14
2024-01-22Fix a `trimmed_def_paths` assertion failure.Nicholas Nethercote-2/+0
`RegionHighlightMode::force_print_trimmed_def_path` can call `trimmed_def_paths` even when `tcx.sess.opts.trimmed_def_paths` is false. Based on the `force` in the method name, it seems this is deliberate, so I have removed the assertion. Fixes #120035.
2024-01-17Use FnOnceOutput instead of FnOnce where expectedOli Scherer-1/+1
2024-01-15Replace `TrimmedDefPaths` with a bool.Nicholas Nethercote-13/+11
It's a tri-state enum but the `Always` variant is never used, so a bool is simpler.
2024-01-15Refactor `try_print_trimmed_def_path`.Nicholas Nethercote-18/+11
Inverting the condition lets us merge the two `Ok(false)` paths. I also find the inverted condition easier to read: "all the things that must be true for trimming to occur", instead of "any of the things that must be true for trimming to not occur".
2024-01-15Add some helpful comments in `trimmed_def_paths`.Nicholas Nethercote-1/+5
To explain things that took me a minute to work out.
2024-01-05Auto merge of #119634 - matthiaskrgr:rollup-v2xt7et, r=matthiaskrgrbors-21/+51
Rollup of 8 pull requests Successful merges: - #119151 (Hide foreign `#[doc(hidden)]` paths in import suggestions) - #119350 (Imply outlives-bounds on lazy type aliases) - #119354 (Make `negative_bounds` internal & fix some of its issues) - #119506 (Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error`) - #119554 (Fix scoping for let chains in match guards) - #119563 (Check yield terminator's resume type in borrowck) - #119589 (cstore: Remove unnecessary locking from `CrateMetadata`) - #119622 (never patterns: Document behavior of never patterns with macros-by-example) r? `@ghost` `@rustbot` modify labels: rollup
2024-01-05Rollup merge of #119354 - fmease:negative_bounds-fixes, r=compiler-errorsMatthias Krüger-21/+51
Make `negative_bounds` internal & fix some of its issues r? compiler-errors
2024-01-04Make iteration order of trimmed_def_paths query stableMichael Woerister-3/+3
2024-01-01Pretty-print always-const trait predicates correctlyLeón Orell Valerian Liehr-12/+21