about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2025-03-05Auto merge of #138021 - workingjubilee:rollup-brhnycu, r=workingjubileebors-11/+2
Rollup of 6 pull requests Successful merges: - #137077 (Postprocess bootstrap metrics into GitHub job summary) - #137373 (Compile run-make-support and run-make tests with the bootstrap compiler) - #137634 (Update `compiler-builtins` to 0.1.149) - #137667 (Add `dist::Gcc` build step) - #137722 (`librustdoc`: 2024 edition! 🎊) - #137947 (Do not install rustup on Rust for Linux job) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-04compiler: use `is_rustic_abi` in abi_checkJubilee Young-3/+3
warns on fewer ABIs now
2025-03-04compiler: use `is_rustic_abi` in ImproperCTypesVisitorJubilee Young-19/+11
no functional changes
2025-03-04compiler: use `is_rustic_abi` in mir_transformJubilee Young-5/+1
no functional changes.
2025-03-04compiler: add `ExternAbi::is_rustic_abi`Jubilee Young-0/+11
2025-03-05Pretty-print `#[deprecated]` attribute in HIR.Predrag Gruevski-0/+74
2025-03-04Make CrateItem::body() function return an optionCelina G. Val-5/+16
When we initially created `CrateItem`, it would only represent items that contain a body. That is no longer the case, for now, make this explicit by expanding the APIs to retrieve the item body. This is related to https://github.com/rust-lang/project-stable-mir/issues/34
2025-03-05Add the `movrs` target feature and `movrs_target_feature` feature gatesayantn-0/+4
2025-03-05Add the new `amx` target featuressayantn-0/+11
2025-03-05Remove out of date comment.Nicholas Nethercote-1/+0
No smallvecs here.
2025-03-05Use `collect` to initialize `features`.Nicholas Nethercote-28/+25
2025-03-04Rollup merge of #137722 - yotamofek:pr/rustdoc/edition-2024, r=notriddleJubilee-9/+0
`librustdoc`: 2024 edition! 🎊 Like #137333 , but for rustdoc 😁
2025-03-04Rollup merge of #137634 - tgross35:update-builtins, r=tgross35Jubilee-2/+2
Update `compiler-builtins` to 0.1.149 Includes a change to make a subset of math symbols available on all platforms [1], and disables `f16` on aarch64 without neon [2]. [1]: https://github.com/rust-lang/compiler-builtins/pull/763 [2]: https://github.com/rust-lang/compiler-builtins/pull/775 try-job: aarch64-gnu try-job: aarch64-gnu-debug try-job: armhf-gnu try-job: dist-various-1 try-job: dist-various-2 try-job: dist-aarch64-linux try-job: dist-arm-linux try-job: dist-armv7-linux try-job: dist-x86_64-linux try-job: test-various
2025-03-05Change signature of `target_features_cfg`.Nicholas Nethercote-71/+85
Currently it is called twice, once with `allow_unstable` set to true and once with it set to false. This results in some duplicated work. Most notably, for the LLVM backend, `LLVMRustHasFeature` is called twice for every feature, and it's moderately slow. For very short running compilations on platforms with many features (e.g. a `check` build of hello-world on x86) this is a significant fraction of runtime. This commit changes `target_features_cfg` so it is only called once, and it now returns a pair of feature sets. This halves the number of `LLVMRustHasFeature` calls.
2025-03-04Auto merge of #135186 - camelid:const-path-multi, r=BoxyUwUbors-136/+422
mgca: Lower all const paths as `ConstArgKind::Path` When `#![feature(min_generic_const_args)]` is enabled, we now lower all const paths in generic arg position to `hir::ConstArgKind::Path`. We then lower assoc const paths to `ty::ConstKind::Unevaluated` since we can no longer use the anon const expression lowering machinery. In the process of implementing this, I factored out `hir_ty_lowering` code that is now shared between lowering assoc types and assoc consts. This PR also introduces a `#[type_const]` attribute for trait assoc consts that are allowed as const args. However, we still need to implement code to check that assoc const definitions satisfy `#[type_const]` if present (basically is it a const path or a monomorphic anon const). r? `@BoxyUwU`
2025-03-05Simplify `implied_target_features`.Nicholas Nethercote-12/+10
Currently its argument is an iterator, but in practice it's always a singleton.
2025-03-05Avoid double interning of feature names.Nicholas Nethercote-8/+7
Also improve some comments.
2025-03-04Only use implied bounds hack if bevy, and use deeply normalize in implied ↵Michael Goulet-246/+99
bounds hack
2025-03-04Make rustdoc tests use always applicable negative auto implsMichael Goulet-2/+2
2025-03-04Ensure that negative auto impls are always applicableMichael Goulet-59/+138
2025-03-04Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3bors-200/+560
Support raw-dylib link kind on ELF raw-dylib is a link kind that allows rustc to link against a library without having any library files present. This currently only exists on Windows. rustc will take all the symbols from raw-dylib link blocks and put them in an import library, where they can then be resolved by the linker. While import libraries don't exist on ELF, it would still be convenient to have this same functionality. Not having the libraries present at build-time can be convenient for several reasons, especially cross-compilation. With raw-dylib, code linking against a library can be cross-compiled without needing to have these libraries available on the build machine. If the libc crate makes use of this, it would allow cross-compilation without having any libc available on the build machine. This is not yet possible with this implementation, at least against libc's like glibc that use symbol versioning. The raw-dylib kind could be extended with support for symbol versioning in the future. This implementation is very experimental and I have not tested it very well. I have tested it for a toy example and the lz4-sys crate, where it was able to successfully link a binary despite not having a corresponding library at build-time. I was inspired by Björn's comments in https://internals.rust-lang.org/t/bundle-zig-cc-in-rustup-by-default/22096/27 Tracking issue: #135694 r? bjorn3 try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: test-various
2025-03-04mgca: Lower all const paths as `ConstArgKind::Path`Noah Lev-136/+422
When `#![feature(min_generic_const_args)]` is enabled, we now lower all const paths in generic arg position to `hir::ConstArgKind::Path`. We then lower assoc const paths to `ty::ConstKind::Unevaluated` since we can no longer use the anon const expression lowering machinery. In the process of implementing this, I factored out `hir_ty_lowering` code that is now shared between lowering assoc types and assoc consts. This PR also introduces a `#[type_const]` attribute for trait assoc consts that are allowed as const args. However, we still need to implement code to check that assoc const definitions satisfy `#[type_const]` if present (basically is it a const path or a monomorphic anon const).
2025-03-04List the feature in removed.rsAlice Ryhl-1/+5
2025-03-04InhabitedPredicate: avoid using a wildcard branchMaja Kądziołka-1/+4
This is error-prone. Explicitly write down which cases don't need anything substituted. Turn the `OpaqueType` case, which currently seems to be unreachable, into a `bug!`.
2025-03-04Clarify why InhabitedPredicate::instantiate_opt existsMaja Kądziołka-0/+5
At first glance, the extra casework seems pointless and needlessly error-prone. Clarify that there is a reason for it being there.
2025-03-04Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete ↵Askar Safin-5/+6
"unsafe impl Sync"" This reverts commit 02406903b0c26440428580a4bbaf30da973c5b23.
2025-03-04Remove obsolete comment from DeduceReadOnlyTomasz Miąsko-29/+0
The situation described in the comment does arise in practice now and described panic is long gone.
2025-03-04Adapt `librustdoc` to 2024 edition lifetieme capture rulesYotam Ofek-9/+0
Get rid of the `Captures` hack
2025-03-04use measureme-12.0.1LuuuXXX-6/+3
2025-03-04promote ohos targets to tier to with host toolsLuuuXXX-5/+8
2025-03-03Also simplify `Preorder`'s `size_hint`Scott McMurray-15/+5
2025-03-04Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgrbors-600/+549
Rollup of 12 pull requests Successful merges: - #135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies) - #137852 (Remove layouting dead code for non-array SIMD types.) - #137863 (Fix pretty printing of unsafe binders) - #137882 (do not build additional stage on compiler paths) - #137894 (Revert "store ScalarPair via memset when one side is undef and the other side can be memset") - #137902 (Make `ast::TokenKind` more like `lexer::TokenKind`) - #137921 (Subtree update of `rust-analyzer`) - #137922 (A few cleanups after the removal of `cfg(not(parallel))`) - #137939 (fix order on shl impl) - #137946 (Fix docker run-local docs) - #137955 (Always allow rustdoc-json tests to contain long lines) - #137958 (triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-04Remove unused `PpMode::needs_hir`Zalathar-8/+0
2025-03-04Allow struct field default values to reference struct's genericsMichael Goulet-1/+5
2025-03-04Also note struct access, and fix macro expansion from foreign cratesMichael Goulet-18/+39
2025-03-03Fix associated type errors tooMichael Goulet-0/+7
2025-03-03Point out macro expansion ident in resolver errors tooMichael Goulet-1/+8
2025-03-03Point of macro expansion from call expr if it involves macro varMichael Goulet-3/+43
2025-03-03Inline FnOnce once againMichael Goulet-13/+10
2025-03-03Better reasons for inline failureMichael Goulet-9/+8
2025-03-03Don't typeck during WF, instead check outside of WF in check_crateMichael Goulet-12/+7
2025-03-03Check signature WF when lowering MIR bodyMichael Goulet-1/+19
2025-03-03Tweak error code for sized checks of const/staticMichael Goulet-7/+15
2025-03-03Auto merge of #137927 - matthiaskrgr:rollup-yj463ns, r=matthiaskrgrbors-112/+296
Rollup of 9 pull requests Successful merges: - #132388 (Implement `#[cfg]` in `where` clauses) - #134900 (Fix parsing of ranges after unary operators) - #136938 (Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern) - #137054 (Make phantom variance markers transparent) - #137525 (Simplify parallelization in test-float-parse) - #137618 (Skip `tidy` in pre-push hook if the user is deleting a remote branch) - #137741 (Stop using `hash_raw_entry` in `CodegenCx::const_str`) - #137849 (Revert "Remove Win SDK 10.0.26100.0 from CI") - #137862 (ensure we always print all --print options in help) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-03Add timestamp to unstable feature usage metricsJane Losare-Lusby-1/+15
2025-03-03Add ``dyn`` keywordKirill Podoprigora-2/+2
2025-03-03Use default field values for `ErrorOutputType`Esteban Küber-26/+23
Remove manual `Default` impl from `config::ErrorOutputType`.
2025-03-03Use default field values for `config::NextSolverConfig`Esteban Küber-8/+4
Use default field values to avoid manual `Default` impl.
2025-03-03Use default field values in `markdown::parse::Context`Esteban Küber-13/+8
2025-03-03Rollup merge of #137922 - Zalathar:sharded, r=SparrowLiiMatthias Krüger-70/+60
A few cleanups after the removal of `cfg(not(parallel))` I noticed a few small things that are no longer needed after the removal of `cfg(not(parallel))` in #132282. One of the later changes adjusts several imports, so viewing the changes individually is recommended. r? SparrowLii (or reroll)