Commit Graph

115 Commits

Author SHA1 Message Date
Nick Cameron
63ac2aae51 Fix tests and assertions; add some comments 2018-10-26 09:50:51 +13:00
Niko Matsakis
0afccbb654 fix incremental test 2018-10-22 10:04:47 -04:00
David Wood
43b5d725d0
Improve implicit self mutability suggestions.
This commit adds an `ImplicitSelfKind` to the HIR and the MIR that keeps
track of whether a implicit self argument is immutable by-value, mutable
by-value, immutable reference or mutable reference so that the addition
of the `mut` keyword can be suggested for the immutable by-value case.
2018-10-02 00:35:15 +02:00
Niko Matsakis
f95f23f0c3 fix incremental test
We are now carrying the user-given type through MIR, so it makes sense
that this would change the hash.
2018-09-10 17:24:43 -04:00
Oliver Schneider
9b1bd94e37 Add existential type definitons 2018-06-07 17:33:53 +02:00
Guillaume Gomez
812656dc95 Rename must-compile-successfully into compile-pass 2018-04-13 23:28:03 +02:00
Taylor Cramer
0f5b52e4a8 Stabilize conservative_impl_trait 2018-03-26 10:43:03 +02:00
David Wood
3a0162b7cb
Fixed issues with incremental tests. 2018-03-23 14:04:08 +00:00
kennytm
92d1f8d8e4
Stabilize inclusive_range_syntax language feature.
Stabilize the syntax `a..=b` and `..=b`.
2018-03-15 16:58:02 +08:00
Eduard-Mihai Burtescu
6e5dacbd5e rustc_mir: always run the deaggregator. 2018-02-20 02:50:26 +02:00
bobtwinkles
85dfa9d1a3 Fix tests for MIR loop lowering
Fixes the hash test to recognize that MirValidated can change when changing
around labels, and add a new test that makes sure we're lowering loop statements
correctly.
2018-02-07 20:00:54 -05:00
Eduard-Mihai Burtescu
6f8d263e87 tests: replace "lvalue" terminology with "place". 2018-01-29 11:48:12 +02:00
kennytm
470a8e1a97
Remove excessive trailing newlines. 2017-12-30 15:50:52 +08:00
Michael Woerister
c5dd9f5301 incr.comp.: Hash spans unconditionally for full accuracy. 2017-12-08 10:02:26 +01:00
Jeff Crocker
3f0cc7caca
Format function interface fingerprint hash tests 2017-12-05 15:27:14 -08:00
Jeff Crocker
104ebd2c43
Update 'while loop' fingerprint hash tests 2017-12-05 15:01:49 -08:00
Jeff Crocker
b8714c6040
Update 'while let loop' fingerprint hash tests 2017-12-05 14:57:35 -08:00
Jeff Crocker
3f48cbb455
Update loop expression fingerprint hash tests 2017-12-05 14:50:54 -08:00
Jeff Crocker
820ed30a85
Update inline asm fingerprint hash tests 2017-12-05 14:44:52 -08:00
Jeff Crocker
bc1754216d
Update function interface fingerprint hash tests 2017-12-05 14:40:13 -08:00
Jeff Crocker
bf3246fa10
Update for loop fingerprint hash tests 2017-12-05 14:13:58 -08:00
Jeff Crocker
77aee18c13
Update closure expression fingerprint hash tests 2017-12-05 14:03:24 -08:00
Michael Woerister
7ebccbb7a4 incr.comp.: Update test cases after metadata hashing removal. 2017-11-29 16:29:13 +01:00
Niko Matsakis
d3e0c33dbe modify inherent impls test to indicate TypeckTables do not change
I also added some comments explaining what is going on. In short, the
changes in question do not, in fact, affect the`TypeckTables` in any
semantic way. However, altering the order of lowering can cause it
appear to affect the `TypeckTables`: if we lower generics before the
body, then the `HirId` for things in the body will be affected. In
this case, we are now lowering the generics etc
*after* the body, so the hash no longer changes. This seems good.
2017-11-22 12:44:10 -05:00
kennytm
c0c3cc4d3d Rollup merge of #45987 - gaurikholkar:let-expr, r=michaelwoerister
update let-expressions hash test to use `except`

A part of #44924, this PR updated let-expressions test using `except`.

cc @michaelwoerister
r? @nikomatsakis
2017-11-22 01:12:56 +08:00
Guillaume Gomez
387fa844bb Rollup merge of #45951 - CrockAgile:master, r=michaelwoerister
incr: Update hash tests to use `except`-style checking

Part of #44924

r? @michaelwoerister
2017-11-16 10:05:02 +01:00
Jeff Crocker
d1a83c6bd2
Remove checked arithmetic from if expression hash tests 2017-11-14 12:12:04 -08:00
Guillaume Gomez
d0b11b9bd1 Rollup merge of #45950 - fitzgen:update-unary-and-binary-exprs-test-to-use-incr-except, r=michaelwoerister
incr: Make `unary_and_binary_exprs.rs` use `except`-style incremental checking

Part of #44924

