Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #19189 from Veykril/push-qutznxznnwqn
minor: Improve unset `OUT_DIR` error message
Lukas Wirth 2025-02-21
parent 8de928d · parent 6b32c83 · commit 88bc40a
-rw-r--r--crates/hir-expand/src/builtin/fn_macro.rs2
-rw-r--r--crates/ide-diagnostics/src/handlers/macro_error.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-expand/src/builtin/fn_macro.rs b/crates/hir-expand/src/builtin/fn_macro.rs
index 310ddaaf9e..55242ab3e5 100644
--- a/crates/hir-expand/src/builtin/fn_macro.rs
+++ b/crates/hir-expand/src/builtin/fn_macro.rs
@@ -833,7 +833,7 @@ fn env_expand(
if key.as_str() == "OUT_DIR" {
err = Some(ExpandError::other(
span,
- r#"`OUT_DIR` not set, enable "build scripts" to fix"#,
+ r#"`OUT_DIR` not set, build scripts may have failed to run"#,
));
}
diff --git a/crates/ide-diagnostics/src/handlers/macro_error.rs b/crates/ide-diagnostics/src/handlers/macro_error.rs
index 99894fefef..2f13298589 100644
--- a/crates/ide-diagnostics/src/handlers/macro_error.rs
+++ b/crates/ide-diagnostics/src/handlers/macro_error.rs
@@ -133,7 +133,7 @@ macro_rules! env { () => {} }
macro_rules! concat { () => {} }
include!(concat!(env!("OUT_DIR"), "/out.rs"));
- //^^^^^^^^^ error: `OUT_DIR` not set, enable "build scripts" to fix
+ //^^^^^^^^^ error: `OUT_DIR` not set, build scripts may have failed to run
"#,
);
}
@@ -186,7 +186,7 @@ fn main() {
//^^^^^^^ error: expected string literal
env!("OUT_DIR");
- //^^^^^^^^^ error: `OUT_DIR` not set, enable "build scripts" to fix
+ //^^^^^^^^^ error: `OUT_DIR` not set, build scripts may have failed to run
compile_error!("compile_error works");
//^^^^^^^^^^^^^ error: compile_error works