Rollup merge of #56497 - ljedrz:cleanup_libstd_const_lifetimes, r=kennytm

cleanup: remove static lifetimes from consts in libstd
This commit is contained in:
Pietro Albini 2018-12-05 23:54:36 +01:00 committed by GitHub
commit bcf2fa190e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 173 additions and 173 deletions

View file

@ -9,11 +9,11 @@
// except according to those terms.
pub mod os {
pub const FAMILY: &'static str = "windows";
pub const OS: &'static str = "windows";
pub const DLL_PREFIX: &'static str = "";
pub const DLL_SUFFIX: &'static str = ".dll";
pub const DLL_EXTENSION: &'static str = "dll";
pub const EXE_SUFFIX: &'static str = ".exe";
pub const EXE_EXTENSION: &'static str = "exe";
pub const FAMILY: &str = "windows";
pub const OS: &str = "windows";
pub const DLL_PREFIX: &str = "";
pub const DLL_SUFFIX: &str = ".dll";
pub const DLL_EXTENSION: &str = "dll";
pub const EXE_SUFFIX: &str = ".exe";
pub const EXE_EXTENSION: &str = "exe";
}

View file

@ -48,8 +48,8 @@ pub fn error_string(mut errnum: i32) -> String {
// `[MS-ERREF]`: https://msdn.microsoft.com/en-us/library/cc231198.aspx
if (errnum & c::FACILITY_NT_BIT as i32) != 0 {
// format according to https://support.microsoft.com/en-us/help/259693
const NTDLL_DLL: &'static [u16] = &['N' as _, 'T' as _, 'D' as _, 'L' as _, 'L' as _,
'.' as _, 'D' as _, 'L' as _, 'L' as _, 0];
const NTDLL_DLL: &[u16] = &['N' as _, 'T' as _, 'D' as _, 'L' as _, 'L' as _,
'.' as _, 'D' as _, 'L' as _, 'L' as _, 0];
module = c::GetModuleHandleW(NTDLL_DLL.as_ptr());
if module != ptr::null_mut() {

View file

@ -99,5 +99,5 @@ pub fn parse_prefix<'a>(path: &'a OsStr) -> Option<Prefix> {
}
}
pub const MAIN_SEP_STR: &'static str = "\\";
pub const MAIN_SEP_STR: &str = "\\";
pub const MAIN_SEP: char = '\\';