about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/print
AgeCommit message (Collapse)AuthorLines
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
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-3/+3
2022-12-13ProjectionTy.item_def_id -> ProjectionTy.def_idMichael Goulet-5/+5
2022-12-13Use ty::OpaqueTy everywhereMichael Goulet-2/+4
2022-12-11Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-deadMatthias Krüger-1/+0
compiler: remove unnecessary imports and qualified paths Some of these imports were necessary before Edition 2021, others were already in the prelude. I hope it's fine that this PR is so spread-out across files :/
2022-12-10Introduce `with_forced_trimmed_paths`Esteban Küber-1/+81
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-1/+0
2022-11-28Remove `Const::from_value`Maybe Waffle-2/+1
...it's just `mk_const` but without the sparcles
2022-11-28Rollup merge of #104732 - WaffleLapkin:from_def_idn't, r=compiler-errorsDylan DPC-1/+1
Refactor `ty::ClosureKind` related stuff I've tried to fix all duplication and weirdness, but if I missed something do tell :p r? `@compiler-errors`
2022-11-27Auto merge of #104983 - matthiaskrgr:rollup-018sk73, r=matthiaskrgrbors-15/+10
Rollup of 8 pull requests Successful merges: - #95836 (Use `rust_out{exe_suffix}` for doctests) - #104882 (notify lcnr on changes to `ObligationCtxt`) - #104892 (Explain how to get the discriminant out of a `#[repr(T)] enum` with payload) - #104917 (Allow non-org members to label `requires-debug-assertions`) - #104931 (Pretty-print generators with their `generator_kind`) - #104934 (Remove redundant `all` in cfg) - #104944 (Support unit tests for jsondoclint) - #104946 (rustdoc: improve popover focus handling JS) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-27Rollup merge of #104931 - Swatinem:async-pretty, r=eholkMatthias Krüger-15/+10
Pretty-print generators with their `generator_kind` After removing `GenFuture`, I special-cased async generators to pretty-print as `impl Future<Output = X>` mainly to avoid too much diagnostics changes originally. This now reverses that change so that async fn/blocks are pretty-printed as `[$async-type@$source-position]` in various diagnostics, and updates the tests that this touches.
2022-11-27Auto merge of #104048 - cjgillot:split-lifetime, r=compiler-errorsbors-13/+7
Separate lifetime ident from lifetime resolution in HIR Drive-by: change how suggested generic args are computed. Fixes https://github.com/rust-lang/rust/issues/103815 I recommend reviewing commit-by-commit.
2022-11-27Rename `fn_trait_kind_from_{from_lang=>def_id}` to better convey meaningMaybe Waffle-1/+1
2022-11-26Pretty-print generators with their `generator_kind`Arpad Borsos-15/+10
After removing `GenFuture`, I special-cased async generators to pretty-print as `impl Future<Output = X>` mainly to avoid too much diagnostics changes originally. This now reverses that change so that async fn/blocks are pretty-printed as `[$movability `async` $something@$source-position]` in various diagnostics, and updates the tests that this touches.
2022-11-25Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwUbors-0/+3
Add `ConstKind::Expr` Starting to implement `ty::ConstKind::Abstract`, most of the match cases are stubbed out, some I was unsure what to add, others I didn't want to add until a more complete implementation was ready. r? `@lcnr`
2022-11-25Add empty ConstKind::Abstractkadmin-0/+3
Initial pass at expr/abstract const/s Address comments Switch to using a list instead of &[ty::Const], rm `AbstractConst` Remove try_unify_abstract_consts Update comments Add edits Recurse more More edits Prevent equating associated consts Move failing test to ui Changes this test from incremental to ui, and mark it as failing and a known bug. Does not cause the compiler to ICE, so should be ok.
2022-11-25Introduce PredicateKind::ClauseSantiago Pastorino-7/+7
2022-11-24Use kw::Empty for elided lifetimes in path.Camille GILLOT-13/+7
2022-11-24Avoid `GenFuture` shim when compiling async constructsArpad Borsos-0/+11
Previously, async constructs would be lowered to "normal" generators, with an additional `from_generator` / `GenFuture` shim in between to convert from `Generator` to `Future`. The compiler will now special-case these generators internally so that async constructs will *directly* implement `Future` without the need to go through the `from_generator` / `GenFuture` shim. The primary motivation for this change was hiding this implementation detail in stack traces and debuginfo, but it can in theory also help the optimizer as there is less abstractions to see through.
2022-11-22Rollup merge of #103488 - oli-obk:impl_trait_for_tait, r=lcnrManish Goregaokar-0/+1
Allow opaque types in trait impl headers and rely on coherence to reject unsound cases r? ````@lcnr```` fixes #99840
2022-11-23Rollup merge of #104728 - WaffleLapkin:require-lang-items-politely, ↵Yuki Okushi-1/+2
r=compiler-errors Use `tcx.require_lang_item` instead of unwrapping lang items I clearly remember esteban telling me that there is `require_lang_item` but he was from a phone atm and I couldn't find it, so I didn't use it. Stumbled on it today, so here we are :)
2022-11-22Use `tcx.require_lang_item` instead of unwrappingMaybe Waffle-1/+2
2022-11-21Unreserve braced enum variants in value namespaceVadim Petrochenkov-4/+4
2022-11-21Add an always-ambiguous predicate to make sure that we don't accidentlally ↵Oli Scherer-0/+1
allow trait resolution to prove false things during coherence
2022-11-21Rollup merge of #104595 - compiler-errors:poly-existential-predicate, r=lcnrMatthias Krüger-8/+6
Add `PolyExistentialPredicate` type alias Wrapping `ExistentialPredicate`s in a binder is very common, and this alias already exists for the `PolyExistential{TraitRef,Projection}` types.
2022-11-19Rollup merge of #104469 - estebank:long-types, r=oli-obkMatthias Krüger-2/+11
Make "long type" printing type aware and trim types in E0275 Instead of simple string cutting, use a custom printer to hide parts of long printed types. On E0275, check for type length before printing.
2022-11-19drive-by: PolyExistentialPredicateMichael Goulet-8/+6