Skip to content

Commit b1496c6

Browse files
committed
Auto merge of #78075 - est31:remove_redundant_static, r=jonas-schievink
Remove redundant 'static
2 parents 187b877 + b87e4f3 commit b1496c6

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

compiler/rustc_feature/src/builtin_attrs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ pub fn is_builtin_attr_name(name: Symbol) -> bool {
598598
BUILTIN_ATTRIBUTE_MAP.get(&name).is_some()
599599
}
600600

601-
pub static BUILTIN_ATTRIBUTE_MAP: SyncLazy<FxHashMap<Symbol, &'static BuiltinAttribute>> =
601+
pub static BUILTIN_ATTRIBUTE_MAP: SyncLazy<FxHashMap<Symbol, &BuiltinAttribute>> =
602602
SyncLazy::new(|| {
603603
let mut map = FxHashMap::default();
604604
for attr in BUILTIN_ATTRIBUTES.iter() {

compiler/rustc_parse/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::str;
2222

2323
use tracing::{debug, info};
2424

25-
pub const MACRO_ARGUMENTS: Option<&'static str> = Some("macro arguments");
25+
pub const MACRO_ARGUMENTS: Option<&str> = Some("macro arguments");
2626

2727
#[macro_use]
2828
pub mod parser;

library/core/benches/ascii.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ macro_rules! repeat {
253253
};
254254
}
255255

256-
const SHORT: &'static str = "Alice's";
257-
const MEDIUM: &'static str = "Alice's Adventures in Wonderland";
258-
const LONG: &'static str = repeat!(
256+
const SHORT: &str = "Alice's";
257+
const MEDIUM: &str = "Alice's Adventures in Wonderland";
258+
const LONG: &str = repeat!(
259259
r#"
260260
La Guida di Bragia, a Ballad Opera for the Marionette Theatre (around 1850)
261261
Alice's Adventures in Wonderland (1865)

library/std/src/net/addr/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn bind_udp_socket_bad() {
6868
// returns its own address, it is still an error to bind a UDP socket to
6969
// a non-local address, and so we still get an error here in that case.
7070

71-
const INPUT_23076: &'static str = "1200::AB00:1234::2552:7777:1313:34300";
71+
const INPUT_23076: &str = "1200::AB00:1234::2552:7777:1313:34300";
7272

7373
assert!(crate::net::UdpSocket::bind(INPUT_23076).is_err())
7474
}

library/std/src/sys/sgx/env.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
pub mod os {
2-
pub const FAMILY: &'static str = "";
3-
pub const OS: &'static str = "";
4-
pub const DLL_PREFIX: &'static str = "";
5-
pub const DLL_SUFFIX: &'static str = ".sgxs";
6-
pub const DLL_EXTENSION: &'static str = "sgxs";
7-
pub const EXE_SUFFIX: &'static str = ".sgxs";
8-
pub const EXE_EXTENSION: &'static str = "sgxs";
2+
pub const FAMILY: &str = "";
3+
pub const OS: &str = "";
4+
pub const DLL_PREFIX: &str = "";
5+
pub const DLL_SUFFIX: &str = ".sgxs";
6+
pub const DLL_EXTENSION: &str = "sgxs";
7+
pub const EXE_SUFFIX: &str = ".sgxs";
8+
pub const EXE_EXTENSION: &str = "sgxs";
99
}

library/std/src/sys/sgx/path.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ pub fn parse_prefix(_: &OsStr) -> Option<Prefix<'_>> {
1515
None
1616
}
1717

18-
pub const MAIN_SEP_STR: &'static str = "/";
18+
pub const MAIN_SEP_STR: &str = "/";
1919
pub const MAIN_SEP: char = '/';

0 commit comments

Comments
 (0)