diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2021-06-14 18:57:06 +0200 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2021-06-14 18:57:06 +0200 |
| commit | 19fddc019f2349e183b9eac231c0ce9b261b39f5 (patch) | |
| tree | 064cc4e95b370ca865f57d51893ac8205aedde0e | |
| parent | b87724053eacc8251cd9bf4f356f1c78497b9031 (diff) | |
| download | rust-19fddc019f2349e183b9eac231c0ce9b261b39f5.tar.gz rust-19fddc019f2349e183b9eac231c0ce9b261b39f5.zip | |
Improve documentation on `UndefinedBehaviorInfo::ValidationFailure`
| -rw-r--r-- | compiler/rustc_middle/src/mir/interpret/error.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs index b01eb28e946..7941800c7fa 100644 --- a/compiler/rustc_middle/src/mir/interpret/error.rs +++ b/compiler/rustc_middle/src/mir/interpret/error.rs @@ -257,6 +257,8 @@ pub enum UndefinedBehaviorInfo<'tcx> { /// Should only be thrown by `validity.rs` and always point out which part of the value /// is the problem. ValidationFailure { + /// The "path" to the value in question, e.g. `.0[5].field` for a struct + /// field in the 6th element of an array that is the first element of a tuple. path: Option<String>, msg: String, }, |
