summary refs log tree commit diff
path: root/src/test/ui/generator
AgeCommit message (Collapse)AuthorLines
2020-01-27Make pointers to statics internalMatthew Jasper-0/+29
2019-12-08async/await: more improvements to non-send errorsDavid Wood-5/+12
Signed-off-by: David Wood <david@davidtw.co>
2019-11-26Record temporary static references in generator witnessesMatthew Jasper-0/+16
2019-11-18Surround types with backticks in type errorsEsteban Küber-1/+1
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-1/+1
2019-11-04Use check-pass in ui tests where appropriateTomasz Miąsko-2/+2
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-3/+3
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-3/+5
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-5/+3
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichtonbors-3/+5
Upgrade Emscripten targets to use upstream LLVM backend - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-3/+5
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-10-02Calculate liveness for the same locals with and without -ZpoloniusMatthew Jasper-20/+0
This fixes some test differences and also avoids overflow in issue-38591.rs.
2019-09-27lowering: don't .abort_if_errors()Mazdak Farrokhzad-1/+15
2019-09-22On obligation errors point at the unfulfilled binding when possibleEsteban Küber-3/+3
2019-09-19When possible point at argument causing item obligation failureEsteban Küber-2/+2
2019-09-16Tweak unsatisfied HRTB errorsEsteban Küber-6/+12
2019-09-06Fixed grammar/style in error messages and reblessed tests.Alexander Regueiro-9/+9
2019-08-31Use span label instead of note for cause in E0631Esteban Küber-16/+9
2019-08-27Changing error messages and renaming tests #63127Kevin Per-1/+1
`async-await/no-args-non-move-async-closure` `generator/no-arguments-on-generators`
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-2/+2
2019-08-20Remove async_await gates from tests.Mazdak Farrokhzad-2/+1
2019-08-14move test that shouldn't be in test/run-pass/Mazdak Farrokhzad-0/+19
2019-08-06Rollup merge of #63230 - tmandry:disallow-possibly-uninitialized, r=CentrilMazdak Farrokhzad-0/+67
Make use of possibly uninitialized data [E0381] a hard error This is one of the behaviors we no longer allow in NLL. Since it can lead to undefined behavior, I think it's definitely worth making it a hard error without waiting to turn off migration mode (#58781). Closes #60450. My ulterior motive here is making it impossible to leave variables partially initialized across a yield (see #60889, discussion at #63035), so tests are included for that. cc #54987 --- I'm not sure if bypassing the buffer is a good way of doing this. We could also make a `force_errors_buffer` or similar that gets recombined with all the errors as they are emitted. But this is simpler and seems fine to me. r? @Centril cc @cramertj @nikomatsakis @pnkfelix @RalfJung
2019-08-05Make use of possibly uninitialized data a hard errorTyler Mandry-0/+67
This is one of the behaviors we no longer allow in NLL. Since it can lead to undefined behavior, I think it's definitely worth making it a hard error without waiting to turn off migration mode (#58781). Closes #60450. My ulterior motive here is making it impossible to leave variables partially initialized across a yield (see discussion at #63035), so tests are included for that.
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+1109
2019-07-22Bless output of test generator/ref-escapes-but-not-over-yield.rs for Poloniuslqd-0/+20
2019-07-17Test case for #62506.Giles Cope-0/+18
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-2/+2
2019-06-25Use `as_temp` to evaluate statement expressionsMatthew Jasper-0/+32
2019-05-24Move async/await tests to test/ui/async-awaitvarkor-30/+0
2019-05-12Remove feature(nll) when compare mode is sufficientMatthew Jasper-9/+3
2019-05-12Change compare mode to use -Zborrowck=mirMatthew Jasper-0/+41
2019-05-07Auto merge of #60586 - cramertj:await, r=oli-obkbors-12/+12
Implement built-in await syntax Adds support for .await under the existing async_await feature gate. Moves macro-like await! syntax to the await_macro feature gate. Removes support for `await` as a non-keyword under the `async_await` feature. This new syntax is not final, but is the consensus solution proposed by the lang team, as explained in https://boats.gitlab.io/blog/post/await-decision/ Fix https://github.com/rust-lang/rust/issues/51719 Fix https://github.com/rust-lang/rust/issues/51751 Fix https://github.com/rust-lang/rust/issues/60016
2019-05-07Implement built-in await syntaxTaylor Cramer-12/+12
Adds support for .await under the existing async_await feature gate. Moves macro-like await! syntax to the await_macro feature gate. Removes support for `await` as a non-keyword under the `async_await` feature.
2019-05-07Trust signature over return expr for generators.David Wood-21/+10
This commit extends the logic used to determine what the expected signature of a closure is so that it can also determine the expected signature of a generator. This improves a diagnostic where the fn signature was blamed instead of the generator body. It doesn't fix fix the diagnostic for `async fn`.
2019-05-06Add test for current behaviour.David Wood-0/+40
This commit adds a test for the current behaviour of signature deduction of generators when there is a type mismatch between the return type of the function body and the signature.
2019-05-03Update testsChristopher Vittal-31/+9
2019-04-25Auto merge of #59111 - gilescope:generator-better-errors, r=nikomatsakisbors-0/+30
Improved error message when type must be bound due to generator. Fixes #58930. Keen to get some feedback - is this as minimal as we can get it or is there an existing visitor I could repurpose?
2019-04-25Improved error message when type must be bound due to generator.Giles Cope-0/+30
Error now mentions type var name and span is highlighted.
2019-04-22Remove double trailing newlinesvarkor-2/+0
2019-04-22update tests for migrate mode by defaultMatthew Jasper-172/+48
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-7/+2
2019-03-13Rollup merge of #59132 - nikomatsakis:issue-53548-generator-bound, r=pnkfelixMazdak Farrokhzad-0/+59
ignore higher-ranked object bound conditions created by WF In the `issue-53548` test added in this PR, the `Box<dyn Trait>` type is expanded to `Box<dyn Trait + 'static>`, but the generator "witness" that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was encountering an ICE (when debug-assertions were enabled) and an unexpected compilation error (without debug-asserions) when trying to process this `'r` region bound. In particular, to be WF, the region bound must meet the requirements of the trait, and hence we got `for<'r> { 'r: 'static }`. This would ICE because the `Binder` constructor we were using was assering that no higher-ranked regions were involved (because the WF code is supposed to skip those). The error (if debug-asserions were disabled) came because we obviously cannot prove that `'r: 'static` for any region `'r`. Pursuant with our "lazy WF" strategy for higher-ranked regions, the fix is not to require that `for<'r> { 'r: 'static }` holds (this is also analogous to what we would do for higher-ranked regions appearing within the trait in other positions). Fixes #53548 r? @pnkfelix
2019-03-12ignore higher-ranked WF requirements for trait objectsNiko Matsakis-0/+59
In the `issue-53548` test added in this commit, the `Box<dyn Trait>` type is expanded to `Box<dyn Trait + 'static>`, but the generator "witness" that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was encountering an ICE (when debug-assertions were enabled) and an unexpected compilation error (without debug-asserions) when trying to process this `'r` region bound. In particular, to be WF, the region bound must meet the requirements of the trait, and hence we got `for<'r> { 'r: 'static }`. This would ICE because the `Binder` constructor we were using was assering that no higher-ranked regions were involved (because the WF code is supposed to skip those). The error (if debug-asserions were disabled) came because we obviously cannot prove that `'r: 'static` for any region `'r`. Pursuant with our "lazy WF" strategy for higher-ranked regions, the fix is not to require that `for<'r> { 'r: 'static }` holds (this is also analogous to what we would do for higher-ranked regions appearing within the trait in other positions).
2019-03-11Update NLL testsVadim Petrochenkov-6/+6
2019-03-11Update testsVadim Petrochenkov-13/+13
2019-01-29Auto merge of #57901 - lqd:issue_57362, r=nikomatsakisbors-4/+4
Add information to higher-ranked lifetimes conflicts error messages Make these errors go through the new "placeholder error" code path, to have self tys displayed and make them hopefully less confusing. Should fix #57362. r? @nikomatsakis — so we can iterate on the specific wording you wanted.
2019-01-28Refer to synthetically named lifetimes as "some specific lifetime" rather ↵Rémy Rakic-2/+2
than "the specific lifetime"
2019-01-27Temporary workaround for travis diagnostic differenceWim Looman-4/+6
2019-01-27Mark static generators as !UnpinWim Looman-0/+28