Make some error messages lowercase

This commit is contained in:
Aaron Hill
2020-09-24 19:10:02 -04:00
parent f756e3a93f
commit e1bce19ca9
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -77,7 +77,7 @@ fn handle_miri_resolve_frame(
let ptr = match this.read_scalar(ptr)?.check_init()? {
Scalar::Ptr(ptr) => ptr,
Scalar::Raw { .. } => throw_ub_format!("Expected a pointer in `rust_miri_resolve_frame`, found {:?}", ptr)
Scalar::Raw { .. } => throw_ub_format!("expected a pointer in `rust_miri_resolve_frame`, found {:?}", ptr)
};
let fn_instance = if let Some(GlobalAlloc::Function(instance)) = this.tcx.get_global_alloc(ptr.alloc_id) {
@@ -87,7 +87,7 @@ fn handle_miri_resolve_frame(
};
if dest.layout.layout.fields.count() != 4 {
throw_ub_format!("Bad declaration of miri_resolve_frame - should return a struct with 4 fields");
throw_ub_format!("bad declaration of miri_resolve_frame - should return a struct with 4 fields");
}
let pos = BytePos(ptr.offset.bytes().try_into().unwrap());
@@ -7,7 +7,7 @@ fn main() {
let frames = unsafe { miri_get_backtrace(0) };
for frame in frames.into_iter() {
unsafe {
miri_resolve_frame(*frame, 0); //~ ERROR Undefined Behavior: Bad declaration of miri_resolve_frame - should return a struct with 4 fields
miri_resolve_frame(*frame, 0); //~ ERROR Undefined Behavior: bad declaration of miri_resolve_frame - should return a struct with 4 fields
}
}
}
@@ -4,6 +4,6 @@
fn main() {
unsafe {
miri_resolve_frame(0 as *mut _, 0); //~ ERROR Undefined Behavior: Expected a pointer
miri_resolve_frame(0 as *mut _, 0); //~ ERROR Undefined Behavior: expected a pointer
}
}