On implicit `Sized` bound on fn argument, point at type instead of pattern
Instead of
```
error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time
--> $DIR/issue-59324.rs:23:20
|
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^^^^^^ doesn't have a size known at compile-time
```
output
```
error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time
--> $DIR/issue-59324.rs:23:29
|
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
```
Partially update `library/Cargo.lock`
Run `cargo update` in library but exclude updates to `cc` and to `compiler_builtins`. Exclusions were done because `cc` seems to have some issues updating [1], and `compiler_builtins` needs to be updated on its own.
Partially supersedes https://github.com/rust-lang/rust/pull/129538.
[1]: https://github.com/rust-lang/rust/pull/130720
try-job: x86_64-msvc
update `compiler-builtins` to 0.1.126
this requires the addition of a bootstrap variant of the new `naked_asm!` macro
r? `@tgross35`
extracted from https://github.com/rust-lang/rust/pull/128651
Revert Break into the debugger on panic (129019)
This was talked about a bit at a recent libs meeting. While I think experimenting with this is worthwhile, I am nervous about this new behaviour reaching stable. We've already reverted on one tier 1 platform (Linux, https://github.com/rust-lang/rust/pull/130810) which means we have differing semantics on different tier 1 platforms. Also the fact it triggers even when `catch_unwind` is used to catch the panic means it can be very noisy in some projects.
At the very least I think it could use some more discussion before being instantly stable. I think this could maybe be re-landed with an environment variable to control/override the behaviour. But that part would likely need a libs-api decision.
cc ````@workingjubilee```` ````@kromych````
[rustdoc] Remove unneeded jinja comments
This is a follow-up of https://github.com/rust-lang/rust/pull/130585.
Since we now check for the jinja comments we missed, we can now check for the jinja comments which are unneeded. It will make the parsing and therefore the compilation a tiny bit faster (well, if anyone sees a difference haha). The real goal is mostly to have easier to read template files. 😉
r? ``@notriddle``
[`cfg_match`] Generalize inputs
cc #115585
Changes the input type from `item` to `tt`, which makes the macro have the same functionality of `cfg_if`.
Also adds a test to ensure that `stmt_expr_attributes` is not triggered.
When the template string passed to asm!() is produced by
a macro call like concat!() we were producing wrong error
spans. Now in the case of a macro call we just use the entire
arg to asm!(), macro call and all, as the error span.
Like #130865 did for the standard library, we can use `&raw` in the
compiler now that stage0 supports it. Also like the other issue, I did
not make any doc or test changes at this time.
Instead of
```
error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time
--> $DIR/issue-59324.rs:23:20
|
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^^^^^^ doesn't have a size known at compile-time
```
output
```
error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time
--> $DIR/issue-59324.rs:23:29
|
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
```
Rollup of 11 pull requests
Successful merges:
- #130279 (Document subtleties of `ManuallyDrop`)
- #130517 (Add the library workspace to the suggested rust-analyzer config)
- #130820 (Fix diagnostics for coroutines with () as input.)
- #130833 (Fix the misleading diagnostic for `let_underscore_drop` on type without `Drop` implementation)
- #130845 (Utf8Chunks: add link to Utf8Chunk)
- #130850 (Pass Module Analysis Manager to Standard Instrumentations)
- #130861 (Use `mem::offset_of!` for `sockaddr_un.sun_path`)
- #130862 (rustdoc: do not animate :target when user prefers reduced motion)
- #130868 (Update FIXME comment in s390x_unknown_linux_*.rs)
- #130879 (Pass correct HirId to late_bound_vars in diagnostic code)
- #130880 (add missing FIXME(const-hack))
r? `@ghost`
`@rustbot` modify labels: rollup
rustdoc: do not animate :target when user prefers reduced motion
This accessibility improvement gates #129284 behind an inverted [prefers-reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/`@media/prefers-reduced-motion)` media query.
Pass Module Analysis Manager to Standard Instrumentations
This PR introduces changes related to llvm::PassInstrumentationCallbacks. Now, we pass Module Analysis Manager to StandardInstrumentations::registerCallbacks, so it can take advantage of such instrumentations as IR verifier or preserved CFG checker. So basically this is NFC PR.
Utf8Chunks: add link to Utf8Chunk
It is currently surprisingly non-trivial to go from the `utf8_chunks` method to the docs of the `valid`/`invalid` methods used in the example. This should help.
Fix diagnostics for coroutines with () as input.
This may be a more real-life example to trigger the diagnostic:
```rust
#![features(try_blocks, coroutine_trait, coroutines)]
use std::ops::Coroutine;
struct Request;
struct Response;
fn get_args() -> Result<String, String> { todo!() }
fn build_request(_arg: String) -> Request { todo!() }
fn work() -> impl Coroutine<Option<Response>, Yield = Request> {
#[coroutine]
|_| {
let r: Result<(), String> = try {
let req = get_args()?;
yield build_request(req)
};
if let Err(msg) = r {
eprintln!("Error: {msg}");
}
}
}
```
Run `cargo update` in library but exclude updates to `cc` and to
`compiler_builtins`. Exclusions were done because `cc` seems to have
some issues updating [1], and `compiler_builtins` needs to be updated on
its own.
[1]: https://github.com/rust-lang/rust/pull/130720
Use `&raw` in the standard library
Since the stabilization in #127679 has reached stage0, 1.82-beta, we can
start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!`
and `ptr::addr_of_mut!` can stop allowing the unstable feature.
I intentionally did not change any documentation or tests, but the rest
of those macro uses are all now using `&raw const` or `&raw mut` in the
standard library.