Skip to content

Commit 52fa020

Browse files
committed
unwrap -> expect
1 parent d6f37c6 commit 52fa020

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_parse/parser

1 file changed

+1
-1
lines changed

src/librustc_parse/parser/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl<'a> Parser<'a> {
390390
negative_bounds: Vec<Span>,
391391
) {
392392
let negative_bounds_len = negative_bounds.len();
393-
let last_span = *negative_bounds.last().unwrap();
393+
let last_span = *negative_bounds.last().expect("no negative bounds, but still error?");
394394
let mut err = self.struct_span_err(
395395
negative_bounds,
396396
"negative bounds are not supported",

0 commit comments

Comments
 (0)