on every call. This ensures that implies bounds are reasonable
(the older code only checked that the values provided had WF types, but
we also must know that the formal types of the arguments are WF.)
warnings. It also checks more conditions than the old code. Keep the
old wf code around unchanged so that we can continue to issue errors for
the cases where we used to report errors.
As part of this, remove the where-clauses-must-reference-parameter rule,
which is easily circumvented.
`implicator`. These definitions are also in accordance with RFC 1214 (or
more so), and hence somewhat different from the implicator. This commit
also modifies the implicator to remove the older rules for projections,
which can easily trigger infinite loops.
after we check casts, because sometimes casts can influence inference,
unfortunately. We do re-run `select_all_trait_obligations` during
regionck anyhow.
This commit removes all unstable and deprecated functions in the standard
library. A release was recently cut (1.3) which makes this a good time for some
spring cleaning of the deprecated functions.
Implemented count, nth, and last in constant time for Windows, Chunks,
and ChunksMut created from a slice.
Included checks for overflow in the implementation of nth().
Also added a test for each implemented method to libcoretest.
Addresses #24214
Initial version of PR had an DerefMut implementation, which was later removed
because it may cause mutable reference aliasing.
Suggest how to implement mutability with reentrant mutex and remove the claim we
implement DerefMut.
When using a generic enum type that was defined in an external crate,
our debuginfo currently claims that the concrete type (e.g. Option<i32>)
was defined in the current crate, where it was first used.
This means that if there are multiple crates that all use, for example,
Option<i32> values, they'll have conflicting debuginfo, each crate
claiming to have defined that type. This doesn't cause problems in
regular builds, but with LTO enabled, LLVM complains because it tries to
merge the debuginfo for those types and sees the ODR violations.
Since I couldn't find a way to get the file info for the external crate
that actually defined the enum, I'm working around the issue by using
"<unknown>" as the file for enum types. We'll want to re-visit and fix
this later, but this at least this fixes the ICE. And with the file
being unknown instead of wrong, the debuginfo isn't really worse than
before either.
Fixes#26447