File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ memchr = "2.1.3"
49
49
num_cpus = " 1.0"
50
50
opener = " 0.4"
51
51
percent-encoding = " 2.0"
52
- rustfix = " 0.5 .0"
52
+ rustfix = " 0.6 .0"
53
53
semver = { version = " 1.0.3" , features = [" serde" ] }
54
54
serde = { version = " 1.0.123" , features = [" derive" ] }
55
55
serde_ignored = " 0.1.0"
Original file line number Diff line number Diff line change @@ -1495,3 +1495,23 @@ The following differences were detected with the current configuration:
1495
1495
" )
1496
1496
. run ( ) ;
1497
1497
}
1498
+
1499
+ #[ cargo_test]
1500
+ fn rustfix_handles_multi_spans ( ) {
1501
+ // Checks that rustfix handles a single diagnostic with multiple
1502
+ // suggestion spans (non_fmt_panic in this case).
1503
+ let p = project ( )
1504
+ . file ( "Cargo.toml" , & basic_manifest ( "foo" , "0.1.0" ) )
1505
+ . file (
1506
+ "src/lib.rs" ,
1507
+ r#"
1508
+ pub fn foo() {
1509
+ panic!(format!("hey"));
1510
+ }
1511
+ "# ,
1512
+ )
1513
+ . build ( ) ;
1514
+
1515
+ p. cargo ( "fix --allow-no-vcs" ) . run ( ) ;
1516
+ assert ! ( p. read_file( "src/lib.rs" ) . contains( r#"panic!("hey");"# ) ) ;
1517
+ }
You can’t perform that action at this time.
0 commit comments