We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 852a316 commit f68be76Copy full SHA for f68be76
tests/testsuite/rust_version.rs
@@ -124,6 +124,40 @@ fn rust_version_bad_pre_release() {
124
.run();
125
}
126
127
+#[cargo_test]
128
+#[should_panic]
129
+fn rust_version_x_wildcard() {
130
+ project()
131
+ .file(
132
+ "Cargo.toml",
133
+ r#"
134
+ [package]
135
+ name = "foo"
136
+ version = "0.0.1"
137
+ edition = "2015"
138
+ authors = []
139
+ rust-version = "x"
140
+ [[bin]]
141
142
+ "#,
143
+ )
144
+ .file("src/main.rs", "fn main() {}")
145
+ .build()
146
+ .cargo("check")
147
+ .with_status(101)
148
+ .with_stderr(
149
+ "\
150
+[ERROR] unexpected version requirement, expected a version like \"1.32\"
151
+ --> Cargo.toml:7:28
152
+ |
153
+7 | rust-version = \"^1.43\"
154
+ | ^^^^^^^
155
156
+",
157
158
+ .run();
159
+}
160
+
161
#[cargo_test]
162
fn rust_version_bad_nonsense() {
163
project()
0 commit comments