diff options
author | bors <bors@rust-lang.org> | 2018-06-01 19:57:12 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2018-06-01 19:57:12 +0000 |
commit | a75938db01e55cdb48dd95621a5b784888537cf7 (patch) | |
tree | c9b243b17c7557260c64624e51bf0345adcd8e9e | |
parent | 1fc4c57828b9deb5f45961e94da757caa7c139d7 (diff) | |
parent | 0198ea0d76788654800f646de88d165813ad8f07 (diff) | |
download | rust-libc-a75938db01e55cdb48dd95621a5b784888537cf7.tar.gz |
Auto merge of #1010 - canndrew:make-size_of-const, r=alexcrichton
make dox::mem::size_of a const fn
-rw-r--r-- | src/dox.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dox.rs b/src/dox.rs index 4b03a5abd1..779641b3cc 100644 --- a/src/dox.rs +++ b/src/dox.rs @@ -204,6 +204,6 @@ mod imp { pub mod mem { pub fn size_of_val<T>(_: &T) -> usize { 4 } - pub fn size_of<T>() -> usize { 4 } + pub const fn size_of<T>() -> usize { 4 } } } diff --git a/src/lib.rs b/src/lib.rs index 9548083c22..489315cfda 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,7 +13,7 @@ #![allow(bad_style, overflowing_literals, improper_ctypes)] #![crate_type = "rlib"] #![crate_name = "libc"] -#![cfg_attr(cross_platform_docs, feature(no_core, lang_items))] +#![cfg_attr(cross_platform_docs, feature(no_core, lang_items, const_fn))] #![cfg_attr(cross_platform_docs, no_core)] #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://doc.rust-lang.org/favicon.ico")] |