Skip to content

Commit 60f7aab

Browse files
committed
Auto merge of rust-lang#3652 - rust-lang:rustup-2024-06-07, r=RalfJung
Automatic Rustup
2 parents 56438c3 + f0ea91c commit 60f7aab

File tree

518 files changed

+5033
-3792
lines changed

Some content is hidden

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

518 files changed

+5033
-3792
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ concurrency:
3838
cancel-in-progress: true
3939
env:
4040
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
41+
# This will be empty in PR jobs.
42+
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
4143
jobs:
4244
# The job matrix for `calculate_matrix` is defined in src/ci/github-actions/jobs.yml.
4345
# It calculates which jobs should be executed, based on the data of the ${{ github }} context.
@@ -242,6 +244,5 @@ jobs:
242244
shell: bash
243245
if: needs.calculate_matrix.outputs.run_type == 'auto'
244246
env:
245-
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
246247
TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues
247248
TOOLSTATE_PUBLISH: 1

Cargo.lock

Lines changed: 143 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
372372
checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05"
373373
dependencies = [
374374
"memchr",
375-
"regex-automata 0.3.9",
375+
"regex-automata 0.3.7",
376376
"serde",
377377
]
378378

@@ -2206,6 +2206,21 @@ dependencies = [
22062206
"vcpkg",
22072207
]
22082208

2209+
[[package]]
2210+
name = "line-wrap"
2211+
version = "0.2.0"
2212+
source = "registry+https://github.com/rust-lang/crates.io-index"
2213+
checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e"
2214+
2215+
[[package]]
2216+
name = "linereader"
2217+
version = "0.4.0"
2218+
source = "registry+https://github.com/rust-lang/crates.io-index"
2219+
checksum = "d921fea6860357575519aca014c6e22470585accdd543b370c404a8a72d0dd1d"
2220+
dependencies = [
2221+
"memchr",
2222+
]
2223+
22092224
[[package]]
22102225
name = "linkchecker"
22112226
version = "0.1.0"
@@ -2214,6 +2229,12 @@ dependencies = [
22142229
"regex",
22152230
]
22162231

2232+
[[package]]
2233+
name = "linked-hash-map"
2234+
version = "0.5.6"
2235+
source = "registry+https://github.com/rust-lang/crates.io-index"
2236+
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
2237+
22172238
[[package]]
22182239
name = "lint-docs"
22192240
version = "0.1.0"
@@ -2364,6 +2385,25 @@ dependencies = [
23642385
"topological-sort",
23652386
]
23662387

2388+
[[package]]
2389+
name = "mdbook-i18n-helpers"
2390+
version = "0.3.3"
2391+
source = "registry+https://github.com/rust-lang/crates.io-index"
2392+
checksum = "f1f71f5961d6f3376e1ff3e5989c2e3ecccc3e8a00f3a3acde446847f84852e4"
2393+
dependencies = [
2394+
"anyhow",
2395+
"chrono",
2396+
"mdbook",
2397+
"polib",
2398+
"pulldown-cmark 0.10.3",
2399+
"pulldown-cmark-to-cmark",
2400+
"regex",
2401+
"semver",
2402+
"serde_json",
2403+
"syntect",
2404+
"textwrap",
2405+
]
2406+
23672407
[[package]]
23682408
name = "mdbook-trpl-listing"
23692409
version = "0.1.0"
@@ -2650,6 +2690,28 @@ version = "1.19.0"
26502690
source = "registry+https://github.com/rust-lang/crates.io-index"
26512691
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
26522692

2693+
[[package]]
2694+
name = "onig"
2695+
version = "6.4.0"
2696+
source = "registry+https://github.com/rust-lang/crates.io-index"
2697+
checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f"
2698+
dependencies = [
2699+
"bitflags 1.3.2",
2700+
"libc",
2701+
"once_cell",
2702+
"onig_sys",
2703+
]
2704+
2705+
[[package]]
2706+
name = "onig_sys"
2707+
version = "69.8.1"
2708+
source = "registry+https://github.com/rust-lang/crates.io-index"
2709+
checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7"
2710+
dependencies = [
2711+
"cc",
2712+
"pkg-config",
2713+
]
2714+
26532715
[[package]]
26542716
name = "opener"
26552717
version = "0.6.1"
@@ -2968,6 +3030,29 @@ version = "0.3.30"
29683030
source = "registry+https://github.com/rust-lang/crates.io-index"
29693031
checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
29703032

