Skip to content

Commit b00f39b

Browse files
committed
Paper over a bug on master
This commit papers over #49889 (introducing a fixme pointing at #50125) for a bug that was introduced with #49695. This workaround is taken from #49891.
1 parent 6027efe commit b00f39b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/librustc/ty/sty.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -885,8 +885,10 @@ impl<'a, 'gcx, 'tcx> ParamTy {
885885
}
886886

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

0 commit comments

Comments
 (0)