Skip to content

Commit 39c714b

Browse files
committed
Auto merge of rust-lang#3252 - rust-lang:rustup-2024-01-05, r=RalfJung
Automatic Rustup
2 parents 38847ae + d11a2bd commit 39c714b

File tree

1,256 files changed

+18848
-10855
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,256 files changed

+18848
-10855
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ jobs:
361361
os: macos-13
362362
- name: dist-aarch64-apple
363363
env:
364-
SCRIPT: "./x.py dist bootstrap --include-default-paths --host=aarch64-apple-darwin --target=aarch64-apple-darwin"
365-
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false --set rust.lto=thin"
364+
SCRIPT: "./x.py dist bootstrap --include-default-paths --stage 2"
365+
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-full-tools --enable-sanitizers --enable-profiler --disable-docs --set rust.jemalloc --set llvm.ninja=false"
366366
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
367367
SELECT_XCODE: /Applications/Xcode_13.4.1.app
368368
USE_XCODE_CLANG: 1
@@ -372,20 +372,8 @@ jobs:
372372
NO_DEBUG_ASSERTIONS: 1
373373
NO_OVERFLOW_CHECKS: 1
374374
DIST_REQUIRE_ALL_TOOLS: 1
375-
os: macos-13-xlarge
376-
- name: aarch64-apple
377-
env:
378-
SCRIPT: "./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin"
379-
RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
380-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
381-
SELECT_XCODE: /Applications/Xcode_13.4.1.app
382-
USE_XCODE_CLANG: 1
383-
MACOSX_DEPLOYMENT_TARGET: 11.0
384-
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
385-
NO_LLVM_ASSERTIONS: 1
386-
NO_DEBUG_ASSERTIONS: 1
387-
NO_OVERFLOW_CHECKS: 1
388-
os: macos-13-xlarge
375+
JEMALLOC_SYS_WITH_LG_PAGE: 14
376+
os: macos-13
389377
- name: x86_64-msvc
390378
env:
391379
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"

Cargo.lock

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
285285

286286
[[package]]
287287
name = "bitflags"
288-
version = "2.4.0"
288+
version = "2.4.1"
289289
source = "registry+https://github.com/rust-lang/crates.io-index"
290-
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
290+
checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
291291

292292
[[package]]
293293
name = "block-buffer"
@@ -537,7 +537,7 @@ checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
537537

