Skip to content

Commit

Permalink
unwrap -> expect
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Dec 21, 2019
1 parent d977e5b commit cabe665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_parse/parser/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl<'a> Parser<'a> {
negative_bounds: Vec<Span>,
) {
let negative_bounds_len = negative_bounds.len();
let last_span = *negative_bounds.last().unwrap();
let last_span = *negative_bounds.last().expect("no negative bounds, but still error?");
let mut err = self.struct_span_err(
negative_bounds,
"negative bounds are not supported",
Expand Down

0 comments on commit cabe665

Please sign in to comment.