File tree Expand file tree Collapse file tree 1 file changed +25
-25
lines changed Expand file tree Collapse file tree 1 file changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,31 @@ fn rust_version_bad_nonsense() {
157
157
. run ( ) ;
158
158
}
159
159
160
+ #[ cargo_test]
161
+ fn rust_version_older_than_edition ( ) {
162
+ project ( )
163
+ . file (
164
+ "Cargo.toml" ,
165
+ r#"
166
+ [package]
167
+ name = "foo"
168
+ version = "0.0.1"
169
+ authors = []
170
+ rust-version = "1.1"
171
+ edition = "2018"
172
+ [[bin]]
173
+ name = "foo"
174
+ "# ,
175
+ )
176
+ . file ( "src/main.rs" , "fn main() {}" )
177
+ . build ( )
178
+ . cargo ( "check" )
179
+ . with_status ( 101 )
180
+ . with_stderr_contains ( " rust-version 1.1 is older than first version (1.31.0) required by the specified edition (2018)" ,
181
+ )
182
+ . run ( ) ;
183
+ }
184
+
160
185
#[ cargo_test]
161
186
fn rust_version_too_high ( ) {
162
187
let p = project ( )
@@ -676,28 +701,3 @@ See https://github.com/rust-lang/cargo/issues/9930 for more information about th
676
701
)
677
702
. run ( ) ;
678
703
}
679
-
680
- #[ cargo_test]
681
- fn rust_version_older_than_edition ( ) {
682
- project ( )
683
- . file (
684
- "Cargo.toml" ,
685
- r#"
686
- [package]
687
- name = "foo"
688
- version = "0.0.1"
689
- authors = []
690
- rust-version = "1.1"
691
- edition = "2018"
692
- [[bin]]
693
- name = "foo"
694
- "# ,
695
- )
696
- . file ( "src/main.rs" , "fn main() {}" )
697
- . build ( )
698
- . cargo ( "check" )
699
- . with_status ( 101 )
700
- . with_stderr_contains ( " rust-version 1.1 is older than first version (1.31.0) required by the specified edition (2018)" ,
701
- )
702
- . run ( ) ;
703
- }
You can’t perform that action at this time.
0 commit comments