@@ -30,8 +30,8 @@ use crate::{
3030 expander:: Expander ,
3131 hir:: {
3232 dummy_expr_id, Array , Binding , BindingAnnotation , BindingId , BindingProblems , CaptureBy ,
33- ClosureKind , Expr , ExprId , Label , LabelId , Literal , LiteralOrConst , MatchArm , Movability ,
34- OffsetOf , Pat , PatId , RecordFieldPat , RecordLitField , Statement ,
33+ ClosureKind , Expr , ExprId , InlineAsm , Label , LabelId , Literal , LiteralOrConst , MatchArm ,
34+ Movability , OffsetOf , Pat , PatId , RecordFieldPat , RecordLitField , Statement ,
3535 } ,
3636 item_scope:: BuiltinShadowMode ,
3737 lang_item:: LangItem ,
@@ -648,7 +648,10 @@ impl ExprCollector<'_> {
648648 }
649649 }
650650 ast:: Expr :: UnderscoreExpr ( _) => self . alloc_expr ( Expr :: Underscore , syntax_ptr) ,
651- ast:: Expr :: AsmExpr ( _) => self . missing_expr ( ) ,
651+ ast:: Expr :: AsmExpr ( e) => {
652+ let expr = Expr :: InlineAsm ( InlineAsm { e : self . collect_expr_opt ( e. expr ( ) ) } ) ;
653+ self . alloc_expr ( expr, syntax_ptr)
654+ }
652655 ast:: Expr :: OffsetOfExpr ( e) => {
653656 let container = Interned :: new ( TypeRef :: from_ast_opt ( & self . ctx ( ) , e. ty ( ) ) ) ;
654657 let fields = e. fields ( ) . map ( |it| it. as_name ( ) ) . collect ( ) ;
0 commit comments