summary refs log tree commit diff
path: root/src/librustc_mir
AgeCommit message (Collapse)AuthorLines
2018-05-25Fix 07c42af554c to work on stableMark Simulacrum-7/+25
2018-05-24Fix issue #50811 (`NaN > NaN` was true).kennytm-7/+6
Fix #50811 Make sure the float comparison output is consistent with the expected behavior when NaN is involved. ---- Note: This PR is a **BREAKING CHANGE**. If you have used `>` or `>=` to compare floats, and make the result as the length of a fixed array type, like: ```rust use std::f64::NAN; let x: [u8; (NAN > NAN) as usize] = [1]; ``` then the code will no longer compile. Previously, all float comparison involving NaN will just return "Greater", i.e. `NAN > NAN` would wrongly return `true` during const evaluation. If you need to retain the old behavior (why), you may replace `a > b` with `a != a || b != b || a > b`.
2018-04-27use `reveal_all` during drop elaborationNiko Matsakis-2/+4
This used to happen by default as part of the normalization routine that was being used.
2018-04-26Allow variant discriminant initializers to refer to other initializers of ↵Oliver Schneider-3/+75
the same enum
2018-04-25Only warn on erroneous promoted constantsOliver Schneider-9/+7
2018-04-21Add back missing `#![feature(never_type)]`skennytm-0/+3
2018-04-21Revert stabilization of `feature(never_type)`.Felix S. Klock II-0/+1
This commit is just covering the feature gate itself and the tests that made direct use of `!` and thus need to opt back into the feature. A follow on commit brings back the other change that motivates the revert: Namely, going back to the old rules for falling back to `()`.
2018-04-20Fix ICE with `main`'s return type containing lifetimesShotaro Yamada-4/+4
2018-04-17Add a tracking issue for making the warning a lintOliver Schneider-0/+1
2018-04-17Don't abort const eval due to long running evals, just warnOliver Schneider-10/+9
2018-04-17Sign extend constants in range patternsOliver Schneider-23/+50
2018-04-17Stop referring to statics' AllocIds directlyOliver Schneider-114/+38
2018-03-31Auto merge of #49500 - oli-obk:mir_dep_graph, r=michaelwoeristerbors-1/+40
Introduce an edge from a const eval to the MIR of all statics it depends on r? @michaelwoerister
2018-03-31Auto merge of #49472 - nikomatsakis:nll-optimize-constraint-prop-1, r=pnkfelixbors-48/+136
optimize NLL constraint propagation a little Removes a bone-headed hot spot in NLL constant propagation; we were re-allocating the stack vector and hashmap as we repeated the DFS. This change shares those resources across each call. It also modifies the constraint list to be a linked list; arguably I should revert that, though, as this didn't turn out to be a perf hit and perhaps the old code was clearer? (Still, the new style appeals to me.) r? @pnkfelix
2018-03-30Add an explanation for the `create_depgraph_edges`Oliver Schneider-1/+12
2018-03-30Auto merge of #49403 - oli-obk:try2, r=eddybbors-6/+31
Trim discriminants to their final type size r? @eddyb fixes #49181
2018-03-30Introduce an edge from a const eval to the MIR of all statics it depends onOliver Schneider-1/+29
2018-03-29apply pnkfelix nitsNiko Matsakis-6/+20
2018-03-29document reason for #[inline(never)] annotationNiko Matsakis-1/+1
2018-03-29amortize dfs storage creationNiko Matsakis-31/+65
2018-03-29remove dependency map and instead use a linked list of constraintsNiko Matsakis-17/+55
2018-03-29add `#[inline(never)]` annotationsNiko Matsakis-0/+2
2018-03-29Stabilize underscore lifetimesTaylor Cramer-1/+1
2018-03-28Stabilize match_default_bindingsTaylor Cramer-1/+1
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-27Use the actual discriminant instead of always choosing the dataful variantOliver Schneider-2/+4
2018-03-27Auto merge of #49202 - csmoe:trait_engine, r=nikomatsakisbors-3/+3
Introduce trait engine address #48895 step 1: introduce trait engine
2018-03-27Trim discriminants to their final type sizeOliver Schneider-6/+29
2018-03-26Stabilize i128_typeMark Mansi-1/+1
2018-03-26Stabilize conservative_impl_traitTaylor Cramer-1/+1
2018-03-25Rollup merge of #49274 - oli-obk:slow_miri, r=michaelwoerister,eddybkennytm-58/+44
Remove slow HashSet during miri stack frame creation fixes #49237 probably has a major impact on #48846 r? @michaelwoerister cc @eddyb I know you kept telling me to use vectors instead of hash containers... Now I know why.
2018-03-25Rollup merge of #49194 - Zoxc:unsafe-generator, r=cramertjkennytm-15/+7
Make resuming generators unsafe instead of the creation of immovable generators cc @withoutboats Fixes #47787
2018-03-24Auto merge of #48482 - davidtwco:issue-47184, r=nikomatsakisbors-18/+138
NLL should identify and respect the lifetime annotations that the user wrote Part of #47184. r? @nikomatsakis
2018-03-23Improved comments for UserAssertTy statement.David Wood-3/+3
2018-03-23Rollup merge of #49030 - Zoxc:misc, r=michaelwoeristerAlex Crichton-3/+3
Misc changes from my parallel rustc branch r? @michaelwoerister
2018-03-23Rollup merge of #48265 - SimonSapin:nonzero, r=KodrAusAlex Crichton-3/+3
Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero RFC: https://github.com/rust-lang/rfcs/pull/2307 Tracking issue: ~~https://github.com/rust-lang/rust/issues/27730~~ https://github.com/rust-lang/rust/issues/49137 Fixes https://github.com/rust-lang/rust/issues/27730
2018-03-23Simplify local accessorsOliver Schneider-10/+8
2018-03-23Don't allocate a local array at all if there are no localsOliver Schneider-16/+22
2018-03-23Replace uses of `Hash(Map|Set)` with `FxHash(Map|Set)` in miriOliver Schneider-8/+9
2018-03-23Vec<_> -> IndexVec<Local, _>Oliver Schneider-22/+14
2018-03-23import trait engine to typeckcsmoe-3/+3
2018-03-22Added flag to disable user type assertion.David Wood-0/+2
2018-03-22Debug logs for replace_bound_regions_with_nll_infer_varsNiko Matsakis-0/+6
2018-03-22Temporarily only adding UserAssertTy on binding patterns.David Wood-3/+9
2018-03-22UserAssertTy can handle inference variables.David Wood-16/+23
This commit modifies the UserAssertTy statement to take a canonicalized type rather than a regular type so that we can handle the case where the user provided type contains a inference variable.
2018-03-22No longer visiting user_assert_ty statements in constraint generation.David Wood-2/+4
2018-03-22Added comment in renumberer about UserAssertTy.David Wood-0/+3
2018-03-22Added override in renumberer for UserAssertTy.David Wood-1/+6
2018-03-22Changed location to at_self from at_successor.David Wood-1/+1
2018-03-22Added initial processing of UserAssertTy statements.David Wood-18/+41
2018-03-22Killing UserAssertTy in CleanupPostBorrowck pass.David Wood-17/+46