Fix implied outlives bounds logic for projections
The logic here is subtly wrong. I put a bit of an explanation in a767d7b5165cea8ee5cbe494a4a636c50ef67c9c.
TL;DR: we register outlives predicates to be proved, because wf code normalizes projections (from the unnormalized types) to type variables. This causes us to register those as constraints instead of implied. This was "fine", because we later added that implied bound in the normalized type, and delayed registering constraints. When I went to cleanup `free_region_relations` to *not* delay adding constraints, this bug was uncovered.
cc. `@aliemjay` because this caused your test failure in #99832 (I only realized as I was writing this)
r? `@nikomatsakis`
Rollup of 6 pull requests
Successful merges:
- #107648 (unused-lifetimes: don't warn about lifetimes originating from expanded code)
- #107655 (rustdoc: use the same URL escape rules for fragments as for examples)
- #107659 (test: snapshot for derive suggestion in diff files)
- #107786 (Implement some tweaks in the new solver)
- #107803 (Do not bring trait alias supertraits into scope)
- #107815 (Disqualify `auto trait` built-in impl in new solver if explicit `impl` exists)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Implement some tweaks in the new solver
I've been testing the new solver on some small codebases, and these are a few small changes I've needed to make.
The most "controversial" here is implementing `trait_candidate_should_be_dropped_in_favor_of`, which I just implemented to always return false. This surprisingly allows some code to compile, without us having to actually decide on any semantics yet.
r? `@rust-lang/initiative-trait-system-refactor`
create symlink for legacy rustfmt path
Fixes#107547 .
Main change is in the `download.rs` file. Created a symlink for the legacy rustfmt path to the new rustfmt path. Other file changes are simply as a result of porting over the symlink_file function from the Build struct to the config Struct
There is a type `QueryCtxt`, which impls the trait `QueryContext`.
Confusingly, there is another type `QueryContext`. The latter is (like
`TyCtxt`) just a pointer to a `GlobalContext`. It's not used much, e.g.
its `impl` block has a single method.
This commit removes `QueryContext`, replacing its use with direct
`GlobalCtxt` use.
Rollup of 9 pull requests
Successful merges:
- #107317 (Implement `AsFd` and `AsRawFd` for `Rc`)
- #107429 (Stabilize feature `cstr_from_bytes_until_nul`)
- #107713 (Extend `BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE`.)
- #107761 (Replace a command line flag with an env var to allow tools to initialize the tracing loggers at their own discretion)
- #107790 ( x.py fails all downloads that use a tempdir with snap curl #107722)
- #107799 (correctly update goals in the cache)
- #107813 (Do not eagerly recover for bad `impl Trait` types in macros)
- #107817 (rustdoc: use svgo to shrink `wheel.svg`)
- #107819 (Set `rust-analyzer.check.invocationLocation` to `root`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Set `rust-analyzer.check.invocationLocation` to `root`
Add
```json
"rust-analyzer.check.invocationLocation": "root",
"rust-analyzer.check.invocationStrategy": "once",
```
to the bundled VS code config. This prevents an error with r-a invoking `python3 x.py` in `src/bootstrap` where `x.py` does not exist.
r? ``@jyn514``
rustdoc: use svgo to shrink `wheel.svg`
use [svgo] to shrink `wheel.svg`
[svgo]: https://github.com/svg/svgo
$ du -bs src/librustdoc/html/static/images/wheel.svg wheel-old.svg
2972 src/librustdoc/html/static/images/wheel.svg
3764 wheel-old.svg
100*((2972-3764)/3764) = -21.04%
correctly update goals in the cache
we may want to actually write the response for our goal into the provisional or global cache instead of simply using the result from the last iteration '^^
r? ```@rust-lang/initiative-trait-system-refactor```
x.py fails all downloads that use a tempdir with snap curl #107722
Have used the open() library from python to capture the binary output of the curl command and write it to a file using stdout of the subprocess. Added a single-line comment mentioning the redirect operator.