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 94d0767 commit 07843edCopy full SHA for 07843ed
tests/testsuite/doc.rs
@@ -1344,6 +1344,31 @@ fn doc_extern_map_local() {
1344
.run();
1345
}
1346
1347
+#[cargo_test]
1348
+fn open_no_doc_crate() {
1349
+ let p = project()
1350
+ .file(
1351
+ "Cargo.toml",
1352
+ r#"
1353
+ [package]
1354
+ name = "a"
1355
+ version = "0.0.1"
1356
+ authors = []
1357
+
1358
+ [lib]
1359
+ doc = false
1360
+ "#,
1361
+ )
1362
+ .file("src/lib.rs", "#[cfg(feature)] pub fn f();")
1363
+ .build();
1364
1365
+ p.cargo("doc --open")
1366
+ .env("BROWSER", "do_not_run_me")
1367
+ .with_status(101)
1368
+ .with_stderr_contains("error: no crates with documentation")
1369
+ .run();
1370
+}
1371
1372
#[cargo_test]
1373
fn doc_workspace_open_different_library_and_package_names() {
1374
let p = project()
0 commit comments