about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src
AgeCommit message (Collapse)AuthorLines
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
2022-11-03Cleanup bind_pattern argsCameron Steffen-37/+14
2022-11-01Rollup merge of #103584 - ouz-a:issue-102303, r=oli-obkDylan DPC-1/+50
Remove bounds check when array is indexed by enum As the title says, this reverts the behavior introduced with 1.64. Fixes #102303 r? `@oli-obk`
2022-11-01Rollup merge of #103749 - est31:reduce_irrefutable_let_else_span, r=cjgillotYuki Okushi-10/+8
Reduce span of let else irrefutable_let_patterns warning Huge spans aren't good for IDE users as they underline constructs that are possibly multiline. Similar PR to #90761 which did the same for the `unused_macros` lint.
2022-10-31Remove bounds check with enum castouz-a-1/+50
2022-10-30Reduce span of let else irrefutable_let_patterns warningest31-10/+8
Huge spans aren't good for IDE users as they underline constructs that are possibly multiline.
2022-10-30Rollup merge of #103726 - TaKO8Ki:avoid-&str-to-string-conversions, ↵Matthias Krüger-1/+1
r=compiler-errors Avoid unnecessary `&str` to `String` conversions
2022-10-29avoid unnecessary `&str` to `String` conversionsTakayuki Maeda-1/+1
2022-10-27Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functionsMaybe Waffle-13/+10
Functions in answer: - `Ty::is_freeze` - `Ty::is_sized` - `Ty::is_unpin` - `Ty::is_copy_modulo_regions`
2022-10-23Comment why normalization is needed for debug assertionsMichael Goulet-1/+6
2022-10-22Introduce InhabitedPredicateCameron Steffen-12/+10
2022-10-15Auto merge of #101832 - compiler-errors:dyn-star-plus, r=eholkbors-0/+1
Make `dyn*` casts into a coercion, allow `dyn*` upcasting I know that `dyn*` is likely not going to be a feature exposed to surface Rust, but this makes it slightly more ergonomic to write tests for these types anyways. ... and this was just fun to implement anyways. 1. Make `dyn*` into a coercion instead of a cast 2. Enable `dyn*` upcasting since we basically get it for free 3. Simplify some of the cast checking code since we're using the coercion path now r? `@eholk` but feel free to reassign cc `@nikomatsakis` and `@tmandry` who might care about making `dyn*` casts into a coercion
2022-10-14Rollup merge of #103031 - est31:match_guard_irrefutable_let, r=oli-obkDylan DPC-5/+13
Suppress irrefutable let patterns lint for prefixes in match guards In match guards, irrefutable prefixes might use the bindings created by the match pattern. Ideally, we check for this, but we can do the next best thing and just not lint for irrefutable prefixes in match guards. Fixes #98361
2022-10-14Rollup merge of #103018 - Rageking8:more-dupe-word-typos, r=TaKO8KiDylan DPC-1/+1
More dupe word typos I only picked those changes (from the regex search) that I am pretty certain doesn't change meaning and is just a typo fix. Do correct me if any fix is undesirable and I can revert those. Thanks.
2022-10-14more dupe word typosRageking8-1/+1
2022-10-14Make dyn* cast into a coercionMichael Goulet-0/+1
2022-10-14Suppress irrefutable let patterns lint for prefixes in match guardsest31-5/+13
In match guards, irrefutable prefixes might use the bindings created by the match pattern. Ideally, we check for this, but we can do the next best thing and just not lint for irrefutable prefixes in match guards.
2022-10-13Ensure enum cast movesGary Guo-2/+2