Add #[context()]
for the function which has the return type impl Iterator<Item = xxx>
, get error[E0562]
#18
Labels
bug
Something isn't working
When using
Please indicate the precise nightly build you are using; try
rustc --version
What I tried to do
Please include sample code or links to your project!
If add
#[context()]
for the function which has the return typeimpl Iterator<Item = xxx>
, geterror[E0562]:
impl Traitonly allowed in function and inherent method return types, not in closure return types
.What happened
Describe what happened in as much detail as possible.
For compiler ICEs, a good idea would be to include the output with
RUST_BACKTRACE=1
.When run above code, get error:
What I expected
When remove
#[context()]
line, no error. But it should support.The text was updated successfully, but these errors were encountered: