diff --git a/src/cargo/ops/cargo_new.rs b/src/cargo/ops/cargo_new.rs index 8ee61b2e80c..d72c91f0c21 100644 --- a/src/cargo/ops/cargo_new.rs +++ b/src/cargo/ops/cargo_new.rs @@ -618,6 +618,8 @@ version = "0.1.0" authors = [{}] edition = {} {} +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + [dependencies] {}"#, name, diff --git a/tests/testsuite/new.rs b/tests/testsuite/new.rs index 5076107e7a4..9dc44d079bb 100644 --- a/tests/testsuite/new.rs +++ b/tests/testsuite/new.rs @@ -522,3 +522,11 @@ fn new_with_blank_email() { let contents = fs::read_to_string(paths::root().join("foo/Cargo.toml")).unwrap(); assert!(contents.contains(r#"authors = ["Sen"]"#), contents); } + +#[test] +fn new_with_reference_link() { + cargo_process("new foo").env("USER", "foo").run(); + + let contents = fs::read_to_string(paths::root().join("foo/Cargo.toml")).unwrap(); + assert!(contents.contains("# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html")) +}