about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/print
AgeCommit message (Collapse)AuthorLines
2023-03-23Rollup merge of #109506 - BoxyUwU:debugable_bound_var_printing, ↵Matthias Krüger-1/+5
r=compiler-errors make param bound vars visibly bound vars with -Zverbose I was trying to debug some type/const bound var stuff and it was shockingly tricky due to the fact that even with `-Zverbose` enabled the `T` in `for<T> T: Trait` prints as `T` making it seem like its `TyKind::Param` when it is infact `TyKind::Bound`. This PR "fixes" this when `-Zverbose` is set to allow rendering it as `^T` or `^1_T` depending on binder depth. r? ```@compiler-errors```
2023-03-23Printing alias-relate goals correctlyMichael Goulet-2/+1
2023-03-23Rename AliasEq -> AliasRelateMichael Goulet-1/+1
2023-03-23Include relation direction in AliasEq predicateMichael Goulet-1/+2
2023-03-23make param bound vars visibly bound varsBoxy-1/+5
2023-03-15ImplTraitPlaceholder -> is_impl_trait_in_traitSantiago Pastorino-1/+1
2023-03-02rustc_middle: Remove trait `DefIdTree`Vadim Petrochenkov-2/+2
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-02-22Remove type-traversal trait aliasesAlan Egerton-13/+13
2023-02-18Pretty placeholders using their namesMichael Goulet-1/+4
2023-02-17Add `Clause::ConstArgHasType` variantBoxy-4/+7
2023-02-16remove bound_type_of query; make type_of return EarlyBinder; change type_of ↵Kyle Matsuda-2/+2
in metadata
2023-02-16change usages of type_of to bound_type_ofKyle Matsuda-1/+1
2023-02-15Add specialized variants of `mk_region`.Nicholas Nethercote-9/+9
Much like there are specialized variants of `mk_ty`. This will enable some optimization in the next commit. Also rename the existing `re_error*` functions as `mk_re_error*`, for consistency.
2023-02-13Rename folder traits' `tcx` method to `interner`Alan Egerton-1/+1
2023-02-13Make folding traits generic over the InternerAlan Egerton-1/+1
2023-02-13Make visiting traits generic over the InternerAlan Egerton-1/+1
2023-02-13Alias folding/visiting traits instead of re-exportAlan Egerton-2/+2
2023-02-13Pre-intern some commonly used type variables.Nicholas Nethercote-2/+2
This requires some rearrangement of plumbing, such as adding `mk_fresh_{,int_,float_}ty` and removing `mk_ty_infer`.
2023-02-12Auto merge of #105671 - lukas-code:depreciate-char, r=scottmcmbors-1/+0
Use associated items of `char` instead of freestanding items in `core::char` The associated functions and constants on `char` have been stable since 1.52 and the freestanding items have soft-deprecated since 1.62 (https://github.com/rust-lang/rust/pull/95566). This PR ~~marks them as "deprecated in future", similar to the integer and floating point modules (`core::{i32, f32}` etc)~~ replaces all uses of `core::char::*` with `char::*` to prepare for future deprecation of `core::char::*`.
2023-02-11Auto merge of #107507 - BoxyUwU:deferred_projection_equality, r=lcnrbors-0/+1
Implement `deferred_projection_equality` for erica solver Somewhat of a revival of #96912. When relating projections now emit an `AliasEq` obligation instead of attempting to determine equality of projections that may not be as normalized as possible (i.e. because of lazy norm, or just containing inference variables that prevent us from resolving an impl). Only do this when the new solver is enabled
2023-02-10add `AliasEq` to `PredicateKind`Boxy-0/+1
2023-02-09Change to `ReError(ErrorGuaranteed)`Esteban Küber-2/+2
2023-02-09Introduce `ReError`Esteban Küber-1/+2
CC #69314
2023-02-03Rollup merge of #107585 - compiler-errors:fndef-sig-cycle, r=oli-obkDylan DPC-5/+18
Don't cause a cycle when formatting query description that references a FnDef When a function returns `-> _`, we use typeck to compute what the resulting type of the body _should_ be. If we call another query inside of typeck and hit a cycle error, we attempt to report the cycle error which requires us to compute all of the query descriptions for the stack. However, if one of the queries in that cycle has a query description that references this function as a FnDef type, we'll cause a *second* cycle error from within the cycle error reporting code, since rendering a FnDef requires us to compute its signature. This causes an unwrap to ICE, since during the *second* cycle reporting code, we try to look for a job that isn't in the active jobs list. We can avoid this by using `with_no_queries!` when computing these query descriptions. Fixes #107089 The only drawback is that the rendering of opaque types in cycles regresses a bit :| I'm open to alternate suggestions about how we may handle this...
2023-02-02Tweak misleading commentMichael Goulet-1/+1
2023-02-02Don't cause a cycle when formatting query description that references a FnDefMichael Goulet-5/+18
2023-01-31Rollup merge of #107486 - compiler-errors:bound-ty-keep-name, r=oli-obkGuillaume Gomez-2/+4
Track bound types like bound regions When we instantiate bound types into placeholder types, we throw away the names for some reason. These names are particularly useful for error reporting once we have `for<T>` binders. r? types
2023-01-30Track bound types like bound regionsMichael Goulet-2/+4
2023-01-30Hide lifetimes of `impl Trait` in force trimmed pathsEsteban Küber-3/+5
2023-01-30Do not mention lifetime names in force trimmed pathsEsteban Küber-0/+4
2023-01-30Don't show `for<'lt>` in force trimmed pathsEsteban Küber-3/+8
2023-01-27Introduce GeneratorWitnessMIR.Camille GILLOT-0/+23
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-1/+1
EarlyBinder to fn_sig in metadata
2023-01-20add raw identifier for keyword in suggestionbohan-1/+1
2023-01-18Rollup merge of #107023 - scottmcm:stop-shouting, r=NilstriebMichael Goulet-1/+1
Stop using `BREAK` & `CONTINUE` in compiler Switching them to `Break(())` and `Continue(())` instead. Entirely search-and-replace, though there's one spot where rustfmt insisted on a reformatting too. libs-api would like to remove these constants (https://github.com/rust-lang/rust/pull/102697#issuecomment-1385705202), so stop using them in compiler to make the removal PR later smaller.
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-1/+1
Switching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-18i am freeBoxy-8/+11
2023-01-18actually print out non local anon constsBoxy-3/+3
2023-01-18defer array len printing to const arg printingBoxy-20/+4
2023-01-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-2/+2
Remove double spaces after dots in comments Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-2/+2
2023-01-14Use associated items of `char` instead of freestanding items in `core::char`Lukas Markeffsky-1/+0
2023-01-14change impl_trait_ref query to return EarlyBinder; remove ↵Kyle Matsuda-1/+1
bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-11Hide more of long types in E0271Esteban Küber-3/+15
Fix #40186.
2022-12-22Give a more helpful error for "trimmed_def_paths construted"Joshua Nelson-1/+7
2022-12-15Shorten trimmed display of closuresEsteban Küber-1/+7
When `with_forced_trimmed_paths` is used, only print filename and start of the closure's span, to reduce their verbosity.
2022-12-14Remove TraitRef::newOli Scherer-4/+2
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-2/+2
2022-12-13Combine identical alias armsMichael Goulet-2/+1
2022-12-13Combine projection and opaque into aliasMichael Goulet-6/+6