about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-04-21Normalize xform_ret_ty after constrainedMichael Goulet-45/+35
2024-04-21Use fulfillment, not evaluate, during method probeMichael Goulet-407/+328
2024-04-21Some early clean-ups in method probeMichael Goulet-51/+8
2024-04-21Auto merge of #124241 - matthiaskrgr:rollup-xhu90xr, r=matthiaskrgrbors-54/+989
Rollup of 5 pull requests Successful merges: - #123840 (Add an intrinsic for `ptr::from_raw_parts(_mut)`) - #124224 (cleanup: unnecessary clone during lower generics args) - #124229 (Add gnullvm targets to manifest) - #124231 (remove from reviewers) - #124235 (Move some tests) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-21Rollup merge of #124235 - c410-f3r:tests98765, r=jieyouxuMatthias Krüger-35/+35
Move some tests r? `@petrochenkov`
2024-04-21Rollup merge of #124231 - BoxyUwU:dereview, r=Mark-SimulacrumMatthias Krüger-1/+0
remove from reviewers not gonna be around for a few weeks
2024-04-21Rollup merge of #124229 - mati865:add-gnullvm-targets-to-manifest, ↵Matthias Krüger-0/+3
r=Mark-Simulacrum Add gnullvm targets to manifest Fixes an oversight from https://github.com/rust-lang/rust/pull/121712
2024-04-21Rollup merge of #124224 - bvanjoi:cleanup, r=fmeaseMatthias Krüger-2/+2
cleanup: unnecessary clone during lower generics args
2024-04-21Rollup merge of #123840 - scottmcm:aggregate-kind-rawptr, r=cjgillotMatthias Krüger-16/+949
Add an intrinsic for `ptr::from_raw_parts(_mut)` Fixes #123174 cc `@CAD97` `@saethlin` r? `@cjgillot` As suggested in https://github.com/rust-lang/rust/pull/123190#issuecomment-2028717967, this adds a new `AggregateKind::RawPtr` for creating a pointer from its data pointer and its metadata. That means that `slice::from_raw_parts` and friends no longer need to hard-code pointer layout into `libcore`, and because it no longer does union hacks the MIR is shorter and more amenable to optimizations.
2024-04-21Auto merge of #124203 - lukas-code:delete-deleting-caches, r=compiler-errorsbors-29/+25
fix normalizing in different `ParamEnv`s with the same `InferCtxt` This PR changes the key of the projection cache from just `AliasTy` to `(AliasTy, ParamEnv)` to allow normalizing in different `ParamEnv`s without resetting caches. Previously, normalizing the same alias in different param envs would always reuse the cached result from the first normalization, which is incorrect if the projection clauses in the param env have changed. Fixing this bug allows us to get rid of `InferCtxt::clear_caches`, which was only used by the `AutoTraitFinder`, because it requires normalizing in different param envs. r? `@fmease`
2024-04-21Move some testsCaio-35/+35
2024-04-21Update tests after 123949Scott McMurray-82/+0
2024-04-21Address more PR feedbackScott McMurray-4/+5
2024-04-21Address PR feedbackScott McMurray-15/+12
2024-04-21Also handle AggregateKind::RawPtr in cg_craneliftScott McMurray-0/+30
2024-04-21InstSimplify `from_raw_parts(p, ())` → `p as _`Scott McMurray-41/+48
2024-04-21Use it in the library, and `InstSimplify` it away in the easy placesScott McMurray-28/+328
2024-04-21Add an intrinsic that lowers to AggregateKind::RawPtrScott McMurray-1/+264
2024-04-21Add `AggregateKind::RawPtr` and enough support to compileScott McMurray-3/+84
2024-04-21Add a mir-opt test for `byte_add` on pointersScott McMurray-0/+248
2024-04-21Add a MIR pre-codegen test for Vec::derefScott McMurray-0/+41
2024-04-21New slice indexing pre-codegen MIR testScott McMurray-0/+47
2024-04-21removalBoxy-1/+0
2024-04-21Auto merge of #123594 - Urgau:fix-non_local_def-lint-overflow, r=lcnrbors-1/+41
Fix trait solver overflow with `non_local_definitions` lint This PR fixes the trait solver overflow with the `non_local_definitions` lint reported in https://github.com/rust-lang/rust/issues/123573 using the suggestion from `@lcnr:` https://github.com/rust-lang/rust/issues/123573#issuecomment-2041348320 to use the next trait solver. ~~I have not (yet) tried to create a minimized repro~~ ``@compiler-errors`` did the minimization (thanks you) but I have manually tested on the `starlark-rust` project that it fixes the issue. Fixes #123573 r? `@lcnr`
2024-04-21also remap RPITITs nested in other types back to their opaquesLukas Markeffsky-2/+6
2024-04-21Add gnullvm targets to manifestMateusz Mikuła-0/+3
2024-04-21Auto merge of #124222 - GuillaumeGomez:rollup-ws1zju7, r=GuillaumeGomezbors-246/+303
Rollup of 4 pull requests Successful merges: - #124069 (enable clippy for bootstrap on CI PRs (in `mingw-check` image)) - #124089 (Fix watchOS and visionOS for pread64 and pwrite64 calls) - #124184 (Suggest using `unsigned_abs` in `abs` documentation) - #124198 (Flip spans for precise capturing syntax not capturing a ty/const param, and for implicit captures of lifetime params) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-21cleanup: unnecessary clone during lower generics argsbohan-2/+2
2024-04-21Rollup merge of #124198 - compiler-errors:improve-ty-ct-param-span, r=NadrierilGuillaume Gomez-38/+69
Flip spans for precise capturing syntax not capturing a ty/const param, and for implicit captures of lifetime params Make the primary span point to the opaque, rather than the param which might be very far away (e.g. in an impl header hundreds of lines above).
2024-04-21Rollup merge of #124184 - gurry:124152-suggest-unsigned-abs-in-abs-doc, ↵Guillaume Gomez-1/+2
r=jhpratt Suggest using `unsigned_abs` in `abs` documentation Fixes #124152
2024-04-21Rollup merge of #124089 - ↵Guillaume Gomez-38/+66
simlay:fix-preadv64-and-pwritev64-link-for-watchos-and-visionos, r=workingjubilee Fix watchOS and visionOS for pread64 and pwrite64 calls In #122880, links to `preadv64` and `pwritev64` were added for `watchOS` however the underlying [`weak!` macro did not include `target_os = "watchos"`](https://github.com/rust-lang/rust/blob/c45dee5efd0c042e9d1e24559ebd0d6424d8aa70/library/std/src/sys/pal/unix/weak.rs#L30-L74). This resulted in an `xcodebuild` error when targeting `watchOS`: ``` Undefined symbols for architecture arm64: "_preadv64", referenced from: __rust_extern_with_linkage_preadv64 in libliveview_native_core.a[274](std-324fdd8d31e8eaa2.std.e18cf7e8d0336778-cgu.08.rcgu.o) "_pwritev64", referenced from: __rust_extern_with_linkage_pwritev64 in libliveview_native_core.a[274](std-324fdd8d31e8eaa2.std.e18cf7e8d0336778-cgu.08.rcgu.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` So I added them. I also went ahead and added the same for visionOS because it's bound to create the same issue.
2024-04-21Rollup merge of #124069 - onur-ozkan:run-clippy-on-bootstrap, r=albertlarsan68Guillaume Gomez-169/+166
enable clippy for bootstrap on CI PRs (in `mingw-check` image) Let's keep the bootstrap codebase cleaner.
2024-04-21Auto merge of #124193 - RalfJung:miri, r=RalfJungbors-685/+1400
Miri subtree update r? `@ghost`
2024-04-21the mir-validation ICE test behaves strangely on Windows hostsRalf Jung-5/+8
let's just disable it there, this code is not platform-dependent anyway
2024-04-21Auto merge of #117457 - daxpedda:wasm-nontrapping-fptoint, r=wesleywiserbors-12/+7
Stabilize Wasm target features that are in phase 4 and 5 This stabilizes the Wasm target features that are known to be working and in [phase 4 and 5](https://github.com/WebAssembly/proposals/tree/04fa8c810e1dc99ab399e41052a6e427ee988180). Feature stabilized: - [Non-trapping float-to-int conversions](https://github.com/WebAssembly/nontrapping-float-to-int-conversions) - [Import/Export of Mutable Globals](https://github.com/WebAssembly/mutable-global) - [Sign-extension operators](https://github.com/WebAssembly/sign-extension-ops) - [Bulk memory operations](https://github.com/WebAssembly/bulk-memory-operations) - [Extended Constant Expressions](https://github.com/WebAssembly/extended-const) Features not stabilized: - [Multi-value](https://github.com/WebAssembly/multi-value): requires rebuilding `std` #73755. - [Reference Types](https://github.com/WebAssembly/reference-types): no point stabilizing without #103516. - [Threads](https://github.com/webassembly/threads): requires rebuilding `std` #77839. - [Relaxed SIMD](https://github.com/WebAssembly/relaxed-simd): separate PR #117468. - [Multi Memory](https://github.com/WebAssembly/multi-memory): not implemented. See https://github.com/rust-lang/rust/pull/117457#issuecomment-1787648070 for more context. Documentation: https://github.com/rust-lang/reference/pull/1420 Tracking issue: https://github.com/rust-lang/rust/issues/44839
2024-04-21Fix watchOS and visionOS for pread64 and pwrite64 callsSebastian Imlay-38/+66
* Refactor apple OSs to use pwritev and preadv rather pwritev64 and preadv64 * Updated the comments for preadv and pwritev
2024-04-21Auto merge of #123930 - Mark-Simulacrum:vec-length-invariant, r=jhprattbors-3/+21
Tell LLVM Vec::len is invariant across growth This allows LLVM to avoid re-loading it from memory.
2024-04-20Avoid reloading Vec::len across grow_one in pushMark Rousskov-3/+21
This saves an extra load from memory.
2024-04-21Auto merge of #123981 - Kobzol:update-nodejs, r=Mark-Simulacrumbors-8/+20
CI: add script for installing NodeJS and update it to v20 I centralized the installation on a single place to make it simple to update the NodeJS version across the board. Fixes: https://github.com/rust-lang/rust/issues/123965 r? `@Mark-Simulacrum`
2024-04-20Auto merge of #124208 - jieyouxu:rollup-gbgpu4u, r=jieyouxubors-421/+912
Rollup of 10 pull requests Successful merges: - #123379 (Print note with closure signature on type mismatch) - #123967 (static_mut_refs: use raw pointers to remove the remaining FIXME) - #123976 (Use fake libc in core test) - #123986 (lint-docs: Add redirects for renamed lints.) - #124053 (coverage: Branch coverage tests for lazy boolean operators) - #124071 (Add llvm-bitcode-linker to build manifest) - #124103 (Improve std::fs::Metadata Debug representation) - #124132 (llvm RustWrapper: explain OpBundlesIndirect argument type) - #124191 (Give a name to each distinct manipulation of pretty-printer FixupContext) - #124196 (mir-opt tests: rename unit-test -> test-mir-pass) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-20Rollup merge of #124196 - RalfJung:mir-opt-tests, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-156/+157
mir-opt tests: rename unit-test -> test-mir-pass "unit-test" is extremely non-descriptive, no idea how one is supposed to read that and know that this specifies the MIR pass being tested.
2024-04-20Rollup merge of #124191 - dtolnay:fixup, r=compiler-errors许杰友 Jieyou Xu (Joe)-224/+178
Give a name to each distinct manipulation of pretty-printer FixupContext There are only 7 distinct ways that the AST pretty-printer interacts with FixupContext: 3 constructors (including Default), 2 transformations, and 2 queries. This PR turns these into associated functions which can be documented with examples. This PR unblocks https://github.com/rust-lang/rust/pull/119427#discussion_r1439481201. In order to improve the pretty-printer's behavior regarding parenthesization of braced macro calls in match arms, which have different grammar than macro calls in statements, FixupContext needs to be extended with 2 new fields. In the previous approach, that would be onerous. In the new approach, all it entails is 1 new constructor (`FixupContext::new_match_arm()`).
2024-04-20Rollup merge of #124132 - RalfJung:OpBundlesIndirect, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-0/+3
llvm RustWrapper: explain OpBundlesIndirect argument type Follow-up to https://github.com/rust-lang/rust/pull/123941 r? ``@Mark-Simulacrum``
2024-04-20Rollup merge of #124103 - dtolnay:metadatadebug, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-10/+26
Improve std::fs::Metadata Debug representation - Remove duplication of `mode` between `file_type` and `permissions`, which both involve operating on the same mode_t integer - Add `is_symlink` - Add `len` in bytes - Remove Ok wrapping around `modified`, `accessed`, `created`, which eliminates 6 useless lines <table> <tr><th>Before</th><th>After</th></tr> <tr><td> ```console Metadata { file_type: FileType( FileType { mode: 0o100600 (-rw-------), }, ), is_dir: false, is_file: true, permissions: Permissions( FilePermissions { mode: 0o100600 (-rw-------), }, ), modified: Ok( SystemTime { tv_sec: 1713402981, tv_nsec: 682983531, }, ), accessed: Ok( SystemTime { tv_sec: 1713402983, tv_nsec: 206999623, }, ), created: Ok( SystemTime { tv_sec: 1713402981, tv_nsec: 682983531, }, ), .. } ``` </td><td> ```console Metadata { file_type: FileType { is_file: true, is_dir: false, is_symlink: false, .. }, permissions: Permissions( FilePermissions { mode: 0o100600 (-rw-------), }, ), len: 2096, modified: SystemTime { tv_sec: 1713402981, tv_nsec: 682983531, }, accessed: SystemTime { tv_sec: 1713402983, tv_nsec: 206999623, }, created: SystemTime { tv_sec: 1713402981, tv_nsec: 682983531, }, .. } ``` </td></tr></table> Generated by: ```rust fn main() { println!("{:#?}", std::fs::metadata("Cargo.toml").unwrap()); } ```
2024-04-20Rollup merge of #124071 - kjetilkjeka:llvm_bitcode_linker_build_manifest, ↵许杰友 Jieyou Xu (Joe)-1/+5
r=Mark-Simulacrum Add llvm-bitcode-linker to build manifest When creating #123423 I didn't realize I also had to add the new component to the build-manifest. This PR finishes the work of adding it, by also adding it to the build manifest. r? ``@Mark-Simulacrum``
2024-04-20Rollup merge of #124053 - Zalathar:lazy-boolean, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-15/+385
coverage: Branch coverage tests for lazy boolean operators The current branch coverage implementation already supports the `&&` and `||` operators (even outside of an `if` condition), as a natural consequence of how they are desugared/lowered, but we didn't have any specific tests for them. This PR adds some appropriate tests. I've also moved the existing branch coverage tests into a `coverage/branch` subdirectory, so that they don't become unwieldy as I add more branch coverage tests. ``@rustbot`` label +A-code-coverage
2024-04-20Rollup merge of #123986 - ehuss:lint-renamed, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-0/+89
lint-docs: Add redirects for renamed lints. This updates the lint docs to include a redirect for renamed lints to the new name. This helps ensure that links to the old name will still be valid. Note that this currently uses a hard-coded list. As mentioned in the comment, a future enhancement may gather this information in a better way. Unblocks #123680
2024-04-20Rollup merge of #123976 - ChrisDenton:no-libc-in-std-doc-tests, ↵许杰友 Jieyou Xu (Joe)-2/+6
r=Mark-Simulacrum Use fake libc in core test The war on libc continues. Some platforms may not need to link to the libc crate (and it's possible some may not even have a libc), therefore we shouldn't require it for tests. This creates dummy `malloc` and `free` implementations for use in the pointer docs, but, keeps the public documentation looking the same as before.
2024-04-20Rollup merge of #123967 - RalfJung:static_mut_refs, r=Nilstrieb许杰友 Jieyou Xu (Joe)-11/+15
static_mut_refs: use raw pointers to remove the remaining FIXME Using `SyncUnsafeCell` would not make a lot of sense IMO.
2024-04-20Rollup merge of #123379 - wutchzone:119266, r=compiler-errors许杰友 Jieyou Xu (Joe)-2/+48
Print note with closure signature on type mismatch Fixes #119266 r? Nilstrieb