Skip to content

Commit 8f67bcf

Browse files
authored
Merge pull request #20268 from lnicola/sync-from-rust
minor: Sync from downstream
2 parents 4bbe74b + da90db7 commit 8f67bcf

File tree

1,297 files changed

+18388
-13086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,297 files changed

+18388
-13086
lines changed

Cargo.lock

Lines changed: 56 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ dependencies = [
216216
"memchr",
217217
"serde",
218218
"serde_derive",
219-
"winnow 0.7.11",
219+
"winnow 0.7.12",
220220
]
221221

222222
[[package]]
@@ -470,23 +470,12 @@ dependencies = [
470470

471471
[[package]]
472472
name = "chrono-tz"
473-
version = "0.10.3"
473+
version = "0.10.4"
474474
source = "registry+https://github.com/rust-lang/crates.io-index"
475-
checksum = "efdce149c370f133a071ca8ef6ea340b7b88748ab0810097a9e2976eaa34b4f3"
475+
checksum = "a6139a8597ed92cf816dfb33f5dd6cf0bb93a6adc938f11039f371bc5bcd26c3"
476476
dependencies = [
477477
"chrono",
478-
"chrono-tz-build",
479-
"phf",
480-
]
481-
482-
[[package]]
483-
name = "chrono-tz-build"
484-
version = "0.4.1"
485-
source = "registry+https://github.com/rust-lang/crates.io-index"
486-
checksum = "8f10f8c9340e31fc120ff885fcdb54a0b48e474bbd77cab557f0c30a3e569402"
487-
dependencies = [
488-
"parse-zoneinfo",
489-
"phf_codegen",
478+
"phf 0.12.1",
490479
]
491480

492481
[[package]]
@@ -501,9 +490,9 @@ dependencies = [
501490

502491
[[package]]
503492
name = "clap"
504-
version = "4.5.40"
493+
version = "4.5.41"
505494
source = "registry+https://github.com/rust-lang/crates.io-index"
506-
checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f"
495+
checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9"
507496
dependencies = [
508497
"clap_builder",
509498
"clap_derive",
@@ -521,9 +510,9 @@ dependencies = [
521510

522511
[[package]]
523512
name = "clap_builder"
524-
version = "4.5.40"
513+
version = "4.5.41"
525514
source = "registry+https://github.com/rust-lang/crates.io-index"
526-
checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e"
515+
checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d"
527516
dependencies = [
528517
"anstream",
529518
"anstyle",
@@ -533,9 +522,9 @@ dependencies = [
533522

534523
[[package]]
535524
name = "clap_derive"
536-
version = "4.5.40"
525+
version = "4.5.41"
537526
source = "registry+https://github.com/rust-lang/crates.io-index"
538-
checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce"
527+
checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491"
539528
dependencies = [
540529
"heck 0.5.0",
541530
"proc-macro2",
@@ -798,9 +787,9 @@ dependencies = [
798787

799788
[[package]]
800789
name = "crc32fast"
801-
version = "1.4.2"
790+
version = "1.5.0"
802791
source = "registry+https://github.com/rust-lang/crates.io-index"
803-
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
792+
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
804793
dependencies = [
805794
"cfg-if",
806795
]
@@ -989,9 +978,9 @@ dependencies = [
989978

990979
[[package]]
991980
name = "derive_setters"
992-
version = "0.1.7"
981+
version = "0.1.8"
993982
source = "registry+https://github.com/rust-lang/crates.io-index"
994-
checksum = "d9c848e86c87e5cc305313041c5677d4d95d60baa71cf95e5f6ea2554bb629ff"
983+
checksum = "ae5c625eda104c228c06ecaf988d1c60e542176bd7a490e60eeda3493244c0c9"
995984
dependencies = [
996985
"darling",
997986
"proc-macro2",
@@ -2045,9 +2034,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
20452034

20462035
[[package]]
20472036
name = "libredox"
2048-
version = "0.1.4"
2037+
version = "0.1.6"
20492038
source = "registry+https://github.com/rust-lang/crates.io-index"
2050-
checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638"
2039+
checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0"
20512040
dependencies = [
20522041
"bitflags",
20532042
"libc",
@@ -2157,7 +2146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
21572146
checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18"
21582147
dependencies = [
21592148
"log",
2160-
"phf",
2149+
"phf 0.11.3",
21612150
"phf_codegen",
21622151
"string_cache",
21632152
"string_cache_codegen",
@@ -2196,9 +2185,9 @@ dependencies = [
21962185

21972186
[[package]]
21982187
name = "measureme"
2199-
version = "12.0.1"
2188+
version = "12.0.3"
22002189
source = "registry+https://github.com/rust-lang/crates.io-index"
2201-
checksum = "570a507d8948a66a97f42cbbaf8a6bb9516a51017d4ee949502ad7a10a864395"
2190+
checksum = "6ebd1ebda747ae161a4a377bf93f87e18d46faad2331cc0c7d25b84b1d445f49"
22022191
dependencies = [
22032192
"log",
22042193
"memmap2",
@@ -2632,15 +2621,6 @@ dependencies = [
26322621
"windows-targets 0.52.6",
26332622
]
26342623

2635-
[[package]]
2636-
name = "parse-zoneinfo"
2637-
version = "0.3.1"
2638-
source = "registry+https://github.com/rust-lang/crates.io-index"
2639-
checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24"
2640-
dependencies = [
2641-
"regex",
2642-
]
2643-
26442624
[[package]]
26452625
name = "pathdiff"
26462626
version = "0.2.3"
@@ -2712,7 +2692,16 @@ version = "0.11.3"
27122692
source = "registry+https://github.com/rust-lang/crates.io-index"
27132693
checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
27142694
dependencies = [
2715-
"phf_shared",
2695+
"phf_shared 0.11.3",
2696+
]
2697+
2698+
[[package]]
2699+
name = "phf"
2700+
version = "0.12.1"
2701+
source = "registry+https://github.com/rust-lang/crates.io-index"
2702+
checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7"
2703+
dependencies = [
2704+
"phf_shared 0.12.1",
27162705
]
27172706

27182707
[[package]]
@@ -2722,7 +2711,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
27222711
checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a"
27232712
dependencies = [
27242713
"phf_generator",
2725-
"phf_shared",
2714+
"phf_shared 0.11.3",
27262715
]
27272716

27282717
[[package]]
@@ -2731,7 +2720,7 @@ version = "0.11.3"
27312720
source = "registry+https://github.com/rust-lang/crates.io-index"
27322721
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
27332722
dependencies = [
2734-
"phf_shared",
2723+
"phf_shared 0.11.3",
27352724
"rand 0.8.5",
27362725
]
27372726

@@ -2744,6 +2733,15 @@ dependencies = [
27442733
"siphasher",
27452734
]
27462735

2736+
[[package]]
2737+
name = "phf_shared"
2738+
version = "0.12.1"
2739+
source = "registry+https://github.com/rust-lang/crates.io-index"
2740+
checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981"
2741+
dependencies = [
2742+
"siphasher",
2743+
]
2744+
27472745
[[package]]
27482746
name = "pin-project-lite"
27492747
version = "0.2.16"
@@ -3136,9 +3134,9 @@ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
31363134

31373135
[[package]]
31383136
name = "rustc-literal-escaper"
3139-
version = "0.0.4"
3137+
version = "0.0.5"
31403138
source = "registry+https://github.com/rust-lang/crates.io-index"
3141-
checksum = "ab03008eb631b703dd16978282ae36c73282e7922fe101a4bd072a40ecea7b8b"
3139+
checksum = "e4ee29da77c5a54f42697493cd4c9b9f31b74df666a6c04dfc4fde77abe0438b"
31423140

31433141
[[package]]
31443142
name = "rustc-main"
@@ -4752,15 +4750,15 @@ dependencies = [
47524750

47534751
[[package]]
47544752
name = "rustix"
4755-
version = "1.0.7"
4753+
version = "1.0.8"
47564754
source = "registry+https://github.com/rust-lang/crates.io-index"
4757-
checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
4755+
checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8"
47584756
dependencies = [
47594757
"bitflags",
47604758
"errno",
47614759
"libc",
47624760
"linux-raw-sys",
4763-
"windows-sys 0.59.0",
4761+
"windows-sys 0.60.2",
47644762
]
47654763

47664764
[[package]]
@@ -4860,9 +4858,9 @@ dependencies = [
48604858

48614859
[[package]]
48624860
name = "serde_json"
4863-
version = "1.0.140"
4861+
version = "1.0.141"
48644862
source = "registry+https://github.com/rust-lang/crates.io-index"
4865-
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
4863+
checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3"
48664864
dependencies = [
48674865
"itoa",
48684866
"memchr",
@@ -5027,7 +5025,7 @@ checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f"
50275025
dependencies = [
50285026
"new_debug_unreachable",
50295027
"parking_lot",
5030-
"phf_shared",
5028+
"phf_shared 0.11.3",
50315029
"precomputed-hash",
50325030
"serde",
50335031
]
@@ -5039,7 +5037,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
50395037
checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0"
50405038
dependencies = [
50415039
"phf_generator",
5042-
"phf_shared",
5040+
"phf_shared 0.11.3",
50435041
"proc-macro2",
50445042
"quote",
50455043
]
@@ -5069,14 +5067,6 @@ dependencies = [
50695067
"syn 1.0.109",
50705068
]
50715069

5072-
[[package]]
5073-
name = "suggest-tests"
5074-
version = "0.1.0"
5075-
dependencies = [
5076-
"build_helper",
5077-
"glob",
5078-
]
5079-
50805070
[[package]]
50815071
name = "syn"
50825072
version = "1.0.109"
@@ -5112,9 +5102,9 @@ dependencies = [
51125102

51135103
[[package]]
51145104
name = "sysinfo"
5115-
version = "0.36.0"
5105+
version = "0.36.1"
51165106
source = "registry+https://github.com/rust-lang/crates.io-index"
5117-
checksum = "aab138f5c1bb35231de19049060a87977ad23e04f2303e953bc5c2947ac7dec4"
5107+
checksum = "252800745060e7b9ffb7b2badbd8b31cfa4aa2e61af879d0a3bf2a317c20217d"
51185108
dependencies = [
51195109
"libc",
51205110
"objc2-core-foundation",
@@ -5419,7 +5409,7 @@ dependencies = [
54195409
"serde_spanned",
54205410
"toml_datetime",
54215411
"toml_write",
5422-
"winnow 0.7.11",
5412+
"winnow 0.7.12",
54235413
]
54245414

54255415
[[package]]
@@ -5837,9 +5827,9 @@ dependencies = [
58375827

58385828
[[package]]
58395829
name = "wasi-preview1-component-adapter-provider"
5840-
version = "34.0.1"
5830+
version = "34.0.2"
58415831
source = "registry+https://github.com/rust-lang/crates.io-index"
5842-
checksum = "aafa1e6af9a954a4bcf6ef420c33355d0ce84ddc6afbcba7bb6f05126f9120ae"
5832+
checksum = "33696c5f1ff1e083de9f36c3da471abd736362bc173e093f8b0b1ed5a387e39b"
58435833

58445834
[[package]]
58455835
name = "wasm-bindgen"
@@ -6483,9 +6473,9 @@ dependencies = [
64836473

64846474
[[package]]
64856475
name = "winnow"
6486-
version = "0.7.11"
6476+
version = "0.7.12"
64876477
source = "registry+https://github.com/rust-lang/crates.io-index"
6488-
checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd"
6478+
checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95"
64896479
dependencies = [
64906480
"memchr",
64916481
]

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ members = [
3939
"src/tools/rustdoc-gui-test",
4040
"src/tools/rustdoc-themes",
4141
"src/tools/rustfmt",
42-
"src/tools/suggest-tests",
4342
"src/tools/test-float-parse",
4443
"src/tools/tidy",
4544
"src/tools/tier-check",

compiler/rustc_abi/src/lib.rs

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use std::fmt;
4343
#[cfg(feature = "nightly")]
4444
use std::iter::Step;
4545
use std::num::{NonZeroUsize, ParseIntError};
46-
use std::ops::{Add, AddAssign, Deref, Mul, RangeInclusive, Sub};
46+
use std::ops::{Add, AddAssign, Deref, Mul, RangeFull, RangeInclusive, Sub};
4747
use std::str::FromStr;
4848

4949
use bitflags::bitflags;
@@ -1391,12 +1391,45 @@ impl WrappingRange {
13911391
}
13921392

13931393
/// Returns `true` if `size` completely fills the range.
1394+
///
1395+
/// Note that this is *not* the same as `self == WrappingRange::full(size)`.
1396+
/// Niche calculations can produce full ranges which are not the canonical one;
1397+
/// for example `Option<NonZero<u16>>` gets `valid_range: (..=0) | (1..)`.
13941398
#[inline]
13951399
fn is_full_for(&self, size: Size) -> bool {
13961400
let max_value = size.unsigned_int_max();
13971401
debug_assert!(self.start <= max_value && self.end <= max_value);
13981402
self.start == (self.end.wrapping_add(1) & max_value)
13991403
}
1404+
1405+
/// Checks whether this range is considered non-wrapping when the values are
1406+
/// interpreted as *unsigned* numbers of width `size`.
1407+
///
1408+
/// Returns `Ok(true)` if there's no wrap-around, `Ok(false)` if there is,
1409+
/// and `Err(..)` if the range is full so it depends how you think about it.
1410+
#[inline]
1411+
pub fn no_unsigned_wraparound(&self, size: Size) -> Result<bool, RangeFull> {
1412+
if self.is_full_for(size) { Err(..) } else { Ok(self.start <= self.end) }
1413+
}
1414+
1415+
/// Checks whether this range is considered non-wrapping when the values are
1416+
/// interpreted as *signed* numbers of width `size`.
1417+
///
1418+
/// This is heavily dependent on the `size`, as `100..=200` does wrap when
1419+
/// interpreted as `i8`, but doesn't when interpreted as `i16`.
1420+
///
1421+
/// Returns `Ok(true)` if there's no wrap-around, `Ok(false)` if there is,
1422+
/// and `Err(..)` if the range is full so it depends how you think about it.
1423+
#[inline]
1424+
pub fn no_signed_wraparound(&self, size: Size) -> Result<bool, RangeFull> {
1425+
if self.is_full_for(size) {
1426+
Err(..)
1427+
} else {
1428+
let start: i128 = size.sign_extend(self.start);
1429+
let end: i128 = size.sign_extend(self.end);
1430+
Ok(start <= end)
1431+
}
1432+
}
14001433
}
14011434

14021435
impl fmt::Debug for WrappingRange {

compiler/rustc_ast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2024"
77
# tidy-alphabetical-start
88
bitflags = "2.4.1"
99
memchr = "2.7.4"
10-
rustc-literal-escaper = "0.0.4"
10+
rustc-literal-escaper = "0.0.5"
1111
rustc_ast_ir = { path = "../rustc_ast_ir" }
1212
rustc_data_structures = { path = "../rustc_data_structures" }
1313
rustc_index = { path = "../rustc_index" }

0 commit comments

Comments
 (0)