Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
60956837cfbf22bd8edd80f57a856e141f7deb8c
rust/tests/rustdoc-ui/error-in-impl-trait/closure.rs

6 lines
173 B
Rust
Raw Normal View History

Fix async-std at the price of breaking half the test suite - Don't mark impl trait as an error
2020-08-03 21:13:13 -04:00
// check-pass
Recurse into function bodies, but don't typeck closures Previously, rustdoc would issue a delay_span_bug ICE on the following code: ```rust pub fn a() -> impl Fn() -> u32 { || content::doesnt::matter() } ``` This wasn't picked up earlier because having `type Alias = impl Trait;` in the same module caused _all closures_ to be typechecked, even if they wouldn't normally. Additionally, if _any_ error was emitted, no delay_span_bug would be emitted. So as part of this commit all of the tests were separated out into different files.
2020-07-09 09:13:59 -04:00
// manually desugared version of an `async fn` (but with a closure instead of a generator)
pub fn a() -> impl Fn() -> u32 {
|| content::doesnt::matter()
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 702ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API