1
Fork 0
Commit graph

284183 commits

Author SHA1 Message Date
bors
addae0705c Auto merge of #138391 - scottmcm:SSA-discriminants, r=WaffleLapkin
Don't `alloca` just to look at a discriminant

Today we're making LLVM do a bunch of extra work when you match on trivial stuff like `Option<bool>` or `ControlFlow<u8>`.

This PR changes that so that simple types like `Option<u32>` or `Result<(), Box<Error>>` can stay as `OperandValue::ScalarPair` and we can still read the discriminant from them, rather than needing to write them into memory to have a `PlaceValue` just to get the discriminant out.

Fixes #137503
2025-03-14 00:42:31 +00:00
KonaeAkira
82a79b99e1 Add codegen test for modulo with power-of-two divisor 2025-03-14 01:27:07 +01:00
KonaeAkira
88aaf1d25a Fix grammar and remove redundant info 2025-03-13 23:56:04 +01:00
Nicholas Nethercote
79e4be1e9f Remove the ref from FnParam::Ident. 2025-03-14 09:45:41 +11:00
Nicholas Nethercote
bebd91feb3 Fix HIR param pretty printing some more.
Anonymous params are currently represented with `kw::Empty`, so handle
that properly. (Subsequent commits will get rid of the `kw::Empty`.)
2025-03-14 09:45:41 +11:00
Nicholas Nethercote
958bc7b365 Handle _ properly in a couple of places.
Currently (PatKind::Wild` (i.e. `_`) gets turned by
`lower_fn_params_to_names` into an empty identifier, which means it is
printed incorrectly by HIR pretty printing.

And likewise for `lower_fn_params_to_names`, which affects some error
messages.

This commit fixes them. This requires a slight tweak in a couple of
places to continue using parameter numbers in some error messages. And
it improves the output of `tests/ui/typeck/cyclic_type_ice.rs`:
`/* _ */` is a better suggestion than `/*  */`.
2025-03-14 09:45:38 +11:00
Nicholas Nethercote
9714f60f1d Inline and remove FnParam::name.
It has a single call site.
2025-03-14 08:40:36 +11:00
Jakub Beránek
38fc11601e Store libgccjit.so in a lib directory in the GCC CI tarball 2025-03-13 21:32:23 +01:00
Jakub Beránek
34272a5468 Do not overwrite original config.toml in opt-dist
So that follow-up CI commands can proceed normally. It will also avoid overwriting `config.toml` when running opt-dist tests locally.
2025-03-13 21:29:46 +01:00
Jakub Beránek
3fc7ca0fee Use GCC for building GCC 2025-03-13 21:29:46 +01:00
Jakub Beránek
955aef5a4e Change GCC build flags 2025-03-13 21:29:20 +01:00
Jakub Beránek
c4371786d6 Create libgccjit.so.0 alias also for CI-downloaded GCC 2025-03-13 21:29:20 +01:00
bjorn3
43499bfe2e Remove has_redox_scheme
Redox OS is moving away from name:/path style paths to /scheme/name/path
style paths which are already handled correctly without has_redox_scheme.
2025-03-13 20:09:07 +00:00
Tshepang Mbambo
54d26b3756
remove comment regarding a removed test directive 2025-03-13 22:05:05 +02:00
bors
cbfdf0b014 Auto merge of #138459 - matthiaskrgr:rollup-hddfg18, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #138126 (Add an opt-out in pretty printing for RTN rendering)
 - #138399 (Delegation: allow foreign fns `reuse`)
 - #138406 (Update mdbook to 0.4.47)
 - #138417 (minor interpreter cleanups)
 - #138420 (Adapt to LLVM dropping CfiFunctionIndex::begin()/end())
 - #138423 (Don't emit error within cast function, propagate it as a `CastError`)
 - #138425 (Remove `feature = "hash_raw_entry"`)
 - #138427 (Fix RISC-V VxWorks LLVM target triples)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-13 19:46:35 +00:00
Nicholas Nethercote
e885122147 Add a pretty printing test for fn params.
Note that multiple parts of the output are incorrect. The following
commits will fix this.
2025-03-14 06:29:24 +11:00
许杰友 Jieyou Xu (Joe)
27d71f0946
Merge pull request #2284 from rust-lang/cuviper-patch-1
Remove the doc for `no-system-llvm`
2025-03-14 03:28:03 +08:00
Josh Stone
496788a490 Record the new settings checksums 2025-03-13 12:21:21 -07:00
Josh Stone
8c91fae5be Remove separate src/tools/x from rust-analyzer settings 2025-03-13 12:21:21 -07:00
Josh Stone
66deb691d6 Alphabetize the root workspace members 2025-03-13 12:21:14 -07:00
Josh Stone
abed12a132 Add src/tools/x to the main workspace
The original reason to exclude it was so it could run before submodules
were initialized. However, those have all been converted to subtrees
now, so the entire workspace is always ready to go.
2025-03-13 12:18:32 -07:00
Josh Stone
190187bfa7
Remove the doc for no-system-llvm
This compiletest directive was removed in rust-lang/rust#120265.
2025-03-13 12:15:29 -07:00
Josh Stone
c88dfb2fc4 Remove myself from libs review
Trying to re-balance my work by reducing reviews for now.
2025-03-13 11:59:10 -07:00
klensy
7b4b4b19e9 bump html5ever to 0.29 with deps 2025-03-13 19:59:53 +03:00
Waffle Lapkin
2c76bf7431
Remove an outdated line from a test comment
They *used* to not work, however this was fixed in the PR that added the
test. I forgot to remove this line or possibly lost its removal while
rebasing.
2025-03-13 17:59:42 +01:00
klensy
b9e00b32e3 bump html5ever to 0.28
see https://github.com/servo/html5ever/pull/548
2025-03-13 19:53:40 +03:00
Matthias Krüger
69b3ad18d2
Rollup merge of #138427 - madsmtm:vxworks-llvm-target, r=jieyouxu
Fix RISC-V VxWorks LLVM target triples

The targets `riscv32-wrs-vxworks` and `riscv64-wrs-vxworks` uses the plain `$ARCH` LLVM triple, which LLVM normalizes to `$ARCH-unknown-unknown`, we should use `$ARCH-unknown-linux-gnu$ABI` which is consistent with the the other VxWorks targets.

Motivation: To make it easier to verify that [`cc-rs`' conversion from `rustc` to Clang/LLVM triples](https://github.com/rust-lang/cc-rs/issues/1431) is correct.

Alternative: Pass `$ARCH-unknown-none` in the other VxWorks LLVM triples, I don't know anything about VxWorks, so am unsure which is the most correct option.

CC target maintainer `@biabbas.`
r? jieyouxu
2025-03-13 17:44:12 +01:00
Matthias Krüger
883f00ce34
Rollup merge of #138425 - cuviper:remove-hash_raw_entry, r=jhpratt
Remove `feature = "hash_raw_entry"`

The `hash_raw_entry` feature finished [fcp-close](https://github.com/rust-lang/rust/issues/56167#issuecomment-2293805510) back in August, and its remaining uses in the compiler have now been removed, so we should be all clear to remove it from `std`.

Closes #56167
2025-03-13 17:44:11 +01:00
Matthias Krüger
962b646207
Rollup merge of #138423 - compiler-errors:delay-emit, r=WaffleLapkin
Don't emit error within cast function, propagate it as a `CastError`

Minor nitpick from #136764.

r? `@WaffleLapkin`
2025-03-13 17:44:10 +01:00
Matthias Krüger
4c20fe837c
Rollup merge of #138420 - zmodem:cfifunctionindex_fix, r=durin42
Adapt to LLVM dropping CfiFunctionIndex::begin()/end()

After https://github.com/llvm/llvm-project/pull/130382, RustWrapper needs to call CfiFunctionIndex::symbols() instead.
2025-03-13 17:44:09 +01:00
Matthias Krüger
9339bc61c9
Rollup merge of #138417 - RalfJung:interpret-cleanup, r=oli-obk
minor interpreter cleanups

- remove the `eval_inline_asm` hook that `@saethlin` added; the usage never materialized and he agreed with removing it
- I tried merging `init_alloc_extra` and `adjust_global_allocation` and it didn't work; leave a comment as to why. Also, make the allocation code path a bit more clear by renaming `init_alloc_extra` to `init_local_allocation`.

r? `@oli-obk`
2025-03-13 17:44:09 +01:00
Matthias Krüger
6db8e5ade5
Rollup merge of #138406 - ehuss:update-mdbook, r=jieyouxu
Update mdbook to 0.4.47

This updates mdbook to bring in an important fix that enables the `output.html.hash-files` option to deal with network caching.

Changelog:
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0446
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0447
2025-03-13 17:44:08 +01:00
Matthias Krüger
41d6e6e8da
Rollup merge of #138399 - Bryanskiy:delegation-extern-fn, r=petrochenkov
Delegation: allow foreign fns `reuse`

In example:
```rust
unsafe extern "C" {
    fn foo();
}

reuse foo as bar;
```

Desugaring before:

```rust
fn bar() {
    foo()
    //~^ ERROR call to unsafe function `foo` is unsafe and requires unsafe function or block
}
```

after:

```rust
unsafe extern "C" fn bar() {
    foo()
}
```

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

r? `@petrochenkov`
2025-03-13 17:44:07 +01:00
Matthias Krüger
b5955e74e8
Rollup merge of #138126 - compiler-errors:rtn-for-sugg, r=oli-obk
Add an opt-out in pretty printing for RTN rendering

Today, we render RPITIT types like `impl Sized { T::method(..) }` when RTN is enabled. This is very useful for diagnostics, since it's often not clear what the `impl Sized` type means by itself, and it makes it clear that that's an RPITIT that can be bounded using RTN syntax. See #115624.

However, since we don't distinguish types that are rendered for the purposes of printing messages vs suggestions, this representation leaks into suggestions and turns into code that can't be parsed. This PR adds a new `with_types_for_suggestion! {}` and `with_types_for_signature! {}` options to the pretty printing architecture to make it clear that we're rendering a type for code suggestions.

This can be applied later as we find that we need it.
2025-03-13 17:44:04 +01:00
bors
52daa7d835 Auto merge of #137152 - saethlin:bss-const-allocs, r=wesleywiser
Add a .bss-like scheme for encoded const allocs

This check if all bytes are zero feel like it should be too slow, and instead we should have a flag that we track, but that seems hard. Let's see how this perfs first.

Also we can probably stash the "it's all zero actually" flag inside one of the other struct members that's already not using an entire byte. This optimization doesn't fire all that often, so it's possible that by sticking it in the varint length field, this PR actually makes rmeta size worse.
2025-03-13 16:41:22 +00:00
bjorn3
83ee034d03 Remove usage of legacy scheme paths on RedoxOS
The name:/path path syntax is getting phased out in favor of
/scheme/name/path. Also using null: is no longer necessary as /dev/null
is available on Redox OS too.
2025-03-13 16:17:50 +00:00
bit-aloo
c6ecd8c95c
update the test_exclude to not use paths with path separators 2025-03-13 21:37:34 +05:30
bit-aloo
9d5f0742a9
make test platform agnostic 2025-03-13 21:37:34 +05:30
bit-aloo
22571da9f8
Add change info to change tracker 2025-03-13 21:37:32 +05:30
bit-aloo
7d1537e425
add test for exclude feature 2025-03-13 21:37:15 +05:30
bit-aloo
ad74285275
add exclude to config.toml 2025-03-13 21:37:15 +05:30
Pyrode
a73e44bce1 Provide helpful diagnostics for shebang lookalikes 2025-03-13 19:53:53 +05:30
Jakub Beránek
0c6d24e373
Print job doc URL on job failure 2025-03-13 14:56:57 +01:00
Jakub Beránek
611764417b
Output job doc URL to allow Rust Log Analyzer to access it 2025-03-13 14:48:18 +01:00
Jakub Beránek
aab643f4a7
Fill doc_url for Rust for Linux and Fuchsia jobs 2025-03-13 14:46:46 +01:00
Jakub Beránek
3cf1a68280
Add doc_url attribute to CI jobs 2025-03-13 14:46:35 +01:00
bors
93257e2d20 Auto merge of #138450 - matthiaskrgr:rollup-4im25vf, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #137816 (attempt to support `BinaryFormat::Xcoff` in `naked_asm!`)
 - #138109 (make precise capturing args in rustdoc Json typed)
 - #138343 (Enable `f16` tests for `powf`)
 - #138356 (bump libc to 0.2.171 to fix xous)
 - #138371 (Update compiletest's `has_asm_support` to match rustc)
 - #138404 (Cleanup sysroot locating a bit)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-13 13:34:28 +00:00
Jakub Beránek
f981a0a0cd
Do not print doctest diffs in the report
When they are moved around in code, their name changes, which produces too noisy diffs.
2025-03-13 14:31:31 +01:00
Jakub Beránek
d5d633d246
Group diffs by tests, rather than job groups 2025-03-13 14:31:31 +01:00
Jakub Beránek
5a7f227351
Collapse report in <details> 2025-03-13 14:31:31 +01:00