| Age | Commit message (Collapse) | Author | Lines |
|
`BasicBlock::new(0)` -> `START_BLOCK` [no functional changes]
|
|
There are several `mk_foo`/`intern_foo` pairs, where the former takes an
iterator and the latter takes a slice. (This naming convention is bad,
but that's a fix for another PR.)
This commit changes several `mk_foo` occurrences into `intern_foo`,
avoiding the need for some `.iter()`/`.into_iter()` calls. Affected
cases:
- mk_type_list
- mk_tup
- mk_substs
- mk_const_list
|
|
|
|
|
|
in metadata
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- #107034 (Migrating rustc_infer to session diagnostics (part 4))
- #107972 (Fix unintentional UB in ui tests)
- #108010 (Make `InferCtxt::can_eq` and `InferCtxt::can_sub` return booleans)
- #108021 (make x look for x.py if shell script does not exist)
- #108047 (Use `target` instead of `machine` for mir interpreter integer handling.)
- #108049 (Don't suggest `#[doc(hidden)]` trait methods with matching return type)
- #108066 (Better names for illegal impl trait positions)
- #108076 (rustdoc: Use more let chain)
- #108088 (clarify correctness of `black_box`)
- #108094 (Demonstrate I/O in File examples)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Don't ICE in `might_permit_raw_init` if reference is polymorphic
Emitting optimized MIR for a polymorphic function may require computing layout of a type that isn't (yet) known. This happens in the instcombine pass, for example. Let's fail gracefully in that condition.
cc `@saethlin`
fixes #107999
|
|
Use `target` instead of `machine` for mir interpreter integer handling.
The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform. As per https://github.com/rust-lang/rust/pull/108029#issuecomment-1429791015
r? `@RalfJung`
|
|
Avoid accessing HIR when it can be avoided
Experiment to see if it helps some incremental cases.
Will be rebased once https://github.com/rust-lang/rust/pull/107942 gets merged.
r? `@ghost`
|
|
The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #107573 (Update the minimum external LLVM to 14)
- #107626 (Fix `x fix` on the standard library itself)
- #107673 (update ICU4X to 1.1.0)
- #107733 (Store metrics from `metrics.json` to CI PGO timer)
- #108007 (Use `is_str` instead of string kind comparison)
- #108033 (add an unstable `#[rustc_coinductive]` attribute)
- #108039 (Refactor refcounted structural_impls via functors)
- #108040 (Use derive attributes for uninteresting traversals)
- #108044 (interpret: rename Pointer::from_addr → from_addr_invalid)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
interpret: rename Pointer::from_addr → from_addr_invalid
This function corresponds to `ptr::invalid` in the standard library; the previous name was not clear enough IMO.
|
|
|
|
|
|
|
|
|
|
|
|
We use more specific `mk_*` functions in most places, might as well use
them as much as possible.
|
|
|
|
These are in places where a `tcx` is easily obtained.
|
|
Extend support for `implies_by` (from `#[stable]` and `#[unstable]`)
to `#[rustc_const_stable]` and `#[rustc_const_unstable]`.
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
Rename `PointerSized` to `PointerLike`
The old name was unnecessarily vague. This PR renames a nightly language feature that I added, so I don't think it needs any additional approval, though anyone can feel free to speak up if you dislike the rename.
It's still unsatisfying that we don't the user which of {size, alignment} is wrong, but this trait really is just a stepping stone for a more generalized mechanism to create `dyn*`, just meant for nightly testing, so I don't think it really deserves additional diagnostic machinery for now.
Fixes #107696, cc ``@RalfJung``
r? ``@eholk``
|
|
Rollup of 8 pull requests
Successful merges:
- #107719 (Remove `arena_cache` modifier from `upstream_monomorphizations_for`)
- #107740 (Avoid locking the global context across the `after_expansion` callback)
- #107746 (Split fn_ctxt/adjust_fulfillment_errors from fn_ctxt/checks)
- #107749 (allow quick-edit convenience)
- #107750 (make more readable)
- #107755 (remove binder from query constraints)
- #107756 (miri: fix ICE when running out of address space)
- #107764 (llvm-16: Use Triple.h from new header location.)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
miri: fix ICE when running out of address space
Fixes https://github.com/rust-lang/miri/issues/2769
r? `@oli-obk`
I didn't add a test since that requires https://github.com/oli-obk/ui_test/issues/38 (host must be 64bit and target 32bit). Also the test takes ~30s, so I am not sure if we want to have it in the test suite?
|
|
r=compiler-errors
Modify existing bounds if they exist
Fixes #107335.
This implementation is kinda gross but I don't really see a better way to do it.
This primarily does two things: Modifies `suggest_constraining_type_param` to accept a new parameter that indicates a span to be replaced instead of added, if presented, and limit the additive suggestions to either suggest a new bound on an existing bound (see newly added unit test) or add the generics argument if a generics argument wasn't found.
The former change is required to retain the capability to add an entirely new bounds if it was entirely omitted.
r? ``@compiler-errors``
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Improve enum checks
Some light refactoring.
|
|
Bump bootstrap compiler to 1.68
This also changes our stage0.json to include the rustc component for the rustfmt pinned nightly toolchain, which is currently necessary due to rustfmt dynamically linking to that toolchain's librustc_driver and libstd.
r? `@pietroalbini`
|
|
|
|
|
|
|
|
|
|
Use stable metric for const eval limit instead of current terminator-based logic
This patch adds a `MirPass` that inserts a new MIR instruction `ConstEvalCounter` to any loops and function calls in the CFG. This instruction is used during Const Eval to count against the `const_eval_limit`, and emit the `StepLimitReached` error, replacing the current logic which uses Terminators only.
The new method of counting loops and function calls should be more stable across compiler versions (i.e., not cause crates that compiled successfully before, to no longer compile when changes to the MIR generation/optimization are made).
Also see: #103877
|
|
|
|
|
|
|
|
EarlyBinder to fn_sig in metadata
|
|
|