Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
e191c5e
Make README more complete and easier to follow
jyn514 Aug 17, 2026
4db6ea9
dedup a bunch of stuff from the readme to the contributing guide page
jyn514 Aug 17, 2026
d2bdc50
Fix some typos
ada4a Aug 14, 2026
c0fbeac
Merge pull request #2978 from ada4a/patch-4
tshepang Aug 21, 2026
4a0c2c0
Merge pull request #2973 from jyn514/reorganize-readme
jyn514 Aug 21, 2026
dfad89f
Dedup a bunch of information that's already on Forge
jyn514 Aug 17, 2026
2851cbf
Merge pull request #2979 from jyn514/reorganize-readme
jieyouxu Aug 22, 2026
fe50815
Rename LTA to CTA
fmease Aug 22, 2026
ee1c73a
Merge pull request #2980 from fmease/rn-lta-to-cta
fmease Aug 22, 2026
ce524bd
Prepare for merging from rust-lang/rust
invalid-email-address Aug 24, 2026
cae2073
Merge ref 'da5114692c9e' from rust-lang/rust
invalid-email-address Aug 24, 2026
1d6abd3
Merge pull request #2981 from rust-lang/rustc-pull
tshepang Aug 24, 2026
ac677f3
Expand on MIR type checking, stub region uniquification.
fallible-algebra Aug 24, 2026
150a7c7
Merge pull request #2982 from fallible-algebra/types-overhaul/mir-tyck
fallible-algebra Aug 24, 2026
b6b4989
ci: bump gha checkout action to latest
tshepang Aug 27, 2026
6ab354d
Merge pull request #2984 from rust-lang/bump-check-version
tshepang Aug 27, 2026
6ad648f
fix "all x does is call ./x"
tshepang Aug 27, 2026
ee332aa
Merge pull request #2985 from rust-lang/tshepang-patch-1
tshepang Aug 27, 2026
6f4c240
Install cargo tools with locked dependencies
konstin Aug 20, 2026
9f0850a
touch-ups to "query system" chapter
jyn514 Aug 29, 2026
e1b066f
Merge pull request #2987 from jyn514/query-touchups
jyn514 Aug 29, 2026
99c21c0
Merge pull request #2986 from konstin/konsti/cargo-install-locked
jyn514 Aug 29, 2026
6e12c94
Add a central index of dev-guide reading club discussions
jyn514 Aug 29, 2026
ee7e981
fix warnings when linkcheck is disabled
jyn514 Aug 29, 2026
a98b839
fix outdated docs about what RA config `x setup` generates
jyn514 Aug 29, 2026
8fdb8e8
Merge pull request #2990 from jyn514/build-dirs
jyn514 Aug 29, 2026
a412c65
Merge pull request #2988 from jyn514/reading-club
jieyouxu Aug 29, 2026
7f0706a
add some more compiler internals videos
jyn514 Aug 29, 2026
335ec54
reorganize lectures into subsections
jyn514 Aug 29, 2026
546a3fd
Merge pull request #2992 from jyn514/videos
jyn514 Aug 29, 2026
b0a5058
mechanical typo fixes
jyn514 Aug 29, 2026
a3ed834
Merge pull request #2994 from jyn514/typo-fixes
jyn514 Aug 29, 2026
e3ae9c6
Add a chapter for contributing to the dev-guide itself
jyn514 Aug 29, 2026
3c7294b
Move "compiler documentation" contributing docs to their dedicated ch…
jyn514 Aug 29, 2026
6049a4f
Move general contribution guidance to getting-started.md
jyn514 Aug 29, 2026
294217a
Move "new feature" procedures to their dedicated chapter
jyn514 Aug 29, 2026
9a97447
Move performance guidance to tests/perf.md
jyn514 Aug 29, 2026
344615a
Replace moved procedures with compatibility links
jyn514 Aug 29, 2026
cba9f93
make contributing.md ordering make more sense
jyn514 Aug 29, 2026
c519124
add E-needs-test walkthrough
jyn514 Aug 29, 2026
2dc5412
call out that the test description is important
jyn514 Aug 29, 2026
0023d94
Merge pull request #2995 from jyn514/split-up-contributing-md
jyn514 Aug 31, 2026
e1de9cb
Merge pull request #2989 from jyn514/linkcheck-warnings
jyn514 Sep 1, 2026
954c2d8
add cross-link
jyn514 Sep 1, 2026
34995d2
Merge pull request #2996 from jyn514/needs-test-walkthrough
jyn514 Sep 1, 2026
114d222
mechanical move contributing.md -> pr-lifecycle
jyn514 Aug 29, 2026
d2916f7
reorganize pr-lifecycle sections
jyn514 Aug 29, 2026
8b9969d
move PR info from walkthrough to pr-lifecycle
jyn514 Aug 29, 2026
97ae997
deduplicate and mechanical fixes
jyn514 Aug 29, 2026
93cda05
Merge pull request rust-lang/rustc-dev-guide#2998 from jyn514/pr-life…
reddevilmidzy Sep 2, 2026
f032b0b
update compiler doc- & inline comments to reflect `Option` & `Result`…
MusicalNinjaDad Sep 2, 2026
09d9afe
fix GitHub capitalization
reddevilmidzy Sep 2, 2026
5a96613
Merge pull request rust-lang/rustc-dev-guide#2999 from reddevilmidzy/gh
reddevilmidzy Sep 2, 2026
0854b8d
update ui tests
MusicalNinjaDad Sep 2, 2026
2069b08
clippy - ui tests, docs & comments
MusicalNinjaDad Sep 2, 2026
cf06285
Remove `impl Visitable for (T,)`
nnethercote Sep 2, 2026
aab7df7
Inline and remove `walk_walkable!` macros
nnethercote Sep 2, 2026
1626def
Inline and remove `MutVisitor`-only `visit_span`
nnethercote Sep 2, 2026
1177ad0
Remove optional and unused `(K, Kb)` arg from `impl_walkable!` macros
nnethercote Sep 2, 2026
5503fda
Remove unnecessary `allow`s from `impl_walkable!` macro
nnethercote Sep 2, 2026
1d894d7
Remove many `$($mut)?` occurrences
nnethercote Sep 2, 2026
2c3f8e9
Remove a few more `$($mut)?` occurrences
nnethercote Sep 2, 2026
ebec21b
Streamline `generate_*_fns`
nnethercote Sep 2, 2026
e61c7c4
Improve formatting
nnethercote Sep 2, 2026
60dfe38
Change rust.override-allocator to build.allocator per rust pr 160100
laundmo Sep 3, 2026
c99012d
Merge pull request #3000 from laundmo/fix-override-allocator
BoxyUwU Sep 3, 2026
c0e55d6
sanitizers: Implement support for the sanitize ignorelist
1c3t3a Jun 10, 2026
73e4196
sembr: update lockfile
tshepang Aug 27, 2026
745ce12
sembr: bit confusing when doc comment comes after attribute
tshepang Aug 27, 2026
89f003a
sembr: reduce indentation
tshepang Aug 27, 2026
b523687
sembr: closing tag can be on same line
tshepang Aug 27, 2026
5a84220
sembr: remove strange logic
tshepang Aug 27, 2026
3b53060
sembr: taste
tshepang Aug 27, 2026
dd8e047
sembr: more sensible
tshepang Aug 27, 2026
fda15d9
c-variadic: use `emit_ptr_va_arg` for `va_arg` on `sparc`
folkertdev Aug 6, 2026
90943d4
Generalize Decodable impl for arrays to all types
panstromek Jul 28, 2026
a715f9c
sembr
tshepang Sep 4, 2026
9e02fec
sembr src/borrow-check/type-check.md
tshepang Sep 4, 2026
2fa835f
make -Ctarget-feature warnings more explicitly FCWs
RalfJung Sep 3, 2026
4bd70b1
improve .md
tshepang Sep 4, 2026
8125a6f
sembr src/solve/coinduction.md
tshepang Sep 4, 2026
8e35924
sembr: me want to handle this... manual process for now
tshepang Sep 4, 2026
44db7a2
improve solve/coinduction.md
tshepang Sep 4, 2026
aeee361
sembr src/solve/the-solver.md
tshepang Sep 4, 2026
c4dae33
improve solve/the-solver.md
tshepang Sep 4, 2026
f16ea38
sembr src/the-parser.md
tshepang Sep 4, 2026
504507c
flow
tshepang Sep 4, 2026
3e203c4
Merge pull request #3002 from rust-lang/tshepang/misc
tshepang Sep 4, 2026
f0fd2ca
Rollup merge of #157808 - 1c3t3a:sanitizer-ignorelist, r=rcvalle
JonathanBrouwer Sep 4, 2026
a63c406
Rollup merge of #160660 - folkertdev:sparc-va-arg, r=saethlin
JonathanBrouwer Sep 4, 2026
cd1a188
Rollup merge of #162237 - RalfJung:target-feature, r=JohnTitor
JonathanBrouwer Sep 4, 2026
5b5c9ad
Rollup merge of #160111 - panstromek:generalize-decodable-array, r=mu…
JonathanBrouwer Sep 4, 2026
42ee8e7
Rollup merge of #162174 - MusicalNinjaDad:try_is_never, r=nnethercote
JonathanBrouwer Sep 4, 2026
dfe68c7
Rollup merge of #162226 - nnethercote:clean-up-AST-visitor, r=fee1-dead
JonathanBrouwer Sep 4, 2026
c97aa40
Rollup merge of #162281 - tshepang:rdg-sync, r=tshepang
JonathanBrouwer Sep 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4751,6 +4751,7 @@ name = "rustc_sanitizers"
version = "0.0.0"
dependencies = [
"bitflags",
"libc",
"rustc_abi",
"rustc_data_structures",
"rustc_hir",
Expand Down
93 changes: 33 additions & 60 deletions compiler/rustc_ast/src/mut_visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ where
}
}

