Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes)
This commit is contained in:
parent
edd3e175d6
commit
c2bbe3349f
@ -1198,7 +1198,7 @@ impl<'tcx> TerminatorKind<'tcx> {
|
||||
t: BasicBlock,
|
||||
f: BasicBlock,
|
||||
) -> TerminatorKind<'tcx> {
|
||||
static BOOL_SWITCH_FALSE: &'static [u128] = &[0];
|
||||
static BOOL_SWITCH_FALSE: &[u128] = &[0];
|
||||
TerminatorKind::SwitchInt {
|
||||
discr: cond,
|
||||
switch_ty: tcx.types.bool,
|
||||
|
@ -604,8 +604,8 @@ fn write_diff<A: Analysis<'tcx>>(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
const BR_LEFT: &'static str = r#"<br align="left"/>"#;
|
||||
const BR_LEFT_SPACE: &'static str = r#"<br align="left"/> "#;
|
||||
const BR_LEFT: &str = r#"<br align="left"/>"#;
|
||||
const BR_LEFT_SPACE: &str = r#"<br align="left"/> "#;
|
||||
|
||||
/// Line break policy that breaks at 40 characters and starts the next line with a single space.
|
||||
const LIMIT_30_ALIGN_1: Option<LineBreak> = Some(LineBreak { sequence: BR_LEFT_SPACE, limit: 30 });
|
||||
|
@ -19,7 +19,7 @@ use rustc_span::{MultiSpan, Span, SpanSnippetError, DUMMY_SP};
|
||||
use log::{debug, trace};
|
||||
use std::mem;
|
||||
|
||||
const TURBOFISH: &'static str = "use `::<...>` instead of `<...>` to specify type arguments";
|
||||
const TURBOFISH: &str = "use `::<...>` instead of `<...>` to specify type arguments";
|
||||
|
||||
/// Creates a placeholder argument.
|
||||
pub(super) fn dummy_arg(ident: Ident) -> Param {
|
||||
|
@ -50,7 +50,7 @@ pub use self::types::Type::*;
|
||||
pub use self::types::Visibility::{Inherited, Public};
|
||||
pub use self::types::*;
|
||||
|
||||
const FN_OUTPUT_NAME: &'static str = "Output";
|
||||
const FN_OUTPUT_NAME: &str = "Output";
|
||||
|
||||
pub trait Clean<T> {
|
||||
fn clean(&self, cx: &DocContext<'_>) -> T;
|
||||
|
@ -194,7 +194,7 @@ impl fmt::Display for ItemType {
|
||||
}
|
||||
}
|
||||
|
||||
pub const NAMESPACE_TYPE: &'static str = "t";
|
||||
pub const NAMESPACE_VALUE: &'static str = "v";
|
||||
pub const NAMESPACE_MACRO: &'static str = "m";
|
||||
pub const NAMESPACE_KEYWORD: &'static str = "k";
|
||||
pub const NAMESPACE_TYPE: &str = "t";
|
||||
pub const NAMESPACE_VALUE: &str = "v";
|
||||
pub const NAMESPACE_MACRO: &str = "m";
|
||||
pub const NAMESPACE_KEYWORD: &str = "k";
|
||||
|
@ -3150,7 +3150,7 @@ fn render_attribute(attr: &ast::MetaItem) -> Option<String> {
|
||||
}
|
||||
}
|
||||
|
||||
const ATTRIBUTE_WHITELIST: &'static [Symbol] = &[
|
||||
const ATTRIBUTE_WHITELIST: &[Symbol] = &[
|
||||
sym::export_name,
|
||||
sym::lang,
|
||||
sym::link_section,
|
||||
@ -4610,7 +4610,7 @@ fn item_keyword(w: &mut Buffer, cx: &Context, it: &clean::Item) {
|
||||
document(w, cx, it)
|
||||
}
|
||||
|
||||
crate const BASIC_KEYWORDS: &'static str = "rust, rustlang, rust-lang";
|
||||
crate const BASIC_KEYWORDS: &str = "rust, rustlang, rust-lang";
|
||||
|
||||
fn make_item_keywords(it: &clean::Item) -> String {
|
||||
format!("{}, {}", BASIC_KEYWORDS, it.name.as_ref().unwrap())
|
||||
|
@ -19,9 +19,9 @@ cfg_if::cfg_if! {
|
||||
if #[cfg(target_os = "fuchsia")] {
|
||||
// fuchsia doesn't have /dev/null
|
||||
} else if #[cfg(target_os = "redox")] {
|
||||
const DEV_NULL: &'static str = "null:\0";
|
||||
const DEV_NULL: &str = "null:\0";
|
||||
} else {
|
||||
const DEV_NULL: &'static str = "/dev/null\0";
|
||||
const DEV_NULL: &str = "/dev/null\0";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ use time::TestExecTime;
|
||||
// Process exit code to be used to indicate test failures.
|
||||
const ERROR_EXIT_CODE: i32 = 101;
|
||||
|
||||
const SECONDARY_TEST_INVOKER_VAR: &'static str = "__RUST_TEST_INVOKE";
|
||||
const SECONDARY_TEST_INVOKER_VAR: &str = "__RUST_TEST_INVOKE";
|
||||
|
||||
// The default console test runner. It accepts the command line
|
||||
// arguments and a vector of test_descs.
|
||||
|
Loading…
Reference in New Issue
Block a user