Commit Graph

303456 Commits

Author SHA1 Message Date
bjorn3
b795264daa Pass TyCtxt rather than Queries to after_expansion 2024-12-12 11:11:12 +00:00
Zalathar
de53fe245d coverage: Tidy up creation of covmap records 2024-12-12 22:10:42 +11:00
Lukas Wirth
c17d430fae Merge pull request #18667 from 1hakusai1/generate_custom_imple_with_no_snippet
fix: Generate implementation with items even if snippet text edit is disabled
2024-12-12 10:51:44 +00:00
Ralf Jung
b9f1aedfd8 Merge pull request #4069 from shamb0/string_deduplication_for_localtime_r
localtime_r: deduplicate timezone name allocation
2024-12-12 10:48:41 +00:00
shamb0
6cbd1ebae3 Improve timezone handling in 'localtime_r()' using 'allocate_bytes()'
Signed-off-by: shamb0 <r.raajey@gmail.com>
2024-12-12 15:47:17 +05:30
Ralf Jung
11ab793655 Merge pull request #4091 from RalfJung/bench-bump
bench-cargo-miri: bump lockfiles
2024-12-12 10:03:07 +00:00
1hakusai1
41bd955f8e Generate implementation with items even if snippet text edit is disabled 2024-12-12 18:55:14 +09:00
Zalathar
f7c6a2cf11 Fix our llvm::Bool typedef to be signed, to match LLVMBool
In the LLVM-C API, boolean values are passed as `typedef int LLVMBool`, but our
Rust-side typedef was using `c_uint` instead.

Signed and unsigned integers have the same ABI on most platforms, but that
isn't universally true, so we should prefer to be consistent with LLVM.
2024-12-12 20:54:33 +11:00
Ralf Jung
c7b8ee060d bench-cargo-miri: bump lockfiles 2024-12-12 10:37:23 +01:00
bors
4606a4d6fa Auto merge of #134201 - matthiaskrgr:rollup-22b721y, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #122003 (link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets)
 - #133859 (Move some alloc tests to the alloctests crate)
 - #134070 (Some asm! diagnostic adjustments and a papercut fix)
 - #134144 (Properly consider APITs for never type fallback ascription fix)
 - #134152 (Simplify `rustc_mir_dataflow::abs_domain`.)
 - #134154 (suppress field expr with generics error message if it's a method)
 - #134155 (Forbid `unsafe_op_in_unsafe_fn` for Hurd)
 - #134173 (allow `symbol_intern_string_literal` lint in test modules)
 - #134178 (Stabilize the Rust 2024 prelude)
 - #134179 (Remove outdated consteval note from `<*mut T>::align_offset` docs.)
 - #134187 (Remove `PErr`.)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-12 09:21:42 +00:00
Ralf Jung
4e8a7340a5 Merge pull request #4068 from devnexen/solarish_stat2
solarish stat following-up, supports for readdir.
2024-12-12 07:42:02 +00:00
Ralf Jung
658edd4ec5 Merge pull request #4089 from RalfJung/ci-bench
ci TEST_BENCH: show output
2024-12-12 07:11:00 +00:00
Matthias Krüger
2ced8b31c7 Rollup merge of #134187 - nnethercote:rm-PErr, r=jieyouxu
Remove `PErr`.

It's just a synonym for `Diag` that adds no value and is only used in a few places.

r? ``@spastorino``
2024-12-12 08:07:05 +01:00
Matthias Krüger
10556598e5 Rollup merge of #134179 - zachs18:align_offset_mut_ptr_doc, r=workingjubilee
Remove outdated consteval note from `<*mut T>::align_offset` docs.
2024-12-12 08:07:04 +01:00
Matthias Krüger
90f6b27a93 Rollup merge of #134178 - ehuss:stabilize-2024-prelude, r=amanieu,traviscross,tgross35
Stabilize the Rust 2024 prelude

This stabilizes the `core::prelude::rust_2024` and `std::prelude::rust_2024` modules. I missed these in the #133349 stabilization.
2024-12-12 08:07:04 +01:00
Matthias Krüger
958fc08e68 Rollup merge of #134173 - onur-ozkan:allow-symbol-intern-string-literal, r=jieyouxu
allow `symbol_intern_string_literal` lint in test modules

Since #133545, `x check compiler --stage 1` no longer works because compiler test modules trigger `symbol_intern_string_literal` lint errors. Bootstrap shouldn't control when to ignore or enable this lint in the compiler tree (using `Kind != Test` was ineffective for obvious reasons).

Also, conditionally adding this rustflag invalidates the build cache between `x test` and other commands.

This PR removes the `Kind` check from bootstrap and handles it directly in the compiler tree in a more natural way.
2024-12-12 08:07:03 +01:00
Matthias Krüger
454ed9b681 Rollup merge of #134155 - sthibaul:unsafe_op_in_unsafe_fn, r=tgross35
Forbid `unsafe_op_in_unsafe_fn` for Hurd

Tracking issue https://github.com/rust-lang/rust/issues/127747
2024-12-12 08:07:02 +01:00
Matthias Krüger
1d784225f1 Rollup merge of #134154 - dev-ardi:field-expr-generics, r=compiler-errors
suppress field expr with generics error message if it's a method

Don't emit "field expressions may not have generic arguments" if it's a method call without `()`

r? estebank
Fixes #67680

Is this the best way to go? It's by far the simplest I could come up with.
2024-12-12 08:07:02 +01:00
Matthias Krüger
d71576da0e Rollup merge of #134152 - nnethercote:simplify-rustc_mir_dataflow-abs_domain, r=compiler-errors
Simplify `rustc_mir_dataflow::abs_domain`.

`rustc_mir_dataflow` has a typedef `AbstractElem` that is equal to `ProjectionElem<AbstractOperand, AbstractType>`. `AbstractOperand` and `AbstractType` are both unit types. There is also has a trait `Lift` to convert a `PlaceElem` to an `AbstractElem`.

But `rustc_mir_middle` already has a typedef `ProjectionKind` that is equal to `ProjectionElem<(), ()>`, which is equivalent to `AbstractElem`. So this commit reuses `ProjectionKind` in `rustc_mir_dataflow`, removes `AbstractElem`, and simplifies the `Lift` trait.

r? ``@pnkfelix``
2024-12-12 08:07:01 +01:00
Matthias Krüger
296e0ba266 Rollup merge of #134144 - compiler-errors:fallback-apit, r=WaffleLapkin
Properly consider APITs for never type fallback ascription fix

Fixes #133842
2024-12-12 08:07:00 +01:00
Matthias Krüger
fed24af611 Rollup merge of #134070 - oli-obk:push-nquzymupzlsq, r=jieyouxu
Some asm! diagnostic adjustments and a papercut fix

Best reviewed commit by commit.

We forgot a `normalize` call in intrinsic checking, causing us to allow literal integers, but not named constants containing that literal. This can in theory affect stable code, but only if libstd contains a stable SIMD type that has an array length that is a named constant. I'd assume we'd have noticed by now due to asm! rejecting those outright.

The error message left me scratching my head for a bit, so I added some extra information to the diagnostic, too.
2024-12-12 08:06:59 +01:00
Matthias Krüger
909a3e2215 Rollup merge of #133859 - bjorn3:move_tests_to_alloctests, r=tgross35
Move some alloc tests to the alloctests crate

Unit tests directly inside of standard library crates require a very fragile way of building that is hard to reproduce outside of bootstrap.
2024-12-12 08:06:59 +01:00
Matthias Krüger
a4cf1f89ab Rollup merge of #122003 - mati865:gnullvm-build-libunwind, r=petrochenkov
link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets

Alternative to https://github.com/rust-lang/rust/pull/121794

```
$ cargo b -r
    Finished `release` profile [optimized] target(s) in 0.38s

$ ntldd target/release/hello.exe | rg unwind
        libunwind.dll => H:\msys64\clang64\bin\libunwind.dll (0x0000020c35df0000)

$ RUSTFLAGS="-C target-feature=+crt-static" cargo b -r
    Finished `release` profile [optimized] target(s) in 0.23s

$ ntldd target/release/hello.exe | rg unwind
```
2024-12-12 08:06:58 +01:00
Ralf Jung
b7565cb1fe ./miri bench: add a flag to skip the install step 2024-12-12 07:45:48 +01:00
Ralf Jung
0272b6cb32 ci TEST_BENCH: show output 2024-12-12 07:24:45 +01:00
Ralf Jung
4a60706e61 Revert "Stop git from merging generated files"
This reverts commit 4cbb599edf.
"-merge" makes git not even do merges if they are entirely conflict-free,
which is not the behavior we want.
2024-12-12 07:20:11 +01:00
David Carlier
579b680f56 solarish stat following-up, supports for readdir. 2024-12-12 06:00:32 +00:00
Eric
b8cd51313e allow needless_option_take to report for more cases
In general, needless_option_take should report whenever
take() is called on a temporary value, not just when the
temporary value is created by as_ref()
2024-12-11 18:53:11 -08:00
bors
903d2976fd Auto merge of #129181 - beetrees:asm-spans, r=pnkfelix,compiler-errors
Pass end position of span through inline ASM cookie

