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
Changes:
````
ci: temporarily disable rustfmt checks/tetss since it's broken for nightly
rustup https://github.com/rust-lang/rust/pull/62964
Bump version of clippy_dummy
update test stderr, not sure which rustc pull request caused this.
rustup https://github.com/rust-lang/rust/pull/62859
Fix tests for edition 2018 compatibility
Revert "Revert global fmt config and use `rustfmt::skip`"
Fix breakage due to rust-lang/rust#60913
Fix breakage due to rust-lang/rust#62705
Revert global fmt config and use `rustfmt::skip`
Fix fmt
rustup https://github.com/rust-lang/rust/pull/62679/
Update pulldown-cmark to 0.5.3
rustup https://github.com/rust-lang/rust/pull/62764
Add test
Format code
Decrease maximum length for stderr files
Improved imports
Fix "unkown clippy lint" error in UI test.
Corrections for PR review.
Implement lint for inherent to_string() method.
UI Test Cleanup: Extract match_ref_pats tests
Update UI tests
Allow no_effect lint
Remove comment
cargo fmt
UI Test Cleanup: Split up checked_unwrap tests
Removed lintining on never type.
UI Test Cleanup: Split out out_of_bounds_indexing
false positives fixes of `implicit_return`
Ignore generated fresh lifetimes in elision check.
````
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.