Skip to content

Commit 26f09b5

Browse files
authored
Merge pull request rust-lang#4120 from rust-lang/rustup-2025-01-03
Automatic Rustup
2 parents 6118879 + 5be4446 commit 26f09b5

File tree

571 files changed

+351709
-1376
lines changed

Some content is hidden

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

571 files changed

+351709
-1376
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
path = library/stdarch
2323
url = https://github.com/rust-lang/stdarch.git
2424
shallow = true
25-
[submodule "src/doc/rustc-dev-guide"]
26-
path = src/doc/rustc-dev-guide
27-
url = https://github.com/rust-lang/rustc-dev-guide.git
28-
shallow = true
2925
[submodule "src/doc/edition-guide"]
3026
path = src/doc/edition-guide
3127
url = https://github.com/rust-lang/edition-guide.git

.mailmap

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Andrew Poelstra <[email protected]> <[email protected]>
4848
Anhad Singh <[email protected]>
4949
Antoine Plaskowski <[email protected]>
5050
51+
5152
Araam Borhanian <[email protected]>
5253
5354
Areski Belaid <[email protected]> areski <[email protected]>
@@ -62,7 +63,10 @@ Austin Seipp <[email protected]> <[email protected]>
6263
Ayaz Hafiz <[email protected]>
6364
Aydin Kim <[email protected]> aydin.kim <[email protected]>
6465
Ayush Mishra <[email protected]>
66+
6567
68+
69+
6670
BaoshanPang <[email protected]>
6771
Barosl Lee <[email protected]> Barosl LEE <[email protected]>
6872
Bastian Kersting <[email protected]>
@@ -98,6 +102,8 @@ Caleb Cartwright <[email protected]>
98102
Caleb Jones <[email protected]>
99103
100104
105+
Catherine <[email protected]>
106+
101107
cameron1024 <[email protected]>
102108
Camille Gillot <[email protected]>
103109
Carl-Anton Ingmarsson <[email protected]> <[email protected]>
@@ -133,11 +139,13 @@ Clement Miao <[email protected]>
133139
Clément Renault <[email protected]>
134140
Cliff Dyer <[email protected]>
135141
Clinton Ryan <[email protected]>
142+
136143
137144
Crazycolorz5 <[email protected]>
138145
139146
Cyryl Płotnicki <[email protected]>
140147
Damien Schoof <[email protected]>
148+
141149
Dan Robertson <[email protected]>
142150
Daniel Campoverde <[email protected]>
143151
Daniel J Rollins <[email protected]>
@@ -179,10 +187,17 @@ Eduardo Bautista <[email protected]> <=>
179187
180188
Eduardo Broto <[email protected]>
181189
190+
Jacob Finkelman <[email protected]>
191+
192+
193+
194+
182195
183196
Elly Fong-Jones <[email protected]>
184197
185198
199+
200+
186201
Eric Holmes <[email protected]>
187202
188203
@@ -206,6 +221,7 @@ Felix S. Klock II <[email protected]> <[email protected]>
206221
Félix Saparelli <[email protected]>
207222
Flaper Fesp <[email protected]>
208223
Florian Berger <[email protected]>
224+
209225
Florian Wilkens <[email protected]> Florian Wilkens <[email protected]>
210226
François Mockers <[email protected]>
211227
@@ -240,6 +256,8 @@ Herman J. Radtke III <[email protected]> Herman J. Radtke III <hermanradtk
240256
Hirochika Matsumoto <[email protected]> <[email protected]>
241257
Hrvoje Nikšić <[email protected]>
242258
Hsiang-Cheng Yang <[email protected]>
259+
Huon Wilson <[email protected]>
260+
243261
244262
245263
@@ -252,9 +270,13 @@ ivan tkachenko <[email protected]>
252270
J. J. Weber <[email protected]>
253271
254272
273+
Jacob Hoffman-Andrews <[email protected]> <[email protected]>
255274
Jacob Greenfield <[email protected]>
256275
257276
277+
Jake Goulding <[email protected]>
278+
279+
258280
Jake Vossen <[email protected]>
259281
260282
Jakob Lautrup Nysom <[email protected]>
@@ -287,6 +309,7 @@ Jerry Hardee <[email protected]>
287309
Jesús Rubio <[email protected]>
288310
Jethro Beekman <[email protected]>
289311
Jian Zeng <[email protected]>
312+
Jieyou Xu <[email protected]>
290313
291314
292315
@@ -322,9 +345,12 @@ Josh Holmer <[email protected]>
322345
323346
324347
348+
349+
Jubilee Young <[email protected]>
325350
Julian Knodt <[email protected]>
326351
327352
Junyoung Cho <[email protected]>
353+
328354
329355
330356
@@ -385,12 +411,14 @@ Marcell Pardavi <[email protected]>
385411
Marcus Klaas de Vries <[email protected]>
386412
Margaret Meyerhofer <[email protected]> <mmeyerho@andrew>
387413
Mark Mansi <[email protected]>
414+
388415
Mark Rousskov <[email protected]>
389416
Mark Sinclair <[email protected]>
390417
Mark Sinclair <[email protected]> =Mark Sinclair <[email protected]>
391418
Markus Legner <[email protected]>
392419
Markus Westerlind <[email protected]> Markus <[email protected]>
393420
Martin Carton <[email protected]>
421+
394422
Martin Habovštiak <[email protected]>
395423
Martin Hafskjold Thoresen <[email protected]>
396424
@@ -415,6 +443,7 @@ Melody Horn <[email protected]> <[email protected]>
415443
416444
417445
446+
418447
Michael Williams <[email protected]>
419448
Michael Woerister <michaelwoerister@posteo> <michaelwoerister@gmail>
420449
Michael Woerister <michaelwoerister@posteo> <[email protected]>
@@ -431,6 +460,7 @@ Ms2ger <[email protected]> <[email protected]>
431460
msizanoen1 <[email protected]>
432461
Mukilan Thiagarajan <[email protected]>
433462
Nadrieril Feneanar <[email protected]>
463+
Nadrieril Feneanar <[email protected]> <[email protected]>
434464
Nadrieril Feneanar <[email protected]> <[email protected]>
435465
436466
@@ -447,15 +477,23 @@ Nicholas Bishop <[email protected]> <[email protected]>
447477
448478
Nicholas Nethercote <[email protected]> <[email protected]>
449479
Nicholas Nethercote <[email protected]> <[email protected]>
480+
481+
450482
Nick Platt <[email protected]>
451483
Niclas Schwarzlose <[email protected]>
452484
Nicolas Abram <[email protected]>
453485
Nicole Mazzuca <[email protected]>
486+
Niko Matsakis <[email protected]>
487+
488+
Noratrieb <[email protected]>
454489
455490
491+
456492
457493
458494
495+
Nikita Popov <[email protected]>
496+
459497
460498
461499
@@ -516,6 +554,7 @@ Ricky Hosfelt <[email protected]>
516554
Ritiek Malhotra <[email protected]>
517555
Rob Arnold <[email protected]>
518556
Rob Arnold <[email protected]> Rob Arnold <[email protected]>
557+
519558
Robert Foss <[email protected]> robertfoss <[email protected]>
520559
Robert Gawdzik <[email protected]> Robert Gawdzik ☢ <[email protected]>
521560
Robert Habermeier <[email protected]>
@@ -553,7 +592,15 @@ Simon Sapin <[email protected]> <[email protected]>
553592
Simonas Kazlauskas <[email protected]> Simonas Kazlauskas <[email protected]>
554593
Simonas Kazlauskas <[email protected]> <[email protected]>
555594
Siva Prasad <[email protected]>
595+
596+
597+
556598
599+
Sophia June Turner <[email protected]>
600+
Sophia June Turner <[email protected]> <[email protected]>
601+
Sophia June Turner <[email protected]> <[email protected]>
602+
Sophia June Turner <[email protected]> <[email protected]>
603+
Sophia June Turner <[email protected]> <[email protected]>
557604
Srinivas Reddy Thatiparthy <[email protected]>
558605
Stanislav Tkach <[email protected]>
559606
startling <[email protected]>
@@ -586,8 +633,10 @@ Tim Diekmann <[email protected]>
586633
587634
Tim JIANG <[email protected]>
588635
Tim Joseph Dumol <[email protected]>
636+
589637
Timothy Maloney <[email protected]>
590638
Tomas Koutsky <[email protected]>
639+
Tomasz Miąsko <[email protected]>
591640
Torsten Weber <[email protected]>
592641
593642
@@ -607,7 +656,9 @@ Valerii Lashmanov <[email protected]>
607656
Vitali Haravy <[email protected]> Vitali Haravy <[email protected]>
608657
Vitaly Shukela <[email protected]>
609658
Waffle Lapkin <[email protected]>
610-
Waffle Lapkin <[email protected]>
659+
660+
Weihang Lo <[email protected]>
661+
611662
612663
whitequark <[email protected]>
613664

