From d75723e9fe07b71eeaf9dad2d8a76080ea201b83 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 30 Aug 2019 08:37:02 +0200 Subject: [PATCH] mod-level doc comment for validity check --- src/librustc_mir/interpret/validity.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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;