From b77e4e915b7dcc91bf875229c39a79db04e09908 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 22 Sep 2021 20:26:40 -0700 Subject: [PATCH] Add some clarity on the license/license-file warning. --- src/cargo/util/toml/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index c4d19de3afa..cdf84c6dc8e 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -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(), ); }