1
Fork 0
Commit graph

283391 commits

Author SHA1 Message Date
Jubilee Young
e81fbe30e6 compiler: use is_rustic_abi in abi_check
warns on fewer ABIs now
2025-03-04 18:23:51 -08:00
Jubilee Young
5abf36b486 compiler: use is_rustic_abi in ImproperCTypesVisitor
no functional changes
2025-03-04 18:21:56 -08:00
Jubilee Young
08b578330e compiler: use is_rustic_abi in mir_transform
no functional changes.
2025-03-04 18:21:56 -08:00
Jubilee Young
1f32f7bd78 compiler: add ExternAbi::is_rustic_abi 2025-03-04 18:21:36 -08:00
Predrag Gruevski
55f8d3f628 Pretty-print #[deprecated] attribute in HIR. 2025-03-05 01:51:07 +00:00
Celina G. Val
4d75c4f8f3 Make CrateItem::body() function return an option
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-04 17:46:40 -08:00
Jubilee
7ba7cc835e
Rollup merge of #137947 - Kobzol:fix-rfl, r=marcoieni
Do not install rustup on Rust for Linux job

Trying to fix the RfL job after the recent rustup update.

r? ``@ghost``

try-job: x86_64-rust-for-linux
2025-03-04 14:50:42 -08:00
Jubilee
dcc85e3e1a
Rollup merge of #137722 - yotamofek:pr/rustdoc/edition-2024, r=notriddle
`librustdoc`: 2024 edition! 🎊

Like #137333 , but for rustdoc 😁
2025-03-04 14:50:42 -08:00
Jubilee
df2a263ec2
Rollup merge of #137667 - Kobzol:gcc-dist-build, r=onur-ozkan
Add `dist::Gcc` build step

This PR adds a `dist:Gcc` bootstrap step to distribute a prebuilt `libgccjit.so` from CI on x64 Linux.

With primed sccache, the build takes ~4 minutes on CI, and produces a 50 MiB archive.

I want to land this before adding something akin to `[gcc] download-ci-gcc = true`, to already have the artifacts available on CI, to make it easier to setup the download merge-base logic.

r? ``@ghost``
2025-03-04 14:50:41 -08:00
Jubilee
dd594f642e
Rollup merge of #137634 - tgross35:update-builtins, r=tgross35
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-04 14:50:40 -08:00
Jubilee
e5ac9f89eb
Rollup merge of #137373 - Kobzol:tool-stage0-improve, r=jieyouxu
Compile run-make-support and run-make tests with the bootstrap compiler

It does not seem necessary to have to recompile run-make-support on changes to the local compiler/stdlib. This PR simplifies the implementation of a few tools, then switches rms to stage0 and also makes the handling of environment variables in run-make tests simpler.

Best reviewed commit-by-commit. I can split it into multiple PRs if you want.

Also tested that `COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make --stage 0` still works. Incredibly, it looks like it even passes more tests than on `master` 😆

r? ``@jieyouxu``
2025-03-04 14:50:39 -08:00
Jubilee
ee1d01939f
Rollup merge of #137077 - Kobzol:citool-test-metrics, r=marcoieni
Postprocess bootstrap metrics into GitHub job summary

