"not general enough" error points to the async spawn site as opposed to the offending code #85516
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=44a059128482832f4b01a5a4897fa08d
(I'm sorry I couldn't minimize more)
The current output is:
note that Before 1.52.1 (in this case 1.50), the error message is worse:
Notes:
When I first encountered this error (the 1.50 version), I didn't remember that fn-trait args are tuples, and I was convinced that I had NO tuples in my code as written, so couldn't find the error, even manually by reading the code.
In both error cases, the better 1.52 one and worse 1.50 version, I couldn't really figure out how to resolve, so I just moved the String clone (it wasn't a string at work, but thats a simple type I used as a placeholder) into the first iterator and out of the buffered stream iterator
My guess is that my fairly-spicy use of a immutable reborrow of self to resolve this lifetime issue: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=48dbe41cb31212353d874de4fb63d9e8 may have something to do with this. I believe this ownership error is because I am forced to use an
async move
block to movech
into the future, which also tries to move the&mut self
?My 2 questions are:
The text was updated successfully, but these errors were encountered: