about summary refs log tree commit diff
path: root/src/librustc_parse/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_parse/parser')
-rw-r--r--src/librustc_parse/parser/ty.rs2
1 files changed, 1 insertions, 1 deletions
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<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",