tidy: Use "const" instead of "static, and remove implied 'static lifetimes

Dropping the redundant lifetimes also eliminates a clippy warning.
This commit is contained in:
Josh Triplett 2018-09-01 16:46:57 -07:00
parent decc3b0eba
commit cd20cdf7e0
3 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@ use std::process::Command;
use serde_json;
static LICENSES: &'static [&'static str] = &[
const LICENSES: &[&str] = &[
"MIT/Apache-2.0",
"MIT / Apache-2.0",
"Apache-2.0/MIT",
@ -33,7 +33,7 @@ static LICENSES: &'static [&'static str] = &[
/// should be considered bugs. Exceptions are only allowed in Rust
/// tooling. It is _crucial_ that no exception crates be dependencies
/// of the Rust runtime (std / test).
static EXCEPTIONS: &'static [&'static str] = &[
const EXCEPTIONS: &[&str] = &[
"mdbook", // MPL2, mdbook
"openssl", // BSD+advertising clause, cargo, mdbook
"pest", // MPL2, mdbook via handlebars
@ -54,13 +54,13 @@ static EXCEPTIONS: &'static [&'static str] = &[
];
/// Which crates to check against the whitelist?
static WHITELIST_CRATES: &'static [CrateVersion] = &[
const WHITELIST_CRATES: &[CrateVersion] = &[
CrateVersion("rustc", "0.0.0"),
CrateVersion("rustc_codegen_llvm", "0.0.0"),
];
/// Whitelist of crates rustc is allowed to depend on. Avoid adding to the list if possible.
static WHITELIST: &'static [Crate] = &[
const WHITELIST: &[Crate] = &[
Crate("aho-corasick"),
Crate("arrayvec"),
Crate("atty"),

View File

@ -15,7 +15,7 @@ use std::io::Read;
use std::path::Path;
/// List of whitelisted sources for packages
static WHITELISTED_SOURCES: &'static [&'static str] = &[
const WHITELISTED_SOURCES: &[&str] = &[
"\"registry+https://github.com/rust-lang/crates.io-index\"",
];

View File

@ -50,7 +50,7 @@ use std::path::Path;
use std::iter::Iterator;
// Paths that may contain platform-specific code
const EXCEPTION_PATHS: &'static [&'static str] = &[
const EXCEPTION_PATHS: &[&str] = &[
// std crates
"src/liballoc_jemalloc",
"src/liballoc_system",