Skip to content

Commit dd3be67

Browse files
committed
proc_macro: don't use the unwrap_or macro from libsyntax.
1 parent 37a6f41 commit dd3be67

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libproc_macro/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#![feature(box_into_raw_non_null)]
4343
#![feature(nonnull_cast)]
4444

45-
#[macro_use]
4645
extern crate syntax;
4746
extern crate syntax_pos;
4847
extern crate rustc_errors;
@@ -602,9 +601,9 @@ impl Iterator for TokenTreeIter {
602601
type Item = TokenTree;
603602

604603
fn next(&mut self) -> Option<TokenTree> {
605-
let next = unwrap_or!(self.next.take().or_else(|| {
604+
let next = self.next.take().or_else(|| {
606605
Frontend.token_cursor_next(&mut self.cursor)
607-
}), return None);
606+
})?;
608607
let (span, kind) = match Frontend.token_stream_to_token_tree(next) {
609608
(span, Ok((kind, next))) => {
610609
self.next = next;

0 commit comments

Comments
 (0)