Use `TraitEngine` in more places, restrict visibility of `FulfillmentCtxt` constructor
Most places that are constructing a `FulfillmentContext` should be constructing a `TraitEngine` generically, so later on if/when we're transitioning it'll be easier.
Logical extension of #99746
Rollup of 9 pull requests
Successful merges:
- #102763 (Some diagnostic-related nits)
- #103443 (Parser: Recover from using colon as path separator in imports)
- #103675 (remove redundent "<>" for ty::Slice with reference type)
- #104046 (bootstrap: add support for running Miri on a file)
- #104115 (Migrate crate-search element to CSS variables)
- #104190 (Ignore "Change InferCtxtBuilder from enter to build" in git blame)
- #104201 (Add check in GUI test for file loading failure)
- #104211 (⬆️ rust-analyzer)
- #104231 (Update mailmap)
Failed merges:
- #104169 (Migrate `:target` rules to use CSS variables)
r? `@ghost`
`@rustbot` modify labels: rollup
Add check in GUI test for file loading failure
Since https://github.com/rust-lang/rust/pull/101702, some resources location need to be updated in case their content changed because then their hash will change too. This will prevent errors like https://github.com/rust-lang/rust/pull/104114 to happen again.
The second commit is to prevent CORS errors: when a file is linked from a file itself imported, the web browser considers they come from a different domain and therefore triggers the error. The option tells the web browser to ignore this case.
cc ```@jsha```
r? ```@notriddle```
bootstrap: add support for running Miri on a file
This enables:
```
./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
```
That can be super helpful for debugging.
Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.
Fixes https://github.com/rust-lang/rust/issues/76666
Parser: Recover from using colon as path separator in imports
I don't know if this is the right approach, any feedback is welcome.
r? ```@compiler-errors```
Fixes#103269
Fix `rustdoc --version` when used with download-rustc
Previously, rustdoc would unconditionally report the version that *rustc* was compiled with. That showed things like `nightly-2022-10-30`, which wasn't right, since this was a `dev` build compiled from source.
Fix it by changing `rustc_driver::version` to a macro expanded at invocation time.
cc https://github.com/rust-lang/rust/issues/103206#issuecomment-1284123084
Update books
## nomicon
1 commits in 9c73283775466d22208a0b28afcab44db4c0cc10..05532356e7a4dbea2330aabb77611f5179493bb8
2022-09-30 07:31:22 +0900 to 2022-11-05 08:13:14 +0900
- Fix typos and grammatical errors (rust-lang/nomicon#384)
## reference
1 commits in 4ea7c5def38ac81df33a9e48e5637a82a5ac404d..9f0cc13ffcd27c1fbe1ab766a9491e15ddcf4d19
2022-10-25 15:14:36 -0700 to 2022-10-31 04:09:16 -0700
- Add a comma (rust-lang/reference#1289)
## book
12 commits in aa5ee485bd6bd80d205da7c82fcdd776f92fdd51..3f64052c048c6def93b94a2b514ee88bba918744
2022-10-20 16:49:55 -0400 to 2022-11-03 22:13:58 -0400
- Upgrade to Rust 1.65
- Upgrade to Rust 1.64
- Upgrade to Rust 1.63
- New ideas for the issue template to try
- Clarify that the conditional expression is the one under discussion
- Updates from copyedit of ch6
- Made Option<T> error explanation more clear
- Update ch06-01-defining-an-enum
- Upgrade mdbook
- Clarify that user1 can't be used as a whole instance. Fixesrust-lang/book#2978.
- Fix plural and incorrect phrase. Fixesrust-lang/book#3359.
- Updates from copyedit of ch5
## rust-by-example
4 commits in 03491f33375c5a2a1661c7fa4be671fe95ce1249..2b15c0abf2bada6e00553814336bc3e2d8399097
2022-10-21 07:30:08 -0300 to 2022-10-31 08:30:13 -0300
- Remove --edition from src/crates/using_lib.md (rust-lang/rust-by-example#1635)
- upgrade upload-artifact
- Clarify Fn in fn/closures/input_parameters.md (rust-lang/rust-by-example#1634)
- fix: erroneous white spaces in types/cast.md
## rustc-dev-guide
12 commits in 51a37ad19a15709d0601afbac6581f5aea6a45da..d0dc6c97a6486f68bac782fff135086eae6d77ec
2022-10-25 10:18:58 -0700 to 2022-11-07 16:49:22 +0200
- trans -> codegen
- Remove implementation details
- Update some more things and improve wording
- Update query.md
- replace tabs with spaces (rust-lang/rustc-dev-guide#1504)
- align code blocks with their paragraphs
- Fixes some typos (rust-lang/rustc-dev-guide#1502)
- UPDATE - mention of Diagnostic derive on enums
- trans -> codegen (rust-lang/rustc-dev-guide#1500)
- add note for err annotation formatting
- Remove `--bless` from pre-push hook suggestion
- Update for highfive transition.
Add support for custom mir
This implements rust-lang/compiler-team#564 . Details about the design, motivation, etc. can be found in there.
r? ```@oli-obk```
Add context to compiler error message
Changed `creates a temporary which is freed while still in use` to `creates a temporary value which is freed while still in use`.
Migrate rustc_codegen_llvm to SessionDiagnostics
WIP: Port current implementation of diagnostics to the new SessionDiagnostics.
Part of #100717
```@rustbot``` label +A-translation
Const Compare for Tuples
Makes the impls for Tuples of ~const `PartialEq` types also `PartialEq`, impls for Tuples of ~const `PartialOrd` types also `PartialOrd`, for Tuples of ~const `Ord` types also `Ord`.
behind the `#![feature(const_cmp)]` gate.
~~Do not merge before #104113 is merged because I want to use this feature to clean up the new test that I added there.~~
r? ``@fee1-dead``
Don't intra linkcheck reference
This removes the reference from the intra-doc link checks. This causes problems if any of the reference content needs to change, it causes the linkchecker to break. The reference has its own broken link check (https://github.com/rust-lang/reference/tree/master/style-check) which uses pulldown-cmark on the source to find actual broken links (instead of false-positives like this regex does).
I think the intra-doc link check could potentially be removed completely, since I think rustdoc is now checking for them well enough. However, it may serve as a decent regression check.
Refactor build-manifest to minimize the number of changes needed to add a new component
- Add all components to `PkgType`
- Automate functionality wherever possible, so functions often don't have to be manually edited
- Where that's not possible, use exhaustive matches on `PkgType` instead of adding individual strings.
- Add documentation for how to add a component. Improve the existing documentation for how to test changes.
I tested locally that this generates an identical manifest before and after my change, as follows:
```sh
git checkout d44e14225a
cargo +nightly run --manifest-path src/tools/build-manifest/Cargo.toml build/dist build/manifest-before 1970-01-01 http://example.com nightly
git checkout refactor-build-manifest
cargo +nightly run --manifest-path src/tools/build-manifest/Cargo.toml build/dist build/manifest-before 1970-01-01 http://example.com nightly
sort -u build/manifest-before/channel-rust-nightly.toml | diff - <(sort -u build/manifest-after/channel-rust-nightly.toml)
```
I then verified by hand that the differences before sorting are inconsequential (mostly targets being slightly reordered).
The only change in behavior is that `llvm-tools` is now properly renamed to `llvm-tools-preview`:
```
; sort -u build/manifest-before/channel-rust-nightly.toml | diff - <(sort -u build/manifest-after/channel-rust-nightly.toml)
784a785
> [renames.llvm-tools]
894a896
> to = "llvm-tools-preview"
```
This is based on https://github.com/rust-lang/rust/pull/102241 and should not be merged before.
Previously, rustdoc would unconditionally report the version that *rustc* was compiled with.
That showed things like `nightly-2022-10-30`, which wasn't right, since this was a `dev` build compiled from source.
Fix it by changing `rustc_driver::version` to a macro expanded at invocation time.
Rollup of 7 pull requests
Successful merges:
- #100508 (avoid making substs of type aliases late bound when used as fn args)
- #101381 (Test that target feature mix up with homogeneous floats is sound)
- #103353 (Fix Access Violation when using lld & ThinLTO on windows-msvc)
- #103521 (Avoid possible infinite loop when next_point reaching the end of file)
- #103559 (first move on a nested span_label)
- #103778 (Update several crates for improved support of the new targets)
- #103827 (Properly remap and check for substs compatibility in `confirm_impl_trait_in_trait_candidate`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup