1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Library-mode build-flow errors.
//!
//! [`BuildError`] covers infrastructure and input-validation failures
//! raised while driving a `build.rs` compilation. Pipeline-stage errors
//! (parse / stratify / plan / codegen) flow through this crate as their
//! own [`Diagnostic`] types inside a [`crate::common::BoxError`]; they
//! don't round-trip through `BuildError`.
use io;
use crateDiagnostic;
use crateFileId;
use Diagnostic as CsDiagnostic;
use Error;
/// Infrastructure failure raised by the library-mode build flow.
///
/// Surfaces filesystem I/O against `$OUT_DIR`, `OUT_DIR` lookup failures,
/// and input-validation rejections (malformed program paths) the builder
/// catches before handing off to the pipeline. Distinct from:
///
/// - [`crate::CodegenError`] — user-source errors caught during codegen.
/// - [`crate::common::InternalError`] — compiler invariant violations
/// that render as "please file a bug" ICEs.
///
/// [`Diagnostic::is_internal`] returns `false` for every `BuildError`
/// variant, so a top-level renderer (e.g. [`crate::common::emit_and_exit`])
/// exits with code `1` and omits the bug-report note — the user fixes
/// their build setup, not their `.dl` program.