Skip to content

Commit

Permalink
panictry!(..) -> .unwrap()
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Oct 16, 2019
1 parent 1a26fdf commit 8ca16dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{ast, panictry};
use crate::ast;
use crate::parse::{PResult, source_file_to_stream};
use crate::parse::new_parser_from_source_str;
use crate::parse::parser::Parser;
Expand Down Expand Up @@ -28,7 +28,7 @@ crate fn with_error_checking_parse<'a, T, F>(s: String, ps: &'a ParseSess, f: F)
F: FnOnce(&mut Parser<'a>) -> PResult<'a, T>,
{
let mut p = string_to_parser(&ps, s);
let x = panictry!(f(&mut p));
let x = f(&mut p).unwrap();
p.sess.span_diagnostic.abort_if_errors();
x
}
Expand Down

0 comments on commit 8ca16dd

Please sign in to comment.