about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-02-22Auto merge of #136428 - EnzymeAD:enable-autodiff, r=oli-obkbors-18/+22
test building enzyme in CI 1) This PR fixes a significant compile-time regression, by only running the expensive autodiff pipeline, if the users pass the newly introduced Enable value to the `-Zautodiff=` flag. It updates the test(s) accordingly. It gives a nice error if users forget that. 2) It fixes macos support by explicitly linking against the Enzyme build folder. This doesn't cover CI macos yet. 3) It fixes the issue that setting ENZYME_RUNPASS was ignored by enzyme and in fact did not schedule enzyme's opt pass. 4) It also re-enables support for various other values for the autodiff flag, which were ignored since the refactor. 5) I merged some improvements to Enzyme core, which means we do not longer depend on LLVM being build with the Plugin Interface enabled. 6) Unrelated to other fixes, this changes `rustc_autodiff` to `EncodeCrossCrate::Yes`. It is not enough on it's own to enable usage of Enzyme in libraries, but it is for sure a piece of the fixes needed to get this to work. try-job: x86_64-gnu r? `@oli-obk` Tracking: - https://github.com/rust-lang/rust/issues/124509
2025-02-22Merge pull request #19203 from lnicola/rust-src-pathLaurențiu Nicola-8/+6
minor: Switch back to RUST_SRC_PATH
2025-02-22Switch back to RUST_SRC_PATHLaurențiu Nicola-8/+6
2025-02-21toc for other editorsJosh Rotenberg-0/+2
2025-02-22Auto merge of #137406 - matthiaskrgr:rollup-9nknrsb, r=matthiaskrgrbors-98/+77
Rollup of 8 pull requests Successful merges: - #136458 (Do not deduplicate list of associated types provided by dyn principal) - #136474 ([`compiletest`-related cleanups 3/7] Make the distinction between sources root vs test suite sources root in compiletest less confusing) - #136592 (Make sure we don't overrun the stack in canonicalizer) - #136787 (Remove `lifetime_capture_rules_2024` feature) - #137207 (Add #[track_caller] to Duration Div impl) - #137245 (Tweak E0277 when predicate comes indirectly from ?) - #137257 (Ignore fake borrows for packed field check) - #137399 (fix ICE in layout computation with unnormalizable const) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-21update autodiff flagsManuel Drehwald-6/+3
2025-02-21update enzyme submodule and usersManuel Drehwald-5/+2
2025-02-21fix build regressionsManuel Drehwald-7/+17
2025-02-22Make a fake body to store typeck results for global_asmMichael Goulet-2/+5
2025-02-22Make asm a named fieldMichael Goulet-6/+6
2025-02-22Rollup merge of #136474 - jieyouxu:src-base, r=clubby789Matthias Krüger-98/+77
[`compiletest`-related cleanups 3/7] Make the distinction between sources root vs test suite sources root in compiletest less confusing Reference for overall changes: https://github.com/rust-lang/rust/pull/136437 Part **3** of **7** of the *`compiletest`-related cleanups* PR series. ### Summary - Remove `--src-base` compiletest in favor of new flags `--src-root` and `--src-test-suite-root` which more accurately conveys the intent. `--src-base` previously actually meant `--src-test-suite-root` and has caused multiple confusions. - Use `--src-root` to have bootstrap directly feed source root path to compiletest, instead of doing a hacky directory parent search heuristic (`find_rust_src_root`) that somehow returns an `Option<PathBuf>`. ### Review advice Best reviewed commit-by-commit. r? bootstrap
2025-02-21Auto merge of #137348 - compiler-errors:span-trim, r=estebankbors-145/+100
More sophisticated span trimming for suggestions Previously #136958 only cared about prefixes or suffixes. Now it detects more cases where a suggestion is "sandwiched" by unchanged code on the left or the right. Would be cool if we could detect several insertions, like `ACE` going to `ABCDE`, extracting `B` and `D`, but that seems unwieldy. r? `@estebank`
2025-02-21Auto merge of #137397 - matthiaskrgr:rollup-ls2pilo, r=matthiaskrgrbors-116/+121
Rollup of 10 pull requests Successful merges: - #132876 (rustdoc book: acknowledge --document-hidden-items) - #136148 (Optionally add type names to `TypeId`s.) - #136609 (libcore/net: `IpAddr::as_octets()`) - #137336 (Stabilise `os_str_display`) - #137350 (Move methods from Map to TyCtxt, part 3.) - #137353 (Implement `read_buf` for WASI stdin) - #137361 (Refactor `OperandRef::extract_field` to prep for MCP838) - #137367 (Do not exempt nonexistent platforms from platform policy) - #137374 (Stacker now handles miri using a noop impl itself) - #137392 (remove few unused fields) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-21Rollup merge of #137392 - klensy:unused, r=compiler-errorsMatthias Krüger-1/+1
remove few unused fields Remove unused field and convert hashmap to hashset in second commit.
2025-02-21Rollup merge of #137367 - workingjubilee:remove-stray-line, r=jieyouxuMatthias Krüger-1/+0
Do not exempt nonexistent platforms from platform policy In #137324 I approved the change of the i586-pc-qnx platform to i686 with this extra line included. I noticed it but thought it was a bootstrap problem of some sort. Nonetheless, removing this line doesn't seem to change anything. r? `@Noratrieb`
2025-02-21Rollup merge of #137350 - nnethercote:remove-Map-3, r=ZalatharMatthias Krüger-109/+97
Move methods from Map to TyCtxt, part 3. A follow-up to #137162. r? `@Zalathar`
2025-02-21Rollup merge of #137336 - riverbl:stabilise-os-str-display, r=tgross35Matthias Krüger-1/+0
Stabilise `os_str_display` Closes #120048.
2025-02-21Rollup merge of #132876 - lolbinarycat:rustdoc-document-hidden-items, ↵Matthias Krüger-4/+23
r=GuillaumeGomez rustdoc book: acknowledge --document-hidden-items
2025-02-22bootstrap: pass `--src-root` and `--src-test-suite-root` instead of `--src-base`许杰友 Jieyou Xu (Joe)-1/+3
2025-02-22compiletest: introduce and use `--src-root` and `--src-test-suite-root`许杰友 Jieyou Xu (Joe)-97/+74
Instead of only having `--src-base` and `src_base` which *actually* refers to the directory containing the test suite and not the sources root. More importantly, kill off `find_rust_src_root` when we can simply pass that info from bootstrap.
2025-02-21bootstrap: add doc for vendor build stepbit-aloo-0/+18
2025-02-21stabilize `unsigned_is_multiple_of`Folkert de Vries-1/+0
2025-02-21Add testsbjorn3-0/+40
2025-02-21fixandylokandy-1/+1
2025-02-21feat: update insta inline snapshot when clicks 'Update Test' runnableandylokandy-16/+13
2025-02-21Fix review commentsbjorn3-7/+7
2025-02-21convert all_macro_rules from hashmap to hashsetklensy-1/+1
2025-02-21Rollup merge of #137305 - nnethercote:rustc_middle-2, r=lcnrMatthias Krüger-1/+1
Tweaks in and around `rustc_middle` A bunch of tiny improvements I found while working on bigger things. r? ```@lcnr```
2025-02-21Rollup merge of #137299 - nnethercote:simplify-PostOrder-customization, ↵Matthias Krüger-1/+1
r=compiler-errors Simplify `Postorder` customization. `Postorder` has a `C: Customization<'tcx>` parameter, that gives it flexibility about how it computes successors. But in practice, there are only two `impls` of `Customization`, and one is for the unit type. This commit simplifies things by removing the generic parameter and replacing it with an `Option`. r? ````@saethlin````
2025-02-21Implement vpmaxq_u8 on aarch64bjorn3-13/+83
2025-02-21Do not exempt nonexistent platforms from platform policyJubilee Young-1/+0
2025-02-21Add build step log for `run-make-support`Jakub Beránek-0/+8
I was always confused about what is being built, since nothing was printed in the log :)
2025-02-20rust-analyzer: use new function in (incorrect) layout computationJubilee Young-1/+1
This is only to fix the build.
2025-02-21Move methods from Map to TyCtxt, part 3.Nicholas Nethercote-109/+97
Continuing the work from #137162. Every method gains a `hir_` prefix.
2025-02-20ref_pat_eat_one_layer_2024: add context and examples to the unstable bookdianne-6/+47
2025-02-21Trim suggestion part before generating highlightsMichael Goulet-24/+20
2025-02-21More sophisticated span trimmingMichael Goulet-121/+80
2025-02-20rustdoc book: acknowlage --document-hidden-itemsbinarycat-4/+23
2025-02-20Rollup merge of #137340 - Kobzol:bootstrap-dir-check, r=onur-ozkanJubilee-1/+12
Add a notice about missing GCC sources into source tarballs I didn't use `.gitkeep`, because that would be a hidden file that might not be noticed, whereas we want to let people inspecting the archive know why the sources are missing. Inspired by https://github.com/rust-lang/rust/issues/137332. r? `@onur-ozkan`
2025-02-20Rollup merge of #137338 - onur-ozkan:137332, r=KobzolJubilee-1/+5
skip submodule updating logics on tarballs Running submodule logic on tarballs isn't necessary since git isn't available there. Fixes #137332
2025-02-20Rollup merge of #137324 - flba-eb:rename_qnx_target_name_i586, r=workingjubileeJubilee-2/+3
Make x86 QNX target name consistent with other Rust targets Rename target to be consistent with other Rust targets: Use `i686` instead of `i586` See also - #136495 - #109173 CC: `@jonathanpallant` `@japaric` `@gh-tr` `@samkearney`
2025-02-20Rollup merge of #137322 - alexcrichton:update-wasm-docs, r=jieyouxuJubilee-0/+2
Update docs for default features of wasm targets LLVM 20 enabled the `nontrapping-fptoint` and `bulk-memory` features by default, so this updates the corresponding documentation for the `wasm32-*` targets (which all point to `wasm32-unknown-unknown`). Closes #137315 with a doc update for the doc part.
2025-02-20Rollup merge of #136985 - zachs18:backend-repr-remove-uninhabited, ↵Jubilee-6/+6
r=workingjubilee Do not ignore uninhabited types for function-call ABI purposes. (Remove BackendRepr::Uninhabited) Accepted MCP: https://github.com/rust-lang/compiler-team/issues/832 Fixes #135802 Do not consider the inhabitedness of a type for function call ABI purposes. * Remove the [`rustc_abi::BackendRepr::Uninhabited`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/enum.BackendRepr.html) variant * Instead calculate the `BackendRepr` of uninhabited types "normally" (as though they were not uninhabited "at the top level", but still considering inhabitedness of variants to determine enum layout, etc) * Add an `uninhabited: bool` field to [`rustc_abi::LayoutData`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/struct.LayoutData.html) so inhabitedness of a `LayoutData` can still be queried when necessary (e.g. when determining if an enum variant needs a tag value allocated to it). This should not affect type layouts (size/align/field offset); this should only affect function call ABI, and only of uninhabited types. cc ``@RalfJung``
2025-02-20Rollup merge of #136608 - kulst:ptx_target_features, r=bjorn3Jubilee-2/+17
Pass through of target features to llvm-bitcode-linker and handling them When using the llvm-bitcode-linker (`linker-flavor=llbc`) target-features are not passed through and are not handled by it. The llvm-bitcode-linker is mainly used as a self contained linker to link llvm bitcode for the nvptx64 target. It uses `llvm-link`, `opt` and `llc` internally. To produce a `.ptx` file of a specific ptx-version it is necessary to pass the version to llc with the `--mattr` option. Without explicitly setting it, the emitted `.ptx`-version is the minimum supported version of the `--target-cpu`. I would like to be able to explicitly set the ptx version as [some llvm problems only occur in earlier `.ptx`-versions](https://github.com/llvm/llvm-project/issues/112998). Therefore this pull request adds support for passing target features to llvm-bitcode-linker and handling them. I was not quite sure if adding these features to `rustc_target/src/target_features.rs` is necessary or not. If so I will gladly add these. r? ``@kjetilkjeka``
2025-02-20Rollup merge of #131651 - Patryk27:avr-unknown-unknown, r=tgross35Jubilee-1/+92
Create a generic AVR target: avr-none This commit removes the `avr-unknown-gnu-atmega328` target and replaces it with a more generic `avr-none` variant that must be specialized using `-C target-cpu` (e.g. `-C target-cpu=atmega328p`). Seizing the day, I'm adding myself as the maintainer of this target - I've been already fixing the bugs anyway, might as well make it official 🙂 Related discussions: - https://github.com/rust-lang/rust/pull/131171 - https://github.com/rust-lang/compiler-team/issues/800 try-job: x86_64-gnu-debug
2025-02-21Rename `ClearCrossCrate::assert_crate_local`.Nicholas Nethercote-1/+1
As `unwrap_crate_local`, because it follows exactly the standard form of an `unwrap` function.
2025-02-20Add a notice about missing GCC sources in source tarballsJakub Beránek-0/+11
2025-02-20skip submodule updating logics on tarballsonur-ozkan-1/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-20Improve error message when a submodule directory is missing completelyJakub Beránek-1/+1
2025-02-20Remove `BackendRepr::Uninhabited`, replaced with an `uninhabited: bool` ↵Zachary S-6/+6
field in `LayoutData`. Also update comments that refered to BackendRepr::Uninhabited.