We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfd4e97 commit ec50a75Copy full SHA for ec50a75
src/tools/error_index_generator/build.rs
@@ -14,7 +14,9 @@ fn main() {
14
if entry.file_name() == "error_codes.rs" {
15
println!("cargo:rerun-if-changed={}", entry.path().to_str().unwrap());
16
let file = fs::read_to_string(entry.path()).unwrap()
17
- .replace("syntax::register_diagnostics!", "register_diagnostics!");
+ .replace("crate::register_diagnostics!", "register_diagnostics!")
18
+ .replace(": include_str!(\"./",
19
+ ": include_str!(\"../../../../../../../../src/librustc_error_codes/");
20
let contents = format!("(|| {{\n{}\n}})()", file);
21
22
fs::write(&out_dir.join(&format!("error_{}.rs", idx)), &contents).unwrap();
0 commit comments