about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-08-30 08:37:02 +0200
committerRalf Jung <post@ralfj.de>2019-08-30 08:37:02 +0200
commitd75723e9fe07b71eeaf9dad2d8a76080ea201b83 (patch)
tree91f72f688313393ba02e307acabcea861f4fd8ae /src
parent235ee34a15a272aa7eb540a632e719fbae68329b (diff)
downloadrust-d75723e9fe07b71eeaf9dad2d8a76080ea201b83.tar.gz
rust-d75723e9fe07b71eeaf9dad2d8a76080ea201b83.zip
mod-level doc comment for validity check
Diffstat (limited to 'src')
-rw-r--r--src/librustc_mir/interpret/validity.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs
index c2505547c5b..3e14ba3efcc 100644
--- a/src/librustc_mir/interpret/validity.rs
+++ b/src/librustc_mir/interpret/validity.rs
@@ -1,3 +1,9 @@
+//! Check the validity invariant of a given value, and tell the user
+//! where in the value it got violated.
+//! In const context, this goes even further and tries to approximate const safety.
+//! That's useful because it means other passes (e.g. promotion) can rely on `const`s
+//! to be const-safe.
+
 use std::fmt::Write;
 use std::ops::RangeInclusive;