unwrap -> expect

This commit is contained in:
Mazdak Farrokhzad 2019-12-21 03:28:22 +01:00
parent d6f37c66c7
commit 52fa020bbf

View file

@ -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",