This PR adds a postprocessing step to each CI job that writes the build and test step bootstrap metrics into [GitHub job summary](https://github.blog/news-insights/product-news/supercharging-github-actions-with-job-summaries/). You can see an example result for dist and test jobs [here](https://github.com/rust-lang-ci/rust/actions/runs/13619495480).

r? ``@ghost``

try-job: dist-x86_64-illumos
try-job: x86_64-gnu
2025-03-04 14:50:39 -08:00
bors
08db600e8e Auto merge of #135186 - camelid:const-path-multi, r=BoxyUwU
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-04 22:37:37 +00:00
binarycat
892016766a search.js: remove incorrect outdated comment 2025-03-04 15:54:48 -06:00
binarycat
a9a52ddc04 search.js: give RawSearchIndexCrate.a an index signature 2025-03-04 15:53:35 -06:00
binarycat
5f39026540 search.js: allow empty result arrays 2025-03-04 15:26:46 -06:00
binarycat
374de12dad search.js: give buildIndex a proper return type
some of the fields of rustdoc.Row were confusing null and undefined.
2025-03-04 15:19:20 -06:00
binarycat
c05f6bf98d search.js: give local where a type 2025-03-04 14:31:35 -06:00
binarycat
4f6772d2ac give local mgens a type 2025-03-04 14:28:45 -06:00
binarycat
9581f1935b search.js: give pathSplitter a type signature 2025-03-04 14:27:09 -06:00
binarycat
78b92f08f9 search.js: second argument of convertNameToId is optional 2025-03-04 13:58:35 -06:00
binarycat
d130e25455 search.js: local variable extra is an array, annotate it as such. 2025-03-04 13:55:28 -06:00
binarycat
32ebe8ed04 don't use double quotes 2025-03-04 13:37:56 -06:00
Michael Goulet
d759958131 Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack 2025-03-04 18:18:48 +00:00
Michael Goulet
05a80608b3 Make rustdoc tests use always applicable negative auto impls 2025-03-04 18:04:07 +00:00
Michael Goulet
3d62b279dd Ensure that negative auto impls are always applicable 2025-03-04 17:45:18 +00:00
pcorwin
c392cf7690 Added documentation for flushing 2025-03-04 12:21:12 -05:00
binarycat
7635f2bfc6 fix whitespace 2025-03-04 11:03:55 -06:00
bors
f9e0239a7b Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3
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-04 15:39:44 +00:00
Noah Lev
177e7ff548 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).
2025-03-04 10:11:13 -05:00
Alice Ryhl
68df70d510 List the feature in removed.rs 2025-03-04 12:44:22 +00:00
Maja Kądziołka
a3d63fb0d4
InhabitedPredicate: avoid using a wildcard branch
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-04 13:33:16 +01:00
Maja Kądziołka
da3e73654f
Clarify why InhabitedPredicate::instantiate_opt exists
At first glance, the extra casework seems pointless and needlessly
error-prone. Clarify that there is a reason for it being there.
2025-03-04 13:33:16 +01:00
Askar Safin
c6c4ea40dc Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync""
This reverts commit 02406903b0.
2025-03-04 15:32:55 +03:00
Jakub Beránek
7b53ac7ee6 Record bootstrap step durations into GitHub summary in citool 2025-03-04 12:31:53 +01:00
Jakub Beránek
ead58ea6f8 Move BuildStep and metric logging into build_helper 2025-03-04 12:30:41 +01:00
Jakub Beránek
2e5ab4e6a0 Store bootstrap command-line into metrics 2025-03-04 12:30:41 +01:00
Jakub Beránek
6463590f0c Postprocess test suite metrics into GitHub summary 2025-03-04 12:30:41 +01:00
Tomasz Miąsko
84dd2a7776 Remove obsolete comment from DeduceReadOnly
The situation described in the comment does arise in practice now and
described panic is long gone.
2025-03-04 12:26:01 +01:00
Yotam Ofek
6e86aa17ec Adapt librustdoc to 2024 edition lifetieme capture rules
Get rid of the `Captures` hack
2025-03-04 12:35:23 +02:00
Yotam Ofek
00523bf7c3 librustdoc: 2024 edition! 🎊 2025-03-04 12:35:18 +02:00
Trevor Gross
2816f03022 Add avr-none to SUMMARY.md and platform-support.md
This was missed this in the implementation PR, so update the links here.
2025-03-04 09:56:25 +00:00
MarcoIeni
69c46515ed
ci: use ubuntu 24 on arm large runner 2025-03-04 10:01:00 +01:00
fuyangpengqi
4febd273e5 Fix some typos
Signed-off-by: fuyangpengqi <995764973@qq.com>
2025-03-04 16:05:32 +08:00
binarycat
60c5855346 ParserQueryElement.typeFilter MAY be a string, OR number.
ideally we would encode that it is a string before
convertTypeFilterOnElem is called, and a number after,
but i'm not sure that's possible without significant refactoring.
2025-03-04 00:44:46 -06:00
binarycat
2f9ea8a55a rustdoc search: give buildTypeMapIndex a conditional return type
we encode "if the argument is a non-empty string,
this will never return null" into the type signature.
2025-03-04 00:27:27 -06:00
binarycat
a8c0b3bfff rustdoc search: increase strictness of typechecking 2025-03-03 23:36:12 -06:00
Scott McMurray
fe6cf34147 Also simplify Preorder's size_hint 2025-03-03 21:07:55 -08:00
bors
fd17deacce Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgr
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-04 02:27:56 +00:00
Zalathar
12cc2b969d Remove unused PpMode::needs_hir 2025-03-04 13:23:40 +11:00