r? @michaelwoerister
2017-11-14 16:52:10 +01:00
gaurikholkar
ef275d1c10 update let-expressions to use except 2017-11-14 21:01:08 +05:30
gaurikholkar
39f468e668 fixing indentation 2017-11-13 20:19:54 +05:30
Jeff Crocker
642468858f
Updated exported incremental compilation hash tests 2017-11-12 16:24:41 -08:00
Jeff Crocker
44528cb7be
Fix indexing expressions test copy/paste docs 2017-11-12 16:20:22 -08:00
Jeff Crocker
b30b442ce1
Update if-expressions incremental hash tests 2017-11-12 16:13:42 -08:00
Nick Fitzgerald
c9c7d9f57a incr: Make unary_and_binary_exprs.rs use except-style incremental checking
Part of #44924
2017-11-12 16:12:29 -08:00
Jeff Crocker
e9e876d92e
Update panic expressions w/o overflow checks tests 2017-11-12 15:48:43 -08:00
Jeff Crocker
59592b11b7
Update panic expression incremental tests 2017-11-12 14:57:43 -08:00
gaurikholkar
f345b3c652 tidy fixes 2017-11-12 20:29:32 +05:30
gaurikholkar
1846addf04 update match-expressions.rs 2017-11-12 15:56:19 +05:30
bors
da3fbe750f Auto merge of #45867 - michaelwoerister:check-ich-stability, r=nikomatsakis
incr.comp.: Verify stability of incr. comp. hashes and clean up various other things.

The main contribution of this PR is that it adds the `-Z incremental-verify-ich` functionality. Normally, when the red-green tracking system determines that a certain query result has not changed, it does not re-compute the incr. comp. hash (ICH) for that query result because that hash is already known. `-Z incremental-verify-ich` tells the compiler to re-hash the query result and compare the new hash against the cached hash. This is a rather thorough way of
- testing hashing implementation stability,
- finding missing `[input]` annotations on `DepNodes`, and
- finding missing read-edges,

since both a missed read and a missing `[input]` annotation can lead to something being marked as green instead of red and thus will have a different hash than it should have.

Case in point, implementing this verification logic and activating it for all `src/test/incremental` tests has revealed several such oversights, all of which are fixed in this PR.

r? @nikomatsakis
2017-11-08 22:27:06 +00:00
Michael Woerister
a1364cd0db incr.comp.: Acknowledge the fact that shift operations can panic at runtime. 2017-11-07 15:49:51 +01:00
Michael Woerister
cedae73c8c Fix incremental tests after change to instantiation strategy. 2017-11-07 08:54:38 +01:00
leonardo.yvens
06506bb751 [Syntax Breaking] Rename DefaultImpl to AutoImpl
DefaultImpl is a highly confusing name for what we now call auto impls,
as in `impl Send for ..`. The name auto impl is not formally decided
but for sanity anything is better than `DefaultImpl` which refers
neither to `default impl` nor to `impl Default`.
2017-11-03 16:13:20 -02:00
Michael Woerister
10ffff8bc6 incr.comp.: Update overflow-check logic in HIR hashing. 2017-10-26 16:23:31 +02:00
Niko Matsakis
4b0f004e3d update inherent_impls tests
Now that we are visiting things in a different order during lowering,
adding parameters winds up affecting the HirIds assigned to thinks in
the method body, whereas it didn't before. We could fix this by
reordering the order in which we visit `generics` during lowering, but
this feels very fragile. Seems better to just let typeck tables be
dirty here.
2017-10-23 16:18:00 -04:00
bors
2aeff0f1b3 Auto merge of #45104 - vitiral:incr_auto_assert2, r=michaelwoerister
Incremental compilation auto assert (with except)

cc @michaelwoerister

bors merged part 1, so this is a WIP of part 2 of #45009  -- auto asserting DepNodes depending on the type of node rustc_clean/dirty is attached to

Framework:
- [x] finish auto-detection for specified DepNodes
- [x] finish auto-detection for remaining DepNodes

Test Refactors:
- [x] consts.rs
- [x] enum_constructors.rs
- [x] extern_mods.rs
- [x] inherent_impls.rs
- [x] statics.rs
- [x] struct_constructors.rs
- ~~**BLOCKED** trait_defs.rs, see FIXME~~
- ~~**BLOCKED** trait_impls.rs~~
- [x] type_defs.rs
- [x] enum_defs.rs
2017-10-14 04:11:49 +00:00
Garrett Berg
80c13ce134 fix review comments 2017-10-13 10:15:03 -06:00
Garrett Berg
f7fe970400 incr comp: rustc_clean/dirty auto assert
This adds auto-assertion to `rustc_clean/dirty` and also implements
more comprehensive testing for

 - src/test/incremental/hashes/enum_constructors.rs
 - src/test/incremental/hashes/enum_defs.rs
 - src/test/incremental/hashes/extern_mods.rs
 - src/test/incremental/hashes/inherent_impls.rs
 - src/test/incremental/hashes/statics.rs
 - src/test/incremental/hashes/struct_constructors.rs
 - src/test/incremental/hashes/type_defs.rs

trait_defs.rs and trait_impl.rs are blocked on a hard to triage
compiler ICE (at least hard for a newbie like me) having to do
with some DepNodes not getting computed for traits.
A FIXME has been added in the source to reflect this continued
work.
2017-10-12 22:32:45 -06:00
gaurikholkar
29b576e15b Update let-expressions.rs 2017-10-09 23:32:21 +05:30
Garrett Berg
c5c3614c18 related to #44924: update incr compilation for struct_defs.rs 2017-10-03 11:03:57 -06:00
bors
0e6f4cf51c Auto merge of #44709 - Badel2:inclusive-range-dotdoteq, r=petrochenkov
Initial support for `..=` syntax

#28237

This PR adds `..=` as a synonym for `...` in patterns and expressions.
Since `...` in expressions was never stable, we now issue a warning.

cc @durka
r? @aturon
2017-09-27 16:04:31 +00:00