about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-02-13 04:37:05 +0100
committerGitHub <noreply@github.com>2019-02-13 04:37:05 +0100
commit5aa260a4b56b30e553f82ed31cba384cbf40ae5d (patch)
tree04ba2864a6be39c38965841e816ad2f3a8598fb7 /src/libsyntax/parse/parser.rs
parent0bc8f6f3f4ecfa3309aaa4df52fb4aa1ddd63b07 (diff)
parentf06af1ff178014dadd62391a4a06e7fff8f2a6a1 (diff)
downloadrust-5aa260a4b56b30e553f82ed31cba384cbf40ae5d.tar.gz
rust-5aa260a4b56b30e553f82ed31cba384cbf40ae5d.zip
Rollup merge of #58289 - haraldh:master, r=sfackler
impl iter() for dyn Error

Examples:

```rust
let next_error_type_a = err
    .iter()
    .filter_map(Error::downcast_ref::<ErrorTypeA>)
    .next();
```

```rust
let source_root_error = err.iter().last();
```

Credit for the ErrorIter goes to reddit user /u/tdiekmann (Tim Diekmann)
https://www.reddit.com/r/rust/comments/aj3lpg/is_an_iterator_impl_over_errorsource_possible/
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions