message: Add warning when `cargo tree -i <spec>` can not find packages
diff: @@ -213,7 +213,13 @@ pub fn build_and_print(ws: &Workspace<'_>, opts: &TreeOptions) -> CargoResult<()
  })
  .collect::<CargoResult<Vec<PackageIdSpec>>>()?;
  + if root_indexes.len() == 0 {
  + ws.config().shell().warn("nothing to print.\n\n\
  + To find dependencies that require specific features or target platforms, \
  + try use options `--all-features` or `--target all` first, and then narrow your search scope accordingly.")?;
  + } else {
  print(ws.config(), opts, root_indexes, &pkgs_to_prune, &graph)?;
  + }
  Ok(())
  }
  