diff options
| author | Tshepang Mbambo <tshepang@gmail.com> | 2025-03-30 00:16:39 +0200 |
|---|---|---|
| committer | Tshepang Mbambo <tshepang@gmail.com> | 2025-03-30 00:16:39 +0200 |
| commit | 471a2a8b87d8b5ba03a43a2c067dd322c1f5e7af (patch) | |
| tree | 7130830fa302cdf2836b93abcc09d85b496211d8 | |
| parent | 904fedf65eb1dfac85c6694a0f76c0d1e930322e (diff) | |
| download | rust-471a2a8b87d8b5ba03a43a2c067dd322c1f5e7af.tar.gz rust-471a2a8b87d8b5ba03a43a2c067dd322c1f5e7af.zip | |
example assumes a static exists
This was removed, likely by mistake, during a refactor.
| -rw-r--r-- | src/doc/rustc-dev-guide/examples/rustc-driver-example.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs b/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs index fb8b13ad154..0e3450086ba 100644 --- a/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs +++ b/src/doc/rustc-dev-guide/examples/rustc-driver-example.rs @@ -34,9 +34,9 @@ impl rustc_span::source_map::FileLoader for MyFileLoader { fn read_file(&self, path: &Path) -> io::Result<String> { if path == Path::new("main.rs") { Ok(r#" +static MESSAGE: &str = "Hello, World!"; fn main() { - let message = "Hello, World!"; - println!("{message}"); + println!("{MESSAGE}"); } "# .to_string()) |
