Skip to content

Commit

Permalink
Paper over a bug on master
Browse files Browse the repository at this point in the history
This commit papers over rust-lang#49889 (introducing a fixme pointing at rust-lang#50125) for a
bug that was introduced with rust-lang#49695. This workaround is taken from rust-lang#49891.
  • Loading branch information
alexcrichton committed Apr 20, 2018
1 parent 6027efe commit b00f39b
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 b00f39b

Please sign in to comment.