about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/check_consts
AgeCommit message (Collapse)AuthorLines
2021-09-07Rename rustc_mir to rustc_const_eval.Camille GILLOT-2484/+0
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-7/+6
2021-09-02do not resolve instances for trait fn idsb-naber-17/+19
2021-08-27fmtDeadbeef-4/+9
2021-08-27Add `ty::BoundConstness`Deadbeef-2/+2
2021-08-27Fix #88155Deadbeef-36/+46
2021-08-26add `tcx` to `fn walk`lcnr-1/+1
2021-08-26make unevaluated const substs optionallcnr-1/+1
2021-08-22Fix more “a”/“an” typosFrank Steffahn-1/+1
2021-08-19introduce a Coerce predicateNiko Matsakis-2/+2
2021-08-16Skip assert ICE with default_method_body_is_constDeadbeef-1/+8
functions marked with #[default_method_body_is_const] would ICE when being const checked due to it not being a const function: `tcx.is_const_fn_raw(did)` returns false. We should skip this assert when it is marked with that attribute.
2021-08-13move Constness into TraitPredicateDeadbeef-2/+5
2021-08-01Auto merge of #87449 - matthiaskrgr:clippyy_v2, r=nagisabors-1/+1
more clippy::complexity fixes (also a couple of clippy::perf fixes)
2021-07-28Improve comments about const panic handlingMara Bos-0/+3
Co-authored-by: Ralf Jung <post@ralfj.de>
2021-07-28Make const panic!("..") work in Rust 2021.Mara Bos-0/+2
During const eval, this replaces calls to core::panicking::panic_fmt and std::panicking::being_panic_fmt with a call to a new const fn: core::panicking::const_panic_fmt. That function uses fmt::Arguments::as_str() to get the str and calls panic_str with that instead. panic!() invocations with formatting arguments are still not accepted, as the creation of such a fmt::Arguments cannot be done in constant functions right now.
2021-07-27Stabilize `const_fn_union`Jacob Pratt-28/+1
2021-07-27Stabilize `const_fn_transmute`Jacob Pratt-32/+0
2021-07-25clippy::useless_formatMatthias Krüger-1/+1
2021-07-24rename Validator → CheckerRalf Jung-5/+5
2021-07-24rename const checking visitor module to check_consts::checkRalf Jung-2/+2
2021-07-19Iterate through impls only when permittedDeadbeef-8/+11
2021-07-13Auto merge of #86857 - fee1-dead:add-attr, r=oli-obkbors-2/+28
Add #[default_method_body_is_const] `@rustbot` label F-const_trait_impl
2021-07-10Permit calls to default const fns of impl constDeadbeef-7/+25
2021-07-10Skip check for calling functions in same traitDeadbeef-3/+11
2021-07-10remove const_raw_ptr_to_usize_cast featureRalf Jung-10/+15
2021-07-03Remove `ty::Binder::bind()`Yuki Okushi-6/+1
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2021-06-05Drop an `if let` that will always succeedLingMan-7/+5
We've already checked that `proj_base == []` in the line above and renaming `place_local` to `local` doesn't gain us anything.
2021-06-03Rollup merge of #85934 - tmiasko:is-union, r=jackh726Yuki Okushi-6/+2
Add `Ty::is_union` predicate
2021-06-02Add `Ty::is_union` predicate and use itTomasz Miąsko-6/+2
2021-06-02convert Rvalue::threadlocalref assertion to delay bugcsmoe-9/+4
2021-06-01skip check_static on rvalue::threadlocalrefcsmoe-1/+5
2021-05-22stabilize const_fn_unsizeRalf Jung-38/+4
2021-05-16Allow `async {}` expressions in const contextsJonas Schievink-2/+10
2021-04-29don't let const_fn feature flag affect impl-block-level trait boundsRalf Jung-11/+2
2021-04-24Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obkbors-32/+22
further split up const_fn feature flag This continues the work on splitting up `const_fn` into separate feature flags: * `const_fn_trait_bound` for `const fn` with trait bounds * `const_fn_unsize` for unsizing coercions in `const fn` (looks like only `dyn` unsizing is still guarded here) I don't know if there are even any things left that `const_fn` guards... at least libcore and liballoc do not need it any more. `@oli-obk` are you currently able to do reviews?
2021-04-19remove E0723 error codeRalf Jung-8/+6
2021-04-19fix few typosklensy-2/+2
2021-04-19add gate tests and pacify tidyRalf Jung-1/+1
2021-04-18separate feature flag for unsizing casts in const fnRalf Jung-22/+9
2021-04-18move 'trait bounds on const fn' to separate feature gateRalf Jung-3/+8
2021-03-31Track bound varsJack Huey-3/+6
2021-03-22Rollup merge of #83351 - RalfJung:precise-const-drop, r=oli-obkDylan DPC-1/+7
post-drop-elab check-const: explain why we still check qualifs r? `@oli-obk`
2021-03-21post-drop-elab check-const: explain why we still check qualifsRalf Jung-1/+7
2021-03-20extract `ConstKind::Unevaluated` into a structlcnr-1/+1
2021-03-12Prepare mir::Constant for ty::Const only supporting valtreesOli Scherer-17/+19
2021-03-09Update match brancheskadmin-0/+1
This updates all places where match branches check on StatementKind or UseContext. This doesn't properly implement them, but adds TODOs where they are, and also adds some best guesses to what they should be in some cases.
2021-03-08Auto merge of #82727 - oli-obk:shrinkmem, r=pnkfelixbors-3/+3
Test the effect of shrinking the size of Rvalue by 16 bytes r? `@ghost`
2021-03-05Shrink the size of Rvalue by 16 bytesOli Scherer-3/+3
2021-03-04Auto merge of #81114 - bugadani:generator, r=estebankbors-1/+1
Box generator-related Body fields Might save some memory on functions that aren't generators.
2021-03-02Rollup merge of #80734 - abonander:ab/issue-66693, r=oli-obkGuillaume Gomez-2/+22
check that first arg to `panic!()` in const is `&str` closes #66693 ~~TODO: regression test~~ cc `@RalfJung` for error message wording