Clarify where the clippy used in `./x.py clippy` is coming from.
It uses whatever clippy binary was installed via rustup, cargo-install
or otherwise and does NOT use the binary generated by `./x.py build src/tools/clippy`.
Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD
Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD and Solaris
See ip(4P) man page:
IP_MULTICAST_TTL Time to live for multicast datagrams. This option
takes an unsigned character as an argument. Its
value is the TTL that IP uses on outgoing multi-
cast datagrams. The default is 1.
IP_MULTICAST_LOOP Loopback for multicast datagrams. Normally multi-
cast datagrams are delivered to members on the
sending host (or sending zone). Setting the
unsigned character argument to 0 causes the oppo-
site behavior, meaning that when multiple zones
are present, the datagrams are delivered to all
zones except the sending zone.
https://docs.oracle.com/cd/E88353_01/html/E37851/ip-4p.htmlhttps://man.openbsd.org/ip.4
Implement `?const` opt-out for trait bounds
For now, such bounds are treated exactly the same as unprefixed ones in all contexts. [RFC 2632](https://github.com/rust-lang/rfcs/pull/2632) does not specify whether such bounds are forbidden outside of `const` contexts, so they are allowed at the moment.
Prior to this PR, the constness of a trait bound/impl was stored in `TraitRef`. Now, the constness of an `impl` is stored in `ast::ItemKind::Impl` and the constness of a bound in `ast::TraitBoundModifer`. Additionally, constness of trait bounds is now stored in an additional field of `ty::Predicate::Trait`, and the combination of the constness of the item along with any `TraitBoundModifier` determines the constness of the bound in accordance with the RFC. Encoding the constness of impls at the `ty` level is left for a later PR.
After a discussion in \#wg-grammar on Discord, it was decided that the grammar should not encode the mutual exclusivity of trait bound modifiers. The grammar for trait bound modifiers remains `[?const] [?]`. To encode this, I add a dummy variant to `ast::TraitBoundModifier` that is used when the syntax `?const ?` appears. This variant causes an error in AST validation and disappears during HIR lowering.
cc #67794
r? @oli-obk
The diagnostic for diagnostic for methods and trait provided
methods would only show the empty string:
error[E0277]: the `?` operator can only be used in that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
Handle the missing cases so it reads ``a method'' / ``an async
method'' / ``a trait method'' respectively.
Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
A single framework for gen-kill and generic dataflow problems
This is the prototype implementation discussed in rust-lang/compiler-team#202. You can read a high-level description of it in [the proposal](https://hackmd.io/@39Qr_z9cQhasi25sGjmFnA/Skvd9rztS) for that design meeting. This would eventually supersede the existing `BitDenotation` interface.
r? @ghost
cc @rust-lang/compiler (esp. @eddyb and @pnkfelix)
`TooGeneric` is encountered during WF checking when we cannot determine that a constant involving a generic parameter will always be evaluated successfully (rather than resulting in an error). In these cases, the burden of proof should be with the caller, so that we can avoid post-monomorphisation tim errors (which was the previous previous behaviour). This commit ensures that this situation produces a proper compiler error, rather than silently ignoring it or ICEing.
Rollup of 8 pull requests
Successful merges:
- #67734 (Remove appendix from Apache license)
- #67795 (Cleanup formatting code)
- #68290 (Fix some tests failing in `--pass check` mode)
- #68297 ( Filter and test predicates using `normalize_and_test_predicates` for const-prop)
- #68302 (Fix #[track_caller] and function pointers)
- #68339 (Add `riscv64gc-unknown-linux-gnu` into target list in build-manifest)
- #68381 (Added minor clarification to specification of GlobalAlloc::realloc.)
- #68397 (rustdoc: Correct order of `async` and `unsafe` in `async unsafe fn`s)
Failed merges:
r? @ghost
rustdoc: Correct order of `async` and `unsafe` in `async unsafe fn`s
The order was swapped in #61319 but rustdoc was never updated to match.
r? @GuillaumeGomez
Added minor clarification to specification of GlobalAlloc::realloc.
The specification of `realloc` is slightly unclear:
```
/// * `layout` must be the same layout that was used
/// to allocate that block of memory,
```
https://github.com/rust-lang/rust/blob/master/src/libcore/alloc.rs#L541-L542
In the case of an `alloc` or `alloc_zeroed` this is fairly evidently the `layout` parameter passed into the original call. In the case of a `realloc`, this I assume is `layout` modified to contain `new_size`. However, I could not find this case specified in the documentation. Thus technically in a sequence of calls to `realloc`, it would be valid to provide the second call to `realloc` the same `layout` as the first call to `realloc`, which is almost certainly not going to be handled correctly.
This PR attempts to clarify the specification.