about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2017-12-13Updating tests to remove all "undeclared lifetime" errors (since those ↵Sunjay Varma-33/+12
should no longer occur)
2017-12-12Auto merge of #46570 - AgustinCB:issue-46553, r=oli-obkbors-2/+32
Ignore `unsopported constant expr` error Fixes #46553
2017-12-12Auto merge of #46598 - davidtwco:issue-46471, r=arielb1bors-46/+205
MIR borrowck: error message confuses locals and temporaries Fixes #46471 and fixes #46472 (see [this Gitter comment](https://gitter.im/rust-impl-period/WG-compiler-nll?at=5a2d5cb53ae2aa6b3facf0c2)). r? @arielb1
2017-12-12Auto merge of #46657 - nikomatsakis:resolve-lifetimes-query, r=arielb1bors-48/+38
move `resolve_lifetimes` into a proper query Now that we made `resolve_lifetimes` into a query, elision errors no longer abort compilation, which affects some tests. Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in the dep-graph, though red-green handles it. The same scenario is (correctly) tested by issue-42602.rs in any case. r? @michaelwoerister
2017-12-11Updated existing tests with new error messages.David Wood-46/+57
2017-12-11Auto merge of #46608 - estebank:resolve-return, r=nikomatsakisbors-5/+48
Resolve type on return type suggestion Partially address #45871.
2017-12-11Fixed case where borrowed value lives until after scopeDavid Wood-0/+45
2017-12-11Added test for #46472David Wood-0/+59
2017-12-11Added test for #46471David Wood-0/+44
2017-12-11Auto merge of #46558 - arielb1:union-borrow-refactor, r=nikomatsakisbors-8/+19
Clean up the MIR borrowck code I want to avoid the new code to start with so much technical debt. r? @nikomatsakis
2017-12-11move `resolve_lifetimes` into a proper queryNiko Matsakis-48/+38
Now that we made `resolve_lifetimes` into a query, elision errors no longer abort compilation, which affects some tests. Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in the dep-graph, though red-green handles it. The same scenario is (correctly) tested by issue-42602.rs in any case.
2017-12-11Auto merge of #46640 - tommyip:ui_tests, r=estebankbors-192/+236
Enforce successful ui tests to have must-compile-successfully flag. r? @nikomatsakis cc @oli-obk Fixes #46587
2017-12-10Auto merge of #46248 - ↵bors-4/+55
zackmdavis:one_time_private_enum_variant_reexport_error, r=estebank one-time diagnostics for private enum variants glob reëxport ![private_enum_reexport](https://user-images.githubusercontent.com/1076988/33224719-4e5805f0-d121-11e7-8bc0-a708a277a5db.png) r? @estebank
2017-12-10Update ui tests' line numbers.Tommy Ip-192/+192
2017-12-10Add must-compile-successfully comment to appropriate ui tests.Tommy Ip-0/+44
2017-12-10centralize `does_not_live_long_enough` error reportingAriel Ben-Yehuda-4/+8
2017-12-10use `places_conflict` to handle reassignmentAriel Ben-Yehuda-4/+11
This fixes the handling of reassignment of struct fields.
2017-12-10Auto merge of #46611 - GuillaumeGomez:type-mismatch, r=petrochenkovbors-0/+25
Fix switched types in type mismatch Fixes #46609.
2017-12-09one-time diagnostic and suggestion for reëxporting private variant errorZack M. Davis-4/+55
We issue just one message for an erroneous glob private variant reëxport (using the Session's one-time-diagnostics capability), but individual (non-glob) such erroneous reëxports still get their own messages. The suggestion to make the enum public is also one-time. The enum variant reëxport error didn't have an associated error code (and remedying this here is deemed out of the scope of this commit), so we resort to the expediency of using 0 as the `DiagnosticMessageId` value. Adding Debug to NameResolution was helpful in development. This resolves #46209.
2017-12-10Fix switched types in type mismatchGuillaume Gomez-0/+25
2017-12-09Resolve type on return type suggestionEsteban Küber-5/+48
2017-12-09Auto merge of #46572 - vramana:fix-45638, r=estebankbors-2/+13
Fix bad error message for cannot_reborrow_already_uniquely_borrowed
2017-12-09Auto merge of #46573 - jseyfried:add_decl_macro_test, r=nrcbors-0/+25
macros: add test for #44128 Closes #44128. r? @nrc
2017-12-08Fix bad error message for cannot_reborrow_already_uniquely_borrowedRamana Venkata-2/+13
Fixes #45638
2017-12-08Auto merge of #46556 - michaelwoerister:enable-query-caching, r=nmatsakisbors-773/+131
incr.comp.: Enable query result caching for many more queries Newly cached queries are: * const_is_rvalue_promotable_to_static * trans_fulfill_obligation * optimized_mir * unsafety_check_result * borrowck * mir_borrowck * mir_const_qualif * contains_extern_indicator * def_symbol_name * symbol_name This also includes the stricter `Span` hashing first mentioned in #46490, which will lead to more false positives in release builds but overall is more correct -- and necessary for caching MIR. Hopefully we will soon be able to reduce the rate of false positives again by factoring `Span` out of MIR. r? @nikomatsakis
2017-12-08Remove some svh-tests from run-pass.Michael Woerister-336/+1
These were already broken for debug builds.
2017-12-08incr.comp.: Hash spans unconditionally for full accuracy.Michael Woerister-437/+130
2017-12-08Auto merge of #46549 - alexcrichton:thinlto-weak, r=michaelwoeristerbors-0/+37
rustc: Further tweak linkage in ThinLTO In #46382 the logic around linkage preservation with ThinLTO ws tweaked but the loop that registered all otherwise exported GUID values as "don't internalize me please" was erroneously too conservative and only asking "external" linkage items to not be internalized. Instead we actually want the inversion of that condition, everything *without* "local" linkage to be internalized. This commit updates the condition there, adds a test, and... Closes #46543
2017-12-08deny instead of warnAgustin Chiappe Berrini-1/+1
2017-12-07Add test for #44128.Jeffrey Seyfried-0/+25
2017-12-07Auto merge of #46497 - AgustinCB:issue-46311, r=petrochenkovbors-9/+20
Modify message for keyword as identifier name This is a temporary solution to #46311. The message is generic enough to cover both cases and is probably a fine enough solution to the specific problem described in the task. However, the underlying reason for this to be wrong is that `next_token_inner` returns `Lifetime` even if the token is a label. That's not simple, as the syntax for both can be quite similar and it may need to take a look to the next token to make a decision. I'm not sure I have enough knowledge about the project to be able to solve that (yet!), so I thought I'll fix the immediate problem first.
2017-12-07Ignore `unsopported constant expr` errorAgustin Chiappe Berrini-2/+32
2017-12-07Auto merge of #46532 - est31:master, r=est31bors-69/+4528
Allow feature-gate tests to live in ui/ and migrate most of the tests from compile-fail The PR consists of three commits: 1. change tidy to allow feature-gate tests to live in ui/ 2. migrate some feature gate tests to ui/ with renaming only 3. migrate some feature gate tests to ui/ with also removing `// gate-test-...` lines and renaming them to the standard `feature-gate-<feat-name>.rs` format.
2017-12-07Auto merge of #46509 - nikomatsakis:nll-master-to-rust-master-3, r=arielb1bors-74/+1581
closure handling for NLL This branch overhauls how we handle closures and universally quantified regions in the NLL code. The goal is to lay the groundwork for "region erasure" by the HIR-based type checker, as well as to avoid "crazy hacks" when it comes to closures. This means that when we type-check a closure, we cannot make use of *any* of the precise values of free regions in its signature, since those are inferred by the HIR type-checker. Therefore, the new code handles closures by: - Creating fresh regions for every free region that appears in the closure's type, which now includes both its signature and the types of all upvars. - This means that the closure is type-checked without knowing about the connections. - When we encounter some region relationship that we can't locally verify, we propagate it to the closure's creator. - During MIR typeck, the closure creators then validates those relationships. For a good example and explanation, see e.g. the test `src/test/nll/closure-requirements/propagate-despite-same-free-region.rs`. Upcoming changes in the next NLL PR (not included in this PR in order to keep it manageable): - Improvements to the MIR type checker so that it handles a lot of stuff presently overlooked - Refactor how we store region values to make it more efficient, better encapsulated - Propagate "type-outlives" relationships like `T: 'a` in a similar fashion to the one covered in this PR (still in the works, but close) - Improvements to error reporting (still in the works) r? @arielb1 or @pnkfelix
2017-12-07rustc: Further tweak linkage in ThinLTOAlex Crichton-0/+37
In #46382 the logic around linkage preservation with ThinLTO ws tweaked but the loop that registered all otherwise exported GUID values as "don't internalize me please" was erroneously too conservative and only asking "external" linkage items to not be internalized. Instead we actually want the inversion of that condition, everything *without* "local" linkage to be internalized. This commit updates the condition there, adds a test, and... Closes #46543
2017-12-07Auto merge of #46523 - CrockAgile:update-fingerprint-tests-macros, ↵bors-404/+320
r=michaelwoerister Update fingerprint tests macros Part of #44924 r? @michaelwoerister
2017-12-07add test comparing free region to bound regionNiko Matsakis-0/+128
suggested by arielb1
2017-12-07use `-Znll -Zborrowck=mir -Zverbose` consistentlyNiko Matsakis-28/+9
2017-12-07region-ebr-does-not-outlive-static: reuse old test insteadNiko Matsakis-43/+13
2017-12-07propagate-approximated-ref: include FIXME commentNiko Matsakis-1/+1
2017-12-07test more failure cases for approximating the "longer" sideNiko Matsakis-48/+157
as suggested by arielb1
2017-12-07test approximations of the "shorter side" that resort to `'static`Niko Matsakis-18/+113
This includes the additional case suggested by arielb1.
2017-12-07delete stray fileNiko Matsakis-87/+0
2017-12-07escape-upvar-ref: patch comment per arielb1Niko Matsakis-14/+21
2017-12-07escape-upvar-nested: patch "dangling reference" to renamed testNiko Matsakis-1/+1
2017-12-07escape-argument: improve comment per arielb1's suggestionNiko Matsakis-14/+16
2017-12-07escape-argument-callee: improve comment per arielb1's suggestionsNiko Matsakis-18/+23
2017-12-07don't print self symbol's internal index unless gensymedNiko Matsakis-9/+9
It's just not useful. It also makes it hard to have tests that probe internal state, since the interning number is very sensitive. Dumping the number in the case of gensym is not ideal but will do for now.
2017-12-07add closure requirement tests, improve debugging outputNiko Matsakis-71/+1368
The overall format is now easier to read. Also, There is now graphviz output, as well as a `#[rustc_regions]` annotation that dumps internal state.
2017-12-07Migrate even more feature gate tests to uiest31-71/+1012
We also rename some of the files to conform to the feature-gate-<feat_name>.rs pattern that is most common.