diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-06 19:00:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-06 19:00:49 +0200 |
| commit | afb6a7002da240f77bd8f6ebb06f9c5d55c20dfb (patch) | |
| tree | f33e6fb7e357ce0296871b7e623ad3a3d1201e1b /src/librustc/mir/interpret | |
| parent | 57e900e453ab271aa30371208aee9cf95f836ab6 (diff) | |
| parent | 022d9c8eb56144c00980c88d4b68a5a1e487484a (diff) | |
| download | rust-afb6a7002da240f77bd8f6ebb06f9c5d55c20dfb.tar.gz rust-afb6a7002da240f77bd8f6ebb06f9c5d55c20dfb.zip | |
Rollup merge of #64202 - alexreg:rush-pr-1, r=Centril
Fixed grammar/style in some error messages Factored out from hacking on rustc for work on the REPL. r? @Centril
Diffstat (limited to 'src/librustc/mir/interpret')
| -rw-r--r-- | src/librustc/mir/interpret/error.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index ef0e2051848..589a021241d 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -430,13 +430,13 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> { match self { PointerOutOfBounds { ptr, msg, allocation_size } => { write!(f, "{} failed: pointer must be in-bounds at offset {}, \ - but is outside bounds of allocation {} which has size {}", + but is outside bounds of allocation {} which has size {}", msg, ptr.offset.bytes(), ptr.alloc_id, allocation_size.bytes()) }, ValidationFailure(ref err) => { write!(f, "type validation failed: {}", err) } - NoMirFor(ref func) => write!(f, "no mir for `{}`", func), + NoMirFor(ref func) => write!(f, "no MIR for `{}`", func), FunctionAbiMismatch(caller_abi, callee_abi) => write!(f, "tried to call a function with ABI {:?} using caller ABI {:?}", callee_abi, caller_abi), @@ -451,9 +451,9 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> { FunctionArgCountMismatch => write!(f, "tried to call a function with incorrect number of arguments"), ReallocatedWrongMemoryKind(ref old, ref new) => - write!(f, "tried to reallocate memory from {} to {}", old, new), + write!(f, "tried to reallocate memory from `{}` to `{}`", old, new), DeallocatedWrongMemoryKind(ref old, ref new) => - write!(f, "tried to deallocate {} memory but gave {} as the kind", old, new), + write!(f, "tried to deallocate `{}` memory but gave `{}` as the kind", old, new), InvalidChar(c) => write!(f, "tried to interpret an invalid 32-bit value as a char: {}", c), AlignmentCheckFailed { required, has } => @@ -462,7 +462,7 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> { TypeNotPrimitive(ty) => write!(f, "expected primitive type, got {}", ty), PathNotFound(ref path) => - write!(f, "Cannot find path {:?}", path), + write!(f, "cannot find path {:?}", path), IncorrectAllocationInformation(size, size2, align, align2) => write!(f, "incorrect alloc info: expected size {} and align {}, \ got size {} and align {}", @@ -525,7 +525,7 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> { InvalidBoolOp(_) => write!(f, "invalid boolean operation"), UnterminatedCString(_) => - write!(f, "attempted to get length of a null terminated string, but no null \ + write!(f, "attempted to get length of a null-terminated string, but no null \ found before end of allocation"), ReadUndefBytes(_) => write!(f, "attempted to read undefined bytes"), |
