about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2018-10-23 02:04:42 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2018-11-10 01:10:07 +0100
commitf65b630d33ef2e57f0966c9b7b1f179e78502a9d (patch)
treeea421979aa80d87b2bf353247f29191c05754721 /src/libstd/thread
parent061d345c1657a86a9d94e90f916a0be8c966d062 (diff)
downloadrust-f65b630d33ef2e57f0966c9b7b1f179e78502a9d.tar.gz
rust-f65b630d33ef2e57f0966c9b7b1f179e78502a9d.zip
constify parts of libstd.
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index a57b8dc7237..3a3d2450014 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -286,7 +286,7 @@ impl Builder {
     /// handler.join().unwrap();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn new() -> Builder {
+    pub const fn new() -> Builder {
         Builder {
             name: None,
             stack_size: None,
@@ -1391,7 +1391,7 @@ impl<T> JoinHandle<T> {
     /// println!("thread id: {:?}", thread.id());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn thread(&self) -> &Thread {
+    pub const fn thread(&self) -> &Thread {
         &self.0.thread
     }