Skip to content

Commit

Permalink
Add a stopgap for rust-lang#49889
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Apr 24, 2018
1 parent cc48ae5 commit a42db7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,10 @@ impl<'a, 'gcx, 'tcx> ParamTy {
}

pub fn is_self(&self) -> bool {
if self.name == keywords::SelfType.name().as_str() {
assert_eq!(self.idx, 0);
// FIXME(#50125): Ignoring `Self` with `idx != 0` might lead to weird behavior elsewhere,
// but this should only be possible when using `-Z continue-parse-after-error` like
// `compile-fail/issue-36638.rs`.
if self.name == keywords::SelfType.name().as_str() && self.idx == 0 {
true
} else {
false
Expand Down

0 comments on commit a42db7d

Please sign in to comment.