diff options
| author | bors <bors@rust-lang.org> | 2020-02-10 22:46:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-10 22:46:29 +0000 |
| commit | 0f0cdf6acdb5a9b968728d961929ca59ff93cfa4 (patch) | |
| tree | 49bcf3b1fde98c8ed06da56145fafc574f47e60e /src/librustc_parse/parser | |
| parent | e6ec0d125eba4074122b187032474b4174fb9d31 (diff) | |
| parent | 119bc976db5549f17258a55bb9684eae0fa98b65 (diff) | |
| download | rust-0f0cdf6acdb5a9b968728d961929ca59ff93cfa4.tar.gz rust-0f0cdf6acdb5a9b968728d961929ca59ff93cfa4.zip | |
Auto merge of #69030 - Dylan-DPC:rollup-t9uk7vc, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #68897 (clean up E0275 explanation) - #68908 (Add long error code explanation message for E0637 ) - #68932 (self-profile: Support arguments for generic_activities.) - #68986 (Make ASCII ctype functions unstably const ) - #69007 (Clean up E0283 explanation) - #69014 (change an instance of span_bug() to struct_span_err() to avoid ICE) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_parse/parser')
| -rw-r--r-- | src/librustc_parse/parser/ty.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_parse/parser/ty.rs b/src/librustc_parse/parser/ty.rs index 990661bf6b5..a573a1ee699 100644 --- a/src/librustc_parse/parser/ty.rs +++ b/src/librustc_parse/parser/ty.rs @@ -214,7 +214,10 @@ impl<'a> Parser<'a> { let path = match bounds.remove(0) { GenericBound::Trait(pt, ..) => pt.trait_ref.path, GenericBound::Outlives(..) => { - self.span_bug(ty.span, "unexpected lifetime bound") + return Err(self.struct_span_err( + ty.span, + "expected trait bound, not lifetime bound", + )); } }; self.parse_remaining_bounds(Vec::new(), path, lo, true) |