538538
[[package]]
539539
name = "clippy"
540-
version = "0.1.76"
540+
version = "0.1.77"
541541
dependencies = [
542542
"anstream",
543543
"clippy_config",
@@ -565,7 +565,7 @@ dependencies = [
565565

566566
[[package]]
567567
name = "clippy_config"
568-
version = "0.1.76"
568+
version = "0.1.77"
569569
dependencies = [
570570
"rustc-semver",
571571
"serde",
@@ -588,7 +588,7 @@ dependencies = [
588588

589589
[[package]]
590590
name = "clippy_lints"
591-
version = "0.1.76"
591+
version = "0.1.77"
592592
dependencies = [
593593
"arrayvec",
594594
"cargo_metadata 0.15.4",
@@ -613,7 +613,7 @@ dependencies = [
613613

614614
[[package]]
615615
name = "clippy_utils"
616-
version = "0.1.76"
616+
version = "0.1.77"
617617
dependencies = [
618618
"arrayvec",
619619
"clippy_config",
@@ -984,7 +984,7 @@ checksum = "a0afaad2b26fa326569eb264b1363e8ae3357618c43982b3f285f0774ce76b69"
984984

985985
[[package]]
986986
name = "declare_clippy_lint"
987-
version = "0.1.76"
987+
version = "0.1.77"
988988
dependencies = [
989989
"itertools",
990990
"quote",
@@ -3370,7 +3370,7 @@ dependencies = [
33703370
name = "rustc_abi"
33713371
version = "0.0.0"
33723372
dependencies = [
3373-
"bitflags 1.3.2",
3373+
"bitflags 2.4.1",
33743374
"rand",
33753375
"rand_xoshiro",
33763376
"rustc_data_structures",
@@ -3401,7 +3401,7 @@ dependencies = [
34013401
name = "rustc_ast"
34023402
version = "0.0.0"
34033403
dependencies = [
3404-
"bitflags 1.3.2",
3404+
"bitflags 2.4.1",
34053405
"memchr",
34063406
"rustc_data_structures",
34073407
"rustc_index",
@@ -3552,7 +3552,7 @@ dependencies = [
35523552
name = "rustc_codegen_llvm"
35533553
version = "0.0.0"
35543554
dependencies = [
3555-
"bitflags 1.3.2",
3555+
"bitflags 2.4.1",
35563556
"itertools",
35573557
"libc",
35583558
"measureme",
@@ -3587,7 +3587,7 @@ name = "rustc_codegen_ssa"
35873587
version = "0.0.0"
35883588
dependencies = [
35893589
"ar_archive_writer",
3590-
"bitflags 1.3.2",
3590+
"bitflags 2.4.1",
35913591
"cc",
35923592
"itertools",
35933593
"jobserver",
@@ -3654,7 +3654,7 @@ name = "rustc_data_structures"
36543654
version = "0.0.0"
36553655
dependencies = [
36563656
"arrayvec",
3657-
"bitflags 1.3.2",
3657+
"bitflags 2.4.1",
36583658
"elsa",
36593659
"ena",
36603660
"indexmap",
@@ -4121,7 +4121,7 @@ dependencies = [
41214121
name = "rustc_metadata"
41224122
version = "0.0.0"
41234123
dependencies = [
4124-
"bitflags 1.3.2",
4124+
"bitflags 2.4.1",
41254125
"libloading 0.7.4",
41264126
"odht",
41274127
"rustc_ast",
@@ -4151,7 +4151,7 @@ dependencies = [
41514151
name = "rustc_middle"
41524152
version = "0.0.0"
41534153
dependencies = [
4154-
"bitflags 1.3.2",
4154+
"bitflags 2.4.1",
41554155
"derive_more",
41564156
"either",
41574157
"field-offset",
@@ -4286,7 +4286,7 @@ dependencies = [
42864286
name = "rustc_parse"
42874287
version = "0.0.0"
42884288
dependencies = [
4289-
"bitflags 1.3.2",
4289+
"bitflags 2.4.1",
42904290
"rustc_ast",
42914291
"rustc_ast_pretty",
42924292
"rustc_data_structures",
@@ -4424,7 +4424,7 @@ dependencies = [
44244424
name = "rustc_resolve"
44254425
version = "0.0.0"
44264426
dependencies = [
4427-
"bitflags 1.3.2",
4427+
"bitflags 2.4.1",
44284428
"pulldown-cmark",
44294429
"rustc_arena",
44304430
"rustc_ast",
@@ -4463,7 +4463,7 @@ dependencies = [
44634463
name = "rustc_session"
44644464
version = "0.0.0"
44654465
dependencies = [
4466-
"bitflags 1.3.2",
4466+
"bitflags 2.4.1",
44674467
"getopts",
44684468
"libc",
44694469
"rustc_ast",
@@ -4521,7 +4521,7 @@ dependencies = [
45214521
name = "rustc_symbol_mangling"
45224522
version = "0.0.0"
45234523
dependencies = [
4524-
"bitflags 1.3.2",
4524+
"bitflags 2.4.1",
45254525
"punycode",
45264526
"rustc-demangle",
45274527
"rustc_data_structures",
@@ -4539,7 +4539,7 @@ dependencies = [
45394539
name = "rustc_target"
45404540
version = "0.0.0"
45414541
dependencies = [
4542-
"bitflags 1.3.2",
4542+
"bitflags 2.4.1",
45434543
"object",
45444544
"rustc_abi",
45454545
"rustc_data_structures",
@@ -4563,6 +4563,7 @@ checksum = "8ba09476327c4b70ccefb6180f046ef588c26a24cf5d269a9feba316eb4f029f"
45634563
name = "rustc_trait_selection"
45644564
version = "0.0.0"
45654565
dependencies = [
4566+
"itertools",
45664567
"rustc_ast",
45674568
"rustc_attr",
45684569
"rustc_data_structures",
@@ -4637,7 +4638,7 @@ dependencies = [
46374638
name = "rustc_type_ir"
46384639
version = "0.0.0"
46394640
dependencies = [
4640-
"bitflags 1.3.2",
4641+
"bitflags 2.4.1",
46414642
"derivative",
46424643
"rustc_data_structures",
46434644
"rustc_index",
@@ -4767,7 +4768,7 @@ version = "0.38.19"
47674768
source = "registry+https://github.com/rust-lang/crates.io-index"
47684769
checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed"
47694770
dependencies = [
4770-
"bitflags 2.4.0",
4771+
"bitflags 2.4.1",
47714772
"errno",
47724773
"libc",
47734774
"linux-raw-sys",
@@ -5205,9 +5206,9 @@ dependencies = [
52055206

52065207
[[package]]
52075208
name = "sysinfo"
5208-
version = "0.29.2"
5209+
version = "0.29.11"
52095210
source = "registry+https://github.com/rust-lang/crates.io-index"
5210-
checksum = "9557d0845b86eea8182f7b10dff120214fb6cd9fd937b6f4917714e546a38695"
5211+
checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666"
52115212
dependencies = [
52125213
"cfg-if",
52135214
"core-foundation-sys",

compiler/rustc_abi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
# tidy-alphabetical-start
8-
bitflags = "1.2.1"
8+
bitflags = "2.4.1"
99
rand = { version = "0.8.4", default-features = false, optional = true }
1010
rand_xoshiro = { version = "0.6.0", optional = true }
1111
rustc_data_structures = { path = "../rustc_data_structures", optional = true }

compiler/rustc_abi/src/lib.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ pub use layout::LayoutCalculator;
2929
/// instead of implementing everything in `rustc_middle`.
3030
pub trait HashStableContext {}
3131

32+
#[derive(Clone, Copy, PartialEq, Eq, Default)]
33+
#[cfg_attr(feature = "nightly", derive(Encodable, Decodable, HashStable_Generic))]
34+
pub struct ReprFlags(u8);
35+
3236
bitflags! {
33-
#[derive(Default)]
34-
#[cfg_attr(feature = "nightly", derive(Encodable, Decodable, HashStable_Generic))]
35-
pub struct ReprFlags: u8 {
37+
impl ReprFlags: u8 {
3638
const IS_C = 1 << 0;
3739
const IS_SIMD = 1 << 1;
3840
const IS_TRANSPARENT = 1 << 2;
@@ -42,11 +44,12 @@ bitflags! {
4244
// the seed stored in `ReprOptions.layout_seed`
4345
const RANDOMIZE_LAYOUT = 1 << 4;
4446
// Any of these flags being set prevent field reordering optimisation.
45-
const IS_UNOPTIMISABLE = ReprFlags::IS_C.bits
46-
| ReprFlags::IS_SIMD.bits
47-
| ReprFlags::IS_LINEAR.bits;
47+
const IS_UNOPTIMISABLE = ReprFlags::IS_C.bits()
48+
| ReprFlags::IS_SIMD.bits()
49+
| ReprFlags::IS_LINEAR.bits();
4850
}
4951
}
52+
rustc_data_structures::external_bitflags_debug! { ReprFlags }
5053

5154
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
5255
#[cfg_attr(feature = "nightly", derive(Encodable, Decodable, HashStable_Generic))]

compiler/rustc_ast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
# tidy-alphabetical-start
8-
bitflags = "1.2.1"
8+
bitflags = "2.4.1"
99
memchr = "2.5.0"
1010
rustc_data_structures = { path = "../rustc_data_structures" }
1111
rustc_index = { path = "../rustc_index" }

compiler/rustc_ast/src/ast.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,9 +2171,10 @@ pub enum InlineAsmRegOrRegClass {
21712171
RegClass(Symbol),
21722172
}
21732173

2174+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Encodable, Decodable, HashStable_Generic)]
2175+
pub struct InlineAsmOptions(u16);
21742176
bitflags::bitflags! {
2175-
#[derive(Encodable, Decodable, HashStable_Generic)]
2176-
pub struct InlineAsmOptions: u16 {
2177+
impl InlineAsmOptions: u16 {
21772178
const PURE = 1 << 0;
21782179
const NOMEM = 1 << 1;
21792180
const READONLY = 1 << 2;
@@ -2186,6 +2187,12 @@ bitflags::bitflags! {
21862187
}
21872188
}
21882189

2190+
impl std::fmt::Debug for InlineAsmOptions {
2191+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2192+
bitflags::parser::to_writer(self, f)
2193+
}
2194+
}
2195+
21892196
#[derive(Clone, PartialEq, Encodable, Decodable, Debug, Hash, HashStable_Generic)]
21902197
pub enum InlineAsmTemplatePiece {
21912198
String(String),
@@ -2481,15 +2488,6 @@ pub enum Const {
24812488
No,
24822489
}
24832490

2484-
impl From<BoundConstness> for Const {
2485-
fn from(constness: BoundConstness) -> Self {
2486-
match constness {
2487-
BoundConstness::Maybe(span) => Self::Yes(span),
2488-
BoundConstness::Never => Self::No,
2489-
}
2490-
}
2491-
}
2492-
24932491
/// Item defaultness.
24942492
/// For details see the [RFC #2532](https://github.com/rust-lang/rfcs/pull/2532).
24952493
#[derive(Copy, Clone, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
@@ -2543,6 +2541,8 @@ impl BoundPolarity {
25432541
pub enum BoundConstness {
25442542
/// `Type: Trait`
25452543
Never,
2544+
/// `Type: const Trait`
2545+
Always(Span),
25462546
/// `Type: ~const Trait`
25472547
Maybe(Span),
25482548
}
@@ -2551,6 +2551,7 @@ impl BoundConstness {
25512551
pub fn as_str(self) -> &'static str {
25522552
match self {
25532553
Self::Never => "",
2554+
Self::Always(_) => "const",
25542555
Self::Maybe(_) => "~const",
25552556
}
25562557
}

compiler/rustc_ast/src/token.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -528,15 +528,6 @@ impl Token {
528528
}
529529
}
530530

531-
/// Returns `true` if the token can appear at the start of a generic bound.
532-
pub fn can_begin_bound(&self) -> bool {
533-
self.is_path_start()
534-
|| self.is_lifetime()
535-
|| self.is_keyword(kw::For)
536-
|| self == &Question
537-
|| self == &OpenDelim(Delimiter::Parenthesis)
538-
}
539-
540531
/// Returns `true` if the token can appear at the start of an item.
541532
pub fn can_begin_item(&self) -> bool {
542533
match self.kind {

0 commit comments

Comments
 (0)