Add a stopgap for #49889
This commit is contained in:
parent
cc48ae5a64
commit
a42db7dbfd
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue