about summary refs log tree commit diff
path: root/src/libstd/ffi
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2018-12-04 10:21:42 +0100
committerljedrz <ljedrz@gmail.com>2018-12-04 10:21:42 +0100
commit8c4129cd9ae079fc010b8e3d73a72659b2f0a986 (patch)
tree99f1759018df33a5a7075f51410e7d7eaea15c9e /src/libstd/ffi
parent91d5d56c00d8e2926ccf856f14a4e52ef480d039 (diff)
downloadrust-8c4129cd9ae079fc010b8e3d73a72659b2f0a986.tar.gz
rust-8c4129cd9ae079fc010b8e3d73a72659b2f0a986.zip
cleanup: remove static lifetimes from consts in libstd
Diffstat (limited to 'src/libstd/ffi')
-rw-r--r--src/libstd/ffi/c_str.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index 66718b95408..7c7f83967e0 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -671,7 +671,7 @@ impl fmt::Debug for CStr {
 #[stable(feature = "cstr_default", since = "1.10.0")]
 impl<'a> Default for &'a CStr {
     fn default() -> &'a CStr {
-        const SLICE: &'static [c_char] = &[0];
+        const SLICE: &[c_char] = &[0];
         unsafe { CStr::from_ptr(SLICE.as_ptr()) }
     }
 }
@@ -1475,7 +1475,7 @@ mod tests {
 
     #[test]
     fn cstr_const_constructor() {
-        const CSTR: &'static CStr = unsafe {
+        const CSTR: &CStr = unsafe {
             CStr::from_bytes_with_nul_unchecked(b"Hello, world!\0")
         };