Skip to content

Commit

Permalink
test(manifest): Verify unset edition
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Feb 29, 2024
1 parent 1b6ff9a commit 0955a80
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/testsuite/edition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,29 @@ fn edition_unstable() {
)
.run();
}

#[cargo_test]
fn unset_edition_works_on_old_msrv() {
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = 'foo'
version = '0.1.0'
rust-version = "1.50" # contains 2018 edition
"#,
)
.file("src/lib.rs", "")
.build();

p.cargo("check -v")
.with_stderr(
"\
[CHECKING] foo [..]
[RUNNING] `rustc [..] --edition=2015 [..]`
[FINISHED] [..]
",
)
.run();
}

0 comments on commit 0955a80

Please sign in to comment.