about summary refs log tree commit diff
path: root/compiler/rustc_middle
AgeCommit message (Collapse)AuthorLines
2022-09-29Shrink `hir::def::Res`.Nicholas Nethercote-1/+2
`Res::SelfTy` currently has two `Option`s. When the second one is `Some` the first one is never consulted. So we can split it into two variants, `Res::SelfTyParam` and `Res::SelfTyAlias`, reducing the size of `Res` from 24 bytes to 12. This then shrinks `hir::Path` and `hir::PathSegment`, which are the HIR types that take up the most space.
2022-09-28account for use of index-based lifetime names in print of binderb-naber-4/+10
2022-09-27rustdoc: Queryify `is_notable_trait`Noah Lev-2/+19
This might help with #102375.
2022-09-27rustc_typeck to rustc_hir_analysislcnr-5/+5
2022-09-26Rollup merge of #101996 - b-naber:binder-print, r=lcnrMatthias Krüger-27/+82
Don't duplicate region names for late-bound regions in print of Binder Fixes https://github.com/rust-lang/rust/issues/101280
2022-09-26address reviewb-naber-3/+4
2022-09-26don't duplicate late-bound region names in print of Binderb-naber-27/+81
2022-09-26remove cfg(bootstrap)Pietro Albini-7/+0
2022-09-26Rollup merge of #102270 - Nilstrieb:delete-useless-benches, r=TaKO8Kifee1-dead-54/+0
Remove benches from `rustc_middle` These benches benchmark rust langauge features and not the compiler, so they seem to be in the wrong place here. They also all take <1ns, making them pretty useless. Looking at their git history, they just seem to have been carried around for many, many years. This commit ends their journey.
2022-09-25Auto merge of #101710 - jyn514:move-dep-kind-node, r=cjgillotbors-141/+11
Move DepKindStruct from rustc_middle to rustc_query_system Helps with https://github.com/rust-lang/rust/issues/96524. cc https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Moving.20.60DepKindStruct.60.20to.20rustc_query_system.20.2396524 r? `@cjgillot`
2022-09-25Auto merge of #95474 - oli-obk:tait_ub, r=jackh726bors-1/+3
Neither require nor imply lifetime bounds on opaque type for well formedness The actual hidden type can live arbitrarily longer than any individual lifetime and arbitrarily shorter than all but one of the lifetimes. fixes #86218 fixes #84305 This is a **breaking change** but it is a necessary soundness fix
2022-09-25Move the `codegen_unit` debug assert from `rustc_query_system` to `query_impl`Joshua Nelson-4/+0
This allows removing a function from the `DepKind` trait.
2022-09-25Move some more code from rustc_middle to rustc_query_systemJoshua Nelson-14/+1
2022-09-25Move functions on `DepKindStruct` from rustc_middle to rustc_query_systemJoshua Nelson-66/+12
2022-09-25Move `DepKindStruct` from rustc_middle to rustc_query_systemJoshua Nelson-62/+3
2022-09-25Remove benches from `rustc_middle`Nilstrieb-54/+0
These benches benchmark rust langauge features and not the compiler, so they seem to be in the wrong place here. They also all take <1ns, making them pretty useless. Looking at their git history, they just seem to have been carried around for many, many years. This commit ends their journey.
2022-09-24Auto merge of #102040 - TaKO8Ki:separate-definitions-and-hir-owners, r=cjgillotbors-69/+107
Separate definitions and HIR owners in the type system Fixes #83158 r? `@cjgillot`
2022-09-24fix lifetime errorEllis Hoag-2/+8
2022-09-24rebase and update trait namesEllis Hoag-5/+3
2022-09-24impl SessionDiagnostic for LayoutError and Spanned<T>Ellis Hoag-1/+10
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-69/+107
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-24Rollup merge of #102088 - oli-obk:cleanups, r=bjorn3Matthias Krüger-1/+4
Fix wrongly refactored Lift impl see https://github.com/rust-lang/rust/pull/101858#issuecomment-1252713639 r? ``@bjorn3``
2022-09-24Auto merge of #102064 - cjgillot:revert, r=Mark-Simulacrumbors-154/+182
Revert perf-regression 101620 Reverts #101862 #101620 r? `@Mark-Simulacrum`
2022-09-24Rollup merge of #102152 - compiler-errors:issue-102140, r=fee1-deadMatthias Krüger-3/+7
Calculate `ProjectionTy::trait_def_id` for return-position `impl Trait` in trait correctly Fixes #102140
2022-09-24Auto merge of #102068 - cjgillot:erased-lifetime-print, r=eholkbors-22/+3
Always print '_, even for erased lifetimes. Explicit lifetime arguments are now the recommended syntax in rust 2018 and rust 2021. This PR applies this discipline to rustc itself.
2022-09-23Always print '_, even for erased lifetimes.Camille GILLOT-22/+3
2022-09-23Auto merge of #102056 - b-naber:unevaluated, r=lcnrbors-88/+165
Introduce mir::Unevaluated Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that. r? `@lcnr`
2022-09-23rename Unevaluated to UnevaluatedConstb-naber-57/+81
2022-09-23Auto merge of #102165 - matthiaskrgr:rollup-n5oquhe, r=matthiaskrgrbors-1/+30
Rollup of 8 pull requests Successful merges: - #100734 (Split out async_fn_in_trait into a separate feature) - #101664 (Note if mismatched types have a similar name) - #101815 (Migrated the rustc_passes annotation without effect diagnostic infrastructure) - #102042 (Distribute rust-docs-json via rustup.) - #102066 (rustdoc: remove unnecessary `max-width` on headers) - #102095 (Deduplicate two functions that would soon have been three) - #102104 (Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests) - #102112 (Allow full relro on powerpc64-unknown-linux-gnu) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-23Rollup merge of #101664 - mejrs:similarity, r=fee1-deadMatthias Krüger-1/+30
Note if mismatched types have a similar name If users get a type error between similarly named types, it will point out that these are actually different types, and where they were defined.
2022-09-23Serialize RPITIT values in libsMichael Goulet-0/+5
2022-09-22Calculate ProjectionTy::trait_def_id correctlyMichael Goulet-3/+7
2022-09-22Rollup merge of #102133 - b-naber:use-valtrees-in-fast-reject, r=lcnrMatthias Krüger-8/+1
Use valtrees for comparison r? `@lcnr`
2022-09-22Rollup merge of #102128 - oli-obk:const_unification, r=lcnrMatthias Krüger-1/+1
Const unification is already infallible, remove the error handling logic r? `@lcnr` is this expected to be used in the future? Right now it is dead code.
2022-09-22Revert "Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk"Camille GILLOT-142/+174
This reverts commit 2cb9a65684dba47c52de8fa938febf97a73e70a9, reversing changes made to 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c.
2022-09-22Revert "Auto merge of #101862 - cjgillot:lint-regression, r=oli-obk"Camille GILLOT-13/+9
This reverts commit bc7b17cfe3bf08b618d1c7b64838053faeb1f590, reversing changes made to 5253b0a0a1f366fad0ebed57597fcf2703b9e893.
2022-09-22use valtrees for comparisonb-naber-8/+1
2022-09-22address reviewb-naber-5/+5
2022-09-22introduce mir::Unevaluatedb-naber-74/+127
2022-09-22Const unification is already infallible, remove the error handling logicOli Scherer-1/+1
2022-09-22Auto merge of #100982 - fee1-dead-contrib:const-impl-requires-const-trait, ↵bors-0/+5
r=oli-obk Require `#[const_trait]` on `Trait` for `impl const Trait` r? `@oli-obk`
2022-09-21FIX - adopt new Diagnostic naming in newly migrated modulesJhonny Bill Mena-1/+2
FIX - ambiguous Diagnostic link in docs UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic [Gardening] FIX - formatting via `x fmt` FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way DELETE - unneeded allow attributes in Handler method FIX - broken test FIX - Rebase conflict UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21UPDATE - rename SessionSubdiagnostic macro to SubdiagnosticJhonny Bill Mena-1/+1
Also renames: - sym::AddSubdiagnostic to sym:: Subdiagnostic - rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
2022-09-21UPDATE - rename DiagnosticHandler macro to DiagnosticJhonny Bill Mena-4/+4
2022-09-21UPDATE - rename DiagnosticHandler trait to IntoDiagnosticJhonny Bill Mena-4/+4
2022-09-21Neither require nor imply lifetime bounds on opaque type for well formednessOli Scherer-1/+3
2022-09-21Fix wrongly refactored Lift implOli Scherer-1/+4
2022-09-20Auto merge of #102061 - notriddle:rollup-kwu9vp8, r=notriddlebors-59/+13
Rollup of 12 pull requests Successful merges: - #100250 (Manually cleanup token stream when macro expansion aborts.) - #101014 (Fix -Zmeta-stats ICE by giving `FileEncoder` file read permissions) - #101958 (Improve error for when query is unsupported by crate) - #101976 (MirPhase: clarify that linting is not a semantic change) - #102001 (Use LLVM C-API to build atomic cmpxchg and fence) - #102008 (Add GUI test for notable traits element position) - #102013 (Simplify rpitit handling on lower_fn_decl) - #102021 (some post-valtree cleanup) - #102027 (rustdoc: remove `docblock` class from `item-decl`) - #102034 (rustdoc: remove no-op CSS `h1-6 { border-bottom-color }`) - #102038 (Make the `normalize-overflow` rustdoc test actually do something) - #102053 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-20Rollup merge of #102021 - lcnr:tyConst-fun, r=b-naber,BoxyUwUMichael Howell-54/+6
some post-valtree cleanup r? project-const-generics cc ```@b-naber```
2022-09-20Rollup merge of #101976 - RalfJung:mir-semantic-phases, r=oli-obkMichael Howell-3/+4
MirPhase: clarify that linting is not a semantic change r? ```@JakobDegen```