about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2019-08-31 14:55:21 +0200
committergnzlbg <gnzlbg@users.noreply.github.com>2019-09-06 15:01:26 +0200
commit5b11935d4331f9a908f00359cc3e96e99e055be1 (patch)
tree617990f3a786d84f40b2e5ac35dd7146c437e76c /library/stdarch/crates/std_detect
parent430744f46a9f1be5b6dd52c428340fb8e8b49218 (diff)
downloadrust-5b11935d4331f9a908f00359cc3e96e99e055be1.tar.gz
rust-5b11935d4331f9a908f00359cc3e96e99e055be1.zip
Document how miri support works
Co-Authored-By: gnzlbg <gnzlbg@users.noreply.github.com>
Diffstat (limited to 'library/stdarch/crates/std_detect')
-rw-r--r--library/stdarch/crates/std_detect/src/detect/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/mod.rs b/library/stdarch/crates/std_detect/src/detect/mod.rs
index 70a50820b36..80207daad8f 100644
--- a/library/stdarch/crates/std_detect/src/detect/mod.rs
+++ b/library/stdarch/crates/std_detect/src/detect/mod.rs
@@ -65,6 +65,11 @@ mod cache;
 
 cfg_if! {
     if #[cfg(miri)] {
+        // When running under miri all target-features that are not enabled at
+        // compile-time are reported as disabled at run-time.
+        //
+        // For features for which `cfg(target_feature)` returns true,
+        // this run-time detection logic is never called.
         #[path = "os/other.rs"]
         mod os;
     } else if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {