Commit Graph

234882 Commits

Author SHA1 Message Date
Florian Schmiderer
91544e6a93 Pass name of object file to LLVM so it can correctly emit S_OBJNAME 2023-09-25 19:31:58 +02:00
Camille GILLOT
1092849967 Use Vec::retain in remove_dead_blocks. 2023-09-25 17:08:40 +00:00
Ralf Jung
a1d6fc4340 rename lint; add tracking issue 2023-09-25 19:05:10 +02:00
rustbot
de377624be Update books 2023-09-25 13:00:44 -04:00
bors
1cbfeabfa9 Auto merge of #113396 - lenko-d:dont_ICE_when_no_bound_vars_for_lifetime_binders, r=compiler-errors
Don't ICE when no bound vars found while doing closure hir type check

The problem was that we were not visiting the const generic default argument in a bound where predicate when the HIR gets traversed in hir_analysis -> collect -> resolve_bound_vars.

Fixes [112574](https://github.com/rust-lang/rust/issues/112574)
2023-09-25 16:32:34 +00:00
Esteban Küber
2e0ad2025f Handle yet another case of break type mismatch 2023-09-25 15:55:59 +00:00
Esteban Küber
f6d4950fee Point at previous breaks that have the expected type 2023-09-25 15:55:59 +00:00
DaniPopes
07e9d1cc24
Fix typo in rustdoc unstable features doc 2023-09-25 17:38:39 +02:00
Oli Scherer
411e431c70 Rebase fallout 2023-09-25 15:02:10 +00:00
bors
9d32ba3a72 Auto merge of #116147 - compiler-errors:jq, r=dtolnay
Fix jq in CI

r? `@Mark-Simulacrum`
2023-09-25 14:42:27 +00:00
Oli Scherer
a38e98371b Split out the stable part of smir into its own crate to prevent accidental usage of forever unstable things 2023-09-25 14:38:27 +00:00
Oli Scherer
19f1d782d5 Move Opaque to stable_mir 2023-09-25 14:38:27 +00:00
Oli Scherer
33998a9751 Fix test by adding a stable way to get an opaque DefKind 2023-09-25 14:38:27 +00:00
Oli Scherer
55b6f64902 Eliminate escape hatch 2023-09-25 14:38:26 +00:00
Oli Scherer
e02a139a23 Eliminate with_tables helper 2023-09-25 14:38:26 +00:00
Michael Goulet
2ffef3949e Fix jq in CI 2023-09-25 14:30:26 +00:00
León Orell Valerian Liehr
025a2cda0e
rustdoc: correctly render ret ty of cross-crate async fns 2023-09-25 15:57:04 +02:00
bors
af68593179 Auto merge of #116029 - chenx97:mipsr6-update-crates, r=Mark-Simulacrum
Update crates for better MIPS R6 support

Update crates to remove dependency on old versions of rustix and linux-raw-sys. Update libc, rustix, and linux-raw-sys to enhance support for MIPS R6 introduced by #112374

Commands that do the update:

```shell
cargo +nightly update tempfile clap
cargo +nightly update linux-raw-sys rustix
```
2023-09-25 10:23:30 +00:00
Philipp Krones
6d331b7f03
Update Cargo.lock 2023-09-25 11:29:11 +02:00
Philipp Krones
3112e373ac
Merge commit '7671c283a50b5d1168841f3014b14000f01dd204' into clippyup 2023-09-25 11:28:58 +02:00
bors
7671c283a5 Auto merge of #11563 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2023-09-25 08:36:06 +00:00
bors
96ab09dbdd Auto merge of #116138 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2023-09-25 08:34:17 +00:00
Philipp Krones
903add0c11
Fix dogfood fallout 2023-09-25 10:31:51 +02:00
Philipp Krones
5eb7604482
Bump nightly version -> 2023-09-25 2023-09-25 10:26:33 +02:00
Philipp Krones
81fe8dc084
Merge remote-tracking branch 'upstream/master' into rustup 2023-09-25 10:26:11 +02:00
bors
efd04b6267 Auto merge of #3084 - RalfJung:deadcode, r=RalfJung
remove some dead code

and add a comment in the AVX test
2023-09-25 06:59:01 +00:00
Ralf Jung
085177678e remove some dead code
and add a comment in the AVX test
2023-09-25 08:56:19 +02:00
bors
d644603b80 Auto merge of #3075 - eduardosm:x86-addcarry-subborrow, r=RalfJung
Move `llvm.x86.*` shims into `shims::x86` and implement `_addcarry_u32` and `_subborrow_u{32,64}`

This PR moves all `llvm.x86.*` shims into `shims::x86` and adds `llvm.x86.addcarry.32`, `llvm.x86.subborrow.32` and `llvm.x86.subborrow.64`.

Additionally, it fixes the input carry semantics of `llvm.x86.addcarry.32`. The input carry is an 8-bit value that is interpreted as 1 when it is non-zero.

https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/addcarry-u32-addcarry-u64.html
2023-09-25 06:10:43 +00:00
bors
67ad3c2394 Auto merge of #116078 - eduardosm:closure-inherit-target-feature, r=Mark-Simulacrum
Add assembly test to make sure that inlining works as expected when closures inherit target features

Closes https://github.com/rust-lang/rust/issues/108338 (the added test proves that it is working correctly)
2023-09-25 05:39:09 +00:00
Eduardo Sánchez Muñoz
4625e1e8ab Use cfg gates in x86 SSE and SSE2 tests 2023-09-25 07:18:10 +02:00
Eduardo Sánchez Muñoz
a617b89996 Implement llvm.x86.subborrow.32 and llvm.x86.subborrow.64 2023-09-25 07:18:10 +02:00
Eduardo Sánchez Muñoz
6ec63ed251 Fix the carry semantics of _addcarry_u32 and _addcarry_u64
The input carry is an 8-bit value that is interpreted as 1 when it is non-zero. The output carry is an 8-bit value that will be 0 or 1.

https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/addcarry-u32-addcarry-u64.html
2023-09-25 07:18:10 +02:00
Eduardo Sánchez Muñoz
356039985e Implement llvm.x86.addcarry.32 by refactoring llvm.x86.addcarry.64 to make it generic 2023-09-25 07:18:10 +02:00
Eduardo Sánchez Muñoz
d6b30b88d0 Move llvm.x86.* implementations into shims::x86 2023-09-25 07:18:10 +02:00
Lenko Donchev
a1d181d740 Added additional visit steps to visit_generic_param() in order to avoid ICE on no bound vars. 2023-09-24 23:39:33 -05:00
bors
8c04c06317 Auto merge of #116074 - fzs111:clarify-pin-docs, r=Mark-Simulacrum
Clarify example in `Pin::new_unchecked` docs

This example in the docs of `Pin::new_unchecked` puzzled me for a relatively long time. Now I understand that it comes down to the difference between dropping the `Pin` vs dropping the pinned value.

I have extended the explanation to highlight this difference. In my opinion it is clearer now, and I hope it helps others understand `Pin` better.
2023-09-25 03:50:59 +00:00
bors
5105b1ec58 Auto merge of #116057 - RalfJung:io-safety, r=Mark-Simulacrum
fix OS-specific I/O safety docs since the io_safety feature is stable

Looks like this text was forgotten to be updated when `io_safety` got stabilized: it still says "once the io_safety feature is stable".

Also adjust the wording a bit for how these docs relate to the general concept of I/O safety.
2023-09-25 00:17:13 +00:00
bors
91958e0a74 Auto merge of #116117 - cjgillot:drop-tracking-mir-noscope, r=compiler-errors
Remove dead diagnostic code for generators

This code has become unreachable with #107421.
2023-09-24 22:25:15 +00:00
Ralf Jung
ad509633a2 ConstParamTy: require Eq 2023-09-24 23:38:07 +02:00
Ralf Jung
4f86c69184 fix ICE due to empty span and empty suggestions 2023-09-24 23:32:36 +02:00
bors
aa137a7e57 Auto merge of #11552 - jonboh:ice_threshold_0_enum_variants, r=y21
prevent ice when threshold is 0 and enum has no variants

changelog: [`enum_variant_names`]: prevent ice when threshold is 0 and enum has no variants

r? `@y21`

Fixes the same ice issue raised during review of https://github.com/rust-lang/rust-clippy/pull/11496
2023-09-24 20:58:58 +00:00
bors
37390d6563 Auto merge of #115911 - nebulark:refactor_targetmachine, r=Nilstrieb
Add OwnedTargetMachine to manage llvm:TargetMachine

LLVMRustDisposeTargetMachine taking a &mut could be undefined behaviour.
Wrapping it with a struct and using pointers instead avoids this problem.
In addition the TargetMachine is now automatically freed via the Wrappers drop impl. This should fix some memory leaks when
create_informational_target_machine was used, e.g. 327e6cf55c/compiler/rustc_codegen_llvm/src/llvm_util.rs (L291-L314)

r? `@Nilstrieb`
2023-09-24 20:36:44 +00:00
Maybe Waffle
99a2fa17e6 Add a test for printing literals via proc-macro 2023-09-24 20:24:33 +00:00
Maybe Waffle
285e574b8e Fix .to_string() of proc_macro::Literal (properly print cstr literals) 2023-09-24 20:05:27 +00:00
Jon
0433e458da
use first instead of get(0)
Co-authored-by: Timo <30553356+y21@users.noreply.github.com>
2023-09-24 21:37:56 +02:00
Florian Schmiderer
3409ca65d8 Add OwnedTargetMachine to manage llvm:TargetMachine. Uses pointers
instead of &'static mut and provides safe interface to create/dispose
it.
2023-09-24 21:11:37 +02:00
bors
a1c7a1c89f Auto merge of #116120 - GuillaumeGomez:regression-102467, r=compiler-errors
Add regression test for #102467

Fixes #102467.

r? `@compiler-errors`
2023-09-24 18:47:52 +00:00
bors
fc61fabc24 Auto merge of #116116 - Nilstrieb:gate-all-__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, r=compiler-errors
Rename the legacy feature gating macro

It had a really confusing name by shadowing the previous name, which has
caused issues in the past where people added their new syntax in the
legacy location.

This makes it clear.

Also adds a comment about the return type notation gating, which confused me why it was here at first before `@compiler-errors` told me why.
2023-09-24 16:59:59 +00:00
jonboh
b3e262acfd add ui-toml test 2023-09-24 18:25:20 +02:00
bors
26eeea6a1b Auto merge of #116069 - compiler-errors:debug-tuple, r=Nilstrieb
Fix debug printing of tuple

Self-explanatory. Didn't create a UI test, but I guess I could -- not sure where debug output shows up in rustc_attrs to make a sufficient test, tho.
2023-09-24 15:16:18 +00:00