3033+
[[package]]
3034+
name = "plist"
3035+
version = "1.6.1"
3036+
source = "registry+https://github.com/rust-lang/crates.io-index"
3037+
checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9"
3038+
dependencies = [
3039+
"base64",
3040+
"indexmap",
3041+
"line-wrap",
3042+
"quick-xml",
3043+
"serde",
3044+
"time",
3045+
]
3046+
3047+
[[package]]
3048+
name = "polib"
3049+
version = "0.2.0"
3050+
source = "registry+https://github.com/rust-lang/crates.io-index"
3051+
checksum = "6b393b155cf9be86249cba1b56cc81be0e6212c66d94ac0d76d37a1761f3bb1b"
3052+
dependencies = [
3053+
"linereader",
3054+
]
3055+
29713056
[[package]]
29723057
name = "polonius-engine"
29733058
version = "0.13.0"
@@ -3126,6 +3211,15 @@ version = "0.4.1"
31263211
source = "registry+https://github.com/rust-lang/crates.io-index"
31273212
checksum = "e9e1dcb320d6839f6edb64f7a4a59d39b30480d4d1765b56873f7c858538a5fe"
31283213

3214+
[[package]]
3215+
name = "quick-xml"
3216+
version = "0.31.0"
3217+
source = "registry+https://github.com/rust-lang/crates.io-index"
3218+
checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33"
3219+
dependencies = [
3220+
"memchr",
3221+
]
3222+
31293223
[[package]]
31303224
name = "quine-mc_cluskey"
31313225
version = "0.2.4"
@@ -3261,12 +3355,13 @@ dependencies = [
32613355

32623356
[[package]]
32633357
name = "regex"
3264-
version = "1.8.4"
3358+
version = "1.9.4"
32653359
source = "registry+https://github.com/rust-lang/crates.io-index"
3266-
checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f"
3360+
checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29"
32673361
dependencies = [
32683362
"aho-corasick",
32693363
"memchr",
3364+
"regex-automata 0.3.7",
32703365
"regex-syntax 0.7.5",
32713366
]
32723367

@@ -3290,9 +3385,14 @@ dependencies = [
32903385

32913386
[[package]]
32923387
name = "regex-automata"
3293-
version = "0.3.9"
3388+
version = "0.3.7"
32943389
source = "registry+https://github.com/rust-lang/crates.io-index"
3295-
checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9"
3390+
checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629"
3391+
dependencies = [
3392+
"aho-corasick",
3393+
"memchr",
3394+
"regex-syntax 0.7.5",
3395+
]
32963396

32973397
[[package]]
32983398
name = "regex-lite"
@@ -3367,6 +3467,7 @@ dependencies = [
33673467
"clap",
33683468
"env_logger",
33693469
"mdbook",
3470+
"mdbook-i18n-helpers",
33703471
"mdbook-trpl-listing",
33713472
"mdbook-trpl-note",
33723473
]
@@ -5372,6 +5473,28 @@ dependencies = [
53725473
"syn 2.0.64",
53735474
]
53745475

5476+
[[package]]
5477+
name = "syntect"
5478+
version = "5.2.0"
5479+
source = "registry+https://github.com/rust-lang/crates.io-index"
5480+
checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1"
5481+
dependencies = [
5482+
"bincode",
5483+
"bitflags 1.3.2",
5484+
"flate2",
5485+
"fnv",
5486+
"once_cell",
5487+
"onig",
5488+
"plist",
5489+
"regex-syntax 0.8.3",
5490+
"serde",
5491+
"serde_derive",
5492+
"serde_json",
5493+
"thiserror",
5494+
"walkdir",
5495+
"yaml-rust",
5496+
]
5497+
53755498
[[package]]
53765499
name = "sysinfo"
53775500
version = "0.30.12"
@@ -5497,6 +5620,12 @@ dependencies = [
54975620
"std",
54985621
]
54995622

5623+
[[package]]
5624+
name = "textwrap"
5625+
version = "0.16.1"
5626+
source = "registry+https://github.com/rust-lang/crates.io-index"
5627+
checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9"
5628+
55005629
[[package]]
55015630
name = "thin-vec"
55025631
version = "0.2.13"
@@ -6476,6 +6605,15 @@ dependencies = [
64766605
"lzma-sys",
64776606
]
64786607

6608+
[[package]]
6609+
name = "yaml-rust"
6610+
version = "0.4.5"
6611+
source = "registry+https://github.com/rust-lang/crates.io-index"
6612+
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
6613+
dependencies = [
6614+
"linked-hash-map",
6615+
]
6616+
64796617
[[package]]
64806618
name = "yansi-term"
64816619
version = "0.1.2"

compiler/rustc_ast/src/ast.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,6 +2501,8 @@ pub enum IsAuto {
25012501
pub enum Safety {
25022502
/// `unsafe` an item is explicitly marked as `unsafe`.
25032503
Unsafe(Span),
2504+
/// `safe` an item is explicitly marked as `safe`.
2505+
Safe(Span),
25042506
/// Default means no value was provided, it will take a default value given the context in
25052507
/// which is used.
25062508
Default,
@@ -3162,6 +3164,7 @@ pub struct DelegationMac {
31623164
#[derive(Clone, Encodable, Decodable, Debug)]
31633165
pub struct StaticItem {
31643166
pub ty: P<Ty>,
3167+
pub safety: Safety,
31653168
pub mutability: Mutability,
31663169
pub expr: Option<P<Expr>>,
31673170
}
@@ -3171,6 +3174,7 @@ pub struct StaticItem {
31713174
#[derive(Clone, Encodable, Decodable, Debug)]
31723175
pub struct StaticForeignItem {
31733176
pub ty: P<Ty>,
3177+
pub safety: Safety,
31743178
pub mutability: Mutability,
31753179
pub expr: Option<P<Expr>>,
31763180
}
@@ -3179,6 +3183,7 @@ impl From<StaticItem> for StaticForeignItem {
31793183
fn from(static_item: StaticItem) -> StaticForeignItem {
31803184
StaticForeignItem {
31813185
ty: static_item.ty,
3186+
safety: static_item.safety,
31823187
mutability: static_item.mutability,
31833188
expr: static_item.expr,
31843189
}
@@ -3189,6 +3194,7 @@ impl From<StaticForeignItem> for StaticItem {
31893194
fn from(static_item: StaticForeignItem) -> StaticItem {
31903195
StaticItem {
31913196
ty: static_item.ty,
3197+
safety: static_item.safety,
31923198
mutability: static_item.mutability,
31933199
expr: static_item.expr,
31943200
}

compiler/rustc_ast/src/mut_visit.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ fn visit_defaultness<T: MutVisitor>(defaultness: &mut Defaultness, vis: &mut T)
862862
fn visit_safety<T: MutVisitor>(safety: &mut Safety, vis: &mut T) {
863863
match safety {
864864
Safety::Unsafe(span) => vis.visit_span(span),
865+
Safety::Safe(span) => vis.visit_span(span),
865866
Safety::Default => {}
866867
}
867868
}
@@ -1079,7 +1080,7 @@ impl NoopVisitItemKind for ItemKind {
10791080
match self {
10801081
ItemKind::ExternCrate(_orig_name) => {}
10811082
ItemKind::Use(use_tree) => vis.visit_use_tree(use_tree),
1082-
ItemKind::Static(box StaticItem { ty, mutability: _, expr }) => {
1083+
ItemKind::Static(box StaticItem { ty, safety: _, mutability: _, expr }) => {
10831084
vis.visit_ty(ty);
10841085
visit_opt(expr, |expr| vis.visit_expr(expr));
10851086
}
@@ -1289,7 +1290,12 @@ pub fn noop_flat_map_item<K: NoopVisitItemKind>(
12891290
impl NoopVisitItemKind for ForeignItemKind {
12901291
fn noop_visit(&mut self, visitor: &mut impl MutVisitor) {
12911292
match self {
1292-
ForeignItemKind::Static(box StaticForeignItem { ty, mutability: _, expr }) => {
1293+
ForeignItemKind::Static(box StaticForeignItem {
1294+
ty,
1295+
mutability: _,
1296+
expr,
1297+
safety: _,
1298+
}) => {
12931299
visitor.visit_ty(ty);
12941300
visit_opt(expr, |expr| visitor.visit_expr(expr));
12951301
}

compiler/rustc_ast/src/token.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ pub fn ident_can_begin_expr(name: Symbol, span: Span, is_raw: IdentIsRaw) -> boo
210210
kw::Unsafe,
211211
kw::While,
212212
kw::Yield,
213+
kw::Safe,
213214
kw::Static,
214215
]
215216
.contains(&name)
@@ -577,6 +578,7 @@ impl Token {
577578
kw::Impl,
578579
kw::Unsafe,
579580
kw::Const,
581+
kw::Safe,
580582
kw::Static,
581583
kw::Union,
582584
kw::Macro,

compiler/rustc_ast/src/visit.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ impl WalkItemKind for ItemKind {
334334
match self {
335335
ItemKind::ExternCrate(_) => {}
336336
ItemKind::Use(use_tree) => try_visit!(visitor.visit_use_tree(use_tree, item.id, false)),
337-
ItemKind::Static(box StaticItem { ty, mutability: _, expr }) => {
337+
ItemKind::Static(box StaticItem { ty, safety: _, mutability: _, expr }) => {
338338
try_visit!(visitor.visit_ty(ty));
339339
visit_opt!(visitor, visit_expr, expr);
340340
}
@@ -658,7 +658,12 @@ impl WalkItemKind for ForeignItemKind {
658658
) -> V::Result {
659659
let &Item { id, span, ident, ref vis, .. } = item;
660660
match self {
661-
ForeignItemKind::Static(box StaticForeignItem { ty, mutability: _, expr }) => {
661+
ForeignItemKind::Static(box StaticForeignItem {
662+
ty,
663+
mutability: _,
664+
expr,
665+
safety: _,
666+
}) => {
662667
try_visit!(visitor.visit_ty(ty));
663668
visit_opt!(visitor, visit_expr, expr);
664669
}

0 commit comments

Comments
 (0)