Are we async
yet?
The long-awaited async
/await
syntax
has been stabilized in Rust 1.39.
You can use it with the active ecosystem of asynchronous I/O around
futures ,
mio ,
tokio , and
async-std .
async
syntax and blockers
`async`/`await` syntax
stabilized in 1.39
[in stable]
/
RFC 2394
/
#50547
Related issues under A-async-await
#82187 - Make async futures `Unpin` if they don't borrow anything across `.await`s
#81653 - Inconsistent move behavior in closure with async block
#80706 - ICE(stable): thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_middle/src/ty/instance.rs:434:85
#80658 - Note when opaque future from `async fn` is involved in a type mismatch is unclear
#79648 - Bad Error Message: error[E0277]: the trait bound `T: Generator<ResumeTy>` is not satisfied
#79024 - Tracking Issue for #![feature(async_stream)]
#78938 - Explain why borrows can't be held across yield point in async blocks/functions
#78840 - #[track_caller] does nothing on async fns
#78755 - Deduplicate code that finds the return type of a future
#78649 - error[E0391]: cycle detected when computing type of async fn
#78633 - Variables not always moved into `async move` block
#78543 - Bad diagnostic for Send bound on Future coming from async fn in foreign crate
#78402 - Improve diagnostics for impl Trait capturing lifetimes
#78337 - Incomprehensible type error when defining getter and setter
#78149 - #[must_use] on async fns works on returned `Future` instead of the awaited value
#77175 - False positive: single_use_lifetimes
#76938 - Superfluous errors for missing lifetime in async function argument
#76547 - async fn can't handle multiple lifetimes in a slice of slices
#76168 - ICE: cannot convert `RePlaceholder to a region vid
#75992 - Increasingly slow compilation as more levels of `async` are added in Rust 1.46
#74779 - Backtraces shouldn't show stack frames generated by the implementation of async-await
#74497 - Unclear lifetime error in closure producing a future
#74256 - E0623 highlights wrong parameter in async fn
#74115 - Confusing error message for `async move` in the 2015 edition
#73741 - Type error in `async` function causes spurious "type must be known in this context" error
#73737 - Typecheck error in body of async fn reported at point-of-use
#73524 - External backtraces for async tasks
#73522 - Debugger support for Rust async/await
#73417 - Extend `#[must_use]` to more types
#73002 - Clarify the behavior of std::task::Waker and Future::Poll
#72956 - Indexing via `index` method and `[idx]` sugar works differently in `async` blocks/functions
#72837 - Compiling simple (but long) code with lots of `async`/`await` takes hours
#72312 - Unhelpful compiler message when a reference is used inside of an await block
#72302 - Tracking Issue for feature `future_poll_fn`
#72247 - Stack space in async closures is not shared between branches in debug builds
#72117 - confusing diagnostic for incorrect type parameter on BoxFuture
#71723 - Async function leads to a "more general type" error
#71686 - Diagnostics request: suggest a closure with an async block when an async closure is encountered
#71671 - Why implementation of iterator is not generic enough in async context?
#71407 - Tracking issue for generator code quality
#71368 - Async execution can get lost during refactoring
#71244 - perf slowdown from #70831 (remove a stack frame from .await calls)
#71093 - [codegen] unnecessary panicking branch in `foo().await` (vs equivalent `FutureImpl.await`)
#71072 - rustc should suggest using async version of Mutex
#70922 - Tracking Issue for core::task::ready! macro
#70098 - no_mangle causes compilation errors with async-await on armv7-linux-androideabi and aarch64-linux-android targets
#69912 - Tracking Issue for the Wake trait
#69826 - Tracking Issue for Generator Memory Usage
#69785 - ICE in collect_and_partition_mono_items
#69781 - It is hard to see the return types of async functions
#69663 - Tracking issue for more precise generator captures
#69431 - Tracking Issue for async blocks in const fn
#68604 - E0700 does not point to where the captured lifetime is
#68543 - Unsized locals and async ICE
#68521 - "expected bound lifetime parameter, found concrete lifetime" when passing a 'static reference to a closure that returns a future
#68119 - Error message for closure with async block needs improvement
#68109 - rustc panics when compiling code that uses tokio's LocalSet
#67982 - Re-land "add IntoFuture trait and support for await"
#67644 - Tracking issue for `IntoFuture`
#66731 - More friendly error msg when await on NONE ASYNC fn/block or return a obj that implements deprecated Future
#66709 - std::future: Document that each Future (Stream, etc) must only be used by one task at a time
#66634 - Error in `async` function/block produces errors for valid unrelated expressions
#66481 - Context and Waker might be accidentally `Sync`
#66445 - Too many `type inside `async` object must be known in this context` errors
#66444 - Show the location of a type usage for trait bound failures
#66281 - Waker::will_wake() gets mostly defeated by executor optimizations
#66168 - async fn unmet lifetime constraints produce confusing diagnostics
#65978 - Symbols in optimized async programs are often not useful
#65677 - Document auto traits implemented by the return types of `async fn`
#65442 - impl Trait that does not capture generic argument
#65409 - Suggest as_mut to reborrow Pin when calling method
#64692 - No error for private type in public async fn
#64650 - Unhelpful error "one type is more general than the other" in async code
#64552 - Lifetime bounds in auto trait impls prevent trait from being implemented on generators
#64286 - EXPERIMENT: Make `async fn`, `.await`, `async move? {` legal on 2015
#63818 - Resolve unsound interaction between self-referential generators (incl. async fn) and noalias
#63768 - An async fn which isn't Send but which should be?
#63647 - inline attribute on async fn doesn't work properly
#63616 - Handle partial initialization correctly in generators
#63526 - Include type bindings on string representation of `impl Trait`
#63502 - Error "cannot infer type" when using '?' in async block + bad diagnostic
#63033 - Async fn does not compile if lifetime does not appear in bounds (sometimes)
#63032 - Lifetime is unnecessarily captured in nested functions returning impl trait via async
#62958 - Async fn doubles argument size
#62572 - Pretty-printing support for Rust generators
#62391 - Pin docs should mention pitfalls of generic code
#62386 - Invalid suggestion when attempting to call async closure
#62290 - Tracking issue for `#!feature(async_closure)]` (RFC 2394)
#62284 - Mutually recursive `async fn`s are hard to make `Send`
#61949 - Inherent async fn returning `Self` treats type's lifetime parameters as `'static`
#61335 - ICE when combining unsized locals and async
#60658 - Wrong Send constraint when using a trait with lifetime + associated type in async
#59971 - async/await: cannot move out of captured variable in an `Fn` closure
#59337 - async closures have concrete argument lifetimes
#59245 - Inconsistency in Send/Sync requirements for async/await
#59087 - Generator size: borrowed variables are assumed live across following yield points
#57478 - Dropped variables still included in generator type
#57017 - async/await: awaiting inside a match block captures borrow too eagerly
#51932 - Weird async/await error message around mutablility
#81907 - Suggest async_recursion crate when writing a recursive async fn
#81457 - Diagnostic involving the type of an async block refers to `generator`'s
#81000 - Regression: missing MIR for generic async fn across crates
#80998 - ICE in github build
#80004 - `async` and other Rust 2018+ keywords not recognized as so in Rustdoc highlighting
#79843 - "introduce a type parameter with a trait bound instead of using `impl Trait`" diagnostic is malformed for async fns where the previous parameter is a borrow
#79694 - Unclear compiler output for move async -> async move
#79146 - ICE with higher-order trait-bounds (`AsyncFnOnce` emulation)
#79144 - ICE with async + HRTB + Closures
#78654 - ICE: compiler/rustc_typeck/src/check/closure.rs:608:18: async fn generator return type not an inference variable
#78600 - Improve error message for "return type cannot contain a projection or `Self`..."
#78522 - Bad interaction of async functions with unused_lifetimes lint
#78366 - ICE when using Matching, Async and Indexing
#78125 - Severe memory leak in Rustc
#78115 - ICE: variable should be placed in scope earlier
#77880 - Unhelpful "cannot infer type" error for ? in async block with unclear Result Err type
#77628 - Compiler runs out of memory in nested async/await calls since 1.46
#77533 - rustdoc shows __arg0 for mutable parameter to async function
#77361 - `async` blocks in a const-context error on nightly, but not on stable
#77217 - False positive unused_lifetimes warning
#76609 - Unclear diagnostics for async callback that takes a reference
#76550 - Odd Lifetime error when compiling async fn with two non-static and one static reference
#76517 - rustdoc renames parameters with `mut` in async fn
#76011 - Suggest `async {}` for `async || {}`
#75977 - ICE assertion failed: self.is_struct() || self.is_union()
#75808 - Potential compiler memory leak in Nightly
#75785 - Lifetime error points to wrong reference in async fn return
#74961 - src\librustc_mir\transform\generator.rs:739:13: Broken MIR: generator contains type &rocket::http::Cookie in MIR, but typeck only knows about for...
#74906 - Async/.await and const-generics causes "Broken MIR:"
#74072 - Error message in async fn refers to lifetime `'1` without defining it
#74047 - ICE on improperly implemented TryFrom
#73914 - Broken MIR in async fn generation
#73541 - ICE "no enclosing breakable scope found" when using continue with a label in a macro in a different loop inside an async block
#73050 - ICE: src/librustc_typeck/check/generator_interior.rs:204: impossible case reached
#72992 - Tracking Issue for `poll_ready`
#72766 - Missing .await causes ICE / StableHasher: unexpected region '_#2r
#72685 - Impossible case reached: src/librustc_ty/needs_drop.rs:111
#72651 - ICE: Broken MIR
#72590 - Unhelpful error message for async method on invalid type
#72470 - LLVM error: "Instruction does not dominate all uses!" on Windows
#72454 - Simple async wrapper doubles the size of a future
#72426 - Compiler Error: 'rustc' panicked at 'Box<Any>' (w/ async closures)
#72095 - thread 'rustc' panicked at 'no label after fn', src/libcore/option.rs:1188:5
#71811 - rustc doesn't suggest missing .await before a `?`
#71222 - Tiny difference of the diagnostics for generator on some environment
#71137 - Improve await error messaging for trait obligations
#70935 - Hard to read error message with 2D line drawing and multi-line expressions
#70921 - Tracking Issue for future readiness functions
#70905 - ICE on generators + arrays
#70818 - note_obligation_cause reporting for non-async/await not optimal
#70736 - internal compiler error: local_def_id: no entry for HirId { owner ...
#70594 - internal compiler error: no type for local variable
#70488 - Async performance regression
#69938 - incorrect error message for duplicate Send impl
#69672 - `x = yield;` makes generators larger than they need to be
#69632 - Overlapping `From` impls produce confusing errors in async code
#69446 - Which `captured variable cannot escape `FnMut` closure body`?
#69355 - Unexpected panic in rustc with async_stream
#69307 - ICE: src/librustc/middle/region.rs:1037: Encountered greater count 28
#69298 - Move keyword page makes no mention of async blocks
#69276 - Improve error message for "return type cannot contain a projection or `Self`..."
#69083 - Detect cases where `Box::pin` was likely intended
#68950 - Strange borrowing issue in inherent async method.
#68864 - 25% compile time increase on beta when building async-std
#68759 - Async await mulitple lifetimes issue with `Box`
#68523 - Bad error message with async main
#68477 - ICE cause by tokio::spawn a async function return future opaque type
#68430 - Rustc doesn't report line numbers for type errors within proc macro async fn within macro_rules macro
#68197 - Confusing error message when expecting BoxFuture
#68112 - Explanation for why future is not Send is wrong
#67893 - rustc compiler crashed when using async in loop
#67832 - ICE in nightly when using trying to preserve rand::rngs::ThreadRng across awaits
#67778 - async fn ICEs in macro on stable
#67765 - Unhelpful error messages from borrow checker with async/await
#67757 - Nightly 2019-12-29 causes `reached the type-length limit` error in previously working code
#67706 - Major async/await compiler performance regression
#67651 - Confusing/incorrect error message with incoherent implementations and async blocks
#67611 - not Send due to await retainment
#67376 - improve diagnostics for non-send Futures that might be solved by introducing temporary variables
#67204 - Explain editions when trying to use async block in 2015 edition
#67200 - rustc panic from unwrapping None
#67158 - ICE on beta and nightly as result of use of `yield` in combination with macro call in `async` block
#67087 - ICE while compiling async/await code
#67036 - Unexpected interactions with async blocks, auto traits, and trait objects
#67025 - Reduce type errors in async fns
#66958 - ICE on rustc 1.41.0-nightly (25d8a9494 2019-11-29) running on x86_64-apple-darwin
#66910 - Slightly incorrect help message with mismatched typs in async code
#66909 - async-await keywords are not documented in the libstd docs
#66814 - Incremental compilation breaks trait objects in async fns
#66695 - Broken MIR after compiler update when indexing statics with async values
#66618 - ICE on 1.39.0 stable with combination of `async` and `..`
#66440 - Confusing error message on variables created on the fly and passed to an async fn
#66387 - Compiler crash on "if" without "else" in async fn
#66312 - async fn presence affects an unrelated error message
#66198 - Borrowing from arguments with higher order async functions
#66107 - async-block diagnostics do not suggest async move when it may be needed
#66100 - [codegen] Unnecessary panicking branches in resumption of infinite generator (stored in static variable)
#65923 - Unhelpful error message when awaiting an async closure while forgetting the brackets
#65899 - Add more context when trying to write async trait function
#65667 - Async/Await: Confusing error message when using non-Send type in async fn
#65436 - async/await regression regarding borrows across yields
#65419 - Attempting to run an async fn after completion mentions generators
#65180 - Async-related type error messages defy expectations (in span location)
#65159 - Nightly async fn ICE
#65147 - check_mod_item_types query times regressed bigly
#64960 - Cannot await in scope that contains call to format!
#64853 - Should async/await be strict keywords?
#64636 - async functions with `unimplemented!()` are marked as unreachable
#64630 - Async struct method, <_'> lifetime shadowing
#64512 - async fn drop order for temporaries in return expression does not match sync
#64496 - reached the type-length limit while instantiating `std::thread::LocalKey::<std::syn...e, ()}]>>]], std::vec::Vec<i32>>`
#64493 - Spurious "unused lifetime parameter" warning with async function
#64477 - Spurious new Send requirement in async block
#64433 - Lifetime errors on nightly-2019-09-11 but not nightly-2019-09-10
#64392 - Async function return type inference fails without an ending return
#64391 - async functions fail to move values into generated futures in the latest nightly
#64382 - Consider async blocks on lifetime errors
#64176 - Lifetime error when Send is enforced on async function return type
#64130 - non-send futures error at point of use, but could cite point of definition in some cases
#64004 - async-await: mutually recursive functions compile sometimes
#63832 - temporary lifetime around await is (maybe) unexpectedly short
#63778 - Temporary values do not outlive a direct await
#63716 - [bug] async specialization is not parsed
#63710 - rustdoc renders re-exported `async fn`s incorrectly
#63533 - Improve error message for `.await` in 2015 edition
#63514 - Tracking issue for map_ok and map_err method for Poll<Option<Result<T, E>>>
#63500 - async fn methods and impl `'_` elision do not interact correctly
#63398 - Wrong block referenced when emitting E0728
#63391 - Improve diagnostic for `break` in `async { ... }` block
#63388 - `&self` lifetime elision with two parameters does not work with `async fn`
#63385 - Unhelpful error message with async usage of Iterator
#63277 - Different error messages between async and regular functions
#63225 - Error with nested async fn and anonymous lifetimes
#63167 - Confusing error message with type unification of impl Traits
#63100 - "Try invoking the function" hint
#62918 - Remove TLS dependency from async/await
#62658 - ICE: assertion failed: `(left == right)` in type_of.rs
#62570 - Async blocks are leaky about wording wrt. `?` in diagnostics
#62566 - include material on async fn in the Rust reference
#62539 - diagnostic for naive recursive async functions is really unfriendly
#62517 - async fn with elided lifetime causes rustc panic
#62506 - ICE on generator type check with a must_use type
#62501 - Tracking issue for `#!feature(async_unsafe)]` (RFC 2394)
#62500 - move async unsafe fn to distinct feature gate
#62382 - Unhelpful span in async type inference error
#62312 - Future compat warning with `.await`ing a `BoxFuture`
#62236 - Move tests in `src/test/run-pass/async-await` -> `src/test/ui/async-await`
#62232 - Inconsistent syntax between `unsafe async fn` and `async fn unsafe`
#62214 - Split the `async_await` feature gate for the subset we want to stabilize
#62149 - [Stabilization] async/await MVP
#62121 - increase test coverage for async-await
#62097 - rustc suggests invalid syntax to fix lifetime inferring error
#62087 - Async/Await rustc assertion panic
#62028 - thread 'rustc' panicked at 'assertion failed: target_offset >= offset'
#62025 - Broken MIR: generator contains type std::vec::Vec<()>
#62009 - ICE when playing with async/await.
#61991 - Can't infer type after collecting an iterator of futures
#61986 - ICE compiling with futures compat
#61950 - Async function using non-across-yield non-Send value is Send only if the usage is inside curly brackets
#61920 - E0373 help suggests `move async` but the correct syntax is `async move`
#61910 - error: internal compiler error: broken MIR in DefId ...
#61906 - Since rust is not going in CPS style coroutine, where is the context carrier for async?
#61834 - Broken MIR: generator contains type impl std::future::Future in MIR, but typeck only knows about {impl std::future::Future, ()}
#61798 - `unreachable_code` warning when invoke `.await` on async diverging function
#61793 - Codegen ICE/regression with 2019-06-12 nightly when using async fn<T: Fn()>(&self, T)
#61770 - Broken MIR: generator contains type
#61731 - "Broken MIR" ICE when using runtime crate
#61685 - Rustc paniced when apply `.await` on a closure in a non-async function
#61664 - compiler panicked at 'Box<Any>'
#61579 - ICE: Broken MIR in generators
#61482 - A `rustc`-internal compile error on future and task API
#61452 - [ICE] async fn vs lint order
#61442 - Broken MIR in futures generator (async/await)
#61211 - async/await borrows more around await points than necessary
#61187 - Internal compiler error in nightly when reversing a vector inside a async fn
#61115 - unused-lifetimes lint false-positives with async functions
#61076 - suggest `await` for future-related type errors
#61072 - async fn + rustfmt don't "just work" inside of RLS
#60889 - Don't ignore generator fields in miri
#60797 - improve the "must use" lint for `Future` to suggest await
#60709 - future miscompiling to ud2
#60674 - Async fn loses mut pattern when passed to attribute macro
#60661 - HIR printing of `async fn` is broken
#60660 - std::r#await! macro cannot be used even if #![feature(await_macro)] is enabled
#60655 - `existential type` complains about `'_` in concrete type of self-borrowing generators
#60653 - Make the parser aware of await where macro calls are expected
#60645 - Are blanket Future impls necessary?
#60615 - async/await unresolved type parameter in generator error shouldn't refer to `yield`
#60613 - Provide appropriate suggestions for some of the discussed await syntaxes
#60610 - Remove await! macro-like syntax support
#60589 - Is async/await compatible with io_uring (Linux async io)?
#60566 - async fn raises unused_mut on parameter that is used mutably
#60518 - ICE with the newest nightly in `lower_ty_direct`
#60509 - Extend `async fn` test suite to account for `ref mut?` patterns
#60498 - async fn forgets the mutability of the arguments
#60438 - __arg variables from async fn desugaring are accessible to the user
#60424 - type inference doesn't work in async fn that return Box<dyn SomeTrait>
#60418 - Move async/await UI tests into a folder
#60414 - Using associated types in async fn type break typing
#60236 - Drop order of async fn arguments doesn't exactly match the equivalent regular fn.
#60203 - Async fns that take structs with elided lifetime parameters are broken.
#60069 - Can define and use async fn without feature gate on nightly
#60016 - Implement `await` syntax
#59972 - Futures involving uninhabited variables are incorrectly considered uninhabited.
#59313 - `async move` breaks doc tests
#59123 - Generator size: unwinding and drops force extra generator state allocation
#59113 - Tracking issue for RFC 2592, futures_api
#59001 - async: hidden type for `impl Trait` captures lifetime that does not appear in bounds
#58945 - internal compiler error: Trying to create type name for unexpected type [debuginfo]
#58930 - async/await produces unspecific "type inside generator must be known in this context" error messages
#58888 - ICE unexpected type in type_metadata: impl core::future::future::Future
#58885 - async/await: Usage of trait objects reports multiple different lifetimes when only one is used
#58884 - async/await: Potentially incorrect lifetime handling when structs with lifetimes are referenced
#58814 - Playing with async triggers compiler bug "TLS Waker not set"
#58652 - async fn should be disallowed entirely on 2015 edition
#58639 - expected signature of `for<'r, 's> fn(&'r mut std::task::Context<'s>)
#58027 - Rustdoc renders async fn incorrectly
#57640 - Resolve `await` syntax
#57084 - ICE(async_await,futures_api,await_macro,generators): cannot relate bound region: ReLateBound(DebruijnIndex(1), BrAnon(2)) <= '_#1r
#57036 - async/await: Sending Waker seems to invalidate it
#56974 - Cannot define async fn with no_std
#56767 - await macro is not in libcore.
#56651 - Obscure compiler panic with async/await
#56238 - async fn should support multiple lifetimes
#55809 - Mixing async functions and &mut leads to overflow evaluating requirement
#55324 - `async fn` doesn't capture lifetimes of type parameters if other lifetimes are present
#54974 - async fn: 'static lifetime not inferred for Arc trait object
#54716 - Unused arguments to async fn are dropped too early
#54326 - Mismatched types diagnostic for async fn return type trusts random returns over function signature
#54289 - ICE with async_await + extern crate + invalid import
#54239 - Using await on an internal future makes private type trigger missing_debug_implementations lint
#53989 - compile async await function error
#53714 - `async fn` inside inherent impl produces generic parse error on 2015 edition
#53548 - async/await: “the requirement `for<'r> 'r : 'static` is not satisfied” with `'static` across await point
#53447 - ICE with --pretty=expanded and async/await
#53259 - Missing detection of Send for async fn
#53249 - async/await assertion failed: unbounded recursion
#52924 - Generators are too big
#51995 - ICE in generator MIR generated by async/await
#51933 - async fn inside fn fails to parse
#51751 - async/await errors should not discuss "yield statements"
#51353 - 'assertion failed: current_depth > ty::DebruijnIndex::INNERMOST' when using generators
#50659 - Suggestion for E0627's message
#50547 - Tracking issue for async/await (RFC 2394)
#50458 - Implement DerefAsync and DerefMutAsync as Deref and DerefMut in async context
`std::task` and `std::future`
stabilized in 1.36
[in stable]
/
RFC 2592
/
#59113
Pin APIs
stabilized in 1.33
[in stable]
/
RFC 2349
/
#49150
`Pin` as a method receiver
stabilized in 1.33
[in stable]
/
RFC 2362
/
#55786
2018 edition
stabilized in 1.31
[in stable]
`async` as a keyword in 2018 edition
stabilized in 1.28
[in stable]
`impl Trait` in return position
stabilized in 1.26
[in stable]
/
RFC 1522
/
#34511
Related issues under A-impl-trait
#82171 - Unclear compiler error when `impl Trait` return value captures non-'static argument
#80675 - Unexpected "the parameter type `T` may not live long enough" at a point where `T` is not relevant
#80583 - Error when concrete type doesn't satisfy impl trait is poorly spanned
#80518 - Lifetime parameters on self + impl Traits requires unexpected workaround
#80476 - E0562 should mention impl Trait in argument position
#80150 - unclear diagnostic with invalid suggestion for lifetime error involving an opaque type
#80083 - Impl Trait forces unnecessary lifetime bounds
#79415 - impl Trait capturing lifetime of type parameter
#78936 - Compile error when providing explicit generic arguments where impl Trait appears in bound of generic type
#78906 - Detect type parameters that were meant to be `impl Trait` in return position
#78403 - Recursive instantiation for Iterator trait with closure-taking adaptors hangs rustc
#78402 - Improve diagnostics for impl Trait capturing lifetimes
#78336 - ICE:assertion failed: body.yield_ty.is_some() && universal_regions.yield_ty.is_some() || body.yield_ty.is_none() && universal_regions.yield_ty.is_none()
#78258 - Incoherent error when a method and the containing impl require the same trait with different lifetimes
#77898 - const initializer is not considered a "defining use" for type_alias_impl_trait
#77696 - broken MIR: bad assignment (&impl Trait = &S): NoSolution
#76882 - impl Trait + 'static is not static if returned from generic function
#76410 - Nested impl Trait for higher-order functions
#73481 - Multiple defining uses of type alias impl trait in single function are not handled
#72614 - Returning an `impl Trait` in associated type position results in error at point-of-use instead of point-of-definition
#70997 - Bug. Get doubled error message with impl_trait_in_bindings when no error must be
#70971 - `ICE: broken MIR` with nested opaque types.
#70703 - Compiler unable to determine two types are equal
#69882 - todo! and unimplemented! does not work with impl Trait return types
#69112 - Conflicting error messages for HRTB in `impl Trait`
#69096 - Rustc overflow its stack when using impl Trait and the struct containing the function itself
#68561 - impl Trait error message expected/found order are confusing
#68064 - Type inference can't resolve type of output of `dyn Future` inside of `impl Fn` inside of Vec
#68020 - Diagnostic should explain that 'impl trait' captures generic parameters
#67830 - "internal compiler error" on Higher-Ranked Trait Bound for impl Trait in return position
#67751 - Trait alias compilation failure when returning impl Alias
#66551 - impl Trait cannot work well with lifetime bounds
#66523 - Confusing error message with `panic!()` and `impl trait`
#66057 - Can't call method on `impl Trait` without explicitly passing generic arguments
#65805 - impl Trait does not capture lifetime of generic argument
#65442 - impl Trait that does not capture generic argument
#64548 - Incorrect compiler hint for complicated type handler
#63355 - ICE with type_alias_impl_trait: errors selecting obligation during MIR typeck
#63205 - Investigate diagnostics regarding type alias `impl Trait`
#63204 - Investigate whether `Ty` and `OpaqueTy` can be merged
#63066 - Meta tracking issue for `impl Trait`
#63065 - Tracking issue for `impl Trait` in `const` and `static` items and `let` bindings
#63063 - Tracking issue for RFC 2515, "Permit impl Trait in type aliases"
#63032 - Lifetime is unnecessarily captured in nested functions returning impl trait via async
#62223 - Can't use `impl Fn` to return a closure that returns another closure
#61997 - Tracking issue for member constraints in region inference
#61773 - `impl_trait_in_bindings` and pick-constraint region bounds
#61756 - `impl Trait` with multiple lifetimes imposes a strange lifetime requirement
#61271 - Handle type error caused by returning specific type that would be solved by using impl Trait
#60725 - Compiling is signification slower with long return position impl types
#60670 - Tracking issue for existential lifetimes
#60249 - Compiler fails to identify type mismatch on function that returns impl Trait
#59631 - Recursive static with impl Trait errors out early
#59365 - Function with impl trait in argument position does not see all impls of trait on value returned from function with impl trait in return position
#58956 - ICE with `impl_trait_in_bindings` when `Wrap`ped
#58817 - Upgrading nightly introduces compiler panic at visit_opaque_types
#58662 - existential Generator + lifetime type errors unless impl trait wrapper is used
#58504 - nightly compiler panic with type-annotated array of `impl Generator`
#57961 - Defining scope of `existential type` defined by associated type
#57612 - Trait aliases considers same type as not equal to itself if used in `impl Trait` return type
#56711 - Recursive call passes `cargo check` but fails with `cargo build`
#55997 - Cycle detected when processing existential type
#55535 - "does not live long enough" when returning Option<impl trait>
#54895 - ICE when using anonymization in impl Trait with HRTB
#54840 - ICE when trying to use &impl in a binding
#54771 - Poor Trailing Semicolon Error in -> impl Trait Function
#54729 - Wrong type inference for closure with impl Trait inside another type
#54600 - `impl_trait_in_bindings` fails with `Option<impl Trait>`
#54560 - Confusing error message for `impl Trait` consts/statics that use generics
#54385 - `impl Trait` should be able to capture long-lived associated types even if the trait contains a lifetime
#54283 - Stability checker prevents return-position impl trait in the standard library
#53984 - impl Trait with associated type equality constraint fails to resolve when constraint contains associated type of non-parameter type
#53920 - ICE: Cannot create local mono-item within future returned as impl trait
#53613 - Lifetimes get replaced with 'static in Self within (return position) impl Trait.
#53398 - existential types cannot be defined in terms of themselves at all
#53092 - FullfillmentError ICE with const fn and existential type
#52304 - Compiler panic on type inference for impl Generator yielding a reference
#51616 - Wrong lifetime is inferred in the argument of closure when given more specific type.
#51525 - existential impl trait overlooks "hidden" lifetimes from projections
#49431 - Confusing error message when returning impl Trait with multiple lifetimes
#49288 - `impl Trait` Associated Types Do Not Leak Auto Traits
#49287 - Argument-position `impl Trait` requires a named lifetime
#48290 - Confusing Error Message with Impl Trait in E0308
#47348 - impl Trait feature is not make code easy
#46644 - Compiler incorrectly reports function return type declaration as source of inner type mismatch with conservative_impl_trait
#45994 - [impl Trait] Should we allow `impl Trait` after `->` in `fn` types or parentheses sugar?
#43943 - Type mismatch with generic parameter returns less than helpful errors
#42940 - impl-trait return type is bounded by all input type parameters, even when unnecessary
#42451 - With impl trait, some variables are not recognised as `'static` when used with `AsRef`.
#41407 - type mismatch resolving `<Thing as FromStr>::Err == <Thing as FromStr>::Err`, with impl trait
#37454 - Option + impl Trait = uncompilable code (?)
#36375 - `impl Trait` fails to resolve when returning `!`
#78456 - ICE: tuple_fields called on non-tuple with type_alias_impl_trait, async block, and non-static trait lifetime
#77112 - trait selection arbitrarily resolves projection ambiguities
#74363 - `todo!()`, `unimplemented!()`, `panic!()`, … don't play well with `impl Trait`
#74298 - Incoherent impls are allowed on opaque types
#74018 - ICE when playing around with existential types, impl trait
#72554 - Assertion failed in erroneous recursive types with methods returning a `impl Trait` type
#71798 - thread 'rustc' panicked at 'assertion failed: !bounds.has_escaping_bound_vars()'
#71042 - ICE with opaquely typed constant used in pattern
#70968 - Confusing error message with `let _ : impl Trait;`
#70877 - ICE whilst experimenting with opaque/existential types.
#69840 - ICE with `impl_trait_in_bindings`
#68477 - ICE cause by tokio::spawn a async function return future opaque type
#68368 - ICE using type_alias_impl_trait feature
#68307 - Copy not implemented on returned closures
#68110 - Improve output of `impl Trait` errors
#67552 - [ICE] with recursive impl trait and Iterator.by_ref()
#67166 - quad-ICE with impl Trait in binding
#67117 - Print better auto-trait diagnostics when opaque return type is involved
#66580 - ICE with type_alias_impl_trait: ty_is_local invoked on unexpected type
#65899 - Add more context when trying to write async trait function
#65679 - ICE when aliasing impl Future
#65582 - Non-`'static` lifetime inferred for return position `impl Trait` (fixed in beta)
#65581 - Rustc panics (NoSolution): could not prove Binder(projection soup)
#65561 - ICE when using 'impl Trait' with an infinity recursive function
#64848 - ICE: Associated constant and impl trait
#64565 - Invalid bound suggestion for argument-position impl trait
#64338 - Ffi safe lint ICE with type alias impl trait
#63794 - unimplemented macro doesnt compile with RPIT
#63706 - rustc suggests invalid syntax for missing method on `impl Trait` parameter
#63677 - rustc crash with type alias of impl trait
#63279 - ICE: instantiated twice
#63263 - ICE with closure return type as impl trait type alias defining use
#63169 - impl trait in type aliases does not trigger "private type in public interface" errors
#63167 - Confusing error message with type unification of impl Traits
#63154 - Associated types, impl traits ~and closures~; oh my, an ICE.
#62988 - Existential types have issues with lifetimes
#62779 - Cross-crate re-export produces invalid rustdoc for impl Trait
#61903 - Unable to return an impl Fn/FnMut/FnOnce that takes a concrete associated type
#61863 - Trying to use same existential type for two functions cause cycle dependency
#61577 - cycle error building rustc with debug logging
#60855 - Should improper_ctypes pierce through impl Trait?
#60662 - HIR printing of `existential type` is broken
#60655 - `existential type` complains about `'_` in concrete type of self-borrowing generators
#60564 - ICE with associated existential type
#60473 - ICE impl_trait_in_bindings with elided lifetime
#60414 - Using associated types in async fn type break typing
#60407 - ICE with existential_type feature
#60371 - Existential type ICE without feature specified
#60367 - impl_trait_in_bindings: Use function return type for binding?
#59342 - Existential types for traits without generic type parameters make rustc panic
#59115 - Tracking issue for omit From::from from `?` lowering for existentials
#59085 - Type alias used in async fn return type is wrongly reported unused
#59023 - impl Trait with < as Trait>::Type syntax does not work in return position
#59022 - `-> impl Fn()` fails with closures used as `FnMut` but actually Fn
#58951 - ICE with `#![feature(existential_type)]` + closure
#58887 - ICE in typeck on existential return type in trait
#58708 - impl trait from unboxed_closure does not accept closures
#58624 - rustdoc can't handle existential types
#58344 - ICE on generic impl trait convergence
#58011 - cargo doc fails to compile existential associated types
#57979 - Regression from stable to nightly: nested impl trait is not allowed
#57933 - The scope of associated existential types
#57807 - Compiler fails to unify existential associated type
#57700 - ICE when returning generic abitrary self type in defining function for existential associated type
#57678 - Existential types: Unused closure environment is part of concrete type
#57611 - ICE when inferring the type of existential type with trait alias bounds
#57464 - Nightly rustc crashes with "unexpected region in query response"
#57266 - Error message for type mismatch between impl Traits needs better explanation
#57201 - Broken MIR impl_trait_in_bindings ICE
#57200 - NLL impl_trait_in_bindings ICE
#57188 - Existential type captures lifetime that doesn't appear in bounds even though it does appear
#56046 - Tracking issue for `Captures` trait
#55903 - ICE: "unexpected predicate" when using multiple lifetime parameters in existential type
#55872 - ICE: Type parameter W/#1 out of range when substituting
#55634 - Cyclic dependency bug processing RPIT `impl Trait`
#55608 - ICE on stable / nightly: ReEmpty
#55234 - impl_trait_in_bindings incremental compilation ICE
#55099 - Incorrect inference of lifetime bound for existential type
#55027 - "trait is not implemented" error when returning "impl Trait" hides a more useful error
#55022 - Issue with impl Trait and panic!()
#54899 - ICE with existential associated type
#54593 - NLL type-checking ICEs on closure recursing on impl Trait-returning enclosing function.
#54234 - Incorrect warning: type alias is never used
#54169 - ICE in existential type with lifetime in trait implementation
#54045 - Regression in #[allow(deprecated)] for `impl Trait` return type
#53791 - existential impl Trait gets seriously confused about lifetimes, "impl T + 'static" does not satisfy static lifetime
#53690 - async fn cannot be recursive
#53598 - ICE: Existential type (w/ and w/o NLL)
#53546 - Existential type complains about private type in public interface if concrete type is not pub
#53457 - non-defining existential type use in defining scope with empty lifetime name
#53443 - ICE when existential type is exported from one crate and used in another
#53345 - Implementing trait for Existential type ICE's
#53096 - ICE 2018 edition with const fn and existential type
#53090 - `existential type` can accept generic bounds that do not specify a trait
#53087 - ICE with const transmute and existential type
#52985 - Existential type ICE
#52901 - Bad error message with wrong `impl trait`-parameter on trait implementation
#52843 - ICE on unsound usage of existential types
#52701 - infinite recursion ICE
#52632 - Existential type can have inconsistent concrete type
#52376 - Rustdoc not showing return type but showing return type lifetimes
#51282 - impl Trait return value infers 'static lifetime
#51069 - impl Trait return value causes an over-restricted lifetime requirement
#50950 - Able to use the turbofish syntax with impl trait for methods
#50881 - ICE using function pointer to function returning `impl Iterator<Item = &&'a str>`
#50865 - Compiler crashed with cannot create local mono-item
#50823 - impl Trait causes "borrowed value does not live long enough"
#50817 - Wrong suggestion for fixing argument-position `impl Trait`
#50652 - Regression in return type error quality with impl trait
#50626 - impl Trait binary operations
#50358 - rustdoc panic while documenting impl trait in argument position
#49926 - impossible case reached on lifetime inference for impl Trait in return position
#49685 - [ICE] librustc_traits/normalize_erasing_regions.rs:46: could not fully normalize `...`
#49376 - rustc has a stack overflow when using `impl Trait` of a trait with a generic parameter with a default type of Self
#48467 - impl trait error message around `'static` is probably confusing
#48140 - ICE with conservative_impl_trait
#47764 - ICE with `impl FnOnce...` in argument position. Unexpected panic.
#47715 - Compiler crash when using impl Trait to bound associated type parameter
#47422 - missing specialization: `<encoder::EncodeContext as SpecializedEncoder<rustc::hir::def_id::LocalDefId>>::specialized_encode` not overriden
#46976 - Rustdoc ICE with argument position impl Trait
#46959 - Universal impl trait shows camel case name warning
#46685 - ICE combining universal plus existential impl Trait
#46541 - 🚀 existential impl Trait allows lifetimes that would not be allowed by abstract type
#46504 - Compiler error: returning impl Generator
#46476 - ICE when using `impl Iterator<Item = &'a Path> + 'a`
#46470 - [ICE] with conservative_impl_trait and universal_impl_trait
#46469 - [ICE] with universal_impl_trait
#46468 - [ICE] with underscore_lifetimes
#46464 - Nested "impl trait" with lifetimes causing internal compiler error
#46456 - `librustc_trans_utils/collector.rs:743: Cannot create local trans-item for DefId(11/0:54 ~ stpl[d907]::html[0]::h1[0])`
#45800 - Link error with incremental and impl trait
#45690 - ICE with conservative_impl_trait
#44956 - Rustc nightly 2017-09-19 crashes because of impl Iterator with reference Item
#44923 - Purely-diverging functions cannot return `impl Trait`.
#44721 - impl Trait in argument position
#44686 - Tracking issue for impl trait in const/static/let
#44685 - Tracking issue for existential types (RFC 2071)
#44530 - Return type that doesn't satisfy `impl Trait` messages should point out the reason
#44437 - None.unwrap() in FnCtxt::instantiate_anon_types
#44198 - Impl Trait ICE: escaping regions in predicate
#44181 - ICE with generators and impl Trait: "Cannot create local trans-item"
#43774 - error: internal compiler error: unexpected panic
#43719 - "only named lifetimes allowed in impl Trait" could have a better error message
#43718 - ICE: escaping regions in predicate Obligation(...)
#43263 - Recursive impl-trait type causes compiler stack overflow
#43135 - Using impl Trait with closure local functions across crates results in ICE
#43073 - ICE with impl_trait
#43021 - compiler panic impl Trait
#42399 - ICE in conservative_impl_trait over VecDeque<String> Iterator
#42183 - Tracking issue for RFC 1951: Finalize syntax and parameter scoping for `impl Trait`, while expanding it to arguments
#41297 - impl Future used across crate boundaries produces an error
#41182 - [ICE] [conservative_impl_trait] escaping regions in predicate
#39639 - 'rustc' has overflowed its stack error
#38064 - Infinite size checker doesn't see through impl Trait, leading to rustc overflow
#37790 - Borrowing issue with impl Trait leads to unergonomic verbosity
#37096 - ICE: "Unexpected tail in unsized_info_ty" when using impl Trait
#35870 - Using impl trait across crates results in linker error
Future extensions
`async fn` in trait method
not stabilized yet
Workaround is available as an attribute macro:
`async-trait`
Generic associated types (GAT)
not stabilized yet
/
RFC 1598
/
#44265
Named existentials and impl Trait variable declarations
not stabilized yet
/
RFC 2071
/
#63066
Async iterators or stream
unresolved
Async closures
not stabilized yet
/
RFC 2394
async
ecosystem
tokio -
An event-driven, non-blocking I/O platform for writing asynchronous applications.
It has async
/await
support starting from 0.2.0-alpha.1
#1201
async-std -
Async version of the Rust standard library. It provides all the interfaces
you are used to, but in an async version and designed for Rust's
async
/await
syntax.
actix -
A actors framework providing higher-level abstraction for tokio.
thin_main_loop -
An experimental, cross platform, main loop and futures executor/reactor,
that binds to the OS APIs suitable for making native GUI applications.
It supports callbacks as well as the async
/await
syntax.
async-task -
Task abstraction for building executors.
Posts about async
Generated at Thu, 25 Feb 2021 20:36:47 +0000
Fork me on GitHub