We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37a6f41 commit dd3be67Copy full SHA for dd3be67
src/libproc_macro/lib.rs
@@ -42,7 +42,6 @@
42
#![feature(box_into_raw_non_null)]
43
#![feature(nonnull_cast)]
44
45
-#[macro_use]
46
extern crate syntax;
47
extern crate syntax_pos;
48
extern crate rustc_errors;
@@ -602,9 +601,9 @@ impl Iterator for TokenTreeIter {
602
601
type Item = TokenTree;
603
604
fn next(&mut self) -> Option<TokenTree> {
605
- let next = unwrap_or!(self.next.take().or_else(|| {
+ let next = self.next.take().or_else(|| {
606
Frontend.token_cursor_next(&mut self.cursor)
607
- }), return None);
+ })?;
608
let (span, kind) = match Frontend.token_stream_to_token_tree(next) {
609
(span, Ok((kind, next))) => {
610
self.next = next;
0 commit comments