Skip to content

Commit fdae9f2

Browse files
committed
test(edition): Without rust-version, no warning shown
1 parent d990adb commit fdae9f2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/testsuite/edition.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,31 @@ fn edition_unstable() {
125125
.run();
126126
}
127127

128+
#[cargo_test]
129+
fn unset_edition_with_unset_rust_version() {
130+
let p = project()
131+
.file(
132+
"Cargo.toml",
133+
r#"
134+
[package]
135+
name = 'foo'
136+
version = '0.1.0'
137+
"#,
138+
)
139+
.file("src/lib.rs", "")
140+
.build();
141+
142+
p.cargo("check -v")
143+
.with_stderr(
144+
"\
145+
[CHECKING] foo [..]
146+
[RUNNING] `rustc [..] --edition=2015 [..]`
147+
[FINISHED] [..]
148+
",
149+
)
150+
.run();
151+
}
152+
128153
#[cargo_test]
129154
fn unset_edition_works_with_no_newer_compatible_edition() {
130155
let p = project()

0 commit comments

Comments
 (0)