| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#146111 (Migrate more things in the new solver to specific `DefId`s)
- rust-lang/rust#146298 (GVN: Ensure indirect is first projection in try_as_place.)
- rust-lang/rust#146299 (docs(std): add error docs for path canonicalize)
- rust-lang/rust#146310 (Allow static regions in `type_name`.)
- rust-lang/rust#146313 (Some `rustc_middle` cleanups)
- rust-lang/rust#146319 (Fix typo in default.rs)
- rust-lang/rust#146320 (rustc-dev-guide subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
rustc-dev-guide subtree update
Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/d03ffd422704a69078a26b57fecff058eb4161dd.
Created using https://github.com/rust-lang/josh-sync.
r? `@ghost`
|
|
Fix typo in default.rs
This sentence currently reads:
> Rust implements `Default` for various primitives types.
I think it should just be "primitive types".
|
|
Some `rustc_middle` cleanups
Minor improvements I found while looking through this code.
r? `@BoxyUwU`
|
|
Allow static regions in `type_name`.
Fixes rust-lang/rust#146249.
r? `@lcnr`
|
|
docs(std): add error docs for path canonicalize
This PR adds the missing error documentation for both [Path.canonicalize](https://doc.rust-lang.org/std/path/struct.Path.html#method.canonicalize) and [PathBuf.canonicalize](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.canonicalize) methods. Since both methods are wappers around [fs::canonicalize](https://doc.rust-lang.org/std/fs/fn.canonicalize.html), the error doc is copied directly from that function.
This makes it faster to find what errors might arise when calling `path.canonicalize` or `path_buf.canonicalize` in the editor itself without needing to drill down to the `fs::canonicalzie` docs.
|
|
GVN: Ensure indirect is first projection in try_as_place.
I haven't found any report for this bug on existing code, but managed to trigger it with rust-lang/rust#143333
|
|
Migrate more things in the new solver to specific `DefId`s
Continuation of https://github.com/rust-lang/rust/pull/145377. I migrated the rest of the types, except aliases.
Aliases are problematic because opaques and associated types share the same type in the new solver. `@jackh726,` `@lcnr,` `@ShoyuVanilla` I'd like to hear ideas here. Anyway, even if we do nothing with them we already got a substantial improvement.
r? types
|
|
improve c-variadic error reporting
tracking issue: https://github.com/rust-lang/rust/issues/44930
The parts of https://github.com/rust-lang/rust/pull/143546 that don't require any particular knowledge about c-variadic functions.
This prepares the way for rejecting c-variadic functions that are also coroutines, safe functions, or associated functions.
|
|
Fixes #146249.
|
|
Don't include ASCII characters in Unicode tables
Split off from https://github.com/rust-lang/rust/pull/145219
|
|
clarify typo pr guidance
|
|
Rustc pull update
|
|
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: 2f3f27bf79ec147fec9d2e7980605307a74067f4
Filtered ref: 82a5eafbafdb98eae68193600732388ae4135756
Upstream diff: https://github.com/rust-lang/rust/compare/a1dbb443527bd126452875eb5d5860c1d001d761...2f3f27bf79ec147fec9d2e7980605307a74067f4
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
This updates the rust-version file to 2f3f27bf79ec147fec9d2e7980605307a74067f4.
|
|
Ignore intrinsic calls in cross-crate-inlining cost model
I noticed in a side project that a function which just compares to `[u64; 2]` for equality is not cross-crate-inlinable. That was surprising to me because I didn't think that code contained a function call, but of course our array comparisons are lowered to an intrinsic. Intrinsic calls don't make a function no longer a leaf, so it makes sense to add this as an exception to the "only leaves" cross-crate-inline heuristic.
This is the useful compare link: https://perf.rust-lang.org/compare.html?start=7cb1a81145a739c4fd858abe3c624ce8e6e5f9cd&end=c3f0a64dbf9fba4722dacf8e39d2fe00069c995e&stat=instructions%3Au because it disables CGU merging in both commits, so effects that cause changes in the sysroot to perturb partitioning downstream are excluded. Perturbations to what is and isn't cross-crate-inlinable in the sysroot has chaotic effects on what items are in which CGUs after merging. It looks like before this PR by sheer luck some of the CGUs dirtied by the patch in eza incr-unchanged happened to be merged together, and with this PR they are not.
The perf runs on this PR point to a nice runtime performance improvement.
|
|
Reimplement DestinationPropagation according to live ranges.
This PR reimplements DestinationPropagation as a problem of merging live-ranges of locals. We merge locals that have disjoint live-ranges. This allows merging several locals in the same round by updating live range information.
Live ranges are mainly computed using the `MaybeLiveLocals` analysis. The subtlety is that we split each statement and terminator in 2 positions. The first position is the regular statement. The second position is a shadow, which is always more live. It encodes partial writes and dead writes as a local being live for half a statement. This half statement ensures that writes conflict with another local's writes and regular liveness.
r? `@Amanieu`
|
|
That way it doesn't need to be exported.
|
|
Because `rust_infer` is the only crate that uses it.
|
|
Exhaustive match isn't necessary for these trivial cases, and some
similar nearby methods are non-exhaustive.
|
|
Rollup of 4 pull requests
Successful merges:
- rust-lang/rust#146170 (fix: offline rustdoc html missing favicon)
- rust-lang/rust#146209 (Misc LTO cleanups)
- rust-lang/rust#146269 (feat(std): emulate flock for solaris via fcntl)
- rust-lang/rust#146297 (Introduce PlaceContext::may_observe_address.)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Introduce PlaceContext::may_observe_address.
A small utility method to avoid open-coding the logic in several MIR opts.
|
|
feat(std): emulate flock for solaris via fcntl
Upstream Solaris flock emulation to libstd from cargo.
This is borrowed from
https://github.com/rust-lang/cargo/blob/3b379fcc541b39321a7758552d37e5e0cc4277b9/src/cargo/util/flock.rs#L502-L536 which was implemented by an Oracle employee.
The code has been in cargo since 2022-12.
Python's `fcntl.flock` emulates like this as well: https://github.com/python/cpython/blob/c919d02edecfe9d75fe374756fb8aa1db8d95f55/Modules/fcntlmodule.c#L337-L400
We did the same thing in
https://github.com/rust-lang/rust/blob/0d0f4eac8b98133e5da6d3604d86a8f3b5a67844/compiler/rustc_data_structures/src/flock/unix.rs#L13-L39
However, should we just always falls back to fcntl for all Unix, instead of "unsupported"?
try-job: `*-solaris`
|
|
Misc LTO cleanups
Follow up to https://github.com/rust-lang/rust/pull/145955.
* Remove want_summary argument from `prepare_thin`.
Since https://github.com/rust-lang/rust/pull/133250 ThinLTO summary writing is instead done by `llvm_optimize`.
* Two minor cleanups
|
|
fix: offline rustdoc html missing favicon
As discussed in the rust-lang/rust#146149 the doc was missing the favicon icon when build locally and viewed on a browser. I changed the relative path and also now we explicitly copy both SVG and PNG.
<img width="1132" height="425" alt="Screenshot 2025-09-03 at 11 57 46 PM" src="https://github.com/user-attachments/assets/062cbb08-04ec-4d88-a43a-710fb6190f82" />
|
|
Add amdgpu test for addrspacecasting global vars and the gpu-kernel calling convention
Add two tests that can now be added, as the amdgpu is merged.
- Global variables are casted to the default address space since rust-lang/rust#135026
- gpu-kernel calling convention, translatos to amdgpu_kernel rust-lang/rust#135047
Tracking issue: rust-lang/rust#135024
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GVN: Allow reusing aggregates if LHS is not a simple local.
This resolves a FIXME in the code. I don't see a reason not to allow this.
|
|
|
|
|
|
The ASCII subset of Unicode is fixed and will never change, so we don't
need to generate tables for it with every new Unicode version. This
saves a few bytes of static data and speeds up `char::is_control` and
`char::is_grapheme_extended` on ASCII inputs.
Since the table lookup functions exported from the `unicode` module will
give nonsensical errors on ASCII input (and in fact will panic in debug
mode), I had to add some private wrapper methods to `char` which check
for ASCII-ness first.
|
|
LorrensP-2158466:miri-float-nondet-foreign-items-take2, r=RalfJung
Miri: non-deterministic floating point operations in foreign_items
Take 2 of rust-lang/rust#143906. The last 2 commits are what changed compared to the original pr.
Verified the tests using (fish shell):
```fish
env MIRIFLAGS="-Zmiri-max-extra-rounding-error -Zmiri-many-seeds" ./x miri --no-fail-fast std core coretests -- f32 f64
```
r? `@RalfJung`
|
|
Rollup of 2 pull requests
Successful merges:
- rust-lang/rust#146254 (Use `Itertools::all_equal_value()` where applicable)
- rust-lang/rust#146290 (Revert "Add LSX accelerated implementation for source file analysis")
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Revert "Add LSX accelerated implementation for source file analysis"
This reverts commit 5b43244ac59119870c9e0f6b642340ab88355b23 to fix native build failures on LoongArch.
Link: https://github.com/rust-lang/rust/pull/145963#issuecomment-3263195096
Link: https://github.com/rust-lang/rust/pull/145963#issuecomment-3263420700
|
|
Use `Itertools::all_equal_value()` where applicable
Just a small cleanup.
We already have `itertools` as a dep in these crates, so might as well use another of its features.
Makes the code simpler IMHO :)
|
|
lint ImproperCTypes: refactor linting architecture (part 1)
This is the first PR in an effort to split rust-lang/rust#134697 into individually-mergeable parts.
This one focuses on properly packaging the lint and its tests, as well as properly separate the "linting" and "type-checking" code.
There is exactly one user-visible change: the safety of `Option<Box<FFISafePointee>>` is now the same in `extern` blocks and function definitions: it is safe.
r? `@tgross35` because you are already looking at the original
|
|
Upstream Solaris flock emulation to libstd from cargo.
This is borrowed from
https://github.com/rust-lang/cargo/blob/3b379fcc541b39321a7758552d37e5e0cc4277b9/src/cargo/util/flock.rs#L502-L536
which was implemented by an Oracle employee.
The code has been in cargo since 2022-12.
Python's `fcntl.flock` emulates like this as well:
https://github.com/python/cpython/blob/c919d02edecfe9d75fe374756fb8aa1db8d95f55/Modules/fcntlmodule.c#L337-L400
We did the same thing in
https://github.com/rust-lang/rust/blob/0d0f4eac8b98133e5da6d3604d86a8f3b5a67844/compiler/rustc_data_structures/src/flock/unix.rs#L13-L39
|