Merge pull request #4491 from RalfJung/missing-mir

make the missing-MIR message more clear
This commit is contained in:
Ralf Jung 2025-07-24 12:26:58 +00:00 committed by GitHub
commit 94f725f8d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -334,8 +334,8 @@ pub fn create_ecx<'tcx>(
helpers::try_resolve_path(tcx, &["core", "ascii", "escape_default"], Namespace::ValueNS);
if !matches!(sentinel, Some(s) if tcx.is_mir_available(s.def.def_id())) {
tcx.dcx().fatal(
"the current sysroot was built without `-Zalways-encode-mir`, or libcore seems missing. \
Use `cargo miri setup` to prepare a sysroot that is suitable for Miri."
"the current sysroot was built without `-Zalways-encode-mir`, or libcore seems missing.\n\
Note that directly invoking the `miri` binary is not supported; please use `cargo miri` instead."
);
}