File tree 3 files changed +12
-9
lines changed
compiler/rustc_codegen_cranelift
3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 6
6
#![ feature( gen_blocks) ]
7
7
8
8
fn foo ( ) -> impl Iterator < Item = u32 > {
9
- gen { yield 42 ; for x in 3 ..6 { yield x } }
9
+ gen {
10
+ yield 42 ;
11
+ for x in 3 ..6 {
12
+ yield x
13
+ }
14
+ }
10
15
}
11
16
12
17
fn moved ( ) -> impl Iterator < Item = u32 > {
13
18
let mut x = "foo" . to_string ( ) ;
14
19
gen move {
15
20
yield 42 ;
16
- if x == "foo" { return }
21
+ if x == "foo" {
22
+ return ;
23
+ }
17
24
x. clear ( ) ;
18
- for x in 3 ..6 { yield x }
25
+ for x in 3 ..6 {
26
+ yield x
27
+ }
19
28
}
20
29
}
21
30
@@ -32,5 +41,4 @@ fn main() {
32
41
let mut iter = moved ( ) ;
33
42
assert_eq ! ( iter. next( ) , Some ( 42 ) ) ;
34
43
assert_eq ! ( iter. next( ) , None ) ;
35
-
36
44
}
Original file line number Diff line number Diff line change 1
- ignore = [
2
- " example/gen_block_iterate.rs" , # uses edition 2024
3
- ]
4
-
5
1
# Matches rustfmt.toml of rustc
6
2
style_edition = " 2024"
7
3
use_small_heuristics = " Max"
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ ignore = [
49
49
50
50
# These are ignored by a standard cargo fmt run.
51
51
" compiler/rustc_codegen_cranelift/scripts" ,
52
- " compiler/rustc_codegen_cranelift/example/gen_block_iterate.rs" , # uses edition 2024
53
52
" compiler/rustc_codegen_gcc/tests" ,
54
53
# Code automatically generated and included.
55
54
" compiler/rustc_codegen_gcc/src/intrinsic/archs.rs" ,
You can’t perform that action at this time.
0 commit comments