| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
compiler: remove unnecessary imports and qualified paths
Some of these imports were necessary before Edition 2021, others were already in the prelude.
I hope it's fine that this PR is so spread-out across files :/
|
|
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- #105216 (Remove unused GUI test)
- #105245 (attempt to clarify align_to docs)
- #105387 (Improve Rustdoc scrape-examples UI)
- #105389 (Enable profiler in dist-powerpc64le-linux)
- #105427 (Dont silently ignore rustdoc errors)
- #105442 (rustdoc: clean up docblock table CSS)
- #105443 (Move some queries and methods)
- #105455 (use the correct `Reveal` during validation)
- #105470 (Clippy: backport ICE fix before beta branch)
- #105474 (lib docs: fix typo)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
use the correct `Reveal` during validation
supersedes #105454. Deals with https://github.com/rust-lang/rust/issues/105009#issuecomment-1342395333, not closing #105009 as the ICE may leak into beta
The issue was the following:
- we optimize the mir, using `Reveal::All`
- some optimization relies on the hidden type of an opaque type
- we then validate using `Reveal::UserFacing` again which is not able to observe the hidden type
r? `@jackh726`
|
|
Start emitting labels even if their pointed to file is not available locally
r? `@estebank`
cc `@RalfJung`
fixes #97699
|
|
|
|
labels are reordered within the file in which they are reported, which can mess up the stack trace
|
|
|
|
|
|
Fix dupe word typos
|
|
interpret: clobber return place when calling function
Makes sure the callee cannot observe the previous contents of the return place, and the caller cannot read any of the old return place contents even if the function unwinds.
I don't think we can test for this though, that would require some strange hand-written MIR.
r? `````@oli-obk`````
|
|
|
|
|
|
clarify comment on Deref promotion
r? `@oli-obk`
|
|
|
|
|
|
Some initial normalization method changes
1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`)
2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`)
3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize`
4. Remove some unused other normalization fns in `Inherited` and `FnCtxt`
Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic.
Stacked on top of #104835 for convenience.
r? types
|
|
|
|
interpret: get rid of run() function
Miri needs its own loop anyway, so there's not much of a point in trying to share this code.
|
|
Prefer doc comments over `//`-comments in compiler
Doc comments are generally nicer: they show up in the documentation, they are shown in IDEs when you hover other mentions of items, etc. Thus it makes sense to use them instead of `//`-comments.
|
|
Pretty-print generators with their `generator_kind`
After removing `GenFuture`, I special-cased async generators to pretty-print as `impl Future<Output = X>` mainly to avoid too much diagnostics changes originally.
This now reverses that change so that async fn/blocks are pretty-printed as `[$async-type@$source-position]` in various diagnostics, and updates the tests that this touches.
|
|
|
|
|
|
Various cleanups around scalar layout restrictions
Pulled out of https://github.com/rust-lang/rust/pull/103724
|
|
After removing `GenFuture`, I special-cased async generators to pretty-print as `impl Future<Output = X>` mainly to avoid too much diagnostics changes originally.
This now reverses that change so that async fn/blocks are pretty-printed as `[$movability `async` $something@$source-position]` in various diagnostics, and updates the tests that this touches.
|
|
Add `ConstKind::Expr`
Starting to implement `ty::ConstKind::Abstract`, most of the match cases are stubbed out, some I was unsure what to add, others I didn't want to add until a more complete implementation was ready.
r? `@lcnr`
|
|
|
|
Initial pass at expr/abstract const/s
Address comments
Switch to using a list instead of &[ty::Const], rm `AbstractConst`
Remove try_unify_abstract_consts
Update comments
Add edits
Recurse more
More edits
Prevent equating associated consts
Move failing test to ui
Changes this test from incremental to ui, and mark it as failing and a known bug.
Does not cause the compiler to ICE, so should be ok.
|
|
|
|
|
|
|
|
teh first scalar
|
|
|
|
Previously, async constructs would be lowered to "normal" generators,
with an additional `from_generator` / `GenFuture` shim in between to
convert from `Generator` to `Future`.
The compiler will now special-case these generators internally so that
async constructs will *directly* implement `Future` without the need
to go through the `from_generator` / `GenFuture` shim.
The primary motivation for this change was hiding this implementation
detail in stack traces and debuginfo, but it can in theory also help
the optimizer as there is less abstractions to see through.
|
|
|
|
|
|
|
|
|
|
sites that used the wrong amount
|
|
Add `PolyExistentialPredicate` type alias
Wrapping `ExistentialPredicate`s in a binder is very common, and this alias already exists for the `PolyExistential{TraitRef,Projection}` types.
|
|
interpret: use Either over Result when it is not representing an error condition
r? `@oli-obk`
|
|
r=oli-obk
Constify `is_aligned` via `align_offset`
Alternative to https://github.com/rust-lang/rust/pull/102753
Make `align_offset` work in const eval (and not always return `usize::MAX`) and then use that to constify `is_aligned{_to}`.
Tracking Issue: https://github.com/rust-lang/rust/issues/104203
|
|
This reverts commit f3a577bfae376c0222e934911865ed14cddd1539.
|
|
|
|
|
|
|
|
|