mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
Update hir-ty test outputs
This commit is contained in:
parent
531e152390
commit
9165e3b381
@ -631,7 +631,6 @@ impl ExprCollector<'_> {
|
||||
let mac_call = mac.macro_call()?;
|
||||
let syntax_ptr = AstPtr::new(expr);
|
||||
let macro_ptr = AstPtr::new(&mac_call);
|
||||
// let prev_stmt = self.statements_in_scope.len();
|
||||
let stmt = self.collect_macro_call(
|
||||
mac_call,
|
||||
macro_ptr,
|
||||
|
@ -175,6 +175,9 @@ fn compute_expr_scopes(expr: ExprId, body: &Body, scopes: &mut ExprScopes, scope
|
||||
|
||||
scopes.set_scope(expr, *scope);
|
||||
match &body[expr] {
|
||||
Expr::MacroStmts { statements, tail } => {
|
||||
compute_block_scopes(statements, *tail, body, scopes, *scope);
|
||||
}
|
||||
Expr::Block { statements, tail, id, label } => {
|
||||
let scope = scopes.new_block_scope(*scope, *id, make_label(label));
|
||||
// Overwrite the old scope for the block expr, so that every block scope can be found
|
||||
|
@ -191,6 +191,8 @@ fn expr_macro_def_expanded_in_various_places() {
|
||||
!0..6 '1isize': isize
|
||||
!0..6 '1isize': isize
|
||||
!0..6 '1isize': isize
|
||||
!0..6 '1isize': isize
|
||||
!0..6 '1isize': isize
|
||||
39..442 '{ ...!(); }': ()
|
||||
73..94 'spam!(...am!())': {unknown}
|
||||
100..119 'for _ ...!() {}': ()
|
||||
@ -272,6 +274,8 @@ fn expr_macro_rules_expanded_in_various_places() {
|
||||
!0..6 '1isize': isize
|
||||
!0..6 '1isize': isize
|
||||
!0..6 '1isize': isize
|
||||
!0..6 '1isize': isize
|
||||
!0..6 '1isize': isize
|
||||
53..456 '{ ...!(); }': ()
|
||||
87..108 'spam!(...am!())': {unknown}
|
||||
114..133 'for _ ...!() {}': ()
|
||||
@ -306,7 +310,6 @@ fn expr_macro_expanded_in_stmts() {
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
!0..8 'leta=();': ()
|
||||
!0..8 'leta=();': ()
|
||||
!3..4 'a': ()
|
||||
!5..7 '()': ()
|
||||
@ -335,16 +338,16 @@ fn recurisve_macro_expanded_in_stmts() {
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
!0..7 'leta=3;': {unknown}
|
||||
!0..7 'leta=3;': {unknown}
|
||||
!0..13 'ng!{[leta=3]}': {unknown}
|
||||
!0..13 'ng!{[leta=]3}': {unknown}
|
||||
!0..13 'ng!{[leta]=3}': {unknown}
|
||||
!0..7 'leta=3;': ()
|
||||
!0..13 'ng!{[leta=3]}': ()
|
||||
!0..13 'ng!{[leta=]3}': ()
|
||||
!0..13 'ng!{[leta]=3}': ()
|
||||
!0..13 'ng!{[let]a=3}': ()
|
||||
!3..4 'a': i32
|
||||
!5..6 '3': i32
|
||||
196..237 '{ ...= a; }': ()
|
||||
229..230 'b': i32
|
||||
233..234 'a': i32
|
||||
229..230 'b': {unknown}
|
||||
233..234 'a': {unknown}
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
@ -364,8 +367,8 @@ fn recursive_inner_item_macro_rules() {
|
||||
"#,
|
||||
expect![[r#"
|
||||
!0..1 '1': i32
|
||||
!0..26 'macro_...>{1};}': {unknown}
|
||||
!0..26 'macro_...>{1};}': {unknown}
|
||||
!0..7 'mac!($)': ()
|
||||
!0..26 'macro_...>{1};}': ()
|
||||
107..143 '{ ...!(); }': ()
|
||||
129..130 'a': i32
|
||||
"#]],
|
||||
|
@ -573,6 +573,7 @@ fn issue_6811() {
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
!0..16 'let_a=...t_b=1;': ()
|
||||
!3..5 '_a': i32
|
||||
!6..7 '1': i32
|
||||
!11..13 '_b': i32
|
||||
@ -1012,17 +1013,17 @@ fn cfg_tail() {
|
||||
"#,
|
||||
expect![[r#"
|
||||
14..53 '{ ...)] 9 }': ()
|
||||
20..31 '{ "first" }': ()
|
||||
20..31 '{ "first" }': &str
|
||||
22..29 '"first"': &str
|
||||
72..190 '{ ...] 13 }': ()
|
||||
78..88 '{ "fake" }': &str
|
||||
80..86 '"fake"': &str
|
||||
93..103 '{ "fake" }': &str
|
||||
95..101 '"fake"': &str
|
||||
108..120 '{ "second" }': ()
|
||||
108..120 '{ "second" }': &str
|
||||
110..118 '"second"': &str
|
||||
210..273 '{ ... 15; }': ()
|
||||
216..227 '{ "third" }': ()
|
||||
216..227 '{ "third" }': &str
|
||||
218..225 '"third"': &str
|
||||
293..357 '{ ...] 15 }': ()
|
||||
299..311 '{ "fourth" }': &str
|
||||
|
Loading…
Reference in New Issue
Block a user