1
Fork 0
Commit graph

278841 commits

Author SHA1 Message Date
Matthias Krüger
60cb6c4044
Rollup merge of #135824 - jieyouxu:delete-bintools-check, r=Noratrieb
tests: delete `cat-and-grep-sanity-check`

Part of #121876.

All remaining `Makefile`s have open PRs that do not rely on platform `cat` or `grep` or the `cat-and-grep` script.
2025-01-21 23:30:22 +01:00
Matthias Krüger
50c89b6c21
Rollup merge of #135821 - hkBst:patch-11, r=ibraheemdev
fix OsString::from_encoded_bytes_unchecked description

fixes #133010
2025-01-21 23:30:21 +01:00
Matthias Krüger
2ba3ece3a1
Rollup merge of #135810 - Kobzol:kobzol-parental-leave, r=Kobzol
Add Kobzol on vacation

I will be mostly reviewing diaper contents in the upcoming weeks, so I'm (proactively, for now) removing myself from the auto review rotation. Feel free to CC me (explicit `r?` won't work) explicitly though, I will be around.

r? `````@ghost`````
2025-01-21 23:30:20 +01:00
Matthias Krüger
79f128183f
Rollup merge of #135793 - jyn514:gitignore, r=jieyouxu
Ignore `mermaid.min.js`

It is very long and tends to match a lot of search queries. It's not useful to show with ripgrep.

Note that this does not actually untrack the file; changes can still be committed (although I suspect it may not have been intentional to commit originally?). This just changes how it interacts with tools that use `.gitignore` as a default filter.

r? rustc-dev-guide
2025-01-21 23:30:20 +01:00
Matthias Krüger
317769f152
Rollup merge of #135750 - scottmcm:cma-example, r=cuviper
Add an example of using `carrying_mul_add` to write wider multiplication

Just the basic quadratic version that you wouldn't actually use for really-big integers, but it's nice and short so is useful as for a demonstration of why you might find `carrying_mul_add` useful :)

cc #85532 ``````@clarfonthey``````
2025-01-21 23:30:19 +01:00
Matthias Krüger
4af3ff8cd1
Rollup merge of #135706 - compiler-errors:elaborate, r=lcnr
Move `supertrait_def_ids` into the elaborate module like all other fns

It's strange that this is the only elaborate-like fn on tcx.

r? lcnr
2025-01-21 23:30:18 +01:00
Matthias Krüger
ea594c692b
Rollup merge of #132232 - asomers:fbsd-13.4, r=Mark-Simulacrum
CI: build FreeBSD artifacts on FreeBSD 13.4

13.2 is EoL, and 13.3 will be EoL too in about 2 months.  Plus, both suffer from a bug in LLVM's libunwind.  It causes a segfault inside of std::backtrace::Backtrace::capture().

Fixes #132185

cc ``````@ehuss`````` .  before you can do the trybuild, you'll also have to download new FreeBSD 13.4 base.txz images and place them in https://ci-mirrors.rust-lang.org/rustc , then update this PR with the correct file names.

try-job: dist-x86_64-freebsd
try-job: dist-various-2
2025-01-21 23:30:17 +01:00
bors
ed43cbcb88 Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors
remove support for the (unstable) #[start] attribute

As explained by `@Noratrieb:`
`#[start]` should be deleted. It's nothing but an accidentally leaked implementation detail that's a not very useful mix between "portable" entrypoint logic and bad abstraction.

