Commit Graph

278820 Commits

Author SHA1 Message Date
Jakub Beránek
5482bbac0f
Reword comment slightly 2025-01-22 17:22:39 +01:00
Jakub Beránek
46ae7382a4
Use objdump instead of llvm-objdump 2025-01-22 12:47:44 +01:00
Jakub Beránek
7877883339
Run the glibc run-make test in opt-dist 2025-01-22 12:47:44 +01:00
Jakub Beránek
75f8cc6ab6
Enable verbose tests in opt-dist tests 2025-01-21 10:20:24 +01:00
Jakub Beránek
ef9349db86
Add test for checking used glibc symbols 2025-01-21 10:20:24 +01:00
bors
b605c65b6e Auto merge of - 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 - 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
bors
f3d1d47fd8 Auto merge of - matthiaskrgr:rollup-4cvw8s4, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 -  (Reexport likely/unlikely in std::hint)
 -  (Respect --sysroot for rustc -vV and -Cpasses=list)
 -  (Partial progress on : Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase)
 -  (Recognise new IPv6 documentation range from IETF RFC 9637)
 -  (Update contributing docs for submodule/subtree changes)
 -  (Subtree update of `rust-analyzer`)
 -  (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 - 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 - 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 - 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 - 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: 
2025-01-20 20:58:36 +01:00
Matthias Krüger
0d5b8138bb
Rollup merge of - vayunbiyani:test-environment, r=RalfJung
Partial progress on : Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase

Part of : 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 - 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 - 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: 
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 - jieyouxu:rollup-3h384pz, r=jieyouxu
Rollup of 5 pull requests

Successful merges:

 -  (Add Profile Override for Non-Git Sources)
 -  (doc: Point to methods on `Command` as alternatives to `set/remove_var`)
 -  (Do not include GCC source code in source tarballs)
 -  (rustc_resolve: use structured fields in traces)
 -  (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 '728bc27f32c05ac8a9b5eb33fd101e479072984f' 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 - 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 .

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 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 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 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 - 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 - 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 - 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
许杰友 Jieyou Xu (Joe)
e7f53663de
Rollup merge of - clubby789:env-note, r=ibraheemdev
doc: Point to methods on `Command` as alternatives to `set/remove_var`

Make these methods more discoverable, as configuring a child process is a common reason for manipulating the environment.
2025-01-20 21:45:04 +08:00
许杰友 Jieyou Xu (Joe)
bdd88ddd30
Rollup merge of - tanvincible:patch-1, r=onur-ozkan
Add Profile Override for Non-Git Sources

## PR description

- Fixes 

This PR introduces the following updates to

1. `bootstrap.py`:
    - If the `profile` is `None` and the source is non-git, the `profile` is automatically overridden to `"dist"`.
    - Ensures that options like `download-ci-llvm` and `download-rustc` are not used with non-git sources. An exception is raised if these options are present in the configuration when the source is non-git.

2. `bootstrap_test.py`
   - Added unit tests to verify both the profile override mechanism and the assertion for restricted options.
These tests ensure the correct behavior for non-git sources and the handling of `if-unchanged` options.

r? `@onur-ozkan`
`@rustbot` T-bootstrap
2025-01-20 21:45:04 +08:00
Lukas Wirth
2233c31531
Merge pull request from osiewicz/drop-outgoing-messages-on-background-thread
lsp-server: Drop outgoing messages on background thread
2025-01-20 13:39:29 +00:00
Lukas Wirth
64d4181a3c
Merge pull request from ChayimFriedman2/non-module-generic-args
fix: Fix a bug where enum variants were not considered properly in type ns resolution
2025-01-20 13:35:03 +00:00
Lukas Wirth
4193abc3fe Fix import search not discarding rawness 2025-01-20 14:29:11 +01:00
Lukas Wirth
7ddeabaa74 Less allocs 2025-01-20 14:29:11 +01:00
Lukas Wirth
dbf7ccc889 Preserve impl assoc names in ImplData 2025-01-20 14:29:11 +01:00
Lukas Wirth
70e93ed898 Vec -> Box<[_]> 2025-01-20 14:29:11 +01:00
Lukas Wirth
241fd2ff4d Properly record meaningful imports as re-exports in symbol index 2025-01-20 14:29:11 +01:00
1hakusai1
f7096db910 Add a test case 2025-01-20 21:22:58 +09:00
1hakusai1
55aee5470b Use Semantics::resolve_method_call_as_callable to find implementation 2025-01-20 21:17:48 +09:00
bors
b5741a36a8 Auto merge of - jieyouxu:rollup-j4q1hpr, r=jieyouxu
Rollup of 7 pull requests

Successful merges:

 -  (Add the concrete syntax for precise capturing to 1.82 release notes.)
 -  (Emit single privacy error for struct literal with multiple private fields and add test for `default_field_values` privacy)
 -  (make it possible to use ci-rustc on tarball sources)
 -  (Add debug assertions to compiler profile)
 -  (rustdoc: Fix flaky doctest test)
 -  (Replace usages of `map_or(bool, ...)` with `is_{some_and|none_or|ok_and}`)
 -  (Rename FileName::QuoteExpansion to CfgSpec)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-20 10:35:43 +00:00
Tom Fryers
8ba0d2db18
Correct counting to four in cell module docs 2025-01-20 10:16:27 +00:00
Laurențiu Nicola
618b913663
Merge pull request from Fabian-Gruenbichler/proc-macro-srv-portability
proc-macro-srv: make usage of RTLD_DEEPBIND portable
2025-01-20 09:35:11 +00:00
Laurențiu Nicola
141e53b715
Merge pull request from lnicola/sync-from-rust
minor: Sync from downstream
2025-01-20 09:29:00 +00:00
Fabian Grünbichler
5f4f6fb961 proc-macro-srv: make usage of RTLD_DEEPBIND portable
the constant is wrong on some platforms (e.g., on mips64el it's 0x10, and 0x8
is RTLD_NOLOAD which makes all this functionality broken), the libc crate takes
care of those differences for us.

fallback to not setting the flag in non-glibc environments - some of them might
have support for it using a different value that we don't know about, and some
of them lack it entirely.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-01-20 10:19:24 +01:00