summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2024-06-04Remove out-of-date comment.Nicholas Nethercote-2/+0
Exhaustiveness and usefulness checking are now in `rustc_pattern_analysis`.
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_mir_build`.Nicholas Nethercote-3/+0
2024-05-13Remove `extern crate rustc_middle` from `rustc_mir_build`.Nicholas Nethercote-2/+0
2024-05-01Step bootstrap cfgsMark Rousskov-1/+0
2024-04-15Make thir_tree and thir_flat into hooksMichael Goulet-2/+2
2024-03-25Auto merge of #122721 - oli-obk:merge_queries, r=davidtwcobors-2/+2
Replace `mir_built` query with a hook and use mir_const everywhere instead A small perf improvement due to less dep graph handling. Mostly just a cleanup to get rid of one of our many mir queries
2024-03-20step cfgsMark Rousskov-1/+0
2024-03-20Replace `mir_built` query with a hook and use mir_const everywhere insteadOli Scherer-2/+2
2024-03-08Stabilize associated type boundsMichael Goulet-1/+1
2024-02-10Remove unnecessary `min_specialization` after bootstrapZalathar-1/+1
These crates all needed specialization for `newtype_index!`, which will no longer be necessary when the current nightly eventually becomes the next bootstrap compiler.
2024-02-06Invert diagnostic lints.Nicholas Nethercote-0/+3
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-01-25Remove unused featuresclubby789-1/+0
2024-01-05Stabilize THIR unsafeckMatthew Jasper-1/+1
2023-12-14rustc_mir_build: Enforce `rustc::potential_query_instability` lintMartin Nordholts-1/+0
Stop allowing `rustc::potential_query_instability` on all of `rustc_mir_build` and instead allow it on a case-by-case basis if it is safe to do so. In this crate there was no instance of the lint remaining.
2023-11-26Use `rustc_fluent_macro::fluent_messages!` directly.Nicholas Nethercote-3/+1
Currently we always do this: ``` use rustc_fluent_macro::fluent_messages; ... fluent_messages! { "./example.ftl" } ``` But there is no need, we can just do this everywhere: ``` rustc_fluent_macro::fluent_messages! { "./example.ftl" } ``` which is shorter.
2023-11-26Avoid need for `{D,Subd}iagnosticMessage` imports.Nicholas Nethercote-1/+0
The `fluent_messages!` macro produces uses of `crate::{D,Subd}iagnosticMessage`, which means that every crate using the macro must have this import: ``` use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage}; ``` This commit changes the macro to instead use `rustc_errors::{D,Subd}iagnosticMessage`, which avoids the need for the imports.
2023-10-25Make THIR unused_unsafe lint consistent with MIRMatthew Jasper-1/+1
Updates THIR behavior to match the changes from #93678
2023-07-22Make `unconditional_recursion` warning detect recursive dropsMartin Nordholts-1/+1
2023-06-19Make closure_saved_names_of_captured_variables a query.Camille GILLOT-0/+2
2023-05-31Remove `lit_to_mir_constant` queryOli Scherer-1/+0
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-1/+1
2023-04-20Remove WithOptconstParam.Camille GILLOT-1/+0
2023-04-18Add `rustc_fluent_macro` to decouple fluent from `rustc_macros`Nilstrieb-1/+1
Fluent, with all the icu4x it brings in, takes quite some time to compile. `fluent_messages!` is only needed in further downstream rustc crates, but is blocking more upstream crates like `rustc_index`. By splitting it out, we allow `rustc_macros` to be compiled earlier, which speeds up `x check compiler` by about 5 seconds (and even more after the needless dependency on `serde_json` is removed from `rustc_data_structures`).
2023-03-29Stabilize a portion of 'once_cell'Trevor Gross-1/+0
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2023-03-11Simplify message pathsest31-1/+1
This makes it easier to open the messages file while developing on features. The commit was the result of automatted changes: for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-02-26Move THIR printing to rustc_mir_build.Camille GILLOT-2/+2
2023-02-22errors: generate typed identifiers in each crateDavid Wood-0/+5
Instead of loading the Fluent resources for every crate in `rustc_error_messages`, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the `rustc_driver` crate and provided to the diagnostic emitter. Signed-off-by: David Wood <david.wood@huawei.com>
2023-01-26previous thir unpretty output through thir-flatb-naber-0/+1
2023-01-18Also remove `#![feature(control_flow_enum)]` where possibleScott McMurray-1/+0
2023-01-11Migrate pattern matchingmejrs-0/+1
2022-12-17Migrate "function cannot return without recursing" diagnosticTheOddGarlic-0/+1
2022-11-21Some cleanup around trait_method lookupOli Scherer-0/+1
2022-10-09Skip chained OpaqueCast when building captures.Camille GILLOT-0/+1
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
2022-09-15Only enable the let_else feature on bootstrapest31-1/+1
On later stages, the feature is already stable. Result of running: rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-08-29Revert let_chains stabilizationNilstrieb-0/+1
This reverts commit 326646074940222d602f3683d0559088690830f4. This is the revert against master, the beta revert was already done in #100538.
2022-08-12Adjust cfgsMark Rousskov-1/+0
2022-07-16Stabilize `let_chains`Caio-1/+1
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-1/+0
2022-05-16use GlobalId in eval_to_valtree query and introduce query for ↵b-naber-0/+1
valtree_to_const_val
2022-05-05Rollup merge of #96628 - joshtriplett:stabilize-then-some, r=m-ou-seYuki Okushi-1/+0
Stabilize `bool::then_some` FCP completed in https://github.com/rust-lang/rust/issues/80967
2022-05-04Stabilize `bool::then_some`Josh Triplett-1/+0
2022-05-04Generate an intermediate temporary for `Drop` constants.Oli Scherer-0/+1
To limit the fallout from this, don't do this for the last (or only) operand in an rvalue.
2022-02-286 - Make more use of `let_chains`Caio-3/+4
Continuation of #94376. cc #53667
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-01add a rustc::query_stability lintlcnr-0/+1
2021-12-14Stabilize iter::zip.PFPoitras-1/+0
2021-10-28Revert "Add rustc lint, warning when iterating over hashmaps"Mark Rousskov-1/+0
2021-10-24Rollup merge of #89558 - lcnr:query-stable-lint, r=estebankMatthias Krüger-0/+1
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
2021-10-16Adopt let_else across the compilerest31-0/+1
This performs a substitution of code following the pattern: let <id> = if let <pat> = ... { identity } else { ... : ! }; To simplify it to: let <pat> = ... { identity } else { ... : ! }; By adopting the let_else feature.