about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2021-03-26Use iter::zip in compiler/Josh Stone-0/+1
2021-03-19stabilize or_patternsmark-1/+1
2021-03-18Remove unwrap_none/expect_none from compiler/.Mara Bos-1/+2
2021-03-12Implement valtreeOli Scherer-0/+4
valtree is a version of constants that is inherently safe to be used within types. This is in contrast to ty::Const which can have different representations of the same value. These representation differences can show up in hashing or equality comparisons, breaking type equality of otherwise equal types. valtrees do not have this problem.
2021-03-10Rename Option::get_or_insert_defaultCameron Steffen-1/+1
2021-03-08Use Option::get_or_defaultCameron Steffen-0/+1
2021-02-09Stabilize str_split_onceJacob Pratt-1/+0
2021-01-23Prevent query cycles during inliningoli-0/+2
2020-12-07Dogfood 'str_split_once() with `compiler/`Eric Arellano-0/+1
2020-10-30TypeVisitor: use `ControlFlow` in rustc_{mir,privacy,traits,typeck}LeSeulArtichaut-0/+1
2020-09-26Auto merge of #70743 - oli-obk:eager_const_to_pat_conversion, r=eddybbors-0/+4
Fully destructure constants into patterns r? `@varkor` as discussed in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/constants.20in.20patterns/near/192789924 we should probably crater it once reviewed
2020-09-20Auto merge of #76964 - RalfJung:rollup-ybn06fs, r=RalfJungbors-3/+2
Rollup of 15 pull requests Successful merges: - #76722 (Test and fix Send and Sync traits of BTreeMap artefacts) - #76766 (Extract some intrinsics out of rustc_codegen_llvm) - #76800 (Don't generate bootstrap usage unless it's needed) - #76809 (simplfy condition in ItemLowerer::with_trait_impl_ref()) - #76815 (Fix wording in mir doc) - #76818 (Don't compile regex at every function call.) - #76821 (Remove redundant nightly features) - #76823 (black_box: silence unused_mut warning when building with cfg(miri)) - #76825 (use `array_windows` instead of `windows` in the compiler) - #76827 (fix array_windows docs) - #76828 (use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip)) - #76840 (Move to intra doc links in core/src/future) - #76845 (Use intra docs links in core::{ascii, option, str, pattern, hash::map}) - #76853 (Use intra-doc links in library/core/src/task/wake.rs) - #76871 (support panic=abort in Miri) Failed merges: r? `@ghost`
2020-09-20Add a query for dereferencing constants of reference typeOliver Scherer-0/+4
2020-09-20Rollup merge of #76825 - lcnr:array-windows-apply, r=varkorRalf Jung-0/+1
use `array_windows` instead of `windows` in the compiler I do think these changes are beautiful, but do have to admit that using type inference for the window length can easily be confusing. This seems like a general issue with const generics, where inferring constants adds an additional complexity which users have to learn and keep in mind.
2020-09-20Rollup merge of #76821 - est31:remove_redundant_nightly_features, ↵Ralf Jung-3/+0
r=oli-obk,Mark-Simulacrum Remove redundant nightly features Removes a bunch of redundant/outdated nightly features. The first commit removes a `core_intrinsics` use for which a stable wrapper has been provided since. The second commit replaces the `const_generics` feature with `min_const_generics` which might get stabilized this year. The third commit is the result of a trial/error run of removing every single feature and then adding it back if compile failed. A bunch of unused features are the result that the third commit removes.
2020-09-20Rollup merge of #76818 - hbina:dont_compile_regex_all_the_time, r=ecstatic-morseRalf Jung-0/+1
Don't compile regex at every function call. Use `SyncOnceCell` to only compile it once. I believe this still adds some kind of locking mechanism? Related issue: https://github.com/rust-lang/rust/issues/76817
2020-09-20Auto merge of #74949 - oli-obk:validate_const_eval_raw, r=RalfJungbors-2/+2
Validate constants during `const_eval_raw` This PR implements the groundwork for https://github.com/rust-lang/rust/issues/72396 * constants are now validated during `const_eval_raw` * to prevent cycle errors, we do not validate references to statics anymore beyond the fact that they are not dangling * the `const_eval` query ICEs if used on `static` items * as a side effect promoteds are now evaluated to `ConstValue::Scalar` again (since they are just a reference to the actual promoted allocation in most cases).
2020-09-20use `array_windows` instead of `windows` in the compilerBastian Kauschke-0/+1
2020-09-19Reflect the "do not call this query directly" mentality in its nameOliver Scherer-1/+1
2020-09-19Unify the names of const eval queries and their return typesOliver Scherer-2/+2
2020-09-19Rename const eval queries to reflect the validation changesOliver Scherer-2/+2
2020-09-18Implement a destination propagation passJonas Schievink-0/+1
2020-09-17Remove redundant #![feature(...)] 's from compiler/est31-3/+0
2020-09-17Don't compile regex at every function call.Hanif Bin Ariffin-0/+1
Use `SyncOnceCell` to only compile it once. I believe this still adds some kind of locking mechanism?
2020-08-30Extend dataflow framework to support arbitrary latticesDylan MacKenzie-0/+1
2020-08-30mv compiler to compiler/mark-0/+61