Update RLS
Continuation of https://github.com/rust-lang/rust/pull/53610.
Workspaces are tricky - the `json_internal` problem was only reproducible in Rust CI (not sure why it was only relevant to Windows?) and it seems that this was fixed by updating serde_json workspace-wide.
Tested locally in Rust repo and it seems to be working.
Nightlies are currently shipping without RLS, so it'd be great to include this in the next nightlies if possible.
This fixes 'cannot find macro `json_internal!` in this scope' RLS
compilation error in Rust CI, presumably due to a local macro fix in
serde_json 1.0.25
(e40cbad70b)
Fix#53525 - Unify E0243, E0244, E0087, E0088, E0089, and E0090 into E0107
Fix#53525
This pr merges all errors related to too many or too few generic arguments in types and functions. E0243, E0244, E0087, E0088, E0089, E0090 errors will no longer be emitted and E0107 will be used instead.
MIR: support user-given type annotations on fns, structs, and enums
This branch adds tooling to track user-given type annotations on functions, structs, and enum variant expressions. The user-given types are passed onto NLL which then enforces them.
cc #47184 — not a complete fix, as there are more cases to cover
r? @eddyb
cc @rust-lang/wg-compiler-nll
Fix compile panic on non existent type return
Reverted the change 28a76a9000 (diff-4ed25c00aceb84666fca639cf8101c7cL1069) which was panicking when returning a type that cannot be found in the current scope and added testing for the compile error.
For example:
```rust
fn addition() -> Wrapper<impl A> {}
```
Where Wrapper is undefined in the scope.
Fix#50865: ICE on impl-trait returning functions reaching private items
Adds a test case as suggested in #50865, and implements @petrochenkov's suggestion. Fixes#50865.
Impl-trait-returning functions are marked under a new (low) access level, which they propagate rather than `AccessLevels::Reachable`. `AccessLevels::is_reachable` returns false for such items (leaving stability analysis unaffected), these items may still be visible to the lints phase however.
docs: minor stylistic changes to str/string docs
std::string::String.repeat(): slightly rephrase to be more in-line with other descriptions.
add ticks around a few keywords in other descriptions.
Lament the invincibility of the Turbofish
Here a test case is added to ensure that any others attempting to drive the Turbofish to extinction have second thoughts. Previously the [entire test suite would succeed](https://github.com/rust-lang/rust/pull/53511) if generic arguments were accepted without disambiguation, making for [confusing and heartbreaking circumstances](https://github.com/rust-lang/rfcs/pull/2527).
Discourage overuse of mem::forget
Some uses of `mem::forget` have been replaced by better methods of `Box`, so I've removed obsoleted use-cases from these docs.
I've removed emphasis on leaking, because it's not obvious `mem::forget` does not guarantee leaking of memory: memory of stack-allocated objects and values partially moved out of `Box` will still be freed. That's a potential error when used to pass objects to FFI, so it's better to direct users to `Box::into_raw` instead.