1
Fork 0

Remove span from BrAnon.

This commit is contained in:
Camille GILLOT 2023-08-03 15:56:56 +00:00
parent ded1a8b026
commit 26cb34cd18
39 changed files with 76 additions and 107 deletions

View file

@ -979,13 +979,11 @@ impl<'tcx> Stable<'tcx> for ty::BoundTyKind {
impl<'tcx> Stable<'tcx> for ty::BoundRegionKind {
type T = stable_mir::ty::BoundRegionKind;
fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
fn stable(&self, _: &mut Tables<'tcx>) -> Self::T {
use stable_mir::ty::BoundRegionKind;
match self {
ty::BoundRegionKind::BrAnon(option_span) => {
BoundRegionKind::BrAnon(option_span.map(|span| span.stable(tables)))
}
ty::BoundRegionKind::BrAnon => BoundRegionKind::BrAnon,
ty::BoundRegionKind::BrNamed(def_id, symbol) => {
BoundRegionKind::BrNamed(rustc_internal::br_named_def(*def_id), symbol.to_string())
}

View file

@ -286,7 +286,7 @@ pub enum BoundTyKind {
#[derive(Clone, Debug)]
pub enum BoundRegionKind {
BrAnon(Option<Span>),
BrAnon,
BrNamed(BrNamedDef, String),
BrEnv,
}