syntax: account for CVarArgs being in the argument list.
Fixes#63430 by testing for `1` argument (the `CVarArgs` itself) instead of `0`.
Note that the error has basically been impossible to trigger since the change that caused #63430, so perhaps we need an audit of untested errors.
Also, this check probably belongs in AST validation/HIR lowering, but I'd rather fix it in place for now.
r? @petrochenkov cc @dlrobertson
Implement Clone, Display for ascii::EscapeDefault
This will mimic the same behaviour as the `char` version; `Display`ing the iterator will give its string representation without advancing it.
typeck: Prohibit RPIT types that inherit lifetimes
Part of #61949.
This PR prohibits return position `impl Trait` types that "inherit
lifetimes" from the parent scope. The intent is to forbid cases that are
challenging until they can be addressed properly.
cc @nikomatsakis
Each call to `fully_expand_fragment` is something unique, interesting, and requiring attention.
It represents a "root" of expansion and its use means that something unusual is happening, like eager expansion or expansion performed outside of the primary expansion pass.
So, it shouldn't be hide under a generic visitor call.
Also, from all the implemented visitor methods only two were actually used.
The slash and quotes in ?/“Kleene” appeared to define “Kleene” as the
name for the ? operator, which is not the case. Rust has three Kleene
operators *, +, ?.
(Pointed out by /u/Sharlinator on Reddit.)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Recently we encountered multiple spurious failures where the crates.io
certificate was reported as expired, even though it's currently due to
expire in a few months. This adds some code to our CI to check for clock
drifts, to possibly find the cause or rule out a bad VM clock.
When encountering a boxed value as expected and a stack allocated value
that could be boxed to fulfill the expectation, like in the following
snippet, suggest `Box::new` wrapping.