about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-04-22 10:34:06 +0900
committerGitHub <noreply@github.com>2020-04-22 10:34:06 +0900
commitf28e3873c55eb4bdcfc496e1f300b97aeb0d189c (patch)
treecf842e5abce7ab4af730230b342c338fb93079f8 /src/libstd/thread
parent567e54fca5e864f95cd41ca05c113aa6b18d7006 (diff)
parent9af047ff74f79911b6e251cd1751be8644437158 (diff)
downloadrust-f28e3873c55eb4bdcfc496e1f300b97aeb0d189c.tar.gz
rust-f28e3873c55eb4bdcfc496e1f300b97aeb0d189c.zip
Rollup merge of #71366 - faern:use-assoc-int-consts3, r=dtolnay
Use assoc int consts3

Define module level int consts with associated constants instead of `min_value()` and `max_value()`. So the code become consistent with what the docs recommend etc. Seems natural.

Also remove the last usages of the int module constants from this repo (except src/test/ directory which I have still not really done anything in). Some places were missed in the previous PRs because the code uses `crate::<IntTy>` to reach the constants.

This is a continuation of #70857

r? @dtolnay
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 282e268efd2..7a3cbbe4562 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1062,7 +1062,7 @@ impl ThreadId {
 
             // If we somehow use up all our bits, panic so that we're not
             // covering up subtle bugs of IDs being reused.
-            if COUNTER == crate::u64::MAX {
+            if COUNTER == u64::MAX {
                 panic!("failed to generate unique thread ID: bitspace exhausted");
             }