compiler/rustc_abi/src/lib.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,38 @@
88
#![warn(unreachable_pub)]
99
// tidy-alphabetical-end
1010

11+
/*! ABI handling for rustc
12+
13+
## What is an "ABI"?
14+
15+
Literally, "application binary interface", which means it is everything about how code interacts,
16+
at the machine level, with other code. This means it technically covers all of the following:
17+
- object binary format for e.g. relocations or offset tables
18+
- in-memory layout of types
19+
- procedure calling conventions
20+
21+
When we discuss "ABI" in the context of rustc, we are probably discussing calling conventions.
22+
To describe those `rustc_abi` also covers type layout, as it must for values passed on the stack.
23+
Despite `rustc_abi` being about calling conventions, it is good to remember these usages exist.
24+
You will encounter all of them and more if you study target-specific codegen enough!
25+
Even in general conversation, when someone says "the Rust ABI is unstable", it may allude to
26+
either or both of
27+
- `repr(Rust)` types have a mostly-unspecified layout
28+
- `extern "Rust" fn(A) -> R` has an unspecified calling convention
29+
30+
## Crate Goal
31+
32+
ABI is a foundational concept, so the `rustc_abi` crate serves as an equally foundational crate.
33+
It cannot carry all details relevant to an ABI: those permeate code generation and linkage.
34+
Instead, `rustc_abi` is intended to provide the interface for reasoning about the binary interface.
35+
It should contain traits and types that other crates then use in their implementation.
36+
For example, a platform's `extern "C" fn` calling convention will be implemented in `rustc_target`
37+
but `rustc_abi` contains the types for calculating layout and describing register-passing.
38+
This makes it easier to describe things in the same way across targets, codegen backends, and
39+
even other Rust compilers, such as rust-analyzer!
40+
41+
*/
42+
1143
use std::fmt;
1244
#[cfg(feature = "nightly")]
1345
use std::iter::Step;

compiler/rustc_ast/src/ast.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,15 @@ impl AngleBracketedArg {
241241
}
242242
}
243243

244-
impl Into<P<GenericArgs>> for AngleBracketedArgs {
245-
fn into(self) -> P<GenericArgs> {
246-
P(GenericArgs::AngleBracketed(self))
244+
impl From<AngleBracketedArgs> for P<GenericArgs> {
245+
fn from(val: AngleBracketedArgs) -> Self {
246+
P(GenericArgs::AngleBracketed(val))
247247
}
248248
}
249249

250-
impl Into<P<GenericArgs>> for ParenthesizedArgs {
251-
fn into(self) -> P<GenericArgs> {
252-
P(GenericArgs::Parenthesized(self))
250+
impl From<ParenthesizedArgs> for P<GenericArgs> {
251+
fn from(val: ParenthesizedArgs) -> Self {
252+
P(GenericArgs::Parenthesized(val))
253253
}
254254
}
255255

compiler/rustc_ast/src/expand/autodiff_attrs.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use std::fmt::{self, Display, Formatter};
77
use std::str::FromStr;
88

9-
use crate::expand::typetree::TypeTree;
109
use crate::expand::{Decodable, Encodable, HashStable_Generic};
1110
use crate::ptr::P;
1211
use crate::{Ty, TyKind};
@@ -79,10 +78,6 @@ pub struct AutoDiffItem {
7978
/// The name of the function being generated
8079
pub target: String,
8180
pub attrs: AutoDiffAttrs,
82-
/// Describe the memory layout of input types
83-
pub inputs: Vec<TypeTree>,
84-
/// Describe the memory layout of the output type
85-
pub output: TypeTree,
8681
}
8782
#[derive(Clone, Eq, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
8883
pub struct AutoDiffAttrs {
@@ -262,22 +257,14 @@ impl AutoDiffAttrs {
262257
!matches!(self.mode, DiffMode::Error | DiffMode::Source)
263258
}
264259

265-
pub fn into_item(
266-
self,
267-
source: String,
268-
target: String,
269-
inputs: Vec<TypeTree>,
270-
output: TypeTree,
271-
) -> AutoDiffItem {
272-
AutoDiffItem { source, target, inputs, output, attrs: self }
260+
pub fn into_item(self, source: String, target: String) -> AutoDiffItem {
261+
AutoDiffItem { source, target, attrs: self }
273262
}
274263
}
275264

276265
impl fmt::Display for AutoDiffItem {
277266
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
278267
write!(f, "Differentiating {} -> {}", self.source, self.target)?;
279-
write!(f, " with attributes: {:?}", self.attrs)?;
280-
write!(f, " with inputs: {:?}", self.inputs)?;
281-
write!(f, " with output: {:?}", self.output)
268+
write!(f, " with attributes: {:?}", self.attrs)
282269
}
283270
}

compiler/rustc_ast/src/format.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use rustc_span::{Ident, Span, Symbol};
44

55
use crate::Expr;
66
use crate::ptr::P;
7+
use crate::token::LitKind;
78

89
// Definitions:
910
//
@@ -45,6 +46,10 @@ pub struct FormatArgs {
4546
pub span: Span,
4647
pub template: Vec<FormatArgsPiece>,
4748
pub arguments: FormatArguments,
49+
/// The raw, un-split format string literal, with no escaping or processing.
50+
///
51+
/// Generally only useful for lints that care about the raw bytes the user wrote.
52+
pub uncooked_fmt_str: (LitKind, Symbol),
4853
}
4954

5055
/// A piece of a format template string.

compiler/rustc_ast/src/mut_visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ fn walk_inline_asm_sym<T: MutVisitor>(
15961596

15971597
fn walk_format_args<T: MutVisitor>(vis: &mut T, fmt: &mut FormatArgs) {
15981598
// FIXME: visit the template exhaustively.
1599-
let FormatArgs { span, template: _, arguments } = fmt;
1599+
let FormatArgs { span, template: _, arguments, uncooked_fmt_str: _ } = fmt;
16001600
for FormatArgument { kind, expr } in arguments.all_args_mut() {
16011601
match kind {
16021602
FormatArgumentKind::Named(ident) | FormatArgumentKind::Captured(ident) => {

compiler/rustc_ast/src/ptr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ impl<T> From<Vec<T>> for P<[T]> {
158158
}
159159
}
160160

161-
impl<T> Into<Vec<T>> for P<[T]> {
162-
fn into(self) -> Vec<T> {
163-
self.into_vec()
161+
impl<T> From<P<[T]>> for Vec<T> {
162+
fn from(val: P<[T]>) -> Self {
163+
val.into_vec()
164164
}
165165
}
166166

compiler/rustc_ast/src/visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ pub fn walk_inline_asm_sym<'a, V: Visitor<'a>>(
10611061
}
10621062

10631063
pub fn walk_format_args<'a, V: Visitor<'a>>(visitor: &mut V, fmt: &'a FormatArgs) -> V::Result {
1064-
let FormatArgs { span: _, template: _, arguments } = fmt;
1064+
let FormatArgs { span: _, template: _, arguments, uncooked_fmt_str: _ } = fmt;
10651065
for FormatArgument { kind, expr } in arguments.all_args() {
10661066
match kind {
10671067
FormatArgumentKind::Named(ident) | FormatArgumentKind::Captured(ident) => {

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,11 +1845,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
18451845
GenericParamKind::Lifetime => {
18461846
// AST resolution emitted an error on those parameters, so we lower them using
18471847
// `ParamName::Error`.
1848+
let ident = self.lower_ident(param.ident);
18481849
let param_name =
18491850
if let Some(LifetimeRes::Error) = self.resolver.get_lifetime_res(param.id) {
1850-
ParamName::Error
1851+
ParamName::Error(ident)
18511852
} else {
1852-
let ident = self.lower_ident(param.ident);
18531853
ParamName::Plain(ident)
18541854
};
18551855
let kind =

0 commit comments

Comments
 (0)