@@ -1096,7 +1096,7 @@ impl<'db> ExprCollector<'db> {
10961096 ast:: Expr :: WhileExpr ( e) => self . collect_while_loop ( syntax_ptr, e) ,
10971097 ast:: Expr :: ForExpr ( e) => self . collect_for_loop ( syntax_ptr, e) ,
10981098 ast:: Expr :: CallExpr ( e) => {
1099- // FIXME: Remove this once we drop support for <1.86, https://github.com/rust-lang/rust/commit/ac9cb908ac4301dfc25e7a2edee574320022ae2c
1099+ // FIXME(MINIMUM_SUPPORTED_TOOLCHAIN_VERSION) : Remove this once we drop support for <1.86, https://github.com/rust-lang/rust/commit/ac9cb908ac4301dfc25e7a2edee574320022ae2c
11001100 let is_rustc_box = {
11011101 let attrs = e. attrs ( ) ;
11021102 attrs. filter_map ( |it| it. as_simple_atom ( ) ) . any ( |it| it == "rustc_box" )
@@ -1649,7 +1649,7 @@ impl<'db> ExprCollector<'db> {
16491649 fn desugar_try_block ( & mut self , e : BlockExpr ) -> ExprId {
16501650 let try_from_output = self . lang_path ( self . lang_items ( ) . TryTraitFromOutput ) ;
16511651 let label = self . generate_new_name ( ) ;
1652- let label = self . alloc_label_desugared ( Label { name : label } ) ;
1652+ let label = self . alloc_label_desugared ( Label { name : label } , AstPtr :: new ( & e ) . wrap_right ( ) ) ;
16531653 let old_label = self . current_try_block_label . replace ( label) ;
16541654
16551655 let ptr = AstPtr :: new ( & e) . upcast ( ) ;
@@ -2319,7 +2319,6 @@ impl<'db> ExprCollector<'db> {
23192319 ast:: Pat :: SlicePat ( p) => {
23202320 let SlicePatComponents { prefix, slice, suffix } = p. components ( ) ;
23212321
2322- // FIXME properly handle `RestPat`
23232322 Pat :: Slice {
23242323 prefix : prefix. into_iter ( ) . map ( |p| self . collect_pat ( p, binding_list) ) . collect ( ) ,
23252324 slice : slice. map ( |p| self . collect_pat ( p, binding_list) ) ,
@@ -2399,7 +2398,6 @@ impl<'db> ExprCollector<'db> {
23992398 } ;
24002399 let start = range_part_lower ( p. start ( ) ) ;
24012400 let end = range_part_lower ( p. end ( ) ) ;
2402- // FIXME: Exclusive ended pattern range is stabilised
24032401 match p. op_kind ( ) {
24042402 Some ( range_type) => Pat :: Range { start, end, range_type } ,
24052403 None => Pat :: Missing ,
@@ -2519,9 +2517,9 @@ impl<'db> ExprCollector<'db> {
25192517 let mut hygiene_info = if hygiene_id. is_root ( ) {
25202518 None
25212519 } else {
2522- hygiene_id. lookup ( ) . outer_expn ( self . db ) . map ( |expansion| {
2520+ hygiene_id. syntax_context ( ) . outer_expn ( self . db ) . map ( |expansion| {
25232521 let expansion = self . db . lookup_intern_macro_call ( expansion. into ( ) ) ;
2524- ( hygiene_id. lookup ( ) . parent ( self . db ) , expansion. def )
2522+ ( hygiene_id. syntax_context ( ) . parent ( self . db ) , expansion. def )
25252523 } )
25262524 } ;
25272525 let name = Name :: new_lifetime ( & lifetime. text ( ) ) ;
@@ -2727,17 +2725,17 @@ impl ExprCollector<'_> {
27272725 self . store . pats . alloc ( Pat :: Missing )
27282726 }
27292727
2730- fn alloc_label ( & mut self , label : Label , ptr : LabelPtr ) -> LabelId {
2728+ fn alloc_label ( & mut self , label : Label , ptr : AstPtr < ast:: Label > ) -> LabelId {
2729+ self . alloc_label_desugared ( label, ptr. wrap_left ( ) )
2730+ }
2731+
2732+ fn alloc_label_desugared ( & mut self , label : Label , ptr : LabelPtr ) -> LabelId {
27312733 let src = self . expander . in_file ( ptr) ;
27322734 let id = self . store . labels . alloc ( label) ;
27332735 self . store . label_map_back . insert ( id, src) ;
27342736 self . store . label_map . insert ( src, id) ;
27352737 id
27362738 }
2737- // FIXME: desugared labels don't have ptr, that's wrong and should be fixed somehow.
2738- fn alloc_label_desugared ( & mut self , label : Label ) -> LabelId {
2739- self . store . labels . alloc ( label)
2740- }
27412739
27422740 fn is_lowering_awaitable_block ( & self ) -> & Awaitable {
27432741 self . awaitable_context . as_ref ( ) . unwrap_or ( & Awaitable :: No ( "unknown" ) )
0 commit comments