mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
0acddf5060
Fix diagnostics for coroutines with () as input. This may be a more real-life example to trigger the diagnostic: ```rust #![features(try_blocks, coroutine_trait, coroutines)] use std::ops::Coroutine; struct Request; struct Response; fn get_args() -> Result<String, String> { todo!() } fn build_request(_arg: String) -> Request { todo!() } fn work() -> impl Coroutine<Option<Response>, Yield = Request> { #[coroutine] |_| { let r: Result<(), String> = try { let req = get_args()?; yield build_request(req) }; if let Err(msg) = r { eprintln!("Error: {msg}"); } } } ``` |
||
---|---|---|
.. | ||
assembly | ||
auxiliary | ||
codegen | ||
codegen-units | ||
coverage | ||
coverage-run-rustdoc | ||
crashes | ||
debuginfo | ||
incremental | ||
mir-opt | ||
pretty | ||
run-make | ||
run-pass-valgrind | ||
rustdoc | ||
rustdoc-gui | ||
rustdoc-js | ||
rustdoc-js-std | ||
rustdoc-json | ||
rustdoc-ui | ||
ui | ||
ui-fulldeps | ||
COMPILER_TESTS.md |