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
Rollup of 11 pull requests
Successful merges:
- #57504 (Re-enable history api on file:// protocol)
- #57848 (Generate a documentation page for core::mem::transmute.)
- #57884 (Update minifier version)
- #57954 (rustdoc: remove blank unstable spans)
- #58028 (Fix image link in the settings menu)
- #58033 (rustdoc: wrap stability tags in colored spans)
- #58086 ([rustdoc] Improve file list display)
- #58143 (Sort elements in the sidebar)
- #58146 (Prevent automatic collapse of methods impl blocks)
- #58150 (Don't apply impl block collapse rules to trait impls)
- #58185 (Remove images' url to make it work even without internet connection)
Failed merges:
r? @ghost