Open
Description
use std::io::{stdout, Write};
fn main() {
stdout().write(b"\x91");
}
The only output, in the "Errors" section, is the message Sandbox operation failed: Output was not valid UTF-8: invalid utf-8 sequence of 1 bytes from index 0
, which, although true, does not contain any compiler warnings or confirmation that compilation was successful. (At first, I thought this might be a connectivity issue or something of that nature.)
I want to see compiler output regardless of whether there is a problem with the actual program stdout. In this case, if you replace \x91
with some valid UTF-8 string, you see the following in the "Standard Error" section, which was absent in the original example:
Compiling playground v0.0.1 (file:///playground)
warning: unused `std::result::Result` which must be used
--> src/main.rs:3:5
|
3 | stdout().write(b"\x61");
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_must_use)] on by default
= note: this `Result` may be an `Err` variant, which should be handled
Finished dev [unoptimized + debuginfo] target(s) in 1.31s
Running `target/debug/playground`