Make some error messages lowercase
This commit is contained in:
parent
f756e3a93f
commit
e1bce19ca9
@ -77,7 +77,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||||||
|
|
||||||
let ptr = match this.read_scalar(ptr)?.check_init()? {
|
let ptr = match this.read_scalar(ptr)?.check_init()? {
|
||||||
Scalar::Ptr(ptr) => ptr,
|
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) {
|
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 {
|
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());
|
let pos = BytePos(ptr.offset.bytes().try_into().unwrap());
|
||||||
|
@ -7,7 +7,7 @@ fn main() {
|
|||||||
let frames = unsafe { miri_get_backtrace(0) };
|
let frames = unsafe { miri_get_backtrace(0) };
|
||||||
for frame in frames.into_iter() {
|
for frame in frames.into_iter() {
|
||||||
unsafe {
|
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 @@ extern "Rust" {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user