After rP489132 lang/rust-nightly can omit components if they fail to build which doesn't play well with lang/rust hardcoding list of manifest files and what to strip(1). Given missing-tools=false is default since Rust 1.31.0 let's optimize.
An example error this review tries to fix:
Build completed successfully in 0:05:38 for f in lib/rustlib/manifest-cargo lib/rustlib/manifest-clippy-preview lib/rustlib/manifest-rls-preview lib/rustlib/manifest-rustc lib/rustlib/manifest-rustfmt-preview lib/rustlib/manifest-rust-analysis-x86_64-unknown-freebsd lib/rustlib/manifest-rust-std-x86_64-unknown-freebsd lib/rustlib/manifest-rust-docs; do /usr/bin/sed -i.bak -E -e 's|:/wrkdirs/usr/ports/lang/rust-nightly/work/stage|:|' -e 's|(man/man[1-9]/.*\.[0-9])|\1.gz|' /wrkdirs/usr/ports/lang/rust-nightly/work/stage/usr/local/$f; /bin/rm -f /wrkdirs/usr/ports/lang/rust-nightly/work/stage/usr/local/$f.bak; echo "/usr/local/$f" >> /wrkdirs/usr/ports/lang/rust-nightly/work/.PLIST.mktmp; /usr/bin/awk ' /^file:/ { file=$0; sub(/^file:/, "", file); print file; } /^dir:/ { dir=$0; sub(/^dir:/, "", dir); system("find /wrkdirs/usr/ports/lang/rust-nightly/work/stage" dir " -type f | /usr/bin/sed -E -e \"s|/wrkdirs/usr/ports/lang/rust-nightly/work/stage||\""); }' /wrkdirs/usr/ports/lang/rust-nightly/work/stage/usr/local/$f >> /wrkdirs/usr/ports/lang/rust-nightly/work/.PLIST.mktmp; done sed: /wrkdirs/usr/ports/lang/rust-nightly/work/stage/usr/local/lib/rustlib/manifest-rls-preview: No such file or directory *** Error code 1