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> {
|
fn read_file(&self, path: &Path) -> io::Result<String> {
|
||||||
if path == Path::new("main.rs") {
|
if path == Path::new("main.rs") {
|
||||||
Ok(r#"
|
Ok(r#"
|
||||||
|
static MESSAGE: &str = "Hello, World!";
|
||||||
fn main() {
|
fn main() {
|
||||||
let message = "Hello, World!";
|
println!("{MESSAGE}");
|
||||||
println!("{message}");
|
|
||||||
}
|
}
|
||||||
"#
|
"#
|
||||||
.to_string())
|
.to_string())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue