I tried this code:
> cargo new foo && cd foo
Created binary (application) `foo` package
> sed -i s/println/panic/ src/main.rs
> RUST_BACKTRACE=1 cargo run --release -Ztrim-paths -Zbuild-std --config=profile.release.debug='"line-tables-only"'
Compiling foo v0.1.0 (/tmp/tmp.VBGvfipbYa/foo)
Finished release [optimized + debuginfo] target(s) in 0.63s
Running `/run/user/1000/cargo-home/target/shared/x86_64-unknown-linux-gnu/release/foo`
thread 'main' panicked at src/main.rs:2:5:
Hello, world!
stack backtrace:
0: begin_panic_handler
at std-0.0.0/src/panicking.rs:645:5
1: panic_fmt
at core-0.0.0/src/panicking.rs:72:14
2: main
at src/main.rs:2:5
3: call_once<fn(), ()>
at core-0.0.0/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I expected to see this happen: std/core version numbers matching rustc's version number
Instead, this happened: std/core have version number 0.0.0
This may be a cargo bug, but I assume it's just using the version numbers from the packaged Cargo.toml so would be fixed here.
Meta
rustc --version --verbose:
rustc 1.76.0-nightly (2c1b65ee1 2023-11-11)
binary: rustc
commit-hash: 2c1b65ee1431f8d3fe2142e821eb13c623bbf8a0
commit-date: 2023-11-11
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.4
cc #111540 (and I can't find a tracking issue for -Zbuild-std)
I tried this code:
I expected to see this happen: std/core version numbers matching rustc's version number
Instead, this happened: std/core have version number 0.0.0
This may be a cargo bug, but I assume it's just using the version numbers from the packaged
Cargo.tomlso would be fixed here.Meta
rustc --version --verbose:cc #111540 (and I can't find a tracking issue for
-Zbuild-std)