Avoid committing to autoderef in object method probing
This fixes the "leak" introduced in #57835 (see test for details, also apparently #54252 had no tests for the "leaks" that were fixed in it, so go ahead and add one).
Maybe beta-nominating because regression, but I'm against landing things on beta we don't have to.
r? @nikomatsakis
Make `intern_lazy_const` actually intern its argument.
Currently it just unconditionally allocates it in the arena.
For a "Clean Check" build of the the `packed-simd` benchmark, this
change reduces both the `max-rss` and `faults` counts by 59%; it
slightly (~3%) increases the instruction counts but the `wall-time` is
unchanged.
For the same builds of a few other benchmarks, `max-rss` and `faults`
drop by 1--5%, but instruction counts and `wall-time` changes are in the
noise.
Fixes#57432, fixes#57829.
Error on duplicate matcher bindings
fix #57593
This should not be merged without a crater run and maybe an FCP. Discussion is ongoing at #57593.
TODO:
- [x] write tests
- [x] crater run
- [x] ~maybe need edition gating?~ not for 1 regression /centril
r? @petrochenkov
Deny warnings in libcore and libstd
This probably fixes https://github.com/rust-lang/rust/issues/57178 (though there may still be some crates that need warnings denied). At least after this change, rustc currently produces no warnings during compilation.
r? @oli-obk
libcore, liballoc: disable tests in Miri
I am going to run the libcore and liballoc unit test suites in Miri. Not all tests pass. This PR disables a whole bunch of tests when running in Miri, to get us to a baseline from which I can investigate failures.
Cc @SimonSapin @alexcrichton
Lower constant patterns with ascribed types.
Fixes#57960.
This PR fixes a bug introduced by #55937 which started checking user
type annotations for associated type patterns. Where lowering a
associated constant expression would previously return a
`PatternKind::Constant`, it now returns a `PatternKind::AscribeUserType`
with a `PatternKind::Constant` inside, this PR unwraps that to
access the constant pattern inside and behaves as before.
r? @pnkfelix
Add embedded book to test such that checktools works
r? @alexcrichton
FWIW this doesn't attempt to make sure we don't break check tools again -- we intentionally make the bash script not exit when x.py fails so we'd need some special case handling so for now I'm just fixing the bug itself, not its cause.
Add const generics to the AST
This is mostly split out from https://github.com/rust-lang/rust/pull/53645 in an effort to make progress merging const generics piecewise instead of in one go.
cc @yodaldevoid, @petrochenkov
r? @eddyb