rust/compiler/rustc_parse/src/parser
Nicholas Nethercote 6e87858f26 Fix a comment.
Imagine you have replace ranges (2..20,X) and (5..15,Y), and these tokens:
```
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x
```
If we replace (5..15,Y) first, then (2..20,X) we get this sequence
```
a,b,c,d,e,Y,_,_,_,_,_,_,_,_,_,p,q,r,s,t,u,v,w,x
a,b,X,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,u,v,w,x
```
which is what we want.

If we do it in the other order, we get this:
```
a,b,X,_,_,_,_,_,_,_,_,_,_,_,_,p,q,r,s,t,u,v,w,x
a,b,X,_,_,Y,_,_,_,_,_,_,_,_,_,_,_,_,_,_,u,v,w,x
```
which is wrong. So it's true that we need the `.rev()` but the comment
is wrong about why.
2024-07-26 17:37:03 +10:00
..
mut_visit Specialize assert_pred. 2024-06-06 08:26:54 +10:00
tokenstream Move some tests from rustc_expand to rustc_parse. 2024-05-06 09:06:02 +10:00
attr.rs Auto merge of #127957 - matthiaskrgr:rollup-1u5ivck, r=matthiaskrgr 2024-07-19 13:39:12 +00:00
attr_wrapper.rs Fix a comment. 2024-07-26 17:37:03 +10:00
diagnostics.rs Rollup merge of #127350 - veera-sivarajan:bugfix-126311, r=lcnr 2024-07-19 10:48:03 +02:00
expr.rs Always pass the visitor as the first argument to walk* functions 2024-07-22 14:01:24 +00:00
generics.rs Remove TrailingToken. 2024-07-18 17:28:49 +10:00
item.rs Rollup merge of #127350 - veera-sivarajan:bugfix-126311, r=lcnr 2024-07-19 10:48:03 +02:00
mod.rs Auto merge of #127957 - matthiaskrgr:rollup-1u5ivck, r=matthiaskrgr 2024-07-19 13:39:12 +00:00
nonterminal.rs Use ForceCollect in parse_attr_item. 2024-07-19 08:24:54 +10:00
pat.rs Always pass the visitor as the first argument to walk* functions 2024-07-22 14:01:24 +00:00
path.rs Use more accurate span for : to :: suggestion 2024-07-12 03:02:58 +00:00
stmt.rs Only check force_collect in collect_tokens_trailing_token. 2024-07-19 08:42:33 +10:00
tests.rs Make Parser::num_bump_calls 0-indexed. 2024-07-19 15:25:55 +10:00
ty.rs Rollup merge of #127350 - veera-sivarajan:bugfix-126311, r=lcnr 2024-07-19 10:48:03 +02:00