Make some error messages lowercase

This commit is contained in:
Aaron Hill 2020-09-24 19:10:02 -04:00
parent f756e3a93f
commit e1bce19ca9
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
3 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
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 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
};
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());

View File

@ -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
}
}
}

View File

@ -4,6 +4,6 @@ extern "Rust" {
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
}
}