You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a trait inherits Iterator, it used to be (rust-0.11) usable as the expression in a for loop. In recent nightlies (a1429bc 2014-08-08 21:36:11 +0000) this seems to be broken.
pubtraitFoo:Iterator<int>{}fnmain(){let f :&Foo;for item in f {}}
This gives me:
test.rs:6:14: 6:15 error: for loop expression does not implement the Iterator trait
test.rs:6 for i in f {
The text was updated successfully, but these errors were encountered:
I believe that this is technically correct as the trait object&Foo does not implement the Iterator trait. This is similar to how the Writer trait is not implemented for &mut Writer, but rather there is a manual implementation for it. The fix you'll need is impl<'a> Iterator<int> for &'a Foo { /* ... */ }
For now, however, this is working as intended, so I'm going to close this.
…ans, r=Veykril
internal: add some `tracing` to {Request, Notification}Dispatch
Some of the tracing config would need to be changed in order to benefit more from this (especially `.with_span_events(FmtSpan::CLOSE)`), which provides span events like the following:
```
2024-01-18T02:41:06.675779Z INFO request{method="textDocument/codeLens" request_id=RequestId(I32(17))}: rust_analyzer::dispatch: close time.busy=61.8µs time.idle=5.29µs
```
I dunno if y'all need `LoggerFormatter` in here, but if you don't, I'd be happy to yeet it out of rust-analyzer. In any case, this provided a pretty decent amount of information in the logs, and I can expand this as needed or we can land this PR and expand later.
If a trait inherits Iterator, it used to be (rust-0.11) usable as the expression in a for loop. In recent nightlies (a1429bc 2014-08-08 21:36:11 +0000) this seems to be broken.
This gives me:
test.rs:6:14: 6:15 error:
for
loop expression does not implement theIterator
traittest.rs:6 for i in f {
The text was updated successfully, but these errors were encountered: