rust/src
bors de692f1fae Auto merge of #100557 - dawnofmidnight:tarball-commit-info, r=Mark-Simulacrum
fix: use git-commit-info for version information

Fixes #33286.
Fixes #86587.

This PR changes the current `git-commit-hash` file that `./x.py` dist puts in the `rustc-{version}-src.tar.{x,g}z` to contain the hash, the short hash, and the commit date from which the tarball was created, assuming git was available when it was. It uses this for reading the version so that rustc has all the appropriate metadata.

# Testing

Testing this is kind of a pain. I did it with something like
```sh
./x.py dist # ensure that `ignore-git` is `false` in config.toml
cp ./build/dist/rustc-1.65.0-dev-src.tar.gz ../rustc-1.65.0-dev-src.tar.gz
cd .. && tar -xzf rustc-1.65.0-dev-src && cd rustc-1.65.0-dev-src
./x.py build
```

Then, the output of  `rustc -vV` with the stage1 compiler should have the `commit-hash` and `commit-date` fields filled, rather than be `unknown`. To be completely sure, you can use `rustc --sysroot` with the stdlib that the original `./x.py dist` made, which will require that the metadata matches.
2022-10-02 20:55:17 +00:00
..
bootstrap Auto merge of #100557 - dawnofmidnight:tarball-commit-info, r=Mark-Simulacrum 2022-10-02 20:55:17 +00:00
ci Upgrade dist-i586-gnu-i586-i686-musl to ubuntu:22.04 2022-09-30 17:32:12 -07:00
doc Upgrade dist-i586-gnu-i586-i686-musl to ubuntu:22.04 2022-09-30 17:32:12 -07:00
etc Add a niche to Duration, unix SystemTime, and non-apple Instant 2022-09-28 18:15:10 +01:00
librustdoc Rollup merge of #100451 - hovinen:no-panic-on-result-err-in-test, r=Mark-Simulacrum 2022-10-02 20:42:20 +05:30
llvm-project@9567f08afc Update LLVM submodule 2022-09-30 16:39:32 +02:00
rustdoc-json-types Rustdoc-Json: List impls for primitives 2022-09-26 18:06:48 +01:00
test Rollup merge of #102566 - compiler-errors:test-102498, r=Mark-Simulacrum 2022-10-02 20:42:22 +05:30
tools Auto merge of #102586 - Dylan-DPC:rollup-g107h6z, r=Dylan-DPC 2022-10-02 15:31:06 +00:00
README.md Remove miri from the submodule list and require it for CI to pass 2022-09-21 15:35:53 +00:00
stage0.json bump stage0 2022-09-26 10:13:46 +02:00
version bump version to 1.66.0 2022-09-16 10:51:09 +02:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like cargo, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.