bors
8adb4b30f4
Auto merge of #132662 - RalfJung:const-panic-inlining, r=tgross35
...
tweak attributes for const panic macro
Let's do some random mutations of this macro to see if that can re-gain the perf lost in https://github.com/rust-lang/rust/pull/132542 .
2024-11-13 19:47:38 +00:00
bors
a00df61387
Auto merge of #132556 - clubby789:cargo-update, r=Mark-Simulacrum
...
Add licenses + run `cargo update`
Replaces #131311
```
compiler & tools dependencies:
Locking 86 packages to latest compatible versions
Updating anstream v0.6.15 -> v0.6.17
Updating anstyle v1.0.8 -> v1.0.10
Updating anstyle-lossy v1.1.2 -> v1.1.3
Updating anstyle-parse v0.2.5 -> v0.2.6
Updating anstyle-query v1.1.1 -> v1.1.2
Updating anstyle-svg v0.1.5 -> v0.1.7
Updating anstyle-wincon v3.0.4 -> v3.0.6
Updating anyhow v1.0.89 -> v1.0.92
Updating arrayref v0.3.7 -> v0.3.9
Updating blake3 v1.5.2 -> v1.5.4
Updating bytes v1.7.2 -> v1.8.0
Updating cc v1.1.23 -> v1.1.34
Updating clap v4.5.18 -> v4.5.20
Updating clap_builder v4.5.18 -> v4.5.20
Updating clap_complete v4.5.29 -> v4.5.36
Updating colorchoice v1.0.2 -> v1.0.3
Updating constant_time_eq v0.3.0 -> v0.3.1
Updating curl v0.4.46 -> v0.4.47
Updating curl-sys v0.4.76+curl-8.10.1 -> v0.4.77+curl-8.10.1
Updating derive_builder v0.20.1 -> v0.20.2
Updating derive_builder_core v0.20.1 -> v0.20.2
Updating derive_builder_macro v0.20.1 -> v0.20.2
Adding foldhash v0.1.3
Updating futures v0.3.30 -> v0.3.31
Updating futures-channel v0.3.30 -> v0.3.31
Updating futures-core v0.3.30 -> v0.3.31
Updating futures-executor v0.3.30 -> v0.3.31
Updating futures-io v0.3.30 -> v0.3.31
Updating futures-macro v0.3.30 -> v0.3.31
Updating futures-sink v0.3.30 -> v0.3.31
Updating futures-task v0.3.30 -> v0.3.31
Updating futures-util v0.3.30 -> v0.3.31
Updating gimli v0.31.0 -> v0.31.1
Adding hashbrown v0.15.0
Updating indexmap v2.5.0 -> v2.6.0
Updating js-sys v0.3.70 -> v0.3.72
Updating libc v0.2.159 -> v0.2.161
Updating libm v0.2.8 -> v0.2.11
Updating object v0.36.4 -> v0.36.5
Updating once_cell v1.19.0 -> v1.20.2
Removing once_map v0.4.19
Updating openssl-sys v0.9.103 -> v0.9.104
Updating pathdiff v0.2.1 -> v0.2.2
Updating pest v2.7.13 -> v2.7.14
Updating pest_derive v2.7.13 -> v2.7.14
Updating pest_generator v2.7.13 -> v2.7.14
Updating pest_meta v2.7.13 -> v2.7.14
Updating pin-project-lite v0.2.14 -> v0.2.15
Updating proc-macro2 v1.0.86 -> v1.0.89
Updating redox_syscall v0.5.6 -> v0.5.7
Updating regex v1.10.6 -> v1.11.1
Updating regex-automata v0.4.7 -> v0.4.8
Updating regex-syntax v0.8.4 -> v0.8.5
Updating rinja v0.3.4 -> v0.3.5
Updating rinja_derive v0.3.4 -> v0.3.5
Updating rinja_parser v0.3.4 -> v0.3.5
Updating rustix v0.38.37 -> v0.38.38
Updating rustversion v1.0.17 -> v1.0.18
Updating schannel v0.1.24 -> v0.1.26
Updating serde v1.0.210 -> v1.0.214
Updating serde_derive v1.0.210 -> v1.0.214
Updating serde_json v1.0.128 -> v1.0.132
Updating syn v2.0.79 -> v2.0.87
Updating tar v0.4.42 -> v0.4.43
Updating terminal_size v0.3.0 -> v0.4.0
Updating thiserror v1.0.64 -> v1.0.66
Updating thiserror-impl v1.0.64 -> v1.0.66
Updating tokio v1.40.0 -> v1.41.0
Updating ucd-trie v0.1.6 -> v0.1.7
Updating unicase v2.7.0 -> v2.8.0
Updating unicode-bidi v0.3.15 -> v0.3.17
Updating unicode-properties v0.1.2 -> v0.1.3
Updating uuid v1.10.0 -> v1.11.0
Updating wasi-preview1-component-adapter-provider v24.0.0 -> v24.0.1 (latest: v25.0.1)
Updating wasm-bindgen v0.2.93 -> v0.2.95
Updating wasm-bindgen-backend v0.2.93 -> v0.2.95
Updating wasm-bindgen-macro v0.2.93 -> v0.2.95
Updating wasm-bindgen-macro-support v0.2.93 -> v0.2.95
Updating wasm-bindgen-shared v0.2.93 -> v0.2.95
Updating wasm-encoder v0.219.0 -> v0.219.1
Updating wasm-metadata v0.219.0 -> v0.219.1
Removing wasmparser v0.219.0
Adding wasmparser v0.218.0 (latest: v0.219.1)
Adding wasmparser v0.219.1
Updating wast v219.0.0 -> v219.0.1
Updating wat v1.219.0 -> v1.219.1
Updating wit-component v0.219.0 -> v0.219.1
Updating wit-parser v0.219.0 -> v0.219.1
library dependencies:
Locking 5 packages to latest compatible versions
Updating compiler_builtins v0.1.136 -> v0.1.138
Updating dlmalloc v0.2.6 -> v0.2.7
Updating object v0.36.4 -> v0.36.5
Updating windows-sys v0.52.0 -> v0.59.0
rustbook dependencies:
Updating anstream v0.6.15 -> v0.6.17
Updating anstyle v1.0.8 -> v1.0.10
Updating anstyle-parse v0.2.5 -> v0.2.6
Updating anstyle-query v1.1.1 -> v1.1.2
Updating anstyle-wincon v3.0.4 -> v3.0.6
Updating anyhow v1.0.89 -> v1.0.92
Updating cc v1.1.22 -> v1.1.34
Updating clap v4.5.18 -> v4.5.20
Updating clap_builder v4.5.18 -> v4.5.20
Updating clap_complete v4.5.29 -> v4.5.36
Updating colorchoice v1.0.2 -> v1.0.3
Updating hashbrown v0.14.5 -> v0.15.0
Updating indexmap v2.5.0 -> v2.6.0
Updating js-sys v0.3.70 -> v0.3.72
Updating libc v0.2.159 -> v0.2.161
Updating once_cell v1.19.0 -> v1.20.2
Updating pathdiff v0.2.1 -> v0.2.2
Updating pest v2.7.13 -> v2.7.14
Updating pest_derive v2.7.13 -> v2.7.14
Updating pest_generator v2.7.13 -> v2.7.14
Updating pest_meta v2.7.13 -> v2.7.14
Updating proc-macro2 v1.0.86 -> v1.0.89
Updating redox_syscall v0.5.6 -> v0.5.7
Updating regex v1.10.6 -> v1.11.1
Updating regex-automata v0.4.7 -> v0.4.8
Updating regex-syntax v0.8.4 -> v0.8.5
Updating rustix v0.38.37 -> v0.38.38
Updating serde v1.0.210 -> v1.0.214
Updating serde_derive v1.0.210 -> v1.0.214
Updating serde_json v1.0.128 -> v1.0.132
Updating syn v2.0.79 -> v2.0.87
Updating terminal_size v0.3.0 -> v0.4.0
Updating thiserror v1.0.64 -> v1.0.66
Updating thiserror-impl v1.0.64 -> v1.0.66
Updating ucd-trie v0.1.6 -> v0.1.7
Updating unicase v2.7.0 -> v2.8.0
Updating unicode-bidi v0.3.15 -> v0.3.17
Updating wasm-bindgen v0.2.93 -> v0.2.95
Updating wasm-bindgen-backend v0.2.93 -> v0.2.95
Updating wasm-bindgen-macro v0.2.93 -> v0.2.95
Updating wasm-bindgen-macro-support v0.2.93 -> v0.2.95
Updating wasm-bindgen-shared v0.2.93 -> v0.2.95
Removing windows-sys v0.48.0
Removing windows-targets v0.48.5
Removing windows_aarch64_gnullvm v0.48.5
Removing windows_aarch64_msvc v0.48.5
Removing windows_i686_gnu v0.48.5
Removing windows_i686_msvc v0.48.5
Removing windows_x86_64_gnu v0.48.5
Removing windows_x86_64_gnullvm v0.48.5
Removing windows_x86_64_msvc v0.48.5
```
2024-11-13 12:57:09 +00:00
clubby789
812daed7a8
Run cargo update
and update licenses
2024-11-13 12:22:10 +00:00
Ralf Jung
c00d64250b
const_panic: don't wrap it in a separate function
2024-11-13 09:53:42 +01:00
bors
44f233f251
Auto merge of #132883 - LaihoE:vectorized_is_sorted, r=thomcc
...
vectorize slice::is_sorted
Benchmarks using u32 slices:
| len | New | Old |
|--------|----------------------|----------------------|
| 2 | 1.1997 ns | 889.23 ps |
| 4 | 1.6479 ns | 1.5396 ns |
| 8 | 2.5764 ns | 2.5633 ns |
| 16 | 5.4750 ns | 4.7421 ns |
| 32 | 11.344 ns | 8.4634 ns |
| 64 | 12.105 ns | 18.104 ns |
| 128 | 17.263 ns | 33.185 ns |
| 256 | 29.465 ns | 60.928 ns |
| 512 | 48.926 ns | 116.19 ns |
| 1024 | 85.274 ns | 237.91 ns |
| 2048 | 160.94 ns | 469.53 ns |
| 4096 | 311.60 ns | 911.43 ns |
| 8192 | 615.89 ns | 2.2316 µs |
| 16384 | 1.2619 µs | 3.4871 µs |
| 32768 | 2.5245 µs | 6.9947 µs |
| 65536 | 5.2254 µs | 15.212 µs |
Seems to be a bit slower on small N but much faster on large N.
Godbolt: https://rust.godbolt.org/z/Txn5MdfKn
2024-11-13 03:43:59 +00:00
bors
242f20dc1e
Auto merge of #132972 - matthiaskrgr:rollup-456osr7, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- #132702 (CFI: Append debug location to CFI blocks)
- #132851 (Update the doc comment of `ASCII_CASE_MASK`)
- #132948 (stabilize const_unicode_case_lookup)
- #132950 (Use GNU ld on m68k-unknown-linux-gnu)
- #132962 (triagebot: add codegen reviewers)
- #132966 (stabilize const_option_ext)
- #132970 (Add tracking issue number to unsigned_nonzero_div_ceil feature)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-13 01:00:17 +00:00
Matthias Krüger
d83de7e0c5
Rollup merge of #132970 - tyilo:nonzero-u-div-ceil-issue, r=tgross35
...
Add tracking issue number to unsigned_nonzero_div_ceil feature
Tracking issue: #132968
2024-11-12 23:26:46 +01:00
Matthias Krüger
ae5c00f053
Rollup merge of #132966 - RalfJung:const_option_ext, r=jhpratt
...
stabilize const_option_ext
Fixes https://github.com/rust-lang/rust/issues/91930
FCP passed in that issue.
2024-11-12 23:26:45 +01:00
Matthias Krüger
978f592539
Rollup merge of #132948 - RalfJung:const_unicode_case_lookup, r=Noratrieb
...
stabilize const_unicode_case_lookup
Fixes https://github.com/rust-lang/rust/issues/101400
See there for t-libs-api FCP
2024-11-12 23:26:43 +01:00
Matthias Krüger
5419f41f9a
Rollup merge of #132851 - chansuke:update-comment, r=thomcc
...
Update the doc comment of `ASCII_CASE_MASK`
Revived and continued the work from https://github.com/rust-lang/rust/pull/120282 .
the original [branch](https://github.com/mahmudsudo/rust-1/tree/patch-1 ) was deleted, i created a new branch to carry the changes forward
2024-11-12 23:26:42 +01:00
bors
b420d923cf
Auto merge of #132870 - Noratrieb:inline-int-parsing, r=tgross35
...
`#[inline]` integer parsing functions
This improves the performance of `str::parse` into integers.
Before:
```
compare fastest │ slowest │ median │ mean │ samples │ iters
╰─ std │ │ │ │ │
├─ 328920585 10.23 ns │ 24.8 ns │ 10.34 ns │ 10.48 ns │ 100 │ 25600
├─ 3255 8.551 ns │ 8.59 ns │ 8.551 ns │ 8.56 ns │ 100 │ 25600
╰─ 5 7.847 ns │ 7.887 ns │ 7.847 ns │ 7.853 ns │ 100 │ 25600
```
After:
```
compare fastest │ slowest │ median │ mean │ samples │ iters
╰─ std │ │ │ │ │
├─ 328920585 8.316 ns │ 23.7 ns │ 8.355 ns │ 8.491 ns │ 100 │ 25600
├─ 3255 4.566 ns │ 4.588 ns │ 4.586 ns │ 4.576 ns │ 100 │ 51200
╰─ 5 2.877 ns │ 3.697 ns │ 2.896 ns │ 2.945 ns │ 100 │ 102400
```
Benchmark:
```rust
fn std(input: &str) -> Result<u64, ParseIntError> {
input.parse()
}
```
2024-11-12 22:24:50 +00:00
Asger Hautop Drewsen
19843dbcb4
Add tracking issue number to unsigned_nonzero_div_ceil feature
2024-11-12 22:36:54 +01:00
Ralf Jung
324d059962
stabilize const_option_ext
2024-11-12 21:42:15 +01:00
Ralf Jung
eddab479fd
stabilize const_unicode_case_lookup
2024-11-12 15:13:31 +01:00
bors
5700240aff
Auto merge of #132943 - matthiaskrgr:rollup-164l3ej, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- #132651 (Remove attributes from generics in built-in derive macros)
- #132668 (Feature gate yield expressions not in 2024)
- #132771 (test(configure): cover `parse_args` in `src/bootstrap/configure.py`)
- #132895 (Generalize `NonNull::from_raw_parts` per ACP362)
- #132914 (Update grammar in std::cell docs.)
- #132927 (Consolidate type system const evaluation under `traits::evaluate_const`)
- #132935 (Make sure to ignore elided lifetimes when pointing at args for fulfillment errors)
- #132941 (Subtree update of `rust-analyzer`)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-12 08:15:38 +00:00
Matthias Krüger
87d5faf5b6
Rollup merge of #132914 - rcorre:cell-grammar, r=tgross35
...
Update grammar in std::cell docs.
Using "having" in both the leading sentence and the bullets is unnecessary.
It makes it read as "it is only possible to have having several immutable...".
2024-11-12 08:07:18 +01:00
Matthias Krüger
72c62688d1
Rollup merge of #132895 - scottmcm:generalize-nonnull-from-raw-parts, r=ibraheemdev
...
Generalize `NonNull::from_raw_parts` per ACP362
I did the raw pointers in #125701 , but apparently forgot `NonNull`.
cc https://github.com/rust-lang/libs-team/issues/362
2024-11-12 08:07:17 +01:00
Matthias Krüger
119b939c18
Rollup merge of #132929 - cuviper:check-alloc_zeroed, r=tgross35
...
Check for null in the `alloc_zeroed` example
We should demonstrate good behavior, just like #99198 did for `alloc`.
2024-11-12 06:27:20 +01:00
Matthias Krüger
0555bb2a1b
Rollup merge of #132869 - lolbinarycat:library-fix-too_long_first_doc_paragraph, r=tgross35
...
split up the first paragraph of doc comments for better summaries
used `./x clippy -Aclippy::all '-Wclippy::too_long_first_doc_paragraph' library/core library/alloc` to find these issues.
2024-11-12 06:27:19 +01:00
Matthias Krüger
953064f00a
Rollup merge of #132847 - RalfJung:addr-dont-expose, r=Mark-Simulacrum
...
elem_offset / subslice_range: use addr() instead of 'as usize'
There's no reason to use ptr-to-int casts with their subtle semantics here.
2024-11-12 06:27:19 +01:00
bors
67f21277cd
Auto merge of #132919 - matthiaskrgr:rollup-ogghyvp, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- #120077 (Add Set entry API )
- #132144 (Arbitrary self types v2: (unused) Receiver trait)
- #132297 (Document some `check_expr` methods, and other misc `hir_typeck` tweaks)
- #132820 (Add a default implementation for CodegenBackend::link)
- #132881 (triagebot: Autolabel rustdoc book)
- #132912 (Simplify some places that deal with generic parameter defaults)
- #132916 (Unvacation fmease)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-12 02:51:21 +00:00
Josh Stone
2ddb91acd1
Check for null in the alloc_zeroed
example
...
We should demonstrate good behavior, just like #99198 did for `alloc`.
2024-11-11 16:30:37 -08:00
Matthias Krüger
9d7faccffc
Rollup merge of #132144 - adetaylor:receiver-trait-itself, r=wesleywiser
...
Arbitrary self types v2: (unused) Receiver trait
This commit contains a new `Receiver` trait, which is the basis for the Arbitrary Self Types v2 RFC. This allows smart pointers to be method receivers even if they're not Deref.
This is currently unused by the compiler - a subsequent PR will start to use this for method resolution if the `arbitrary_self_types` feature gate is enabled. This is being landed first simply to make review simpler: if people feel this should all be in an atomic PR let me know.
This is a part of the arbitrary self types v2 project, https://github.com/rust-lang/rfcs/pull/3519
https://github.com/rust-lang/rust/issues/44874
r? `@wesleywiser`
2024-11-11 21:58:29 +01:00
Matthias Krüger
3ab4477ba7
Rollup merge of #120077 - SUPERCILEX:set-entry, r=Amanieu
...
Add Set entry API
See https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/HashSet.3A.3Aentry/near/413224639 and https://github.com/rust-lang/rust/issues/60896#issuecomment-678708111
Closes https://github.com/rust-lang/rfcs/issues/1490
2024-11-11 21:58:28 +01:00
bors
81eef2d362
Auto merge of #132902 - matthiaskrgr:rollup-43qgg3t, r=matthiaskrgr
...
Rollup of 4 pull requests
Successful merges:
- #129627 (Ensure that tail expr receive lifetime extension)
- #130999 (Implement file_lock feature)
- #132873 (handle separate prefixes in clippy rules)
- #132891 (Remove `rustc_session::config::rustc_short_optgroups`)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-11 19:25:06 +00:00
Ryan Roden-Corrent
0d3a58e576
Update grammar in std::cell docs.
...
Using "having" in both the leading sentence and the bullets is unnecessary.
It makes it read as "it is only possible to have having several immutable...".
2024-11-11 13:22:03 -05:00
Matthias Krüger
95175f851e
Rollup merge of #130999 - cberner:flock_pr, r=joboet
...
Implement file_lock feature
This adds lock(), lock_shared(), try_lock(), try_lock_shared(), and unlock() to File gated behind the file_lock feature flag
This is the initial implementation of https://github.com/rust-lang/rust/issues/130994 for Unix and Windows platforms. I will follow it up with an implementation for WASI preview 2
2024-11-11 15:23:33 +01:00
bors
d4822c2d84
Auto merge of #127589 - notriddle:notriddle/search-sem-3, r=GuillaumeGomez
...
rustdoc-search: simplify rules for generics and type params
**Heads up!**: This PR is a follow-up that depends on #124544 . It adds 12dc24f460
, a change to the filtering behavior, and 9900ea48b5
, a minor ranking tweak.
Part of https://github.com/rust-lang/rust-project-goals/issues/112
This PR overturns https://github.com/rust-lang/rust/pull/109802
## Preview
* no results: [`Box<[A]> -> Vec<B>`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CB%3E )
* results: [`Box<[A]> -> Vec<A>`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CA%3E )
* [`T -> U`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=T%20-%3E%20U )
* [`Cx -> TyCtxt`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3-compiler/rustdoc/index.html?search=Cx%20-%3E%20TyCtxt )
![image](https://github.com/user-attachments/assets/015ae28c-7469-4f7f-be03-157d28d7ec97 )
## Description
This commit is a response to feedback on the displayed type signatures results, by making generics act stricter.
- Order within generics is significant. This means `Vec<Allocator>` now matches only with a true vector of allocators, instead of matching the second type param. It also makes unboxing within generics stricter, so `Result<A, B>` only matches if `B` is in the error type and `A` is in the success type. The top level of the function search is unaffected.
- Generics are only "unboxed" if a type is explicitly opted into it. References and tuples are hardcoded to allow unboxing, and Box, Rc, Arc, Option, Result, and Future are opted in with an unstable attribute. Search result unboxing is the process that allows you to search for `i32 -> str` and get back a function with the type signature `&Future<i32> -> Box<str>`.
- Instead of ranking by set overlap, it ranks by the number of items in the type signature. This makes it easier to find single type signatures like transmute.
## Find the discussion on
* <https://rust-lang.zulipchat.com/#narrow/stream/393423-t-rustdoc.2Fmeetings/topic/meeting.202024-07-08/near/449965149 >
* <https://github.com/rust-lang/rust/pull/124544#issuecomment-2204272265 >
* <https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/deciding.20on.20semantics.20of.20generics.20in.20rustdoc.20search >
2024-11-11 12:26:00 +00:00
Scott McMurray
fb26ba88f8
Generalize NonNull::from_raw_parts
per ACP362
...
I did the raw pointers in 125701, but apparently forgot `NonNull`.
2024-11-11 00:05:17 -08:00
Laiho
3855cb8048
vectorize slice::is_sorted
2024-11-11 00:23:51 +02:00
Noratrieb
fc8c16eb82
#[inline]
integer parsing functions
...
This improves the performance of `str::parse` into integers.
Before:
```
compare fastest │ slowest │ median │ mean │ samples │ iters
╰─ std │ │ │ │ │
├─ 328920585 10.23 ns │ 24.8 ns │ 10.34 ns │ 10.48 ns │ 100 │ 25600
├─ 3255 8.551 ns │ 8.59 ns │ 8.551 ns │ 8.56 ns │ 100 │ 25600
╰─ 5 7.847 ns │ 7.887 ns │ 7.847 ns │ 7.853 ns │ 100 │ 25600
```
After:
```
compare fastest │ slowest │ median │ mean │ samples │ iters
╰─ std │ │ │ │ │
├─ 328920585 8.316 ns │ 23.7 ns │ 8.355 ns │ 8.491 ns │ 100 │ 25600
├─ 3255 4.566 ns │ 4.588 ns │ 4.586 ns │ 4.576 ns │ 100 │ 51200
╰─ 5 2.877 ns │ 3.697 ns │ 2.896 ns │ 2.945 ns │ 100 │ 102400
```
Benchmark:
```rust
fn std(input: &str) -> Result<u64, ParseIntError> {
input.parse()
}
```
2024-11-10 20:37:13 +01:00
binarycat
ae3c68db34
split up the first paragraph of doc comments for better summaries
2024-11-10 13:22:58 -06:00
chansuke
b496873020
Update the doc comment of ASCII_CASE_MASK
2024-11-10 22:24:06 +09:00
Ralf Jung
b2d1874dc2
elem_offset / subslice_range: use addr() instead of 'as usize'
2024-11-10 13:03:25 +01:00
Matthias Krüger
94cc01af15
Rollup merge of #132136 - RalfJung:target-feature-abi-compat, r=Mark-Simulacrum
...
ABI compatibility: remove section on target features
Once https://github.com/rust-lang/rust/pull/127731 lands, we will properly diagnose ABI issues caused by target feature mismatch (at least on tier 1 targets). So I'd say we can remove the corresponding part of the docs here -- this is now something the compiler can take care of, so programmers don't need to be concerned. For now this is just a lint, but that's just a transition period, like in prior cases where we fix I-unsound bugs by adding a new check that goes through the "future incompatibility" stages. We have decided that it's actually a bug that we have ABI risks around target features, and we shouldn't document that bug as-if it was intended behavior.
Cc `@rust-lang/opsem` `@chorman0773` `@veluca93`
2024-11-10 10:09:52 +01:00
Jubilee
dc647392d6
Rollup merge of #132778 - lolbinarycat:io-Error-into_inner-docs, r=cuviper
...
update io::Error::into_inner to acknowledge io::Error::other
2024-11-08 20:46:13 -08:00
binarycat
b004cac72e
update io::Error::into_inner to acknowlage io::Error::other
2024-11-08 10:43:34 -06:00
Christopher Berner
9330786c27
Address review comments
2024-11-08 08:16:41 -08:00
Christopher Berner
5a156a7999
Update library/std/src/sys/pal/windows/fs.rs
...
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
2024-11-08 08:09:53 -08:00
bors
209799f3b9
Auto merge of #132717 - RalfJung:rustc_safe_intrinsic, r=compiler-errors
...
remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead
This brings us one step closer towards removing support for `extern "rust-intrinsic"` blocks, in favor of `#[rustc_intrinsic]` functions.
Also move `#[rustc_intrinsic]` under the `intrinsics` feature gate, to match the `extern "rust-intrinsic"` style.
2024-11-08 10:28:47 +00:00
Ralf Jung
e3010e84db
remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead
2024-11-08 09:16:00 +01:00
Stuart Cook
4b904ceb46
Rollup merge of #132738 - cuviper:channel-heap-init, r=ibraheemdev
...
Initialize channel `Block`s directly on the heap
The channel's `Block::new` was causing a stack overflow because it held
32 item slots, instantiated on the stack before moving to `Box::new`.
The 32x multiplier made modestly-large item sizes untenable.
That block is now initialized directly on the heap.
Fixes #102246
try-job: test-various
2024-11-08 18:51:30 +11:00
Jubilee
c9009ae8c8
Rollup merge of #132696 - fortanix:raoul/rte-235-fix_fmodl_missing_symbol_issue, r=tgross35
...
Compile `test_num_f128` conditionally on `reliable_f128_math` config
With #132434 merged, our internal SGX CI started failing with:
```
05:27:34 = note: rust-lld: error: undefined symbol: fmodl
05:27:34 >>> referenced by arith.rs:617 (core/src/ops/arith.rs:617)
05:27:34 >>> /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/std-5d5f11eb008c9091.std.d8141acc61ab7ac8-cgu.10.rcgu.o:(std::num::test_num::h7dd9449f6c01fde8)
05:27:34 >>> did you mean: fmodf
05:27:34 >>> defined in: /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/libcompiler_builtins-0376f439a2ebf305.rlib(compiler_builtins-0376f439a2ebf305.compiler_builtins.c22db39d25d6f802-cgu.148.rcgu.o)
```
This originated from the `test_num_f128` test not having the required conditional compilation. This PR fixes that issue.
cc: ````@jethrogb,```` ````@workingjubilee````
2024-11-07 18:48:23 -08:00
Jubilee
0683e031a8
Rollup merge of #132639 - RalfJung:intrinsics, r=workingjubilee,Amanieu
...
core: move intrinsics.rs into intrinsics folder
This makes the rustbot notification we have set up for this folder in `triagebot.toml` actually work. Also IMO it makes more sense to have it all in one folder.
2024-11-07 18:48:23 -08:00
Josh Stone
03383ad102
Initialize channel Block
s directly on the heap
...
The channel's `Block::new` was causing a stack overflow because it held
32 item slots, instantiated on the stack before moving to `Box::new`.
The 32x multiplier made modestly-large item sizes untenable.
That block is now initialized directly on the heap.
Fixes #102246
2024-11-07 10:09:45 -08:00
Ralf Jung
ab1787b223
core: move intrinsics.rs into intrinsics folder
2024-11-07 17:49:45 +01:00
bors
9a77c3c2cb
Auto merge of #132714 - mati865:update-memchr, r=tgross35
...
unpin and update memchr
I'm unable to build x86_64-pc-windows-gnu Rust due to some weird binutils bug, but thinlto issue seems to be no longer present. Let's give it a go on the CI.
Possibly fixed by https://github.com/rust-lang/rust/pull/129079
Fixes #127890
2024-11-07 15:34:14 +00:00
Jonas Böttiger
0a0cadfe8a
Rollup merge of #132715 - tabokie:fix-lazy-lock-doc, r=Noratrieb
...
fix `LazyLock::get` and `LazyLock::get_mut` document
2024-11-07 13:08:29 +01:00
Jonas Böttiger
49a58c8723
Rollup merge of #132665 - tyilo:nonzero-u-div-ceil, r=joboet
...
Implement `div_ceil` for `NonZero<unsigned>`
ACP: https://github.com/rust-lang/libs-team/issues/471
2024-11-07 13:08:27 +01:00
Raoul Strackx
072088074e
Separate f128 %
operation to deal with missing fmodl
symbol
2024-11-07 11:33:10 +01:00