summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src
AgeCommit message (Collapse)AuthorLines
2023-01-20Auto merge of #107105 - matthiaskrgr:rollup-rkz9t7r, r=matthiaskrgrbors-0/+6
Rollup of 8 pull requests Successful merges: - #106783 (Recover labels written as identifiers) - #106973 (Don't treat closures from other crates as local) - #106979 (Document how to get the type of a default associated type) - #107053 (signal update string representation for haiku.) - #107058 (Recognise double-equals homoglyph) - #107067 (Custom MIR: Support storage statements) - #107076 (Added const-generic ui test case for issue #106419) - #107091 (Fix broken format strings in `infer.ftl`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-26/+21
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-19Custom MIR: Support storage statementsTomasz Miąsko-0/+6
2023-01-18Also remove `#![feature(control_flow_enum)]` where possibleScott McMurray-1/+0
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-3/+3
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-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-9/+9
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-9/+9
2023-01-17tidyWaffle Maybe-17/+16
rustfmt, pleaaaaase, start supporting rust Co-authored-by: nils <48135649+Nilstrieb@users.noreply.github.com>
2023-01-17Don't call closures immediately, use `try{}` blocksMaybe Waffle-27/+23
2023-01-14suggest fix for attempted integer identifier in patternsEzra Shaw-4/+31
2023-01-11Rollup merge of #106097 - mejrs:mir_build2, r=oli-obkMichael Goulet-319/+361
Migrate mir_build diagnostics 2 of 3 The first three commits are fairly boring, however I've made some changes to the output of the match checking diagnostics.
2023-01-11Translate `Overlap` eagerlymejrs-10/+18
2023-01-11Some cleanup, oopsmejrs-5/+0
2023-01-11Don't recommend `if let` if `let else` worksmejrs-48/+17
2023-01-11Migrate pattern matchingmejrs-185/+246
2023-01-11Migrate usefulness.rsmejrs-4/+35
2023-01-11Migrate deconstruct_pat.rsmejrs-21/+34
2023-01-11Translate const_to_pat.rsmejrs-138/+103
2023-01-11Detect out of bounds range pattern valueEsteban Küber-6/+72
Fix #68972.
2023-01-04Rollup merge of #106403 - compiler-errors:rename-hir-methods, r=cjgillotMichael Goulet-6/+6
Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent` The `hir::Map::get_parent_node` function doesn't return a `Node`, and I think that's quite confusing. Let's rename it to something that sounds more like something that gets the parent hir id => `hir::Map::parent_id`. Same with `find_parent_node` => `opt_parent_id`. Also, combine `hir.get(hir.parent_id(hir_id))` and similar `hir.find(hir.parent_id(hir_id))` function into new functions that actually retrieve the parent node in one call. This last commit is the only one that might need to be looked at closely.
2023-01-04rename get_parent_node to parent_idMichael Goulet-6/+6
2023-01-03Don't trim path for `unsafe_op_in_unsafe_fn` lintsLéo Lanteri Thauvin-10/+13
2022-12-24Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholkMatthias Krüger-22/+19
rustc: Remove needless lifetimes
2022-12-22Fix the issue number in comment for as_local_call_operandTomasz Miąsko-1/+1
2022-12-22Rollup merge of #106012 - JakobDegen:retag-raw, r=RalfJungMatthias Krüger-3/+0
Clarify that raw retags are not permitted in Mir Not sure when this changed, but documentation and the validator needed to be updated. This also removes raw retags from custom mir. cc rust-lang/miri#2735 r? `@RalfJung`
2022-12-21Clarify that raw retags are not permitted in MirJakob Degen-3/+0
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-22/+19
2022-12-20Some style nitsOli Scherer-3/+3
2022-12-20Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obkbors-2/+2
Improve syntax of `newtype_index` This makes it more like proper Rust and also makes the implementation a lot simpler. Mostly just turns weird flags in the body into proper attributes. It should probably also be converted to an attribute macro instead of function-like, but that can be done in a future PR.
2022-12-19Revert "Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr"Rémy Rakic-309/+83
This reverts commit 03770f0e2b60c02db8fcf52fed5fb36aac70cedc, reversing changes made to 01ef4b21dc5251b58bd9c6fd6face2ae95d56da1.
2022-12-18Rollup merge of #105873 - matthiaskrgr:clippy_fmt, r=NilstriebMatthias Krüger-1/+1
use &str / String literals instead of format!()
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-2/+2
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obkMatthias Krüger-9/+8
don't destuct references just to reborrow
2022-12-18don't restuct references just to reborrowMatthias Krüger-9/+8
2022-12-18avoid .into() conversion to identical typesMatthias Krüger-1/+1
2022-12-18use &str / String literals instead of format!()Matthias Krüger-1/+1
2022-12-18Auto merge of #104417 - mejrs:mir_build, r=davidtwcobors-291/+888
Migrate rustc_mir_build diagnostics Rebases https://github.com/rust-lang/rust/pull/100854 ~~The remaining issue is how to better resolve https://github.com/rust-lang/rust/commit/72bea68af4ee2a41c44998916f6a789163f12e7d~~ ~~The diagnostic macros seems to generate a broken diagnostic, and I couldn't figure out how to manually format the fluent message, so I hardcoded the format string for now. I'd like pointers to a better fix for this.~~ Also, I'm not 100% sure I didn't mess up a rebase somewhere 🙂 r? `@davidtwco`
2022-12-17Rollup merge of #105814 - JakobDegen:custom-mir-terms, r=oli-obkMatthias Krüger-0/+49
Support call and drop terminators in custom mir The only caveat with this change is that cleanup blocks are not supported. I would like to add them, but it's not quite clear to me what the best way to do that is, so I'll have to think about it some more. r? ``@oli-obk``
2022-12-17Try to fix ICEmejrs-1/+5
2022-12-17Remove (eager)mejrs-1/+1
2022-12-17Resolve various merge conflictsmejrs-128/+127
2022-12-17Migrate multiple mut borrows diagnosticTheOddGarlic-7/+41
2022-12-17Migrate borrow of moved value diagnosticTheOddGarlic-17/+23
2022-12-17Migrate irrefutable let pattern diagnosticsTheOddGarlic-57/+53
2022-12-17Migrate pattern bindings with variant name lintTheOddGarlic-23/+20
2022-12-17Migrate leading/trailing irrefutable let pattern diagnosticsTheOddGarlic-25/+26
2022-12-17Migrate lower range bound diagnosticsTheOddGarlic-24/+22
2022-12-17Migrate "could not evaluate const pattern" diagnosticTheOddGarlic-3/+10
2022-12-17Migrate "constant pattern depends on generic parameter" diagnosticTheOddGarlic-3/+11
2022-12-17Migrate unreachable pattern diagnosticTheOddGarlic-8/+15