I think the way the stable user-facing entrypoint should work (and works today on stable) is pretty simple:
- `std`-using cross-platform programs should use `fn main()`. the compiler, together with `std`, will then ensure that code ends up at `main` (by having a platform-specific entrypoint that gets directed through `lang_start` in `std` to `main` - but that's just an implementation detail)
- `no_std` platform-specific programs should use `#![no_main]` and define their own platform-specific entrypoint symbol with `#[no_mangle]`, like `main`, `_start`, `WinMain` or `my_embedded_platform_wants_to_start_here`. most of them only support a single platform anyways, and need cfg for the different platform's ways of passing arguments or other things *anyways*

`#[start]` is in a super weird position of being neither of those two. It tries to pretend that it's cross-platform, but its signature is  a total lie. Those arguments are just stubbed out to zero on ~~Windows~~ wasm, for example. It also only handles the platform-specific entrypoints for a few platforms that are supported by `std`, like Windows or Unix-likes. `my_embedded_platform_wants_to_start_here` can't use it, and neither could a libc-less Linux program.
So we have an attribute that only works in some cases anyways, that has a signature that's a total lie (and a signature that, as I might want to add, has changed recently, and that I definitely would not be comfortable giving *any* stability guarantees on), and where there's a pretty easy way to get things working without it in the first place.

Note that this feature has **not** been RFCed in the first place.

*This comment was posted [in May](https://github.com/rust-lang/rust/issues/29633#issuecomment-2088596042) and so far nobody spoke up in that issue with a usecase that would require keeping the attribute.*

Closes https://github.com/rust-lang/rust/issues/29633

try-job: x86_64-gnu-nopt
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: test-various
2025-01-21 19:46:20 +00:00
Michael Goulet
45929a8f46 Move supertrait_def_ids into the elaborate module like all other fns 2025-01-21 17:36:57 +00:00
Ralf Jung
56c90dc31e remove support for the #[start] attribute 2025-01-21 06:59:15 -07:00
许杰友 Jieyou Xu (Joe)
c45e97c549 tests: delete cat-and-grep-sanity-check
All remaining `Makefile`s have open PRs that do not rely on platform
`cat` or `grep`.
2025-01-21 21:37:14 +08:00
Marijn Schouten
fdc80af5c5
fix OsString::from_encoded_bytes_unchecked description 2025-01-21 14:36:18 +01:00
bors
cd805f09ff Auto merge of #133830 - compiler-errors:span-key, r=lcnr
Rework dyn trait lowering to stop being so intertwined with trait alias expansion

This PR reworks the trait object lowering code to stop handling trait aliases so funky, and removes the `TraitAliasExpander` in favor of a much simpler design. This refactoring is important for making the code that I'm writing in https://github.com/rust-lang/rust/pull/133397 understandable and easy to maintain, so the diagnostics regressions are IMO inevitable.

In the old trait object lowering code, we used to be a bit sloppy with the lists of traits in their unexpanded and expanded forms. This PR largely rewrites this logic to expand the trait aliases *once* and handle them more responsibly throughout afterwards.

Please review this with whitespace disabled.

r? lcnr
2025-01-21 12:33:33 +00:00
bors
a7a6c64a65 Auto merge of #135335 - oli-obk:push-zxwssomxxtnq, r=saethlin
codegen: store ScalarPair via memset when one side is undef and the other side can be memset

Basically since `undef` can be any byte, it can also be the byte(s) that are in the non-undef parts of a value. So we can just treat the `undef` at not being there and only look at the initialized bytes and memset over them

fixes #104290

based on https://github.com/rust-lang/rust/pull/135258
2025-01-21 09:45:24 +00:00
Jakub Beránek
51af4d6d22
Add Kobzol on vacation 2025-01-21 10:23:14 +01:00
Oli Scherer
8f5f5e56a8 Add more tests 2025-01-21 08:27:30 +00:00
Oli Scherer
dfa4c01b2e Treat undef bytes as equal to any other byte 2025-01-21 08:27:21 +00:00
Oli Scherer
964c58a7d9 Ensure we always get a constant, even without mir opts 2025-01-21 08:25:59 +00:00
Oli Scherer
8876cf7181 Also generate undef scalars and scalar pairs 2025-01-21 08:22:15 +00:00
bors
ebbe63891f Auto merge of #135632 - marcoieni:split-x86_64-msvc-2025, r=Kobzol
CI: split x86_64-msvc job using windows 2025

try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: dist-x86_64-msvc
2025-01-21 06:58:11 +00:00
bors
b605c65b6e Auto merge of #135224 - wyfo:tls-panic-outline, r=cuviper
Outline panicking code for `LocalKey::with`

See https://github.com/rust-lang/rust/pull/115491 for prior related modifications.

https://godbolt.org/z/MTsz87jGj shows a reduction of the code size for TLS accesses.
2025-01-21 02:23:15 +00:00
bors
a42d5ecf34 Auto merge of #134286 - Urgau:unreach_pub-std, r=ibraheemdev
Enable `unreachable_pub` lint in core

This PR enables the [`unreachable_pub`](https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unreachable-pub) as warn in `core`, `rtstartup` and `panic_unwind`.

The motivation is similar to the compiler [MCP: Enable deny(unreachable_pub) on `rustc_*` crates](https://github.com/rust-lang/compiler-team/issues/773#issue-2467219005) :

> "Where is this thing used?" is a question I ask all the time when reading unfamiliar code. Because of this, I generally find it annoying when things are marked with a more permissive visibility than necessary. "This thing marked pub, which other crates is it used in? Oh, it's not used in any other crates."

Another motivation is to help to lint by utilizing it in-tree and seeing it's limitation in more complex scenarios.

The diff was mostly generated with `./x.py fix --stage 1 library/core/ -- --broken-code`, as well as manual edits for code in macros, generated code and other targets.

r? libs
2025-01-20 23:34:04 +00:00
jyn
9d88b82b99 Ignore mermaid.min.js
It is very long and tends to match a lot of search queries. It's not useful to show with ripgrep.

Note that this does not actually untrack the file; changes can still be committed (although I suspect it may not have been intentional to commit originally?). This just changes how it interacts with tools that use `.gitignore` as a default filter.
2025-01-20 16:08:08 -05:00
bors
f3d1d47fd8 Auto merge of #135789 - matthiaskrgr:rollup-4cvw8s4, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #133695 (Reexport likely/unlikely in std::hint)
 - #135330 (Respect --sysroot for rustc -vV and -Cpasses=list)
 - #135333 (Partial progress on #132735: Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase)
 - #135741 (Recognise new IPv6 documentation range from IETF RFC 9637)
 - #135770 (Update contributing docs for submodule/subtree changes)
 - #135775 (Subtree update of `rust-analyzer`)
 - #135776 (Subtree sync for rustc_codegen_cranelift)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-20 20:41:33 +00:00
Matthias Krüger
67b609a919
Rollup merge of #135776 - bjorn3:sync_cg_clif-2025-01-20, r=bjorn3
Subtree sync for rustc_codegen_cranelift

Nothing too exciting this time, but this includes a fix for a linker hang on Windows: https://github.com/rust-lang/rustc_codegen_cranelift/pull/1554

r? ``@ghost``

``@rustbot`` label +A-codegen +A-cranelift +T-compiler
2025-01-20 20:58:38 +01:00
Matthias Krüger
b0eadb1a37
Rollup merge of #135775 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? ``@ghost``
2025-01-20 20:58:37 +01:00
Matthias Krüger
ab69a954d6
Rollup merge of #135770 - jieyouxu:subtree-submodule-contributing, r=Kobzol
Update contributing docs for submodule/subtree changes

Noticed in https://github.com/rust-lang/rust/pull/135337#issuecomment-2602434736.

r? ``@Kobzol`` (or anyone really)
2025-01-20 20:58:37 +01:00
Matthias Krüger
8a7db695a6
Rollup merge of #135741 - bardiharborow:std/net/rfc9637, r=Amanieu
Recognise new IPv6 documentation range from IETF RFC 9637

This PR adds the `3fff::/20` range defined by [IETF RFC 9637](https://datatracker.ietf.org/doc/rfc9637/) to those ranges which `Ipv6Addr::is_documentation` recognises as a documentation IP.

See also: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
Unstable tracking issue: #27709
2025-01-20 20:58:36 +01:00
Matthias Krüger
0d5b8138bb
Rollup merge of #135333 - vayunbiyani:test-environment, r=RalfJung
Partial progress on #132735: Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase

Part of #132735: Replace `extern "rust-intrinsic"` with `#[rustc_intrinsic]` macro

- Updated all instances of `extern "rust-intrinsic"` to use the `#[rustc_intrinsic]` macro.
- Skipped `.md` files and test files to avoid unnecessary changes.
2025-01-20 20:58:35 +01:00
Matthias Krüger
c8c5fa4893
Rollup merge of #135330 - bjorn3:respect_sysroot_in_version_printing, r=lqd
Respect --sysroot for rustc -vV and -Cpasses=list

This is necessary when the specified codegen backend is in a custom sysroot.

Fixes https://github.com/rust-lang/rust/issues/135165
2025-01-20 20:58:35 +01:00
Matthias Krüger
bbec1510bb
Rollup merge of #133695 - x17jiri:hint_likely, r=Amanieu
Reexport likely/unlikely in std::hint

Since `likely`/`unlikely` should be working now, we could reexport them in `std::hint`. I'm not sure if this is already approved or if it requires approval

Tracking issue: #26179
2025-01-20 20:58:34 +01:00
Urgau
15f345b815 core: #[allow(unreachable_pub)] on unreachable pub use 2025-01-20 18:35:32 +01:00
Urgau
8e61502484 core: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
Urgau
0f30662147 rtstartup: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
Urgau
477ef65121 panic_unwind: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
bors
9f4d9dc102 Auto merge of #135769 - jieyouxu:rollup-3h384pz, r=jieyouxu
Rollup of 5 pull requests

Successful merges:

 - #135433 (Add Profile Override for Non-Git Sources)
 - #135626 (doc: Point to methods on `Command` as alternatives to `set/remove_var`)
 - #135658 (Do not include GCC source code in source tarballs)
 - #135676 (rustc_resolve: use structured fields in traces)
 - #135762 (Correct counting to four in cell module docs)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-20 17:07:30 +00:00
bjorn3
056a9cebe9 Respect --target in get_backend_from_raw_matches 2025-01-20 15:47:26 +00:00
bjorn3
d740a3f06a Merge commit '728bc27f32' into sync_cg_clif-2025-01-20 2025-01-20 15:30:04 +00:00
Jiri Bobek
cb2efaf5bc 1. Removed 'rustc_nounwind' 2. Rewording of comments 2025-01-20 16:16:46 +01:00
bjorn3
728bc27f32 Rustup to rustc 1.86.0-nightly (9a1d156f3 2025-01-19) 2025-01-20 14:41:06 +00:00
bjorn3
496b073257 Sync from rust 9a1d156f38 2025-01-20 14:35:25 +00:00
bors
6a64e3b897 Auto merge of #135643 - khuey:135332, r=jieyouxu
When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely

Dropping them fails `-Zverify-llvm-ir`.

Fixes #135332.

r? `@jieyouxu`
2025-01-20 14:16:22 +00:00
vayunbiyani
c79fc90e9a Updated several files to use rust intrinsic macros instead of the legacy extern "rust-intrinsic" blocks 2025-01-20 09:15:23 -05:00
许杰友 Jieyou Xu (Joe)
e749a38886 docs: update contributing docs for submodule/subtree changes 2025-01-20 21:53:59 +08:00
Lukas Wirth
1eb9d15e42
Merge pull request #18967 from Veykril/push-pwonkmwqmmol
Properly record meaningful imports as re-exports in symbol index
2025-01-20 13:46:52 +00:00
Lukas Wirth
fe034eddc2
Merge pull request #18934 from 1hakusai1/goto_definition_from_into
feat: Add the ability to jump from `into` to `from` definitions
2025-01-20 13:46:47 +00:00
Lukas Wirth
5770977d72
Merge pull request #18982 from Veykril/push-lstmvzsowxyt
Extract variable assist triggers less eagerly
2025-01-20 13:45:26 +00:00
许杰友 Jieyou Xu (Joe)
ecfb55762c
Rollup merge of #135762 - TomFryersMidsummer:patch-1, r=joboet
Correct counting to four in cell module docs

It could also be argued that `OnceCell<T>` and `LazyCell<T>` don't really provide safe interior mutability in different ways. But it's a vague enough claim that I'm not sure it's worth being pedantic about.
2025-01-20 21:45:06 +08:00
许杰友 Jieyou Xu (Joe)
3e26673b29
Rollup merge of #135676 - yotamofek:resolve-cleanups, r=BoxyUwU
rustc_resolve: use structured fields in traces

I think this crate was written before `tracing` was adopted, and was manually writing fields into trace logs instead of using structured fields.

I kept function names in the trace messages even though I added `#[instrument]` invocations so that the events will be in named spans, wasn't sure if spans are always printed.
2025-01-20 21:45:06 +08:00
许杰友 Jieyou Xu (Joe)
a41d652d10
Rollup merge of #135658 - Kobzol:src-tarball-remove-gcc, r=jieyouxu
Do not include GCC source code in source tarballs

The licensing story is unclear, it makes the archive much larger, and we should not need it for building anything in the tarballs (yet).

```
Before:
121s building the archive
1.3 GiB gzipped size
5.7 GiB extracted size
402519 extracted files

After:
64s building the archive
961 MiB gzipped size
4.5 GiB extracted size
257719 extracfed files
```

Fixes: https://github.com/rust-lang/rust/issues/135606

r? `@ehuss`
2025-01-20 21:45:05 +08:00