Split TyBareFn into TyFnDef and TyFnPtr.
There's a lot of stuff wrong with the representation of these types: TyFnDef doesn't actually uniquely identify a function, TyFnPtr is used to represent method calls, TyFnDef in the sub-expression of a cast isn't correctly reified, and probably some other stuff I haven't discovered yet. Splitting them seems like the right first step, though.
This commit is contained in:
parent
4b868411af
commit
b423a0f9ef
73 changed files with 406 additions and 324 deletions
|
|
@ -135,12 +135,12 @@ pub fn enc_ty<'a, 'tcx>(w: &mut Cursor<Vec<u8>>, cx: &ctxt<'a, 'tcx>, t: Ty<'tcx
|
|||
ty::TyStr => {
|
||||
write!(w, "v");
|
||||
}
|
||||
ty::TyBareFn(Some(def_id), f) => {
|
||||
ty::TyFnDef(def_id, f) => {
|
||||
write!(w, "F");
|
||||
write!(w, "{}|", (cx.ds)(def_id));
|
||||
enc_bare_fn_ty(w, cx, f);
|
||||
}
|
||||
ty::TyBareFn(None, f) => {
|
||||
ty::TyFnPtr(f) => {
|
||||
write!(w, "G");
|
||||
enc_bare_fn_ty(w, cx, f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue