-
Notifications
You must be signed in to change notification settings - Fork 13.3k
local_crate ICE #2804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here is a simpler repro:
|
Note that there is no ICE if |
I'll check this out. |
Minimized to: use std;
import std::map::hashmap;
fn add_interfaces(managed_ip: str, device: std::map::hashmap<str, std::json::json>) {
#error["%s, %?", managed_ip, device["interfaces"]];
} |
Also, it compiles if I manually expand the macro, like: use std;
import std::map::hashmap;
fn add_interfaces(managed_ip: str, device: std::map::hashmap<str, std::json::json>) {
log(error, #fmt("%s, %?", managed_ip, device["interfaces"]));
} |
Splendid bug. The issue was that there's an index expression ( |
Concrete playback seeks to generate unit tests in the original source file. An intermediate temporary file is used to reduce the risk of corrupting original source files. Once the temporary file has been completely written to, it is to be atomically moved to replace the source file. This can only be done on the same file system. We now create the temporary file in the same source directory as the original source file to ensure we are on the same file system. The implementation uses NamedTempFile from the tempfile crate, which renders our own tempfile implementation redundant. Tested on Ubuntu 20.04 with /tmp on a different partition (where our regression tests would previously fail). Resolves: rust-lang#2705
When trying to compile the code below I get the following with a rust from June 30:
Here is the code:
The text was updated successfully, but these errors were encountered: