Revert "Implement Anonymous{Struct, Union} in the AST"
This reverts commit059b68dd67
. Note that this was manually adjusted to retain some of the refactoring introduced by commit059b68dd67
, so that it could likewise retain the correction introduced in commit5b4bc05fa5
This commit is contained in:
parent
b6aa7e3105
commit
91feb76d13
13 changed files with 14 additions and 209 deletions
|
@ -748,10 +748,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
}
|
||||
}
|
||||
|
||||
pub(super) fn lower_field_def(
|
||||
&mut self,
|
||||
(index, f): (usize, &FieldDef),
|
||||
) -> hir::FieldDef<'hir> {
|
||||
fn lower_field_def(&mut self, (index, f): (usize, &FieldDef)) -> hir::FieldDef<'hir> {
|
||||
let ty = if let TyKind::Path(ref qself, ref path) = f.ty.kind {
|
||||
let t = self.lower_path_ty(
|
||||
&f.ty,
|
||||
|
|
|
@ -1289,15 +1289,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
let kind = match t.kind {
|
||||
TyKind::Infer => hir::TyKind::Infer,
|
||||
TyKind::Err => hir::TyKind::Err,
|
||||
// FIXME(unnamed_fields): IMPLEMENTATION IN PROGRESS
|
||||
TyKind::AnonymousStruct(ref _fields, _recovered) => {
|
||||
self.sess.struct_span_err(t.span, "anonymous structs are unimplemented").emit();
|
||||
hir::TyKind::Err
|
||||
}
|
||||
TyKind::AnonymousUnion(ref _fields, _recovered) => {
|
||||
self.sess.struct_span_err(t.span, "anonymous unions are unimplemented").emit();
|
||||
hir::TyKind::Err
|
||||
}
|
||||
TyKind::Slice(ref ty) => hir::TyKind::Slice(self.lower_ty(ty, itctx)),
|
||||
TyKind::Ptr(ref mt) => hir::TyKind::Ptr(self.lower_mt(mt, itctx)),
|
||||
TyKind::Rptr(ref region, ref mt) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue