Closed
Description
I'm not sure if this is a Rust issue or a Cargo issue, but since it manifests using file!()
I figured I'd raise it here. I'm not sure when the actual regression occurred, as it was previously masked in our build by #47139.
The change we're seeing is that file!()
is now returning a path relative to the root of the workspace, rather than the root of the project. This specifically breaks our tests which have code like:
let path = Path::new(file!())
.parent()
.unwrap()
.join("other_stuff.txt");
File::open(&path).read_to_string(&mut s).unwrap();