]> git.proxmox.com Git - cargo.git/commitdiff
Add some clarity on the license/license-file warning.
authorEric Huss <eric@huss.org>
Thu, 23 Sep 2021 03:26:40 +0000 (20:26 -0700)
committerEric Huss <eric@huss.org>
Thu, 23 Sep 2021 03:26:40 +0000 (20:26 -0700)
src/cargo/util/toml/mod.rs

index c4d19de3afaffbd162fbbf935b58046b7dde88e7..cdf84c6dc8e6e7ca015df0ff00e1d86a7fca238c 100644 (file)
@@ -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(),
             );
         }