about summary refs log tree commit diff
path: root/src/librustc_parse
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-21 03:28:22 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-12-21 19:20:41 +0100
commit52fa020bbf030ae2a57e66bb259ee626a5f1132e (patch)
tree4b0dcacc20c13ebd99bd3826b1fc971e3545ed45 /src/librustc_parse
parentd6f37c66c72ed4692781250165bf5fd56a64dfaa (diff)
downloadrust-52fa020bbf030ae2a57e66bb259ee626a5f1132e.tar.gz
rust-52fa020bbf030ae2a57e66bb259ee626a5f1132e.zip
unwrap -> expect
Diffstat (limited to 'src/librustc_parse')
-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",