Skip to content

Commit 471a2a8

Browse files
committed
example assumes a static exists
This was removed, likely by mistake, during a refactor.
1 parent 904fedf commit 471a2a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/rustc-dev-guide/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)