Merge pull request #2309 from rust-lang/restore-static
example assumes a static exists
This commit is contained in:
commit
55aebf682d
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in New Issue