From 52fa020bbf030ae2a57e66bb259ee626a5f1132e Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 21 Dec 2019 03:28:22 +0100 Subject: unwrap -> expect --- src/librustc_parse/parser/ty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/librustc_parse/parser') diff --git a/src/librustc_parse/parser/ty.rs b/src/librustc_parse/parser/ty.rs index 15e0d54bb01..b83ec71124d 100644 --- a/src/librustc_parse/parser/ty.rs +++ b/src/librustc_parse/parser/ty.rs @@ -390,7 +390,7 @@ impl<'a> Parser<'a> { negative_bounds: Vec, ) { 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", -- cgit 1.4.1-3-g733a5