Skip to content

Commit

Permalink
Auto merge of #9941 - ehuss:license-warning, r=Eh2406
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Sep 23, 2021
2 parents 5080dd3 + b77e4e9 commit 39ed55e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1398,8 +1398,12 @@ impl TomlManifest {
);
if project.license_file.is_some() && project.license.is_some() {
manifest.warnings_mut().add_warning(
"only one of `license` or \
`license-file` is necessary"
"only one of `license` or `license-file` is necessary\n\
`license` should be used if the package license can be expressed \
with a standard SPDX expression.\n\
`license-file` should be used if the package uses a non-standard license.\n\
See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields \
for more information."
.to_string(),
);
}
Expand Down

0 comments on commit 39ed55e

Please sign in to comment.