summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src
AgeCommit message (Collapse)AuthorLines
2022-12-07Rollup merge of #105267 - compiler-errors:issue-104613, r=oli-obkMatthias Krüger-3/+3
Don't ICE in ExprUseVisitor on FRU for non-existent struct Fixes #104613 Fixes #105202
2022-12-05Move -Z maximal-hir-to-mir-coverage implementation to new ↵Will Crichton-32/+44
`maybe_new_source_scope` method
2022-12-04drive-by: move field_index to typeck resultsMichael Goulet-3/+3
2022-12-04Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercotebors-1/+1
Cheaper `dump_mir` take two alternative to #105083 r? `@nnethercote`
2022-12-02Use zero based indexing for pass_countOli Scherer-1/+1
2022-11-29Improve spans in custom mirJakob Degen-5/+13
2022-11-29Support statics in custom mirJakob Degen-0/+23
2022-11-29Support most constant kinds in custom mirJakob Degen-78/+96
2022-11-28Remove `Const::from_value`Maybe Waffle-1/+1
...it's just `mk_const` but without the sparcles
2022-11-28Simplify calls to `tcx.mk_const`Maybe Waffle-1/+1
`mk_const(ty::ConstKind::X(...), ty)` can now be simplified to `mk_cosnt(..., ty)`. I searched with the following regex: \mk_const\([\n\s]*(ty::)?ConstKind\ I've left `ty::ConstKind::{Bound, Error}` as-is, they seem clearer this way.
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-18/+22
2022-11-24Rollup merge of #103908 - estebank:consider-cloning, r=compiler-errorsMatthias Krüger-4/+12
Suggest `.clone()` or `ref binding` on E0382
2022-11-24Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiserbors-9/+7
Use `as_deref` in compiler (but only where it makes sense) This simplifies some code :3 (there are some changes that are not exacly `as_deref`, but more like "clever `Option`/`Result` method use")
2022-11-23Account for `x @ y` and suggest `ref x @ ref y`Esteban Küber-4/+12
2022-11-23Auto merge of #103947 - camsteffen:place-clones, r=cjgillotbors-150/+134
Reduce `PlaceBuilder` cloning Some API tweaks with an eye towards reducing clones.
2022-11-22Auto merge of #104711 - Dylan-DPC:rollup-gkw1qr8, r=Dylan-DPCbors-17/+20
Rollup of 6 pull requests Successful merges: - #104295 (Check generics parity before collecting return-position `impl Trait`s in trait) - #104464 (Reduce exceptions overallocation on non Windows x86_64) - #104615 (Create def_id for async fns during lowering) - #104669 (Only declare bindings for if-let guards once per arm) - #104701 (Remove a lifetime resolution hack from `compare_predicate_entailment`) - #104710 (disable strict-provenance-violating doctests in Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-22Rollup merge of #104669 - LeSeulArtichaut:88015-if-let-guard-bindings, ↵Dylan DPC-17/+20
r=cjgillot Only declare bindings for if-let guards once per arm Currently, each candidate for a match arm uses separate locals for the bindings in the if-let guard, causing problems (#88015) when those branches converge in the arm body. Fixes #88015 (🤞)
2022-11-22Auto merge of #103578 - petrochenkov:nofict, r=nagisabors-1/+1
Unreserve braced enum variants in value namespace With this PR braced enum variants (`enum E { V { /*...*/ } }`) no longer take a slot in value namespace, so the special case mentioned in the note in https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md#braced-structs is removed. Report - https://github.com/rust-lang/rust/pull/103578#issuecomment-1292594900.
2022-11-21merge self type and substs in `trait_method`Oli Scherer-5/+4
2022-11-21Stop passing the self-type as a separate argument.Oli Scherer-2/+1
2022-11-21Fix an ICE that I just made worseOli Scherer-9/+1
2022-11-21Some cleanup around trait_method lookupOli Scherer-7/+7
2022-11-21Use iterators instead of slices at more sitesOli Scherer-1/+1
2022-11-21Allow iterators instead of requiring slices that will get turned into iteratorsOli Scherer-1/+1
2022-11-21Assert that various types have the right amount of generic args and fix the ↵Oli Scherer-1/+9
sites that used the wrong amount
2022-11-21Reduce the amount of passed-around arguments that will get merged into one ↵Oli Scherer-8/+9
later anyway
2022-11-21Unreserve braced enum variants in value namespaceVadim Petrochenkov-1/+1
2022-11-21Only declare bindings for if-let guards once per armLéo Lanteri Thauvin-17/+20
2022-11-20Factor out conservative_is_privately_uninhabitedCameron Steffen-3/+3
2022-11-20Change to Ty::is_inhabited_fromCameron Steffen-11/+6
2022-11-20Rollup merge of #104564 - RalfJung:either, r=oli-obkMatthias Krüger-17/+13
interpret: use Either over Result when it is not representing an error condition r? `@oli-obk`
2022-11-18review feedbackRalf Jung-7/+1
2022-11-18interpret: use Either over Result when it is not representing an error conditionRalf Jung-13/+15
2022-11-18rename to `string_deref_patterns`Deadbeef-2/+2
2022-11-17Remove more PlaceBuilder clonesCameron Steffen-21/+26
2022-11-17Replace into_place with to_placeCameron Steffen-34/+20
2022-11-17Replace try_upvars_resolved with try_to_placeCameron Steffen-51/+35
2022-11-17Introduce PlaceBuilder::resolve_upvar by refCameron Steffen-63/+72
2022-11-17Minimal implementation of implicit deref patternsDeadbeef-0/+33
2022-11-17Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-deadbors-12/+7
Record `LocalDefId` in HIR nodes instead of a side table This is part of an attempt to remove the `HirId -> LocalDefId` table from HIR. This attempt is a prerequisite to creation of `LocalDefId` after HIR lowering (https://github.com/rust-lang/rust/pull/96840), by controlling how `def_id` information is accessed. This first part adds the information to HIR nodes themselves instead of a table. The second part is https://github.com/rust-lang/rust/pull/103902 The third part will be to make `hir::Visitor::visit_fn` take a `LocalDefId` as last parameter. The fourth part will be to completely remove the side table.
2022-11-16Use `as_deref` in compiler (but only where it makes sense)Maybe Waffle-9/+7
2022-11-14Rollup merge of #104349 - rustaceanclub:master, r=oli-obkMatthias Krüger-1/+1
fix some typos in comments
2022-11-13Store a LocalDefId in hir::AnonConst.Camille GILLOT-9/+6
2022-11-13Store a LocalDefId in hir::GenericParam.Camille GILLOT-3/+1
2022-11-13fix some typos in commentscui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-11-11Don't ICE with inline const errors during MIR buildMichael Goulet-0/+3
2022-11-10Use const_error_with_guaranteed moreMichael Goulet-9/+41
2022-11-08Add support for custom MIR parsingJakob Degen-6/+510
2022-11-05Rollup merge of #103984 - V0ldek:103974-refactor-mk_const, r=BoxyUwUMatthias Krüger-2/+1
Refactor tcx mk_const parameters. Unroll the `ty::ConstS` parameter to `TyCtxt::mk_const` into separate `ty::ConstKind` and `Ty` parameters. Signature change is in: https://github.com/V0ldek/rust/blob/c97fd8183a98d6a89b8fc2e02eb068298e6fb7dc/compiler/rustc_middle/src/ty/context.rs#L2234 and https://github.com/V0ldek/rust/blob/c97fd8183a98d6a89b8fc2e02eb068298e6fb7dc/compiler/rustc_middle/src/ty/context.rs#L2572-L2575 the rest is callsites. Closes #103974 r? `@oli-obk`
2022-11-04Refactor tcx mk_const parameters.Mateusz-2/+1