diff options
| author | Ralf Jung <post@ralfj.de> | 2020-04-16 17:41:28 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-04-16 17:41:28 +0200 |
| commit | 18d0907dcc8ca5b71e6a70ff7eaed30c3e883d84 (patch) | |
| tree | 4740f5dfbe37c2a5906c7bfd3f10be77e1ddb5f9 /src/librustc_middle | |
| parent | 351eefe93a96f98d37182701590493b6710175c3 (diff) | |
| download | rust-18d0907dcc8ca5b71e6a70ff7eaed30c3e883d84.tar.gz rust-18d0907dcc8ca5b71e6a70ff7eaed30c3e883d84.zip | |
Miri error messages: avoid try terminology
Diffstat (limited to 'src/librustc_middle')
| -rw-r--r-- | src/librustc_middle/mir/interpret/error.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_middle/mir/interpret/error.rs b/src/librustc_middle/mir/interpret/error.rs index 7844fb10840..ddff9a57818 100644 --- a/src/librustc_middle/mir/interpret/error.rs +++ b/src/librustc_middle/mir/interpret/error.rs @@ -305,7 +305,7 @@ impl fmt::Debug for InvalidProgramInfo<'_> { Layout(ref err) => write!(f, "{}", err), TransmuteSizeDiff(from_ty, to_ty) => write!( f, - "tried to transmute from {:?} to {:?}, but their sizes differed", + "transmuting from {:?} to {:?}, which do not have the same size", from_ty, to_ty ), } @@ -431,7 +431,7 @@ impl fmt::Debug for UndefinedBehaviorInfo { "using uninitialized data, but this operation requires initialized memory" ), DeadLocal => write!(f, "accessing a dead local variable"), - ReadFromReturnPlace => write!(f, "tried to read from the return place"), + ReadFromReturnPlace => write!(f, "reading from return place"), } } } @@ -462,9 +462,9 @@ impl fmt::Debug for UnsupportedOpInfo { match self { Unsupported(ref msg) => write!(f, "{}", msg), ReadForeignStatic(did) => { - write!(f, "tried to read from foreign (extern) static {:?}", did) + write!(f, "cannot read from foreign (extern) static {:?}", did) } - NoMirFor(did) => write!(f, "could not load MIR for {:?}", did), + NoMirFor(did) => write!(f, "cannot load MIR for {:?}", did), ReadPointerAsBytes => write!(f, "unable to turn pointer into raw bytes",), ReadBytesAsPointer => write!(f, "unable to turn bytes into a pointer"), } |
