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
This commit leverages the runtime support for DWARF exception info added
in #27210 to enable unwinding by default on 64-bit MSVC. This also additionally
adds a few minor fixes here and there in the test harness and such to get
`make check` entirely passing on 64-bit MSVC:
* The invocation of `maketest.py` now works with spaces/quotes in CC
* debuginfo tests are disabled on MSVC
* A link error for librustc was hacked around (see #27438)
I was not able to come up with tests that would expose this bug, as, apparently, Rust types of the args are not used for anything but debug logging.
Thanks to @luqmana for pointing this out!