Skip to content

Commit 19fddc0

Browse files
committed
Improve documentation on UndefinedBehaviorInfo::ValidationFailure
1 parent b877240 commit 19fddc0

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_middle/src/mir/interpret

1 file changed

+2
-0
lines changed

compiler/rustc_middle/src/mir/interpret/error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ pub enum UndefinedBehaviorInfo<'tcx> {
257257
/// Should only be thrown by `validity.rs` and always point out which part of the value
258258
/// is the problem.
259259
ValidationFailure {
260+
/// The "path" to the value in question, e.g. `.0[5].field` for a struct
261+
/// field in the 6th element of an array that is the first element of a tuple.
260262
path: Option<String>,
261263
msg: String,
262264
},

0 commit comments

Comments
 (0)