about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2018-03-08Rollup merge of #48752 - alexcrichton:fix-target-feature, r=michaelwoeristerManish Goregaokar-2/+22
rustc: Fix ICE with `#[target_feature]` on module This commit fixes an ICE in rustc when `#[target_feature]` was applied to items other than functions due to the way the feature was validated.
2018-03-08Rollup merge of #48738 - Songbird0:parseinterror_potential_cause, r=joshtriplettManish Goregaokar-0/+7
Add a potential cause raising `ParseIntError`. Initially, I wanted to add it directly to the documentation of `str. parse()` method, I finally found that it was more relevant (I hope so?) to directly document the structure in question. I've added a scenario, in which we could all get caught at least once, to make it easier to diagnose the problem when parsing integers.
2018-03-08Rollup merge of #48699 - frewsxcv:frewsxcv-impl-trait, r=nikomatsakisManish Goregaokar-99/+53
Replace iterator structures with `impl Trait`. Two commits: * Replace iterator structures with `impl Trait`. * Run rustfmt on `src/librustc_data_structures/graph/mod.rs`.
2018-03-08Rollup merge of #48682 - spastorino:make_causal_lazy, r=nikomatsakisManish Goregaokar-860/+1255
[NLL] Make causal tracking lazy Close #46590 cc @nikomatsakis
2018-03-08Rollup merge of #48292 - topecongiro:from_str-for-path-and-pathbuf, ↵Manish Goregaokar-0/+27
r=alexcrichton Implement FromStr for PathBuf Closes #44431.
2018-03-08Auto merge of #46882 - oli-obk:miri3, r=eddybbors-7166/+6638
Replace all const evaluation with miri * error reporting in constants prints a stacktrace through all called const fns * Trivial constant propagation and folding in MIR (always active, irrelevant of the optimization level) * can now use floating constants in patterns (previously only floating point literals were allowed) * the future compat lint is still produced for both cases * can index into constant arrays during const eval (previously feature gated) * can create a constant union value with field `a` and read from field `b` * can dereference references into constants * can create references inside constants (`const X: &u32 = &22`) * Tuple struct constructors can be used in constants * regression in const eval errors spans (some of these need improvements in mir debug info) * can cast floats to ints and vice versa (in constants, and even nan/inf constants) * Mir dump prints false/true instead of 0u8/1u8 * `1i8 >> [8][0]` does not lint about exceeding bitshifts anymore. * Needs const propagation across projections * `foo[I]` produces a const eval lint if `foo: [T; N]` and `N < I` * Essentially all builtin panics produce lints if they can be statically proven to trigger at runtime. This is on a best effort basis, so there might be some complex cases that don't trigger. (The runtime panic stays there, irrelevant of whether the lint is produced or not) * can use `union`s to implement `transmute` for `Copy` types in constants without a feature gate. With all the greatness and nasal demons that come with this. * can convert integers to `&'static T` in constants (useful for embedded) fixes #34997 (stack overflow with many constants) fixes #25574 (deref byte strings in patterns) fixes #27918 (broken mir ICE) fixes #46114 (ICE on struct constructors in patterns) fixes #37448 (`SomeStruct { foo } as SomeStruct`) fixes #43754 (`return` in const fn) fixes #41898 (tuple struct constructors) fixes #31364 (infinite recursion with const fn, fixed by miri's recursion limit) closes #29947 (const indexing stabilization) fixes #45044 (pattern matching repeat expressions) fixes #47971 (ICE on const fn + references) fixes #48081 (ICE on cyclic assoc const error) fixes #48746 (nonhelpful error message with unions) r? @eddyb even though 1k loc are added in tests, this PR reduces the loc in this repository by 700
2018-03-08Don't derive traits on packed structsOliver Schneider-1/+22
2018-03-08Clean up the binary hex lintOliver Schneider-3/+5
2018-03-08simplify constant value pair field accessOliver Schneider-6/+1
2018-03-08Unify the const folding errorsOliver Schneider-155/+278
before they differed depending on whether optimizations were on or not
2018-03-08Correct the shift overflow check in miriOliver Schneider-1/+1
2018-03-08Regenerate testsOliver Schneider-283/+247
2018-03-08Use clearer name for integer bit width helper functionOliver Schneider-4/+4
2018-03-08Reuse `Integer::from_attr`Oliver Schneider-5/+6
2018-03-08Remove unused error codeOliver Schneider-35/+0
2018-03-08Generator assertions are unconditionally triggeredOliver Schneider-4/+6
2018-03-08Address review commentsOliver Schneider-71/+33
2018-03-08Adjust test which differs between 32 bit and 64 bitOliver Schneider-2/+2
The differences are not part of what the test is testing, so they were simply removed.
2018-03-08Decide signdedness on the layout instead of the typeOliver Schneider-69/+77
2018-03-08Deduplicate some codeOliver Schneider-73/+67
2018-03-08Don't use the undefined bytes of PrimVal::BytesOliver Schneider-277/+255
2018-03-08Fix mozjs crater failureOliver Schneider-3/+48
2018-03-08Const eval will oom together with rustc nowOliver Schneider-44/+0
2018-03-08Step limit is now terminator limitOliver Schneider-3/+4
2018-03-08Add regression testOliver Schneider-0/+34
2018-03-08Rebase falloutOliver Schneider-1197/+22
2018-03-08Report tcx errors with the span of the currently evaluating statementOliver Schneider-65/+41
2018-03-08Report a best guess span if no stack is available anymoreOliver Schneider-8/+19
2018-03-08Update compile-fail testsOliver Schneider-89/+24
2018-03-08Add a test for transmuting via unions in constantsOliver Schneider-0/+62
2018-03-08TypoOliver Schneider-1/+1
2018-03-08Unregress error spans in constant errorsOliver Schneider-20/+26
2018-03-08Stage 2 doesn't see suggestion_approximateOliver Schneider-16/+0
2018-03-08Remove dead codeOliver Schneider-5/+37
2018-03-08Add some documentation to pattern/const conversionsOliver Schneider-2/+12
2018-03-08Reduce code duplicationOliver Schneider-66/+32
2018-03-08Tidy fixOliver Schneider-7/+6
2018-03-08Const eval error refactoringOliver Schneider-84/+109
2018-03-08Add stack traces to miri errorsOliver Schneider-28/+43
2018-03-08Update testsOliver Schneider-27/+31
2018-03-08Report all errors other than those about insufficient type informationOliver Schneider-2/+4
2018-03-08Compute the ParamEnv only once and use it to call tcx.const_evalOliver Schneider-17/+35
2018-03-08Add regression test for const propOliver Schneider-0/+28
2018-03-08Can only const prop temporariesOliver Schneider-1/+6
Variables might error in branches that are not reachable due to the variable value.
2018-03-08Update testsOliver Schneider-0/+24
2018-03-08Simplify const propagator by removing unused code pathsOliver Schneider-71/+52
2018-03-08Rename OptimizationFinder and don't propagate any borrowsOliver Schneider-38/+12
2018-03-08Simplify const prop checks through PlaceContextOliver Schneider-54/+52
2018-03-08Move the resource limits to the session in preparation for attributes ↵Oliver Schneider-33/+22
configuring them
2018-03-08Figure out const propgatable locals in a single passOliver Schneider-28/+31