Before this PR, only the start position of the span was passed though the inline ASM cookie to diagnostics. LLVM 19 has full support for 64-bit inline ASM cookies; this PR uses that to pass the end position of the span in the upper 32 bits, meaning inline ASM diagnostics now point at the entire line the error occurred on, not just the first character of it.
2024-12-12 02:34:06 +00:00
Will Crichton
eb10db0a76 Make some types and methods related to Polonius + Miri public. 2024-12-11 17:28:49 -08:00
Steven Grady
f39e813c0f Bump Fuchsia 2024-12-11 16:35:43 -08:00
Michael Goulet
2caada17c0 Properly consider APITs for never type fallback ascription fix 2024-12-12 00:32:18 +00:00
Nicholas Nethercote
40c964510c Remove PErr.
It's just a synonym for `Diag` that adds no value and is only used in a
few places.
2024-12-12 11:31:55 +11:00
bors
ca71dc1c9c Auto merge of #128004 - folkertdev:naked-fn-asm, r=Amanieu
codegen `#[naked]` functions using global asm

tracking issue: https://github.com/rust-lang/rust/issues/90957

Fixes #124375

This implements the approach suggested in the tracking issue: use the existing global assembly infrastructure to emit the body of `#[naked]` functions. The main advantage is that we now have full control over what gets generated, and are no longer dependent on LLVM not sneakily messing with our output (inlining, adding extra instructions, etc).

I discussed this approach with `@Amanieu` and while I think the general direction is correct, there is probably a bunch of stuff that needs to change or move around here. I'll leave some inline comments on things that I'm not sure about.

Combined with https://github.com/rust-lang/rust/pull/127853, if both accepted, I think that resolves all steps from the tracking issue.

r? `@Amanieu`
2024-12-11 21:51:07 +00:00
bors
1daec069fb Auto merge of #128004 - folkertdev:naked-fn-asm, r=Amanieu
codegen `#[naked]` functions using global asm

tracking issue: https://github.com/rust-lang/rust/issues/90957

Fixes #124375

This implements the approach suggested in the tracking issue: use the existing global assembly infrastructure to emit the body of `#[naked]` functions. The main advantage is that we now have full control over what gets generated, and are no longer dependent on LLVM not sneakily messing with our output (inlining, adding extra instructions, etc).

I discussed this approach with `@Amanieu` and while I think the general direction is correct, there is probably a bunch of stuff that needs to change or move around here. I'll leave some inline comments on things that I'm not sure about.

Combined with https://github.com/rust-lang/rust/pull/127853, if both accepted, I think that resolves all steps from the tracking issue.

r? `@Amanieu`
2024-12-11 21:51:07 +00:00
Guillaume Gomez
cd3f69974f Merge pull request #576 from onur-ozkan/bless-lang-tests
stabilize `lang_tests_common` config parsing logic
2024-12-11 22:44:38 +01:00
Ralf Jung
60eca2c575 apply review feedback 2024-12-11 22:18:51 +01:00
Ralf Jung
d31c5e9c06 apply review feedback 2024-12-11 22:18:51 +01:00
Ralf Jung
d6ddc73dae forbid toggling x87 and fpregs on hard-float targets 2024-12-11 22:18:50 +01:00
Ralf Jung
8d3a263c79 generalize 'forbidden feature' concept so that even (un)stable feature can be invalid to toggle
Also rename some things for extra clarity
2024-12-11 22:11:15 +01:00
Ralf Jung
a1374f5c36 generalize 'forbidden feature' concept so that even (un)stable feature can be invalid to toggle
Also rename some things for extra clarity
2024-12-11 22:11:15 +01:00
Ralf Jung
2d887a5c5c generalize 'forbidden feature' concept so that even (un)stable feature can be invalid to toggle
Also rename some things for extra clarity
2024-12-11 22:11:15 +01:00
Eric Huss
1bc58979a2 Stabilize the Rust 2024 prelude 2024-12-11 13:09:57 -08:00
Oli Scherer
98edb8f403 Clarify why a type is rejected for asm! 2024-12-11 20:17:37 +00:00
Oli Scherer
6d3d61f1b0 Evaluate constants in SIMD vec lengths before rejecting them 2024-12-11 20:17:37 +00:00
Laurențiu Nicola
96d97611e2 Merge pull request #18466 from ChayimFriedman2/proper-lint-severity
Properly handle different defaults for severity of lints
2024-12-11 20:05:39 +00:00
Michael Goulet
43e2fd5086 Fix ICE when multiple supertrait substitutions need assoc but only one is provided 2024-12-11 19:53:40 +00:00
Michael Goulet
25a7fdf5bc Dont use span as key when collecting missing associated types from dyn 2024-12-11 19:53:27 +00:00
Laurențiu Nicola
4dc0f2744b Merge pull request #18666 from samestep/manual-autopublish-link
Fix publish workflow link in manual
2024-12-11 19:50:55 +00:00
Sam Estep
ef879f7a74 Fix publish workflow link in manual 2024-12-11 14:35:36 -05:00