1
Fork 0

Add a stopgap for #49889

This commit is contained in:
Josh Stone 2018-04-20 11:37:41 -07:00
parent cc48ae5a64
commit a42db7dbfd

View file

@ -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