Commit Graph

303456 Commits

Author SHA1 Message Date
Matthias Krüger
19a21289ba Rollup merge of #143593 - mejrs:dummy, r=jdonszelmann
Port #[rustc_dummy]

r? ``@jdonszelmann``
2025-07-08 19:29:39 +02:00
Matthias Krüger
cbf7f80d5c Rollup merge of #143555 - obi1kenobi:pg/target-feature-not-unsafe-rustdoc-json, r=aDotInTheVoid
Don't mark `#[target_feature]` safe fns as unsafe in rustdoc JSON.

Fixes https://github.com/rust-lang/rust/issues/142655 by explicitly checking whether functions are safe but using `#[target_feature]`, instead of relying on the `FnHeader::is_unsafe()` method which considers such functions unsafe.

I don't believe this merits a bump of the rustdoc JSON `FORMAT_VERSION` constant, since the format is unchanged and this is just a small bugfix.

r? aDotInTheVoid
2025-07-08 19:29:38 +02:00
Matthias Krüger
bc9b313cb5 Rollup merge of #143402 - GrigorenkoPV:attributes/link_attrs, r=jdonszelmann
Port several linking (linkage?) related attributes the new attribute system

This ports:
- `#[export_stable]`
- `#[ffi_const]`
- `#[ffi_pure]`
- `#[rustc_std_internal_symbol]`

Part of rust-lang/rust#131229

r? ``@oli-obk``
2025-07-08 19:29:37 +02:00
Jakub Beránek
fab9c64e2d Add triagebot stdarch mention ping 2025-07-08 19:28:42 +02:00
Michael Goulet
bbb409cc68 Instantiate binder for Copy/Clone/Sized eagerly 2025-07-08 16:35:06 +00:00
Michael Goulet
8d2d4eb89a Instantiate auto trait before computing higher-ranked constituent types 2025-07-08 16:33:38 +00:00
Hayashi Mikihiro
5834bda8be Migrate pull_assignment_up assist to SyntaxEditor
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-09 00:58:58 +09:00
Oli Scherer
b1d45f6b3e Remove const_eval_select hack 2025-07-08 15:49:00 +00:00
Guillaume Gomez
29b75a6b34 Fix weird rustdoc output when single and glob reexport conflict on a name 2025-07-08 17:37:09 +02:00
Amanieu d'Antras
a310bdd0d8 Merge pull request #1853 from Kobzol/pull-fixed
Perform the first rustc pull.. for the second time
2025-07-08 15:10:51 +00:00
Oli Scherer
543c860ea6 Constify Fn* traits 2025-07-08 14:36:43 +00:00
Jakub Beránek
bdead41b65 Merge ref '040e2f8b9ff2' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 040e2f8b9f
Filtered ref: cf4d00a666607e356e410a820ae07eeba28a9b53

This merge was created using https://github.com/rust-lang/josh-sync.
2025-07-08 16:18:56 +02:00
Jakub Beránek
3c9297c845 Prepare for merging from rust-lang/rust
This updates the rust-version file to 040e2f8b9f.
2025-07-08 16:18:46 +02:00
Jakub Beránek
701d222e3f Reset rust-version 2025-07-08 16:18:43 +02:00
bors
f838cbc06d Auto merge of #134628 - estebank:const-default, r=oli-obk
Make `Default` const and add some `const Default` impls

Full list of `impl const Default` types:

