about summary refs log tree commit diff
path: root/src/test/ui/async-await/issues
AgeCommit message (Collapse)AuthorLines
2020-11-02Add "this has type `{}` which {}" noteYuki Okushi-0/+5
2020-11-02Address some code reviewsYuki Okushi-7/+2
2020-11-02Separate complex multispan into some notesYuki Okushi-4/+11
2020-10-17Make it more clear when complaining about async fn's return typesGus Wynn-2/+4
2020-09-26Call `type_of` for opaque types later in compilationMatthew Jasper-1/+1
This ensures that various wf checks have already been done before we typeck item bodies.
2020-09-25Move from {{closure}}#0 syntax to {closure#0} for (def) path componentsmarmeladema-2/+2
2020-09-02pretty: trim paths of unique symbolsDan Aloni-13/+13
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-08Be consistent when describing a move as a 'partial' in diagnosticsAaron Hill-4/+4
When an error occurs due to a partial move, we would use the world "partial" in some parts of the error message, but not in others. This commit ensures that we use the word 'partial' in either all or none of the diagnostic messages. Additionally, we no longer describe a move out of a `Box` via `*` as a 'partial move'. This was a pre-existing issue, but became more noticable when the word 'partial' is used in more places.
2020-07-22Further tweak wording of E0759 and introduce E0767Esteban Küber-2/+2
2020-07-01expand: Stop using nonterminals for passing tokens to attribute and derive ↵Vadim Petrochenkov-3/+3
macros
2020-06-25Adds a clearer message for when the async keyword is missing from a functionNell Shamrell-2/+3
Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
2020-06-15Change E0758 to E0759 to avoid conflict with #72912Esteban Küber-2/+2
2020-06-15small tweaksEsteban Küber-5/+1
2020-06-15Register new eror codeEsteban Küber-0/+1
2020-06-15Use note for requirement source spanEsteban Küber-1/+5
2020-06-15review comments: wordingEsteban Küber-1/+1
2020-06-15Tweak wording and add error codeEsteban Küber-3/+3
2020-06-15Reduce verbosity of suggestion message and mention lifetime in labelEsteban Küber-1/+1
2020-05-30Tweak wording and spans of `'static` `dyn Trait`/`impl Trait` requirementsEsteban Küber-8/+5
2020-05-30review comment: tweak wording and account for span overlapEsteban Küber-1/+1
2020-05-30Account for returned `dyn Trait` evaluating to `'static` lifetimeEsteban Küber-1/+1
Provide a suggestion for `dyn Trait + '_` when possible.
2020-04-28Rollup merge of #71340 - Valloric:more-check-pass, r=nikomatsakisDylan DPC-4/+4
Moving more build-pass tests to check-pass One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277 --- <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/rust-lang/rust/71340) <!-- Reviewable:end -->
2020-04-23Moving more build-pass tests to check-passVal Markovic-4/+4
One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277
2020-04-22Tweak wordingEsteban Küber-1/+1
2020-04-22Tweak `'static` suggestion codeEsteban Küber-1/+5
Fix #71196.
2020-04-19Do not show DefId in diagnosticsYuki Okushi-2/+24
2020-04-17Avoid emitting stderr for nowYuki Okushi-24/+2
2020-04-17Add test for issue-67893Yuki Okushi-0/+45
2020-04-16Auto merge of #70831 - sfackler:shrink-future-stack, r=matthewjasperbors-4/+1
Remove a stack frame from .await calls The stack frames when `.await`ing one async fn from another currently look like this: ``` 12: foo::b::{{closure}} at src/main.rs:2 13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:66 14: core::future::poll_with_context at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:84 15: foo::a::{{closure}} at src/main.rs:6 ``` Since the move away from using TLS to pass the Context around, it's now easy to remove frame 14 by removing poll_with_context in favor of calling Future::poll directly. This still leaves the `GenFuture` frame, but that seems significantly harder to deal with. It also improves diagnostics a bit since they no longer talk about the private poll_with_context function.
2020-04-13Incorporate feedback into diagnosticsTyler Mandry-1/+1
2020-04-13Improve span labelTyler Mandry-1/+1
2020-04-11rustc: Add a warning count upon completionRoccoDev-0/+2
2020-04-10Rollup merge of #69745 - estebank:predicate-obligations-3, r=nikomatsakis,eddybMazdak Farrokhzad-1/+1
Use `PredicateObligation`s instead of `Predicate`s Keep more information about trait binding failures. Use more specific spans by pointing at bindings that introduce obligations. Subset of #69709. r? @eddyb
2020-04-09Rollup merge of #70367 - nikomatsakis:issue-69307, r=Aaron1011Mazdak Farrokhzad-0/+53
save/restore `pessimistic_yield` when entering bodies This flag is used to make the execution order around `+=` operators pessimistic. Failure to save/restore the flag was causing independent async blocks to effect one another, leading to strange ICEs and failed assumptions. Fixes #69307 r? @Zoxc
2020-04-08Small tweaks to required bound spanEsteban Küber-1/+1
2020-04-06add nested regression testNiko Matsakis-0/+30
2020-04-05Remove a stack frame from .await callsSteven Fackler-4/+1
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-10/+6
2020-03-24save/restore `pessimistic_yield` when entering bodiesNiko Matsakis-0/+23
This flag is used to make the execution order around `+=` operators pessimistic. Failure to save/restore the flag was causing independent async blocks to effect one another, leading to strange ICEs and failed assumptions.
2020-03-23Update testsJohn Kåre Alsaker-32/+12
2020-03-17Make async/await lowering use resume argumentsJonas Schievink-2/+2
2020-03-12update testsMark Mansi-4/+4
2020-02-22update some testsMark Mansi-4/+4
2020-02-14Update testsMatthew Jasper-10/+1
2020-02-06Rollup merge of #68524 - jonas-schievink:generator-resume-arguments, r=ZoxcDylan DPC-3/+3
Generator Resume Arguments cc https://github.com/rust-lang/rust/issues/43122 and https://github.com/rust-lang/rust/issues/56974 Blockers: * [x] Fix miscompilation when resume argument is live across a yield point (https://github.com/rust-lang/rust/pull/68524#issuecomment-578459069) * [x] Fix 10% compile time regression in `await-call-tree` benchmarks (https://github.com/rust-lang/rust/pull/68524#issuecomment-578487162) * [x] Fix remaining 1-3% regression (https://github.com/rust-lang/rust/pull/68524#issuecomment-579566255) - resolved (https://github.com/rust-lang/rust/pull/68524#issuecomment-581144901) * [x] Make dropck rules account for resume arguments (https://github.com/rust-lang/rust/pull/68524#issuecomment-578541137) Follow-up work: * Change async/await desugaring to make use of this feature * Rewrite [`box_region.rs`](https://github.com/rust-lang/rust/blob/3d8778d767f0dde6fe2bc9459f21ead8e124d8cb/src/librustc_data_structures/box_region.rs) to use resume arguments (this shows up in profiles too)
2020-02-05Fix testEsteban Küber-0/+2
2020-02-05Account for `fn()` types in lifetime suggestionsEsteban Küber-5/+3
2020-02-05Use spans for input borrowed types unrelated to return typeEsteban Küber-1/+5
2020-02-02Add a resume type parameter to `Generator`Jonas Schievink-3/+3
2020-01-25Auto merge of #68269 - csmoe:temp, r=estebankbors-0/+42
Suggest to shorten temporary borrow from raw pointer Closes https://github.com/rust-lang/rust/issues/65436 r? @estebank cc @tmandry