diff options
author | Andrew Cann <shum@canndrew.org> | 2018-06-01 16:58:47 +0800 |
---|---|---|
committer | Andrew Cann <shum@canndrew.org> | 2018-06-01 16:58:47 +0800 |
commit | c460b376c22d9e73fad112194c02a133c92d6a03 (patch) | |
tree | 919c7519f18eee103958a639ab97604e6dbc2c61 | |
parent | 6578c7c7d15fa0e6174bab9c8144b4c43ee703fa (diff) | |
download | rust-libc-c460b376c22d9e73fad112194c02a133c92d6a03.tar.gz |
make dox::mem::size_of a const fn
-rw-r--r-- | src/dox.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dox.rs b/src/dox.rs index 941b65cc74..91fd7f75d6 100644 --- a/src/dox.rs +++ b/src/dox.rs @@ -160,6 +160,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 } } } |