Allow #[unstable] impls for fn() with unstable abi.
This commit is contained in:
parent
e60016eb55
commit
ead96f7f74
1 changed files with 8 additions and 3 deletions
|
@ -888,10 +888,15 @@ impl<'tcx> Visitor<'tcx> for CheckTraitImplStable<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_ty(&mut self, t: &'tcx Ty<'tcx>) {
|
fn visit_ty(&mut self, t: &'tcx Ty<'tcx>) {
|
||||||
if let TyKind::Never = t.kind {
|
match t.kind {
|
||||||
self.fully_stable = false;
|
TyKind::Never => self.fully_stable = false,
|
||||||
|
TyKind::BareFn(f) => {
|
||||||
|
if rustc_target::spec::abi::is_stable(f.abi.name()).is_err() {
|
||||||
|
self.fully_stable = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => intravisit::walk_ty(self, t),
|
||||||
}
|
}
|
||||||
intravisit::walk_ty(self, t)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue