Remove a lit_to_const call
We have so many special cases of `match expr.kind { Lit() => {}, Unary(Neg, Lit()) => {} }`... I'm trying to figure out how to get these all unified, but outright removing some is good, too. So let's try it.
Tho we don't have many `const {}` blocks in the perf test suite... But I also don't know how common `const { 42 }` blocks are, I'd expect these to occur mostly from macros (like `thread_local!`)
handle `--json-output` properly
Because `rustfmt` doesn't support JSON output, `x test --json-output` doesn't respect the `--json-output` flag during formatting step. This change makes that `x test` skips the formatting step if `--json-output` is specified. In addition, resolves#133855 with the 2nd commit.
Stabilize `std::io::ErrorKind::CrossesDevices`
FCP in #130191
cc #86442
See #130191 for more info and a recap of what has happened up until now.
TLDR: This had been FCP'd in December 2022 with some other `ErrorKind`s, but the stabilization got postponed due to some concerns voiced about several of the variants. However, the only concern ever voiced for this variant in particular was a wish to rename this to `NotSameDevice` analogous to Windows's `ERROR_NOT_SAME_DEVICE` (as opposed to Unix's `EXDEV`). This suggestion did not receive any support. So let's try to FCP this as is.
r? libs-api
This mainly aids in error recovery but also makes it a bit easier to handle lifetime resolution.
While doing so it also came apparent that we were not actually lowering lifetime outlives relationships within lifetime parameter declaration bounds, so this fixes that.
Rollup of 10 pull requests
Successful merges:
- #118833 (Add lint against function pointer comparisons)
- #122161 (Fix suggestion when shorthand `self` has erroneous type)
- #133233 (Add context to "const in pattern" errors)
- #133761 (Update books)
- #133843 (Do not emit empty suggestion)
- #133863 (Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro`)
- #133872 (No need to create placeholders for GAT args in confirm_object_candidate)
- #133874 (`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder)
- #133890 (Add a new test ui/incoherent-inherent-impls/no-other-unrelated-errors to check E0116 does not cause unrelated errors)
- #133892 (Revert #133817)
r? `@ghost`
`@rustbot` modify labels: rollup
Revert #133817
This reverts commit 0585134e709de4a14e509158662fa569c155c195, reversing changes made to 5530869e0ff21d69e0eef1a4c4fd1f25bcbe7fbf.
#133817 unfortunately only converted the `println!` instances to `eprintln!`, meaning that some test output (via compiletest/bootstrap) was messed up because stdout/stderr output interleaved improperly when some `println!` instances were converted to `eprintln!` instances, while some `print!` instances remain unchanged. This made reading test output annoying for contributors cc #133879.
Closes#133879 by reverting.
#133817 can be relanded in the future when `print!` instances are also matched with `println!` instances.
cc `@clubby789`
This is a clean revert so I'm going to self-approve this PR.