Avoid going through the happy path in case of non-fn builtin calls
No functional change, just doing an early return. The removed comment is not applicable anymore, not every node needs type bindings in the error case. At best this would have been needed to avoid ICEs, but afaict this can't happen anymore today, as we do fallible checks.
Bump `cfg-if` to `1.0` in rustc crates
When `packed_simd_2` and `getrandom` are updated to newer versions, we will no longer have a dependency on old `cfg_if` versions.
Fix an opaque type ICE
fixes#104551
The issue is that if you have
```rust
type T = impl Sized;
let (_a, _b): T = ..
```
we have only the type annotation `T`, but want to use that ascription for `_a` and `_b`, so what we generate is a type ascription plus a field projection saying `_a`'s type is `T::0`. Of course `T` has no fields. Of course we could also not generate type annotations for projections into opaque types at all, but that's more fragile, as we now have to make sure that 12bbdbdb44/compiler/rustc_mir_build/src/build/matches/mod.rs (L709) doesn't have any arm that introduces a user type annotation except for `PatKind::Binding`.
docs: add long error explanation for error E0472
Add long-form error docs for E0472: "inline assembly not supported on this target" and update UI tests.
R? `@GuillaumeGomez`
Implement va_list and va_arg for s390x FFI
Following the s390x ELF ABI and based on the clang implementation, provide appropriate definitions of va_list in library/core/src/ffi/mod.rs and va_arg handling in compiler/rustc_codegen_llvm/src/va_arg.rs.
Fixes the following test cases on s390x:
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn src/test/ui/abi/variadic-ffi.rs
Fixes https://github.com/rust-lang/rust/issues/84628.
Rollup of 5 pull requests
Successful merges:
- #105901 (Don't panic on stable since miri is not available there)
- #105912 (rustdoc: force pre tags to have the default line height)
- #105914 (rustdoc: Simplify CSS for scraped code examples code blocks)
- #105933 (Add readable rustdoc display for tvOS and watchOS)
- #105935 (docs/test: add UI test and long-form error docs for `E0377`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Improve syntax of `newtype_index`
This makes it more like proper Rust and also makes the implementation a lot simpler.
Mostly just turns weird flags in the body into proper attributes.
It should probably also be converted to an attribute macro instead of function-like, but that can be done in a future PR.
Add `IMPLIED_BOUNDS_ENTAILMENT` lint
Implements a lint (#105572) version of the hard-error introduced in #105483. Context is in that PR.
r? `@lcnr`
cc `@oli-obk` who had asked for this to be a lint first
Not sure if this needs to be an FCP, since it's a lint for now.
Revert #103880 "Use non-ascribed type as field's type in mir"
This PR prepares a revert for #103880 to fix#105809, #105881, #105886 and others (like the duplicates of the first one), in case an actual fix can't get done today.
I've also added the MCVE from #105809. There is no MCVE for the #105881 and #105886 ICEs yet however, so there are no tests for them here, although we'll need one before relanding the original changes.
Were this PR to land, it would also reopen#96514 as it was fixed by the original PR.
Opening as draft to allow time for a possible fix.
r? `@jackh726`
Following the s390x ELF ABI and based on the clang implementation,
provide appropriate definitions of va_list in library/core/src/ffi/mod.rs
and va_arg handling in compiler/rustc_codegen_llvm/src/va_arg.rs.
Fixes the following test cases on s390x:
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn
src/test/ui/abi/variadic-ffi.rs
Fixes https://github.com/rust-lang/rust/issues/84628.
Revert "Replace usage of `ResumeTy` in async lowering with `Context`"
Reverts rust-lang/rust#105250
Fixes: #105501
Following instructions from [forge](https://forge.rust-lang.org/compiler/reviews.html#reverts).
This change introduced a breaking change that is not actionable nor relevant, and is blocking updates to our toolchain. Along with other comments on the CL marking issues that are fixed by reverts, reverting is best until these issues can be resolved
cc. `@Swatinem`
Add long error docs for `E0460` and `E0457`
Final docs for errors in #61137 that have UI tests, my next PRs will also add these tests.
r? ``@GuillaumeGomez``
Rollup of 8 pull requests
Successful merges:
- #105419 (Add tests for #41731)
- #105447 (Add a test for #103095)
- #105842 (print argument name in arg mismatch if possible)
- #105863 (Update browser-ui-test version to reduce GUI tests flakyness)
- #105867 (remove redundant fn params that were only "used" in recursion)
- #105869 (don't clone Copy types)
- #105873 (use &str / String literals instead of format!())
- #105879 (Revert "Introduce lowering_arena to avoid creating AST nodes on the fly")
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Revert "Introduce lowering_arena to avoid creating AST nodes on the fly"
This reverts commit d9a1faaa9c (#101499).
This was originally part of #101345 which has now been closed as a different approach is taken now.
r? `@oli-obk`
cc `@spastorino`
print argument name in arg mismatch if possible
A bit more contextual than just `/* value */`, at least when the argument is named something related to its context.
The UI test cases are... not super convincing, but also they're minimized tests.
Remove the `..` from the body, only a few invocations used it and it's
inconsistent with rust syntax.
Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
This removes the `custom` format functionality as its only user was
trivially migrated to using a normal format.
If a new use case for a custom formatting impl pops up, you can add it
back.