Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ab2168b

Browse files
committed
update 'unsupported' message
1 parent 90fb25a commit ab2168b

22 files changed

+45
-22
lines changed

src/tools/miri/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ interpreter will explicitly tell you when it finds something unsupported:
141141
error: unsupported operation: can't call foreign function: bind
142142
...
143143
= help: this is likely not a bug in the program; it indicates that the program \
144-
performed an operation that the interpreter does not support
144+
performed an operation that Miri does not support
145145
```
146146

147147
### Cross-interpretation: running for different targets

src/tools/miri/src/diagnostics.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,10 @@ pub fn report_error<'tcx, 'mir>(
320320
#[rustfmt::skip]
321321
let helps = match e.kind() {
322322
Unsupported(_) =>
323-
vec![(None, format!("this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support"))],
323+
vec![
324+
(None, format!("this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support")),
325+
(None, format!("if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there")),
326+
],
324327
UndefinedBehavior(AlignmentCheckFailed { .. })
325328
if ecx.machine.check_alignment == AlignmentCheck::Symbolic
326329
=>

src/tools/miri/tests/extern-so/fail/function_not_in_so.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error: unsupported operation: can't call foreign function `foo` on $OS
44
LL | foo();
55
| ^^^^^ can't call foreign function `foo` on $OS
66
|
7-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7+
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
8+
= help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
89
= note: BACKTRACE:
910
= note: inside `main` at $DIR/function_not_in_so.rs:LL:CC
1011

src/tools/miri/tests/fail-dep/shims/fs/close_stdout.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error: unsupported operation: cannot close stdout
44
LL | libc::close(1);
55
| ^^^^^^^^^^^^^^ cannot close stdout
66
|
7-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7+
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
8+
= help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
89
= note: BACKTRACE:
910
= note: inside `main` at $DIR/close_stdout.rs:LL:CC
1011

src/tools/miri/tests/fail-dep/shims/fs/read_from_stdout.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error: unsupported operation: cannot read from stdout
44
LL | libc::read(1, bytes.as_mut_ptr() as *mut libc::c_void, 512);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot read from stdout
66
|
7-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7+
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
8+
= help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
89
= note: BACKTRACE:
910
= note: inside `main` at $DIR/read_from_stdout.rs:LL:CC
1011

src/tools/miri/tests/fail-dep/shims/fs/write_to_stdin.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error: unsupported operation: cannot write to stdin
44
LL | libc::write(0, bytes.as_ptr() as *const libc::c_void, 5);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot write to stdin
66
|
7-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7+
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
8+
= help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
89
= note: BACKTRACE:
910
= note: inside `main` at $DIR/write_to_stdin.rs:LL:CC
1011

src/tools/miri/tests/fail-dep/tokio/sleep.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ LL | | timeout,
99
LL | | ))
1010
| |__________^ returning ready events from epoll_wait is not yet implemented
1111
|
12-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
12+
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
13+
= help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
1314

1415
error: aborting due to 1 previous error
1516

src/tools/miri/tests/fail-dep/unsupported_incomplete_function.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error: unsupported operation: can't call foreign function `signal` on $OS
44
LL | libc::signal(libc::SIGPIPE, libc::SIG_IGN);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function `signal` on $OS
66
|
7-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7+
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
8+
= help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
89
= note: BACKTRACE:
910
= note: inside `main` at $DIR/unsupported_incomplete_function.rs:LL:CC
1011

src/tools/miri/tests/fail/alloc/no_global_allocator.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error: unsupported operation: can't call foreign function `__rust_alloc` on $OS
44
LL | __rust_alloc(1, 1);
55
| ^^^^^^^^^^^^^^^^^^ can't call foreign function `__rust_alloc` on $OS
66
|
7-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7+
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
8+
= help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
89
= note: BACKTRACE:
910
= note: inside `start` at $DIR/no_global_allocator.rs:LL:CC
1011

src/tools/miri/tests/fail/extern-type-field-offset.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ error: unsupported operation: `extern type` does not have a known offset
44
LL | let _field = &x.a;
55
| ^^^^ `extern type` does not have a known offset
66
|
7-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7+
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
8+
= help: if this is a basic API commonly used on this target, please report an issue; but note that Miri does not aim to support every FFI function out there
89
= note: BACKTRACE:
910
= note: inside `main` at $DIR/extern-type-field-offset.rs:LL:CC
1011

0 commit comments

Comments
 (0)