Disambiguate symlink argument names
Mirrors https://github.com/rust-lang/rust/pull/79060.
diff --git a/gen/src/fs.rs b/gen/src/fs.rs
index 8f94f00..7a6858c 100644
--- a/gen/src/fs.rs
+++ b/gen/src/fs.rs
@@ -91,17 +91,17 @@
}
fn symlink<'a>(
- src: &'a Path,
- dst: &'a Path,
+ original: &'a Path,
+ link: &'a Path,
fun: fn(&'a Path, &'a Path) -> io::Result<()>,
) -> Result<()> {
- match fun(src, dst) {
+ match fun(original, link) {
Ok(()) => Ok(()),
Err(e) => err!(
e,
"Failed to create symlink `{}` pointing to `{}`",
- dst,
- src,
+ link,
+ original,
),
}
}
@@ -111,24 +111,24 @@
pub(crate) use self::symlink_file as symlink_dir;
#[cfg(unix)]
-pub(crate) fn symlink_file(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> Result<()> {
- symlink(src.as_ref(), dst.as_ref(), std::os::unix::fs::symlink)
+pub(crate) fn symlink_file(original: impl AsRef<Path>, link: impl AsRef<Path>) -> Result<()> {
+ symlink(original.as_ref(), link.as_ref(), std::os::unix::fs::symlink)
}
#[cfg(windows)]
-pub(crate) fn symlink_file(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> Result<()> {
+pub(crate) fn symlink_file(original: impl AsRef<Path>, link: impl AsRef<Path>) -> Result<()> {
symlink(
- src.as_ref(),
- dst.as_ref(),
+ original.as_ref(),
+ link.as_ref(),
std::os::windows::fs::symlink_file,
)
}
#[cfg(windows)]
-pub(crate) fn symlink_dir(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> Result<()> {
+pub(crate) fn symlink_dir(original: impl AsRef<Path>, link: impl AsRef<Path>) -> Result<()> {
symlink(
- src.as_ref(),
- dst.as_ref(),
+ original.as_ref(),
+ link.as_ref(),
std::os::windows::fs::symlink_dir,
)
}