- ()
- bool
- char
- std::ascii::Char
- usize
- u8
- u16
- u32
- u64
- u128
- i8
- i16
- i32
- i64
- i128
- f16
- f32
- f64
- f128
- std::marker::PhantomData<T>
- Option<T>
- std::iter::Empty<T>
- std::ptr::Alignment
- &[T]
- &mut [T]
- &str
- &mut str
- String
- Vec<T>
2025-07-08 14:04:40 +00:00
Stypox
e5f7d4d783 Implement enter_trace_span() in MiriMachine 2025-07-08 15:37:01 +02:00
Stypox
e8c8330ba1 Make enter_trace_span take a closure for better optimization 2025-07-08 15:24:56 +02:00
Stypox
3cacaa7d0e Add inline(always) to Machine::enter_trace_span 2025-07-08 15:24:56 +02:00
Stypox
07143afee4 Replace TRACING_ENABLED with enter_trace_span()
Hopefully this will make tracing calls be optimized out properly when tracing is disabled
2025-07-08 15:24:55 +02:00
Stypox
c4bf37d358 Always inline InterpCx::layout_of after perf regression 2025-07-08 15:23:48 +02:00
Jakub Beránek
961bac0b19 Add cross-compilation tool test 2025-07-08 15:06:27 +02:00
llogiq
d964e55de2 skip exit late lint pass on tests (#15222)
changelog: [`exit`]: When using the `--test` or `--all-targets` flag,
the exit lint should not fail on the main function.

Fixes rust-lang/rust-clippy#13518

With help from @sesgoe
2025-07-08 12:46:36 +00:00
Marijn Schouten
ca4a712b59 clippy fix: markdown indentation for indented items after line break 2025-07-08 11:48:15 +00:00
Marijn Schouten
f96d5d9602 collect.rs: remove empty line after doc comment 2025-07-08 11:48:15 +00:00
Marijn Schouten
004478a829 int_log10.rs: change top level doc comments to outer 2025-07-08 11:48:15 +00:00
Aleksey Kliger
3ba8e330f9 Rewrite for clarity
move common code to a helper function

Co-Authored-By: Kobzol <berykubik@gmail.com>
2025-07-08 07:37:44 -04:00
Dillon Amburgey
b2299e20b2 fix: correct assertion to check for 'noinline' attribute presence before removal 2025-07-08 06:24:50 -05:00
Dillon Amburgey
0455577974 fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations 2025-07-08 06:24:19 -05:00
bors
040e2f8b9f Auto merge of #143540 - yotamofek:pr/library/simplify-num-fmt, r=tgross35
Simplify num formatting helpers

Noticed `ilog10` was being open-coded when looking at this diff: 85d6768f4c..76d9775912 (diff-6be9b44b52d946ccac652ddb7c98146a01b22ea0fc5737bc10db245a24796a45)
That, and two other small cleanups 😁

(should probably go through perf just to make sure it doesn't regress formatting)
2025-07-08 10:54:22 +00:00
Folkert de Vries
061a941adc remove unneeded cast 2025-07-08 10:27:34 +00:00
Folkert de Vries
92701fef20 shorten array literals 2025-07-08 10:27:34 +00:00
Folkert de Vries
323c646ec3 remote intermediate assignment 2025-07-08 10:27:34 +00:00
Folkert de Vries
82126a6eba fix whitespace in aarch64.spec.yml 2025-07-08 10:27:34 +00:00
Rémy Rakic
5059315e28 remove -znostart-stop-gc workaround
Now that `#[used(linker)]` is the default on ELF, we don't need to use the
`-znostart-stop-gc` link-arg workaround to match bfd's behavior when
using lld.
2025-07-08 10:24:11 +00:00
Rémy Rakic
889638a8b3 document new stable flags, with x64 linux implementation notes 2025-07-08 10:24:11 +00:00
Rémy Rakic
e32b1d7126 expand -Clink-self-contained tests
- update existing tests for stabilization
- ensure `-Clink-self-contained=-linker` is only stable on x64 linux
- test invalid `-Clink-self-contained` components
2025-07-08 10:24:10 +00:00
Marijn Schouten
d44dcd4513 update to literal-escaper-0.0.5 2025-07-08 10:16:44 +00:00
Jakub Beránek
07d5fbb751 Update README with link to josh-sync 2025-07-08 09:56:00 +00:00
Jakub Beránek
a95bd00e8d Remove custom josh-sync scripts 2025-07-08 09:56:00 +00:00
Jakub Beránek
b14323aedc Also test LldWrapper and remove llvm-config override from tests 2025-07-08 11:49:08 +02:00
Jakub Beránek
fd37722001 Update llvm-bitcode-linker tests 2025-07-08 11:47:57 +02:00
Jakub Beránek
c33f908f57 Remove sysroot copy from LlvmBitcodeLinker step
That step should be responsible for building the tool, not performing side-effects. Also, only copy the tool to the `self-contained` directory, not to the `rustlib/<target>/bin` directory.
2025-07-08 11:39:48 +02:00
Jakub Beránek
754d46e33a Remove extra_features from LlvmBitcodeLinker
It wasn't used anywhere.
2025-07-08 11:39:43 +02:00
Rémy Rakic
856c662567 expand -Clinker-features tests
- ensure only `-Clinker-features=-lld` is stabilized, and only on x64
  linux
- test `-Clinker-features` unstable values
2025-07-08 09:30:44 +00:00
Rémy Rakic
d6179022c1 update bootstrap mcp510 handling
beta and stage1 need to use different flags (-C vs -Z) to be able to use
the old and new `linker-features` and `link-self-contained` flags
2025-07-08 09:21:35 +00:00
Rémy Rakic
3f194a86ee stabilize -Clink-self-contained=-linker on x64 linux
This stabilizes a subset of the `-Clink-self-contained` components on x64 linux:
the rust-lld opt-out.

The opt-in is not stabilized, as interactions with other stable flags require
more internal work, but are not needed for stabilizing using rust-lld by default.

Similarly, since we only switch to rust-lld on x64 linux, the opt-out is
only stabilized there. Other targets still require `-Zunstable-options`
to use it.
2025-07-08 09:21:35 +00:00
Rémy Rakic
2e6d82c9c9 stabilize -Clinker-features=-lld on x64 linux
This stabilizes a subset of the `-Clinker-features` components on x64 linux:
the lld opt-out.

The opt-in is not stabilized, as interactions with other stable flags require
more internal work, but are not needed for stabilizing using rust-lld by default.

Similarly, since we only switch to rust-lld on x64 linux, the opt-out is
only stabilized there. Other targets still require `-Zunstable-options`
to use it.
2025-07-08 09:04:21 +00:00
Jieyou Xu
37136dd974 Disable tests/run-make/mte-ffi
See RUST-141600: this test is broken in two ways:

1. This test triggers `-Wincompatible-pointer-types` on GCC 14.
2. This test requires ARMv8.5+ w/ MTE extensions enabled, but GHA CI
   runner hardware do not have this enabled.
2025-07-08 16:40:10 +08:00
Jieyou Xu
24a25dbb88 Revert tests/run-make/mte-ffi changes
Partially reverts commit 40311c4dcf.
2025-07-08 16:40:05 +08:00
Rémy Rakic
aa52711543 add post-dist test for checking that we use LLD
And remove the previous beta/stable/nightly LLD tests.
2025-07-08 08:08:40 +00:00