Skip to content

Commit 5be4446

Browse files
author
The Miri Cronjob Bot
committed
Merge from rustc
2 parents 2b29964 + 61bda87 commit 5be4446

File tree

570 files changed

+351708
-1375
lines changed

Some content is hidden

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

570 files changed

+351708
-1375
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 <asp11@sfu.ca> <apoelstra@wpsoftware.net>
4848
Anhad Singh <andypythonappdeveloper@gmail.com>
4949
Antoine Plaskowski <antoine.plaskowski@epitech.eu>
5050
Anton Löfgren <anton.lofgren@gmail.com> <alofgren@op5.com>
51+
apiraino <apiraino@users.noreply.github.com> <apiraino@protonmail.com>
5152
Araam Borhanian <avborhanian@gmail.com>
5253
Araam Borhanian <avborhanian@gmail.com> <dobbybabee@gmail.com>
5354
Areski Belaid <areski@gmail.com> areski <areski@gmail.com>
@@ -62,7 +63,10 @@ Austin Seipp <mad.one@gmail.com> <as@hacks.yi.org>
6263
Ayaz Hafiz <ayaz.hafiz.1@gmail.com>
6364
Aydin Kim <ladinjin@hanmail.net> aydin.kim <aydin.kim@samsung.com>
6465
Ayush Mishra <ayushmishra2005@gmail.com>
66+
Ashley Mannix <kodraus@hey.com> <ashleymannix@live.com.au>
6567
asrar <aszenz@gmail.com>
68+
b-naber <bn263@gmx.de>
69+
b-naber <bn263@gmx.de> <b_naber@gmx.de>
6670
BaoshanPang <pangbw@gmail.com>
6771
Barosl Lee <vcs@barosl.com> Barosl LEE <github@barosl.com>
6872
Bastian Kersting <bastian@cmbt.de>
@@ -98,6 +102,8 @@ Caleb Cartwright <caleb.cartwright@outlook.com>
98102
Caleb Jones <code@calebjones.net>
99103
Noah Lev <camelidcamel@gmail.com>
100104
Noah Lev <camelidcamel@gmail.com> <37223377+camelid@users.noreply.github.com>
105+
Catherine <catherine3.flores@gmail.com>
106+
Catherine <catherine3.flores@gmail.com> <catherine.3.flores@gmail.com>
101107
cameron1024 <cameron.studdstreet@gmail.com>
102108
Camille Gillot <gillot.camille@gmail.com>
103109
Carl-Anton Ingmarsson <mail@carlanton.se> <ca.ingmarsson@gmail.com>
@@ -133,11 +139,13 @@ Clement Miao <clementmiao@gmail.com>
133139
Clément Renault <renault.cle@gmail.com>
134140
Cliff Dyer <jcd@sdf.org>
135141
Clinton Ryan <clint.ryan3@gmail.com>
142+
Taylor Cramer <cramertaylorj@gmail.com> <cramertj@google.com>
136143
ember arlynx <ember@lunar.town> <corey@octayn.net>
137144
Crazycolorz5 <Crazycolorz5@gmail.com>
138145
csmoe <35686186+csmoe@users.noreply.github.com>
139146
Cyryl Płotnicki <cyplo@cyplo.net>
140147
Damien Schoof <damien.schoof@gmail.com>
148+
Dan Gohman <dev@sunfishcode.online> <sunfish@mozilla.com>
141149
Dan Robertson <danlrobertson89@gmail.com>
142150
Daniel Campoverde <alx741@riseup.net>
143151
Daniel J Rollins <drollins@financialforce.com>
@@ -179,10 +187,17 @@ Eduardo Bautista <me@eduardobautista.com> <=>
179187
Eduardo Bautista <me@eduardobautista.com> <mail@eduardobautista.com>
180188
Eduardo Broto <ebroto@tutanota.com>
181189
Edward Shen <code@eddie.sh> <xes@meta.com>
190+
Jacob Finkelman <eh2406@wayne.edu>
191+
Jacob Finkelman <eh2406@wayne.edu> <YeomanYaacov@gmail.com>
192+
Jacob Finkelman <eh2406@wayne.edu> <jfinkelm@amazon.com>
193+
Jacob Finkelman <eh2406@wayne.edu> <finkelman@semcog.org>
194+
Jacob Finkelman <eh2406@wayne.edu> <Eh2406@users.noreply.github.com>
182195
Elliott Slaughter <elliottslaughter@gmail.com> <eslaughter@mozilla.com>
183196
Elly Fong-Jones <elly@leptoquark.net>
184197
Eric Holk <eric.holk@gmail.com> <eholk@cs.indiana.edu>
185198
Eric Holk <eric.holk@gmail.com> <eholk@mozilla.com>
199+
Eric Holk <eric.holk@gmail.com> <eric@theincredibleholk.org>
200+
Eric Holk <eric.holk@gmail.com> <ericholk@microsoft.com>
186201
Eric Holmes <eric@ejholmes.net>
187202
Eric Reed <ecreed@cs.washington.edu> <ereed@mozilla.com>
188203
Erick Tryzelaar <erick.tryzelaar@gmail.com> <etryzelaar@iqt.org>
@@ -206,6 +221,7 @@ Felix S. Klock II <pnkfelix@pnkfx.org> <pnkfelix@mozilla.com>
206221
Félix Saparelli <felix@passcod.name>
207222
Flaper Fesp <flaper87@gmail.com>
208223
Florian Berger <fbergr@gmail.com>
224+
Florian Gilcher <florian.gilcher@asquera.de> <flo@andersground.net>
209225
Florian Wilkens <mrfloya_github@outlook.com> Florian Wilkens <floya@live.de>
210226
François Mockers <mockersf@gmail.com>
211227
Frank Steffahn <fdsteffahn@gmail.com> <frank.steffahn@stu.uni-kiel.de>
@@ -240,6 +256,8 @@ Herman J. Radtke III <herman@hermanradtke.com> Herman J. Radtke III <hermanradtk
240256
Hirochika Matsumoto <git@hkmatsumoto.com> <matsujika@gmail.com>
241257
Hrvoje Nikšić <hniksic@gmail.com>
242258
Hsiang-Cheng Yang <rick68@users.noreply.github.com>
259+
Huon Wilson <dbau.pp@gmail.com>
260+
Huon Wilson <dbau.pp@gmail.com> <wilson.huon@gmail.com>
243261
Ian Jackson <ijackson@chiark.greenend.org.uk> <ian.jackson@citrix.com>
244262
Ian Jackson <ijackson@chiark.greenend.org.uk> <ijackson+github@slimy.greenend.org.uk>
245263
Ian Jackson <ijackson@chiark.greenend.org.uk> <iwj@xenproject.org>
@@ -252,9 +270,13 @@ ivan tkachenko <me@ratijas.tk>
252270
J. J. Weber <jjweber@gmail.com>
253271
Jack Huey <jack.huey@umassmed.edu> <jackh726@gmail.com>
254272
Jacob <jacob.macritchie@gmail.com>
273+
Jacob Hoffman-Andrews <rust@hoffman-andrews.com> <github@hoffman-andrews.com>
255274
Jacob Greenfield <xales@naveria.com>
256275
Jacob Pratt <jacob@jhpratt.dev> <the.z.cuber@gmail.com>
257276
Jacob Pratt <jacob@jhpratt.dev> <jacopratt@tesla.com>
277+
Jake Goulding <jake.goulding@integer32.com>
278+
Jake Goulding <jake.goulding@integer32.com> <jake.goulding@gmail.com>
279+
Jake Goulding <jake.goulding@integer32.com> <shepmaster@mac.com>
258280
Jake Vossen <jake@vossen.dev>
259281
Jakob Degen <jakob.e.degen@gmail.com> <jakob@degen.com>
260282
Jakob Lautrup Nysom <jako3047@gmail.com>
@@ -287,6 +309,7 @@ Jerry Hardee <hardeejj9@gmail.com>
287309
Jesús Rubio <jesusprubio@gmail.com>
288310
Jethro Beekman <github@jbeekman.nl>
289311
Jian Zeng <knight42@mail.ustc.edu.cn>
312+
Jieyou Xu <jieyouxu@outlook.com>
290313
Jieyou Xu <jieyouxu@outlook.com> <39484203+jieyouxu@users.noreply.github.com>
291314
Jihyun Yu <j.yu@navercorp.com> <yjh0502@gmail.com>
292315
Jihyun Yu <j.yu@navercorp.com> jihyun <jihyun@nablecomm.com>
@@ -322,9 +345,12 @@ Josh Holmer <jholmer.in@gmail.com>
322345
Josh Stone <cuviper@gmail.com> <jistone@redhat.com>
323346
Josh Stone <cuviper@gmail.com> <jistone@fedoraproject.org>
324347
Julia Ryan <juliaryan3.14@gmail.com> <josephryan3.14@gmail.com>
348+
Jubilee Young <workingjubilee@gmail.com> <46493976+workingjubilee@users.noreply.github.com>
349+
Jubilee Young <workingjubilee@gmail.com>
325350
Julian Knodt <julianknodt@gmail.com>
326351
jumbatm <jumbatm@gmail.com> <30644300+jumbatm@users.noreply.github.com>
327352
Junyoung Cho <june0.cho@samsung.com>
353+
Jynn Nelson <github@jyn.dev> <rust@jyn.dev>
328354
Jynn Nelson <github@jyn.dev> <jyn514@gmail.com>
329355
Jynn Nelson <github@jyn.dev> <joshua@yottadb.com>
330356
Jynn Nelson <github@jyn.dev> <jyn.nelson@redjack.com>
@@ -385,12 +411,14 @@ Marcell Pardavi <marcell.pardavi@gmail.com>
385411
Marcus Klaas de Vries <mail@marcusklaas.nl>
386412
Margaret Meyerhofer <mmeyerho@andrew.cmu.edu> <mmeyerho@andrew>
387413
Mark Mansi <markm@cs.wisc.edu>
414+
Mark Mansi <markm@cs.wisc.edu> <m.mim95@gmail.com>
388415
Mark Rousskov <mark.simulacrum@gmail.com>
389416
Mark Sinclair <mark.edward.x@gmail.com>
390417
Mark Sinclair <mark.edward.x@gmail.com> =Mark Sinclair <=125axel125@gmail.com>
391418
Markus Legner <markus@legner.ch>
392419
Markus Westerlind <marwes91@gmail.com> Markus <marwes91@gmail.com>
393420
Martin Carton <cartonmartin+git@gmail.com>
421+
Martin Carton <cartonmartin+git@gmail.com> <cartonmartin@gmail.com>
394422
Martin Habovštiak <martin.habovstiak@gmail.com>
395423
Martin Hafskjold Thoresen <martinhath@gmail.com>
396424
Martin Nordholts <martin.nordholts@codetale.se> <enselic@gmail.com>
@@ -415,6 +443,7 @@ Melody Horn <melody@boringcactus.com> <mathphreak@gmail.com>
415443
Mendes <pedro.mendes.26@gmail.com>
416444
mental <m3nta1@yahoo.com>
417445
mibac138 <5672750+mibac138@users.noreply.github.com>
446+
Michael Howell <michael@notriddle.com> <notriddle+rust-mod@protonmail.com>
418447
Michael Williams <m.t.williams@live.com>
419448
Michael Woerister <michaelwoerister@posteo> <michaelwoerister@gmail>
420449
Michael Woerister <michaelwoerister@posteo> <michaelwoerister@gmail.com>
@@ -431,6 +460,7 @@ Ms2ger <ms2ger@gmail.com> <Ms2ger@gmail.com>
431460
msizanoen1 <qtmlabs@protonmail.com>
432461
Mukilan Thiagarajan <mukilanthiagarajan@gmail.com>
433462
Nadrieril Feneanar <Nadrieril@users.noreply.github.com>
463+
Nadrieril Feneanar <Nadrieril@users.noreply.github.com> <nadrieril+rust@gmail.com>
434464
Nadrieril Feneanar <Nadrieril@users.noreply.github.com> <nadrieril+git@gmail.com>
435465
NAKASHIMA, Makoto <makoto.nksm+github@gmail.com> <makoto.nksm@gmail.com>
436466
NAKASHIMA, Makoto <makoto.nksm+github@gmail.com> <makoto.nksm+github@gmail.com>
@@ -447,15 +477,23 @@ Nicholas Bishop <nbishop@nbishop.net> <nicholasbishop@gmail.com>
447477
Nicholas Bishop <nbishop@nbishop.net> <nicholasbishop@google.com>
448478
Nicholas Nethercote <n.nethercote@gmail.com> <nnethercote@apple.com>
449479
Nicholas Nethercote <n.nethercote@gmail.com> <nnethercote@mozilla.com>
480+
Nick Cameron <nrc@ncameron.org> <ncameron@mozilla.com>
481+
Nick Fitzgerald <fitzgen@gmail.com> <nfitzgerald@mozilla.com>
450482
Nick Platt <platt.nicholas@gmail.com>
451483
Niclas Schwarzlose <15schnic@gmail.com>
452484
Nicolas Abram <abramlujan@gmail.com>
453485
Nicole Mazzuca <npmazzuca@gmail.com>
486+
Niko Matsakis <rust@nikomatsakis.com>
487+
Niko Matsakis <rust@nikomatsakis.com> <niko@alum.mit.edu>
488+
Noratrieb <48135649+Noratrieb@users.noreply.github.com>
454489
Noratrieb <48135649+Noratrieb@users.noreply.github.com> <48135649+Nilstrieb@users.noreply.github.com>
455490
Noratrieb <48135649+Noratrieb@users.noreply.github.com> <nilstrieb@gmail.com>
491+
Noratrieb <48135649+Noratrieb@users.noreply.github.com> <rust@noratrieb.dev>
456492
Noratrieb <48135649+Noratrieb@users.noreply.github.com> <nora@noratrieb.dev>
457493
Nif Ward <nif.ward@gmail.com>
458494
Nika Layzell <nika@thelayzells.com> <michael@thelayzells.com>
495+
Nikita Popov <nikita.ppv@gmail.com>
496+
Nikita Popov <nikita.ppv@gmail.com> <npopov@redhat.com>
459497
NODA Kai <nodakai@gmail.com>
460498
Oğuz Ağcayazı <oguz.agcayazi@gmail.com> <oguz.agcayazi@gmail.com>
461499
Oğuz Ağcayazı <oguz.agcayazi@gmail.com> <ouz.agz@gmail.com>
@@ -516,6 +554,7 @@ Ricky Hosfelt <ricky@hosfelt.io>
516554
Ritiek Malhotra <ritiekmalhotra123@gmail.com>
517555
Rob Arnold <robarnold@cs.cmu.edu>
518556
Rob Arnold <robarnold@cs.cmu.edu> Rob Arnold <robarnold@68-26-94-7.pools.spcsdns.net>
557+
Robert Collins <robertc@robertcollins.net> <robertc+rust@robertcollins.net>
519558
Robert Foss <dev@robertfoss.se> robertfoss <dev@robertfoss.se>
520559
Robert Gawdzik <rgawdzik@hotmail.com> Robert Gawdzik ☢ <rgawdzik@hotmail.com>
521560
Robert Habermeier <rphmeier@gmail.com>
@@ -553,7 +592,15 @@ Simon Sapin <simon@exyr.org> <simon.sapin@exyr.org>
553592
Simonas Kazlauskas <git@kazlauskas.me> Simonas Kazlauskas <github@kazlauskas.me>
554593
Simonas Kazlauskas <git@kazlauskas.me> <simonas+t-compiler@kazlauskas.me>
555594
Siva Prasad <sivaauturic@gmail.com>
595+
Skgland <3877590+Skgland@users.noreply.github.com>
596+
Skgland <3877590+Skgland@users.noreply.github.com> <bb-github@t-online.de>
597+
Skgland <3877590+Skgland@users.noreply.github.com> <bennet.blessmann+github@googlemail.com>
556598
Smittyvb <me@smitop.com>
599+
Sophia June Turner <547158+sophiajt@users.noreply.github.com>
600+
Sophia June Turner <547158+sophiajt@users.noreply.github.com> <547158+jntrnr@users.noreply.github.com>
601+
Sophia June Turner <547158+sophiajt@users.noreply.github.com> <jonathandturner@users.noreply.github.com>
602+
Sophia June Turner <547158+sophiajt@users.noreply.github.com> <jturner@mozilla.com>
603+
Sophia June Turner <547158+sophiajt@users.noreply.github.com> <jonathan.d.turner@gmail.com>
557604
Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>
558605
Stanislav Tkach <stanislav.tkach@gmail.com>
559606
startling <tdixon51793@gmail.com>
@@ -586,8 +633,10 @@ Tim Diekmann <t.diekmann.3dv@gmail.com>
586633
Tim Hutt <tdhutt@gmail.com>
587634
Tim JIANG <p90eri@gmail.com>
588635
Tim Joseph Dumol <tim@timdumol.com>
636+
Tim Neumann <mail@timnn.me> <timnn@google.com>
589637
Timothy Maloney <tmaloney@pdx.edu>
590638
Tomas Koutsky <tomas@stepnivlk.net>
639+
Tomasz Miąsko <tomasz.miasko@gmail.com>
591640
Torsten Weber <TorstenWeber12@gmail.com>
592641
Torsten Weber <TorstenWeber12@gmail.com> <torstenweber12@gmail.com>
593642
Trevor Gross <tmgross@umich.edu> <t.gross35@gmail.com>
@@ -607,7 +656,9 @@ Valerii Lashmanov <vflashm@gmail.com>
607656
Vitali Haravy <HumaneProgrammer@gmail.com> Vitali Haravy <humaneprogrammer@gmail.com>
608657
Vitaly Shukela <vi0oss@gmail.com>
609658
Waffle Lapkin <waffle.lapkin@gmail.com>
610-
Waffle Lapkin <waffle.lapkin@tasking.com>
659+
Waffle Lapkin <waffle.lapkin@gmail.com> <waffle.lapkin@tasking.com>
660+
Weihang Lo <me@weihanglo.tw>
661+
Weihang Lo <me@weihanglo.tw> <weihanglo@users.noreply.github.com>
611662
Wesley Wiser <wwiser@gmail.com> <wesleywiser@microsoft.com>
612663
whitequark <whitequark@whitequark.org>
613664
William Ting <io@williamting.com> <william.h.ting@gmail.com>

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)