mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() ``` error: couldn't read `$DIR/not-utf8-bin-file.rs`: stream did not contain valid UTF-8 --> $DIR/not-utf8-2.rs:6:5 | LL | include!("not-utf8-bin-file.rs"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: `[193]` is not valid utf-8 --> $DIR/not-utf8-bin-file.rs:2:14 | LL | let _ = "�|�␂!5�cc␕␂��"; | ^ = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info) ``` When we attempt to load a Rust source code file, if there is a OS file failure we try reading the file as bytes. If that succeeds we try to turn it into UTF-8. If *that* fails, we provide additional context about *where* the file has the first invalid UTF-8 character. Fix #76869. |
||
---|---|---|
.. | ||
auxiliary | ||
ast-const-trait-bound.rs | ||
ast-const-trait-bound.stdout | ||
avoid-crash.rs | ||
avoid-crash.stderr | ||
bad-literal.rs | ||
bad-literal.stderr | ||
bad-literal.stdout | ||
box.rs | ||
box.stdout | ||
expanded-exhaustive.rs | ||
expanded-exhaustive.stdout | ||
expanded-interpolation.rs | ||
expanded-interpolation.stdout | ||
extern-static.rs | ||
extern-static.stdout | ||
flattened-format-args.rs | ||
flattened-format-args.stdout | ||
hir-tree.rs | ||
let-else-hir.rs | ||
let-else-hir.stdout | ||
mir-unpretty.rs | ||
mir-unpretty.stderr | ||
staged-api-invalid-path-108697.rs | ||
staged-api-invalid-path-108697.stderr | ||
unpretty-expr-fn-arg.rs | ||
unpretty-expr-fn-arg.stdout | ||
unsafe-attr.rs | ||
unsafe-attr.stdout |