impl<V: MutVisitor, T> MutVisitable<V> for (T,)
where
T: MutVisitable<V>,
{
type Extra = T::Extra;
fn visit_mut(&mut self, visitor: &mut V, extra: Self::Extra) {
self.0.visit_mut(visitor, extra);
}
}

impl<V: MutVisitor, T1, T2> MutVisitable<V> for (T1, T2)
where
T1: MutVisitable<V, Extra = ()>,
Expand Down Expand Up @@ -154,23 +144,17 @@ pub trait MutWalkable<V: MutVisitor> {
}

macro_rules! visit_visitable {
(mut $visitor:expr, $($expr:expr),* $(,)?) => {{
($visitor:expr, $($expr:expr),* $(,)?) => {{
$(MutVisitable::visit_mut($expr, $visitor, ());)*
}};
}

macro_rules! visit_visitable_with {
(mut $visitor:expr, $expr:expr, $extra:expr $(,)?) => {
($visitor:expr, $expr:expr, $extra:expr $(,)?) => {
MutVisitable::visit_mut($expr, $visitor, $extra)
};
}

macro_rules! walk_walkable {
($visitor:expr, $expr:expr, mut) => {
MutWalkable::walk_mut($expr, $visitor)
};
}

macro_rules! impl_visitable {
(|&mut $self:ident: $self_ty:ty,
$vis:ident: &mut $vis_ty:ident,
Expand All @@ -186,10 +170,9 @@ macro_rules! impl_visitable {
}

macro_rules! impl_walkable {
($(<$K:ident: $Kb:ident>)? |&mut $self:ident: $self_ty:ty,
(|&mut $self:ident: $self_ty:ty,
$vis:ident: &mut $vis_ty:ident| $block:block) => {
#[allow(unused_parens, non_local_definitions)]
impl<$($K: $Kb,)? $vis_ty: MutVisitor> MutWalkable<$vis_ty> for $self_ty {
impl<$vis_ty: MutVisitor> MutWalkable<$vis_ty> for $self_ty {
fn walk_mut(&mut $self, $vis: &mut $vis_ty) -> V::Result {
$block
}
Expand All @@ -198,15 +181,15 @@ macro_rules! impl_walkable {
}

macro_rules! impl_visitable_noop {
(<mut> $($ty:ty,)*) => {
($($ty:ty,)*) => {
$(
impl_visitable!(|&mut self: $ty, _vis: &mut V, _extra: ()| {});
)*
};
}

macro_rules! impl_visitable_list {
(<mut> $($ty:ty,)*) => {
($($ty:ty,)*) => {
$(impl<V: MutVisitor, T> MutVisitable<V> for $ty
where
for<'a> &'a mut $ty: IntoIterator<Item = &'a mut T>,
Expand All @@ -225,7 +208,7 @@ macro_rules! impl_visitable_list {
}

macro_rules! impl_visitable_direct {
(<mut> $($ty:ty,)*) => {
($($ty:ty,)*) => {
$(impl_visitable!(
|&mut self: $ty, visitor: &mut V, _extra: ()| {
MutWalkable::walk_mut(self, visitor)
Expand All @@ -235,75 +218,61 @@ macro_rules! impl_visitable_direct {
}

macro_rules! impl_visitable_calling_walkable {
(<mut>
(
$( fn $method:ident($ty:ty $(, $extra_name:ident: $extra_ty:ty)?); )*
) => {
$(fn $method(&mut self, node: &mut $ty $(, $extra_name:$extra_ty)?) {
impl_visitable!(|&mut self: $ty, visitor: &mut V, extra: ($($extra_ty)?)| {
let ($($extra_name)?) = extra;
visitor.$method(self $(, $extra_name)?);
});
walk_walkable!(self, node, mut)
MutWalkable::walk_mut(node, self)
})*
}
}

macro_rules! define_named_walk {
((mut) $Visitor:ident
($Visitor:ident
$( pub fn $method:ident($ty:ty); )*
) => {
$(pub fn $method<V: $Visitor>(visitor: &mut V, node: &mut $ty) {
walk_walkable!(visitor, node, mut)
MutWalkable::walk_mut(node, visitor)
})*
};
}

super::common_visitor_and_walkers!((mut) MutVisitor);

macro_rules! generate_flat_map_visitor_fns {
($($name:ident, $Ty:ty, $flat_map_fn:ident$(, $param:ident: $ParamTy:ty)*;)+) => {
($($flat_map_fn:ident, $Ty:ty $(, $param:ident: $ParamTy:ty)?;)+) => {
$(
#[allow(unused_parens)]
impl<V: MutVisitor> MutVisitable<V> for ThinVec<$Ty> {
type Extra = ($($ParamTy),*);
type Extra = ($($ParamTy)?);

#[inline]
fn visit_mut(
&mut self,
visitor: &mut V,
($($param),*): Self::Extra,
) -> V::Result {
$name(visitor, self $(, $param)*)
fn visit_mut(&mut self, visitor: &mut V, ($($param)?): Self::Extra) -> V::Result {
self.flat_map_in_place(|value| visitor.$flat_map_fn(value $(, $param)?));
}
}

fn $name<V: MutVisitor>(
vis: &mut V,
values: &mut ThinVec<$Ty>,
$(
$param: $ParamTy,
)*
) {
values.flat_map_in_place(|value| vis.$flat_map_fn(value$(,$param)*));
}
)+
}
}

generate_flat_map_visitor_fns! {
visit_items, Box<Item>, flat_map_item;
visit_foreign_items, Box<ForeignItem>, flat_map_foreign_item;
visit_generic_params, GenericParam, flat_map_generic_param;
visit_stmts, Stmt, flat_map_stmt;
visit_exprs, Box<Expr>, filter_map_expr;
visit_expr_fields, ExprField, flat_map_expr_field;
visit_pat_fields, PatField, flat_map_pat_field;
visit_variants, Variant, flat_map_variant;
visit_assoc_items, Box<AssocItem>, flat_map_assoc_item, ctxt: AssocCtxt;
visit_where_predicates, WherePredicate, flat_map_where_predicate;
visit_params, Param, flat_map_param;
visit_field_defs, FieldDef, flat_map_field_def;
visit_arms, Arm, flat_map_arm;
flat_map_item, Box<Item>;
flat_map_foreign_item, Box<ForeignItem>;
flat_map_generic_param, GenericParam;
flat_map_stmt, Stmt;
filter_map_expr, Box<Expr>; // the odd one out; it works because `Option` impls `IntoIterator`
flat_map_expr_field, ExprField;
flat_map_pat_field, PatField;
flat_map_variant, Variant;
flat_map_assoc_item, Box<AssocItem>, ctxt: AssocCtxt;
flat_map_where_predicate, WherePredicate;
flat_map_param, Param;
flat_map_field_def, FieldDef;
flat_map_arm, Arm;
}

pub fn walk_flat_map_pat_field<T: MutVisitor>(
Expand All @@ -316,7 +285,11 @@ pub fn walk_flat_map_pat_field<T: MutVisitor>(

macro_rules! generate_walk_flat_map_fns {
($($fn_name:ident($Ty:ty$(,$extra_name:ident: $ExtraTy:ty)*) => $visit_fn_name:ident;)+) => {$(
pub fn $fn_name<V: MutVisitor>(vis: &mut V, mut value: $Ty$(,$extra_name: $ExtraTy)*) -> SmallVec<[$Ty; 1]> {
pub fn $fn_name<V: MutVisitor>(
vis: &mut V,
mut value: $Ty
$(,$extra_name: $ExtraTy)*
) -> SmallVec<[$Ty; 1]> {
vis.$visit_fn_name(&mut value$(,$extra_name)*);
smallvec![value]
}
Expand Down
Loading
Loading