Skip to content

Commit 4b05125

Browse files
committed
Auto merge of rust-lang#2900 - oli-obk:rustup, r=oli-obk
Rustup
2 parents aee196f + 90459e8 commit 4b05125

File tree

490 files changed

+6312
-2876
lines changed

Some content is hidden

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

490 files changed

+6312
-2876
lines changed

Cargo.lock

+55-21
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602"
154154

155155
[[package]]
156156
name = "ar_archive_writer"
157-
version = "0.1.3"
157+
version = "0.1.4"
158158
source = "registry+https://github.com/rust-lang/crates.io-index"
159-
checksum = "b0639441fd17a3197d1cbca8dc8768cc172a63b64b4bb6c372e8f41ed0acc9bb"
159+
checksum = "74cfb39880a59e122232cb5fb06b20b4382d58c12fa9747d16f846d38a7b094c"
160160
dependencies = [
161-
"object",
161+
"object 0.31.1",
162162
]
163163

164164
[[package]]
@@ -233,7 +233,7 @@ dependencies = [
233233
"cfg-if",
234234
"libc",
235235
"miniz_oxide",
236-
"object",
236+
"object 0.30.1",
237237
"rustc-demangle",
238238
]
239239

@@ -331,6 +331,12 @@ dependencies = [
331331
"packed_simd_2",
332332
]
333333

334+
[[package]]
335+
name = "byteorder"
336+
version = "1.4.3"
337+
source = "registry+https://github.com/rust-lang/crates.io-index"
338+
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
339+
334340
[[package]]
335341
name = "bytes"
336342
version = "1.0.1"
@@ -629,7 +635,7 @@ dependencies = [
629635
"itertools",
630636
"pulldown-cmark",
631637
"quine-mc_cluskey",
632-
"regex-syntax",
638+
"regex-syntax 0.7.1",
633639
"rustc-semver",
634640
"semver",
635641
"serde",
@@ -723,6 +729,7 @@ dependencies = [
723729
name = "compiletest"
724730
version = "0.0.0"
725731
dependencies = [
732+
"anyhow",
726733
"build_helper",
727734
"colored",
728735
"diff",
@@ -2364,13 +2371,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
23642371
checksum = "8d864c91689fdc196779b98dba0aceac6118594c2df6ee5d943eb6a8df4d107a"
23652372
dependencies = [
23662373
"compiler_builtins",
2374+
"memchr",
2375+
"rustc-std-workspace-alloc",
2376+
"rustc-std-workspace-core",
2377+
]
2378+
2379+
[[package]]
2380+
name = "object"
2381+
version = "0.31.1"
2382+
source = "registry+https://github.com/rust-lang/crates.io-index"
2383+
checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1"
2384+
dependencies = [
23672385
"crc32fast",
23682386
"flate2",
23692387
"hashbrown 0.13.1",
23702388
"indexmap",
23712389
"memchr",
2372-
"rustc-std-workspace-alloc",
2373-
"rustc-std-workspace-core",
2390+
"ruzstd",
23742391
]
23752392

23762393
[[package]]
@@ -2695,9 +2712,9 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
26952712

26962713
[[package]]
26972714
name = "proc-macro2"
2698-
version = "1.0.53"
2715+
version = "1.0.56"
26992716
source = "registry+https://github.com/rust-lang/crates.io-index"
2700-
checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73"
2717+
checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
27012718
dependencies = [
27022719
"unicode-ident",
27032720
]
@@ -2865,7 +2882,7 @@ checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
28652882
dependencies = [
28662883
"aho-corasick",
28672884
"memchr",
2868-
"regex-syntax",
2885+
"regex-syntax 0.6.26",
28692886
]
28702887

28712888
[[package]]
@@ -2874,7 +2891,7 @@ version = "0.1.10"
28742891
source = "registry+https://github.com/rust-lang/crates.io-index"
28752892
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
28762893
dependencies = [
2877-
"regex-syntax",
2894+
"regex-syntax 0.6.26",
28782895
]
28792896

28802897
[[package]]
@@ -2892,6 +2909,12 @@ version = "0.6.26"
28922909
source = "registry+https://github.com/rust-lang/crates.io-index"
28932910
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
28942911

2912+
[[package]]
2913+
name = "regex-syntax"
2914+
version = "0.7.1"
2915+
source = "registry+https://github.com/rust-lang/crates.io-index"
2916+
checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"
2917+
28952918
[[package]]
28962919
name = "remote-test-client"
28972920
version = "0.1.0"
@@ -3222,7 +3245,7 @@ dependencies = [
32223245
"cstr",
32233246
"libc",
32243247
"measureme",
3225-
"object",
3248+
"object 0.31.1",
32263249
"rustc-demangle",
32273250
"rustc_ast",
32283251
"rustc_attr",
@@ -3258,7 +3281,7 @@ dependencies = [
32583281
"itertools",
32593282
"jobserver",
32603283
"libc",
3261-
"object",
3284+
"object 0.31.1",
32623285
"pathdiff",
32633286
"regex",
32643287
"rustc_arena",
@@ -4417,6 +4440,17 @@ version = "1.0.5"
44174440
source = "registry+https://github.com/rust-lang/crates.io-index"
44184441
checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088"
44194442

4443+
[[package]]
4444+
name = "ruzstd"
4445+
version = "0.3.1"
4446+
source = "registry+https://github.com/rust-lang/crates.io-index"
4447+
checksum = "9a15e661f0f9dac21f3494fe5d23a6338c0ac116a2d22c2b63010acd89467ffe"
4448+
dependencies = [
4449+
"byteorder",
4450+
"thiserror",
4451+
"twox-hash",
4452+
]
4453+
44204454
[[package]]
44214455
name = "ryu"
44224456
version = "1.0.5"
@@ -4477,18 +4511,18 @@ dependencies = [
44774511

44784512
[[package]]
44794513
name = "serde"
4480-
version = "1.0.159"
4514+
version = "1.0.160"
44814515
source = "registry+https://github.com/rust-lang/crates.io-index"
4482-
checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065"
4516+
checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c"
44834517
dependencies = [
44844518
"serde_derive",
44854519
]
44864520

44874521
[[package]]
44884522
name = "serde_derive"
4489-
version = "1.0.159"
4523+
version = "1.0.160"
44904524
source = "registry+https://github.com/rust-lang/crates.io-index"
4491-
checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585"
4525+
checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df"
44924526
dependencies = [
44934527
"proc-macro2",
44944528
"quote",
@@ -4653,7 +4687,7 @@ dependencies = [
46534687
"hermit-abi 0.3.0",
46544688
"libc",
46554689
"miniz_oxide",
4656-
"object",
4690+
"object 0.30.1",
46574691
"panic_abort",
46584692
"panic_unwind",
46594693
"profiler_builtins",
@@ -4925,13 +4959,13 @@ dependencies = [
49254959

49264960
[[package]]
49274961
name = "thorin-dwp"
4928-
version = "0.4.0"
4962+
version = "0.6.0"
49294963
source = "registry+https://github.com/rust-lang/crates.io-index"
4930-
checksum = "da8fbf660a019b6bf11ea95762041464aa9099cc293b6a66d77cea5107619671"
4964+
checksum = "98c040e1340b889d4180c64e1d787efa9c32cb1617757e101480b61238b0d927"
49314965
dependencies = [
49324966
"gimli 0.26.2",
49334967
"hashbrown 0.12.3",
4934-
"object",
4968+
"object 0.31.1",
49354969
"tracing",
49364970
]
49374971

compiler/rustc_abi/src/layout.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use tracing::debug;
1212
pub trait LayoutCalculator {
1313
type TargetDataLayoutRef: Borrow<TargetDataLayout>;
1414

15-
fn delay_bug(&self, txt: &str);
15+
fn delay_bug(&self, txt: String);
1616
fn current_data_layout(&self) -> Self::TargetDataLayoutRef;
1717

1818
fn scalar_pair(&self, a: Scalar, b: Scalar) -> LayoutS {
@@ -969,7 +969,7 @@ fn univariant(
969969
for &i in &inverse_memory_index {
970970
let field = &fields[i];
971971
if !sized {
972-
this.delay_bug(&format!(
972+
this.delay_bug(format!(
973973
"univariant: field #{} comes after unsized field",
974974
offsets.len(),
975975
));

compiler/rustc_ast_lowering/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ use rustc_errors::{
5858
use rustc_fluent_macro::fluent_messages;
5959
use rustc_hir as hir;
6060
use rustc_hir::def::{DefKind, LifetimeRes, Namespace, PartialRes, PerNS, Res};
61-
use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID};
61+
use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID, LOCAL_CRATE};
6262
use rustc_hir::definitions::DefPathData;
6363
use rustc_hir::{ConstArg, GenericArg, ItemLocalId, ParamName, TraitCandidate};
6464
use rustc_index::{Idx, IndexSlice, IndexVec};
@@ -435,6 +435,7 @@ pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> hir::Crate<'_> {
435435
// Queries that borrow `resolver_for_lowering`.
436436
tcx.ensure_with_value().output_filenames(());
437437
tcx.ensure_with_value().early_lint_checks(());
438+
tcx.ensure_with_value().debugger_visualizers(LOCAL_CRATE);
438439
let (mut resolver, krate) = tcx.resolver_for_lowering(()).steal();
439440

440441
let ast_index = index_crate(&resolver.node_id_to_def_id, &krate);

compiler/rustc_attr/src/builtin.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ use crate::session_diagnostics::{self, IncorrectReprFormatGenericCause};
2323
pub const VERSION_PLACEHOLDER: &str = "CURRENT_RUSTC_VERSION";
2424

2525
pub fn rust_version_symbol() -> Symbol {
26-
let version = option_env!("CFG_VERSION").unwrap_or("<current>");
27-
let version = version.split(' ').next().unwrap();
26+
let version = option_env!("CFG_RELEASE").unwrap_or("<current>");
2827
Symbol::intern(&version)
2928
}
3029

compiler/rustc_borrowck/src/nll.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ pub(super) fn dump_annotation<'tcx>(
430430
fn for_each_region_constraint<'tcx>(
431431
tcx: TyCtxt<'tcx>,
432432
closure_region_requirements: &ClosureRegionRequirements<'tcx>,
433-
with_msg: &mut dyn FnMut(&str) -> io::Result<()>,
433+
with_msg: &mut dyn FnMut(String) -> io::Result<()>,
434434
) -> io::Result<()> {
435435
for req in &closure_region_requirements.outlives_requirements {
436436
let subject = match req.subject {
@@ -439,7 +439,7 @@ fn for_each_region_constraint<'tcx>(
439439
format!("{:?}", ty.instantiate(tcx, |vid| tcx.mk_re_var(vid)))
440440
}
441441
};
442-
with_msg(&format!("where {}: {:?}", subject, req.outlived_free_region,))?;
442+
with_msg(format!("where {}: {:?}", subject, req.outlived_free_region,))?;
443443
}
444444
Ok(())
445445
}

compiler/rustc_borrowck/src/type_check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ macro_rules! span_mirbug {
7171
$crate::type_check::mirbug(
7272
$context.tcx(),
7373
$context.last_span,
74-
&format!(
74+
format!(
7575
"broken MIR in {:?} ({:?}): {}",
7676
$context.body().source.def_id(),
7777
$elem,
@@ -274,7 +274,7 @@ fn translate_outlives_facts(typeck: &mut TypeChecker<'_, '_>) {
274274
}
275275

276276
#[track_caller]
277-
fn mirbug(tcx: TyCtxt<'_>, span: Span, msg: &str) {
277+
fn mirbug(tcx: TyCtxt<'_>, span: Span, msg: String) {
278278
// We sometimes see MIR failures (notably predicate failures) due to
279279
// the fact that we check rvalue sized predicates here. So use `delay_span_bug`
280280
// to avoid reporting bugs in those cases.

compiler/rustc_builtin_macros/src/asm.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ fn expand_preparsed_asm(ecx: &mut ExtCtxt<'_>, args: AsmArgs) -> Option<ast::Inl
550550
if !parser.errors.is_empty() {
551551
let err = parser.errors.remove(0);
552552
let err_sp = template_span.from_inner(InnerSpan::new(err.span.start, err.span.end));
553-
let msg = &format!("invalid asm template string: {}", err.description);
553+
let msg = format!("invalid asm template string: {}", err.description);
554554
let mut e = ecx.struct_span_err(err_sp, msg);
555555
e.span_label(err_sp, err.label + " in asm template string");
556556
if let Some(note) = err.note {
@@ -585,7 +585,7 @@ fn expand_preparsed_asm(ecx: &mut ExtCtxt<'_>, args: AsmArgs) -> Option<ast::Inl
585585
|| args.reg_args.contains(idx)
586586
{
587587
let msg = format!("invalid reference to argument at index {}", idx);
588-
let mut err = ecx.struct_span_err(span, &msg);
588+
let mut err = ecx.struct_span_err(span, msg);
589589
err.span_label(span, "from here");
590590

591591
let positional_args = args.operands.len()
@@ -638,7 +638,7 @@ fn expand_preparsed_asm(ecx: &mut ExtCtxt<'_>, args: AsmArgs) -> Option<ast::Inl
638638
ecx.struct_span_err(
639639
template_span
640640
.from_inner(InnerSpan::new(span.start, span.end)),
641-
&msg,
641+
msg,
642642
)
643643
.emit();
644644
None

compiler/rustc_builtin_macros/src/cfg_eval.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ impl CfgEval<'_, '_> {
166166
))
167167
},
168168
Annotatable::Stmt(_) => |parser| {
169-
Ok(Annotatable::Stmt(P(parser.parse_stmt(ForceCollect::Yes)?.unwrap())))
169+
Ok(Annotatable::Stmt(P(parser
170+
.parse_stmt_without_recovery(false, ForceCollect::Yes)?
171+
.unwrap())))
170172
},
171173
Annotatable::Expr(_) => {
172174
|parser| Ok(Annotatable::Expr(parser.parse_expr_force_collect()?))

compiler/rustc_builtin_macros/src/deriving/clone.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ fn cs_clone_simple(
145145
}
146146
_ => cx.span_bug(
147147
trait_span,
148-
&format!("unexpected substructure in simple `derive({})`", name),
148+
format!("unexpected substructure in simple `derive({})`", name),
149149
),
150150
}
151151
}
@@ -179,10 +179,10 @@ fn cs_clone(
179179
vdata = &variant.data;
180180
}
181181
EnumTag(..) | AllFieldlessEnum(..) => {
182-
cx.span_bug(trait_span, &format!("enum tags in `derive({})`", name,))
182+
cx.span_bug(trait_span, format!("enum tags in `derive({})`", name,))
183183
}
184184
StaticEnum(..) | StaticStruct(..) => {
185-
cx.span_bug(trait_span, &format!("associated function in `derive({})`", name))
185+
cx.span_bug(trait_span, format!("associated function in `derive({})`", name))
186186
}
187187
}
188188

@@ -194,7 +194,7 @@ fn cs_clone(
194194
let Some(ident) = field.name else {
195195
cx.span_bug(
196196
trait_span,
197-
&format!("unnamed field in normal struct in `derive({})`", name,),
197+
format!("unnamed field in normal struct in `derive({})`", name,),
198198
);
199199
};
200200
let call = subcall(cx, field);

compiler/rustc_builtin_macros/src/deriving/generic/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ impl<'a> TraitDef<'a> {
15911591
BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE,
15921592
sp,
15931593
ast::CRATE_NODE_ID,
1594-
&format!(
1594+
format!(
15951595
"{} slice in a packed struct that derives a built-in trait",
15961596
ty
15971597
),

compiler/rustc_builtin_macros/src/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ fn report_invalid_references(
814814
};
815815
e = ecx.struct_span_err(
816816
span,
817-
&format!("invalid reference to positional {} ({})", arg_list, num_args_desc),
817+
format!("invalid reference to positional {} ({})", arg_list, num_args_desc),
818818
);
819819
e.note("positional arguments are zero-based");
820820
}

compiler/rustc_builtin_macros/src/source_util.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@ pub fn expand_include_str(
188188
base::MacEager::expr(cx.expr_str(sp, interned_src))
189189
}
190190
Err(_) => {
191-
cx.span_err(sp, &format!("{} wasn't a utf-8 file", file.display()));
191+
cx.span_err(sp, format!("{} wasn't a utf-8 file", file.display()));
192192
DummyResult::any(sp)
193193
}
194194
},
195195
Err(e) => {
196-
cx.span_err(sp, &format!("couldn't read {}: {}", file.display(), e));
196+
cx.span_err(sp, format!("couldn't read {}: {}", file.display(), e));
197197
DummyResult::any(sp)
198198
}
199199
}
@@ -221,7 +221,7 @@ pub fn expand_include_bytes(
221221
base::MacEager::expr(expr)
222222
}
223223
Err(e) => {
224-
cx.span_err(sp, &format!("couldn't read {}: {}", file.display(), e));
224+
cx.span_err(sp, format!("couldn't read {}: {}", file.display(), e));
225225
DummyResult::any(sp)
226226
}
227227
}

0 commit comments

Comments
 (0)