Skip to content

Commit 39ed55e

Browse files
committed
Auto merge of #9941 - ehuss:license-warning, r=Eh2406
Add some clarity on the license/license-file warning. As noted in #8537, there is some confusion about why license and license-file are mutually exclusive. This attempts to add some detail to the warning.
2 parents 5080dd3 + b77e4e9 commit 39ed55e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,8 +1398,12 @@ impl TomlManifest {
13981398
);
13991399
if project.license_file.is_some() && project.license.is_some() {
14001400
manifest.warnings_mut().add_warning(
1401-
"only one of `license` or \
1402-
`license-file` is necessary"
1401+
"only one of `license` or `license-file` is necessary\n\
1402+
`license` should be used if the package license can be expressed \
1403+
with a standard SPDX expression.\n\
1404+
`license-file` should be used if the package uses a non-standard license.\n\
1405+
See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields \
1406+
for more information."
14031407
.to_string(),
14041408
);
14051409
}

0 commit comments

Comments
 (0)