Matthias Krüger
45a0ec81ea
Rollup merge of #136354 - hkBst:patch-34, r=ibraheemdev
...
Update docs for impl keyword
This started as a fix for #79878 , but also introduces some structure (headings), and elaborates a tiny bit on impl Trait syntax.
2025-02-11 18:04:40 +01:00
Matthias Krüger
052ebc65b2
Rollup merge of #136246 - hkBst:patch-29, r=ibraheemdev
...
include note on variance and example
Fixes #89150
2025-02-11 18:04:38 +01:00
Matthias Krüger
65d20f39f3
Rollup merge of #136239 - folkertdev:show-supported-register-classes, r=SparrowLii,jieyouxu
...
show supported register classes in error message
a simple diagnostic change that shows the supported register classes when an invalid one is found.
This information can be hard to find (especially for unstable targets), and this message now gives at least something to try or search for. I've followed the pattern for invalid clobber ABIs.
`@rustbot` label +A-inline-assembly
2025-02-11 18:04:34 +01:00
Matthias Krüger
09ee4e7b00
Rollup merge of #135677 - yotamofek:resolve-cleanups2, r=compiler-errors
...
Small `rustc_resolve` cleanups
1. Don't open-code `Reverse`
2. Use slice patterns where possible
2025-02-11 18:04:28 +01:00
Matthias Krüger
d719afdbd9
Rollup merge of #135285 - tbu-:pr_fix_typo4, r=GuillaumeGomez
...
it-self → itself, build-system → build system, type-alias → type alias
2025-02-11 18:04:22 +01:00
Sky
7bca1f2675
Fix missing const for inherent pointer replace methods
2025-02-11 11:49:38 -05:00
MarcoIeni
7f38958e50
ci: remove more unused files and directories in free runners
2025-02-11 17:47:32 +01:00
Trevor Gross
aa26cab257
Rename Float::exp to Float::ex
...
Our function to get the exponent conflicts with the inherent `exp`
function for `e^x`. Rename `exp` to `ex` to avoid confusion and usage
problems.
2025-02-11 10:41:43 -06:00
Michael Howell
ac15a10b55
just_underscores_and_digits: ignore empty ident
...
Empty idents come from error recovery, and should imply that a
better error has already been emitted.
2025-02-11 09:35:43 -07:00
Alejandra González
c40898e186
declare_interior_mutable_const, borrow_interior_mutable_const: resolve <T as Trait>::AssocT projections (#14125 )
...
changelog: [`declare_interior_mutable_const`,
`borrow_interior_mutable_const`]: resolve `<T as Trait>::AssocT`
projections
---
This came up during https://github.com/rust-lang/rust/pull/130543 where
we have `<T as AtomicPrimitive>::Assoc = AtomicT` instead of just
`AtomicT` and clippy failed to resolve that properly.
This really needs a review, because
- I don't know if `try_normalize_erasing_regions` is the right thing to
call here.
- I'm not sure if I peel off the correct amount of `ValTree::Branch`
layers (I think I do).
Also, shouldn't this lint's infrastructure rely on `Freeze` trait
(https://github.com/rust-lang/rust/issues/121675 ) instead of hardcoding
a list of known-to-be-interior-mutable types?
---
Previously filed this in the main rust repo
(https://github.com/rust-lang/rust/pull/136369 ), was asked to do it here
instead
(https://github.com/rust-lang/rust/pull/136369#issuecomment-2628527774 ).
2025-02-11 16:32:35 +00:00
Trevor Gross
e32f79583c
Change the issue number for likely_unlikely and cold_path
...
These currently point to rust-lang/rust#26179 , which is nearly a decade
old and has a lot of outdated discussion. Move these features to a new
tracking issue specifically for the recently added API.
New tracking issue: https://github.com/rust-lang/rust/issues/136873
2025-02-11 16:10:35 +00:00
Mads Marquart
7972aa2394
dev-guide: Link to t-lang procedures for new features
2025-02-11 15:49:04 +01:00
onur-ozkan
61ba728b18
add coverage for Builder::is_host_target
...
Signed-off-by: onur-ozkan <work@onurozkan.dev >
2025-02-11 16:39:02 +03:00
onur-ozkan
909d43b38c
add Builder::is_host_target
...
Signed-off-by: onur-ozkan <work@onurozkan.dev >
2025-02-11 16:35:43 +03:00
Guillaume Gomez
9222b05d9f
Correctly handle user-select: none
2025-02-11 14:29:58 +01:00
Guillaume Gomez
9e0c8b67e9
Add regression test for source line numbers
2025-02-11 14:29:58 +01:00
Guillaume Gomez
673fd23dff
Update rustdoc tests
2025-02-11 14:29:58 +01:00
Chayim Refael Friedman
da4c099375
Merge pull request #19117 from gohome001/implicit-drop-inlay-hints-bug
...
Fix: don't emit implicit drop inlay hints for macro
2025-02-11 13:18:04 +00:00
bors
8c61cd4df8
Auto merge of #136571 - marcoieni:ubuntu-24-large-runners, r=Mark-Simulacrum
...
ci: use ubuntu 24 for x86 large runners
try-job: dist-powerpc64le-linux
try-job: x86_64-gnu-debug
try-job: dist-arm-linux
try-job: x86_64-fuchsia
try-job: x86_64-gnu-distcheck
try-job: dist-x86_64-linux
try-job: dist-x86_64-linux-alt
2025-02-11 13:06:54 +00:00
Yotam Ofek
73d5fe153b
rustc_codegen_ssa: cleanup codegen attrs
2025-02-11 12:44:07 +00:00
Yotam Ofek
a821785641
rustc_codegen_ssa: simplify test for incompatible dependency formats
...
thanks @kadiwa4
2025-02-11 12:44:07 +00:00
Yotam Ofek
9e5e6a9d0f
rustc_codegen_ssa: cleanup nested ifs and a needless match
2025-02-11 12:43:29 +00:00
Lukas Wirth
4883966818
Merge pull request #18998 from ChayimFriedman2/exclude
...
fix: Make `rust-analyzer.files.excludeDirs` work, actually
2025-02-11 11:41:54 +00:00
bors
69482e8e5a
Auto merge of #136851 - jhpratt:rollup-ftijn95, r=jhpratt
...
Rollup of 11 pull requests
Successful merges:
- #136606 (Fix long lines which rustfmt fails to format)
- #136663 (Stabilize `NonZero::count_ones`)
- #136672 (library: doc: core::alloc::Allocator: trivial typo fix)
- #136704 (Improve examples for file locking)
- #136721 (cg_llvm: Reduce visibility of some items outside the `llvm` module)
- #136813 (rustc_target: Add the fp16 target feature for AArch32)
- #136830 (fix i686-unknown-hurd-gnu x87 footnote)
- #136832 (Fix platform support table for i686-unknown-uefi)
- #136835 (Stop using span hack for contracts feature gating)
- #136837 (Overhaul how contracts are lowered on fn-like bodies)
- #136839 (fix ensure_monomorphic_enough)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-11 10:17:02 +00:00
Oli Scherer
dcf1e4d72b
Document some safety constraints and use more safe wrappers
2025-02-11 09:47:13 +00:00
Yotam Ofek
c930bb2cfb
rustc_codegen_ssa: use slice patterns instead of len-check+indexing
2025-02-11 09:41:48 +00:00
Oli Scherer
4b83038d63
Add a safe wrapper for WriteBitcodeToFile
2025-02-11 09:41:22 +00:00
Oli Scherer
b2cd1b8ead
Remove an unsafe closure invariant by inlining the closure wrapper into the called function
2025-02-11 09:41:22 +00:00
Oli Scherer
c294da3310
Reject impl Trait bounds in various places where we unconditionally warned since 1.0
2025-02-11 09:19:37 +00:00
Oli Scherer
f1f996a4d5
Handle pattern types wrapped in Option in FFI checks
2025-02-11 08:52:08 +00:00
Oli Scherer
6d7ce4e893
Add a TyPat in the AST to reuse the generic arg lowering logic
2025-02-11 08:51:05 +00:00
Oli Scherer
5bae8ca77c
Correctly handle pattern types in FFI redeclaration lints
2025-02-11 08:30:35 +00:00
Oli Scherer
473352da31
Correctly handle pattern types in FFI safety
2025-02-11 08:30:35 +00:00
Oli Scherer
644c6948d0
Add ffi tests for pattern types
2025-02-11 08:30:35 +00:00
Trevor Gross
7db47c741c
Check exact values for specified cases
...
Inputs in `case_list` shouldn't hit xfails or increased ULP tolerance.
Ensure that overrides are skipped when testing against MPFR or a
specified value and that NaNs, if any, are checked bitwise.
2025-02-11 02:27:13 -06:00
Marijn Schouten
e279c4eadb
include note on variance and example
...
Fixes #89150
Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com >
2025-02-11 09:20:59 +01:00
Askar Safin
8506dd2644
config.example.toml: remove "parallel-compiler"
2025-02-11 11:09:49 +03:00
gohome001
4036a7a77d
add test case for ignoring inlay hint for macro call
2025-02-11 15:27:34 +08:00
gohome001
6e6bdc311a
don't emit implicit drop inlay hints for macro
2025-02-11 15:24:46 +08:00
Askar Safin
02406903b0
compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync"
2025-02-11 10:21:17 +03:00
lapla-cogito
7139436f98
add index checks for the slice in manual_slice_fill
2025-02-11 16:13:26 +09:00
Ralf Jung
2066d6ec8e
Merge pull request #4186 from rust-lang/rustup-2025-02-11
...
Automatic Rustup
2025-02-11 07:12:03 +00:00
Marijn Schouten
166680c480
Update docs for impl keyword
2025-02-11 08:04:32 +01:00
Askar Safin
51f49d8464
compiler/rustc_codegen_llvm/src/lib.rs: remove "unsafe impl Send/Sync"
2025-02-11 09:58:53 +03:00
Trevor Gross
53a055049c
Add roundeven{,f,f16,f128}
...
C23 specifies a new set of `roundeven` functions that round to the
nearest integral, with ties to even. It does not raise any floating
point exceptions.
This behavior is similar to two other functions:
1. `rint`, which rounds to the nearest integer respecting rounding mode
and possibly raising exceptions.
2. `nearbyint`, which is identical to `rint` except it may not raise
exceptions.
Technically `rint`, `nearbyint`, and `roundeven` all behave the same in
Rust because we assume default floating point environment. The backends
are allowed to lower to `roundeven`, however, so we should provide it in
case the fallback is needed.
Add the `roundeven` family here and convert `rint` to a function that
takes a rounding mode. This currently has no effect.
2025-02-11 00:55:22 -06:00
Trevor Gross
2a3ef8b9a2
Fix parsing of negative hex float literals in util
2025-02-11 00:55:22 -06:00
Askar Safin
d7f2227e63
compiler/rustc_codegen_gcc/src/back/lto.rs: delete "unsafe impl Sync/Send"
2025-02-11 09:47:13 +03:00
Askar Safin
851cc4bed4
compiler/rustc_codegen_gcc/src/back/lto.rs: delete "unsafe impl Sync/Send"
2025-02-11 09:47:13 +03:00
Askar Safin
afa01c145c
src/doc/rustc-dev-guide/src/parallel-rustc.md: remove Arc and Rc (it seems they are left-over after my PR)
2025-02-11 09:25:46 +03:00
Askar Safin
d79f9ca257
compiler/rustc_data_structures/src/sync.rs: delete Sync and Send
2025-02-11 09:15:54 +03:00