Rollup of 8 pull requests
Successful merges:
- #61207 (Allow lifetime elision in `Pin<&(mut) Self>`)
- #62074 (squash of all commits for nth_back on ChunksMut)
- #62771 (Break dependencies between `syntax_ext` and other crates)
- #62883 (Refactoring use common code between option, result and accum)
- #62949 (Re-enable assertions in PPC dist builder)
- #62996 (tidy: Add a check for inline unit tests)
- #63038 (Make more informative error on outer attribute after inner)
- #63050 (ci: download awscli from our mirror)
Failed merges:
r? @ghost
ci: download awscli from our mirror
This fixes multiple network issues we had when downloading awscli from PyPI on Azure Pipelines by vendoring awscli itself and its dependencies in our S3 bucket. Instructions on how to update the cache are present at the top of `src/ci/install-awscli.sh`.
r? @alexcrichton or @Mark-Simulacrum
fixes#62967
tidy: Add a check for inline unit tests
As described in https://github.com/rust-lang/rust/issues/61097.
There's a large whitelist right now, because in many crates the tests are not outlined yet.
~This PR only outlines tests in one crate (`rustc_lexer`) as an example.~
r? @Mark-Simulacrum
Refactoring use common code between option, result and accum
`Option` and `Result` have almost exactly the same code that in `accum.rs` that implement `Sum` and `Product`. This PR just move some code to use the same code for all of them. I believe is better to not implement this `Iterator` feature twice.
I'm not very familiar with pub visibility hope I didn't make then public. However, maybe these adapters could be useful and we could think to make then pub.
#59605#11084
r? @pnkfelix
Break dependencies between `syntax_ext` and other crates
Move `source_util` macros into `syntax_ext`.
Move other early code generation facilities like standard library injection into `syntax_ext`.
The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything.
Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`.
r? @eddyb
squash of all commits for nth_back on ChunksMut
wip nth_back for chunks_mut
working chunksmut
fixed nth_back for chunksmut
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
r? @timvermeulen
r? @scottmcm
Allow lifetime elision in `Pin<&(mut) Self>`
This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it
Replaces #60944Closes#52675
r? @eddyb
cc @cramertj @Centril @withoutboats @scottmcm
This fixes multiple network issues we had when downloading awscli from
PyPI on Azure Pipelines by vendoring awscli itself and its dependencies
in our S3 bucket. Instructions on how to update the cache are present at
the top of src/ci/install-awscli.sh
Add lib section to rustc_lexer's Cargo.toml
This is required to fix the rustc-ap-syntax build error in the recent version. The error could also be fixed on the [rustc-auto-publish](https://github.com/alexcrichton/rustc-auto-publish) side by manually adding `[lib]` section if one does not exist. The latter approach, however, may have a surprising side effect, so I am opting for a simpler solution for now.
r? @alexcrichton
Stop bare trait lint applying to macro call sites
Fixes#61963. Apologies for the delay with in fixing this. If anyone has a better idea how to detect this macro call site case, I'd be happy to fix this in a more robust, less hacky way.
r? @estebank
add `repr(transparent)` to `IoSliceMut` where missing
tried using `IoSliceMut` in FFI, got `improper_ctypes` warning.
according to the docs: `IoSliceMut` is "guaranteed to be ABI compatible with the `iovec` type" so it should be usable in FFI.
`IoSlice` is also `repr(transparent)` for every platform where these types contain `iovec`-like types.
vxworks also has `IoSliceMut` as transparent so its not even consistently one or the other.
no comment about this next to the types or in the PR that introduced the types, so assuming this was just missed.
r? @sfackler
Fix cycle error with existential types
Fixes#61863
We now allow uses of `existential type`'s that aren't defining uses - that is, uses which don't constrain the underlying concrete type.
To make this work correctly, we also modify `eq_opaque_type_and_type` to not try to apply additional constraints to an opaque type. If we have code like this:
```rust
existential type Foo;
fn foo1() -> Foo { ... }
fn foo2() -> Foo { foo1() }
```
then `foo2` doesn't end up constraining `Foo`, which means that `foo2` will end up using the type `Foo` internally - that is, an actual `TyKind::Opaque`. We don't want to equate this to the underlying concrete type - we just need to enforce the basic equality constraint between the two types (here, the return type of `foo1` and the return type of `foo2`)
Optimize RefCell read borrowing
Instead of doing two comparisons we can do only one with a bit of cleverness.
LLVM currently can't do this optimization itself on x86-64.