8000 example assumes a static exists · lolbinarycat/rustc-dev-guide@eb3d07b · GitHub
[go: up one dir, main page]

Skip to content

Commit eb3d07b

Browse files
author
Tshepang Mbambo
committed
example assumes a static exists
This was removed, likely by mistake, during a refactor.
1 parent 190844e commit eb3d07b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/rustc-driver-example.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ impl rustc_span::source_map::FileLoader for MyFileLoader {
3434
fn read_file(&self, path: &Path) -> io::Result<String> {
3535
if path == Path::new("main.rs") {
3636
Ok(r#"
37+
static MESSAGE: &str = "Hello, World!";
3738
fn main() {
38-
let message = "Hello, World!";
39-
println!("{message}");
39+
println!("{MESSAGE}");
4040
}
4141
"#
4242
.to_string())

0 commit comments

Comments
 (0)
0