mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Update rustfix.
This commit is contained in:
parent
46ba901448
commit
9362fe5ff3
@ -49,7 +49,7 @@ memchr = "2.1.3"
|
|||||||
num_cpus = "1.0"
|
num_cpus = "1.0"
|
||||||
opener = "0.4"
|
opener = "0.4"
|
||||||
percent-encoding = "2.0"
|
percent-encoding = "2.0"
|
||||||
rustfix = "0.5.0"
|
rustfix = "0.6.0"
|
||||||
semver = { version = "1.0.3", features = ["serde"] }
|
semver = { version = "1.0.3", features = ["serde"] }
|
||||||
serde = { version = "1.0.123", features = ["derive"] }
|
serde = { version = "1.0.123", features = ["derive"] }
|
||||||
serde_ignored = "0.1.0"
|
serde_ignored = "0.1.0"
|
||||||
|
@ -1495,3 +1495,23 @@ The following differences were detected with the current configuration:
|
|||||||
")
|
")
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cargo_test]
|
||||||
|
fn rustfix_handles_multi_spans() {
|
||||||
|
// Checks that rustfix handles a single diagnostic with multiple
|
||||||
|
// suggestion spans (non_fmt_panic in this case).
|
||||||
|
let p = project()
|
||||||
|
.file("Cargo.toml", &basic_manifest("foo", "0.1.0"))
|
||||||
|
.file(
|
||||||
|
"src/lib.rs",
|
||||||
|
r#"
|
||||||
|
pub fn foo() {
|
||||||
|
panic!(format!("hey"));
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
p.cargo("fix --allow-no-vcs").run();
|
||||||
|
assert!(p.read_file("src/lib.rs").contains(r#"panic!("hey");"#));
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user