Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e4c6a7c

Browse files
committedOct 2, 2023
add few more items to sync list. NB: not every entry is checked if code actually in sync, should be reviewed
1 parent 3a0ea27 commit e4c6a7c

File tree

31 files changed

+137
-9
lines changed

31 files changed

+137
-9
lines changed
 

‎compiler/rustc_ast/src/token.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ impl Lit {
104104
}
105105
}
106106

107+
// tidy-ticket-ast-from_token
107108
/// Keep this in sync with `Token::can_begin_literal_or_bool` excluding unary negation.
108109
pub fn from_token(token: &Token) -> Option<Lit> {
109110
match token.uninterpolate().kind {
@@ -120,6 +121,7 @@ impl Lit {
120121
_ => None,
121122
}
122123
}
124+
// tidy-ticket-ast-from_token
123125
}
124126

125127
impl fmt::Display for Lit {
@@ -545,6 +547,7 @@ impl Token {
545547
///
546548
/// In other words, would this token be a valid start of `parse_literal_maybe_minus`?
547549
///
550+
// tidy-ticket-ast-can_begin_literal_maybe_minus
548551
/// Keep this in sync with and `Lit::from_token`, excluding unary negation.
549552
pub fn can_begin_literal_maybe_minus(&self) -> bool {
550553
match self.uninterpolate().kind {
@@ -564,6 +567,7 @@ impl Token {
564567
_ => false,
565568
}
566569
}
570+
// tidy-ticket-ast-can_begin_literal_maybe_minus
567571

568572
/// A convenience function for matching on identifiers during parsing.
569573
/// Turns interpolated identifier (`$i: ident`) or lifetime (`$l: lifetime`) token

‎compiler/rustc_builtin_macros/src/assert/context.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ impl<'cx, 'a> Context<'cx, 'a> {
292292
}
293293
// Expressions that are not worth or can not be captured.
294294
//
295+
// tidy-ticket-all-expr-kinds
295296
// Full list instead of `_` to catch possible future inclusions and to
296297
// sync with the `rfc-2011-nicer-assert-messages/all-expr-kinds.rs` test.
297298
ExprKind::Assign(_, _, _)
@@ -323,6 +324,7 @@ impl<'cx, 'a> Context<'cx, 'a> {
323324
| ExprKind::Yeet(_)
324325
| ExprKind::Become(_)
325326
| ExprKind::Yield(_) => {}
327+
// tidy-ticket-all-expr-kinds
326328
}
327329
}
328330

‎compiler/rustc_codegen_ssa/src/back/write.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ impl<B: WriteBackendMethods> WorkItem<B> {
714714
}
715715
}
716716

717+
// tidy-ticket-short_description
717718
/// Generate a short description of this work item suitable for use as a thread name.
718719
fn short_description(&self) -> String {
719720
// `pthread_setname()` on *nix ignores anything beyond the first 15
@@ -761,6 +762,7 @@ impl<B: WriteBackendMethods> WorkItem<B> {
761762
WorkItem::LTO(m) => desc("lto", "LTO module", m.name()),
762763
}
763764
}
765+
// tidy-ticket-short_description
764766
}
765767

766768
/// A result produced by the backend.

‎compiler/rustc_const_eval/src/interpret/projection.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ where
149149
None => {
150150
// For unsized types with an extern type tail we perform no adjustments.
151151
// NOTE: keep this in sync with `PlaceRef::project_field` in the codegen backend.
152+
// FIXME: that one? compiler/rustc_codegen_ssa/src/mir/place.rs
152153
assert!(matches!(base_meta, MemPlaceMeta::None));
153154
(base_meta, offset)
154155
}

‎compiler/rustc_const_eval/src/interpret/validity.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
505505
Ok(true)
506506
}
507507
ty::Float(_) | ty::Int(_) | ty::Uint(_) => {
508+
// tidy-ticket-try_visit_primitive
508509
// NOTE: Keep this in sync with the array optimization for int/float
509510
// types below!
510511
self.read_scalar(
@@ -516,6 +517,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
516517
},
517518
)?;
518519
Ok(true)
520+
// tidy-ticket-try_visit_primitive
519521
}
520522
ty::RawPtr(..) => {
521523
let place =
@@ -778,9 +780,10 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
778780
}
779781
};
780782

783+
// tidy-ticket-visit_value
781784
// Optimization: we just check the entire range at once.
782785
// NOTE: Keep this in sync with the handling of integer and float
783-
// types above, in `visit_primitive`.
786+
// types above, in `try_visit_primitive`.
784787
// In run-time mode, we accept pointers in here. This is actually more
785788
// permissive than a per-element check would be, e.g., we accept
786789
// a &[u8] that contains a pointer even though bytewise checking would
@@ -820,6 +823,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
820823
}
821824
}
822825
}
826+
// tidy-ticket-visit_value
823827
}
824828
// Fast path for arrays and slices of ZSTs. We only need to check a single ZST element
825829
// of an array and not all of them, because there's only a single value of a specific

‎compiler/rustc_data_structures/src/profiling.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ bitflags::bitflags! {
125125
}
126126
}
127127

128+
// tidy-ticket-self-profile-events
128129
// keep this in sync with the `-Z self-profile-events` help message in rustc_session/options.rs
129130
const EVENT_FILTERS_BY_NAME: &[(&str, EventFilter)] = &[
130131
("none", EventFilter::empty()),
@@ -142,6 +143,7 @@ const EVENT_FILTERS_BY_NAME: &[(&str, EventFilter)] = &[
142143
("incr-result-hashing", EventFilter::INCR_RESULT_HASHING),
143144
("artifact-sizes", EventFilter::ARTIFACT_SIZES),
144145
];
146+
// tidy-ticket-self-profile-events
145147

146148
/// Something that uniquely identifies a query invocation.
147149
pub struct QueryInvocationId(pub u32);

‎compiler/rustc_errors/src/json.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ struct FutureIncompatReport {
322322
future_incompat_report: Vec<FutureBreakageItem>,
323323
}
324324

325+
// tidy-ticket-UnusedExterns
326+
// FIXME: where it located in cargo?
325327
// NOTE: Keep this in sync with the equivalent structs in rustdoc's
326328
// doctest component (as well as cargo).
327329
// We could unify this struct the one in rustdoc but they have different
@@ -333,6 +335,7 @@ struct UnusedExterns<'a, 'b, 'c> {
333335
/// List of unused externs by their names.
334336
unused_extern_names: &'b [&'c str],
335337
}
338+
// tidy-ticket-UnusedExterns
336339

337340
impl Diagnostic {
338341
fn from_errors_diagnostic(diag: &crate::Diagnostic, je: &JsonEmitter) -> Diagnostic {

‎compiler/rustc_hir_analysis/src/check/region.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ fn resolve_block<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, blk: &'tcx h
119119
visitor.cx.var_parent = visitor.cx.parent;
120120

121121
{
122+
// FIXME: sync with exactly where?
122123
// This block should be kept approximately in sync with
123124
// `intravisit::walk_block`. (We manually walk the block, rather
124125
// than call `walk_block`, in order to maintain precise

‎compiler/rustc_hir_analysis/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,12 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
208208
});
209209
})?;
210210

211+
// tidy-ticket-sess-time-item_types_checking
211212
// NOTE: This is copy/pasted in librustdoc/core.rs and should be kept in sync.
212213
tcx.sess.time("item_types_checking", || {
213214
tcx.hir().for_each_module(|module| tcx.ensure().check_mod_item_types(module))
214215
});
216+
// tidy-ticket-sess-time-item_types_checking
215217

216218
// Freeze definitions as we don't add new ones at this point. This improves performance by
217219
// allowing lock-free access to them.

‎compiler/rustc_middle/src/ty/util.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ impl<'tcx> TyCtxt<'tcx> {
653653
&& !self.is_foreign_item(def_id)
654654
}
655655

656+
// tidy-ticket-thread_local_ptr_ty
656657
/// Returns the type a reference to the thread local takes in MIR.
657658
pub fn thread_local_ptr_ty(self, def_id: DefId) -> Ty<'tcx> {
658659
let static_ty = self.type_of(def_id).instantiate_identity();
@@ -665,6 +666,7 @@ impl<'tcx> TyCtxt<'tcx> {
665666
Ty::new_imm_ref(self, self.lifetimes.re_static, static_ty)
666667
}
667668
}
669+
// tidy-ticket-thread_local_ptr_ty
668670

669671
/// Get the type of the pointer to the static that we use in MIR.
670672
pub fn static_ptr_ty(self, def_id: DefId) -> Ty<'tcx> {
@@ -674,7 +676,9 @@ impl<'tcx> TyCtxt<'tcx> {
674676
self.type_of(def_id).instantiate_identity(),
675677
);
676678

679+
// tidy-ticket-static_ptr_ty
677680
// Make sure that accesses to unsafe statics end up using raw pointers.
681+
// FIXME: should it said sync with thread_local_ptr_ty?
678682
// For thread-locals, this needs to be kept in sync with `Rvalue::ty`.
679683
if self.is_mutable_static(def_id) {
680684
Ty::new_mut_ptr(self, static_ty)
@@ -683,6 +687,7 @@ impl<'tcx> TyCtxt<'tcx> {
683687
} else {
684688
Ty::new_imm_ref(self, self.lifetimes.re_erased, static_ty)
685689
}
690+
// tidy-ticket-static_ptr_ty
686691
}
687692

688693
/// Return the set of types that should be taken into account when checking

‎compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ impl<'tcx> Constructor<'tcx> {
671671
}
672672
}
673673

674+
// tidy-ticket-arity
674675
/// The number of fields for this constructor. This must be kept in sync with
675676
/// `Fields::wildcards`.
676677
pub(super) fn arity(&self, pcx: &PatCtxt<'_, '_, 'tcx>) -> usize {
@@ -702,6 +703,7 @@ impl<'tcx> Constructor<'tcx> {
702703
Or => bug!("The `Or` constructor doesn't have a fixed arity"),
703704
}
704705
}
706+
// tidy-ticket-arity
705707

706708
/// Some constructors (namely `Wildcard`, `IntRange` and `Slice`) actually stand for a set of actual
707709
/// constructors (like variants, integers or fixed-sized slices). When specializing for these
@@ -749,6 +751,7 @@ impl<'tcx> Constructor<'tcx> {
749751
}
750752
}
751753

754+
// tidy-ticket-is_covered_by
752755
/// Returns whether `self` is covered by `other`, i.e. whether `self` is a subset of `other`.
753756
/// For the simple cases, this is simply checking for equality. For the "grouped" constructors,
754757
/// this checks for inclusion.
@@ -802,7 +805,9 @@ impl<'tcx> Constructor<'tcx> {
802805
),
803806
}
804807
}
808+
// tidy-ticket-is_covered_by
805809

810+
// tidy-ticket-is_covered_by_any
806811
/// Faster version of `is_covered_by` when applied to many constructors. `used_ctors` is
807812
/// assumed to be built from `matrix.head_ctors()` with wildcards and opaques filtered out,
808813
/// and `self` is assumed to have been split from a wildcard.
@@ -835,6 +840,7 @@ impl<'tcx> Constructor<'tcx> {
835840
}
836841
}
837842
}
843+
// tidy-ticket-is_covered_by_any
838844
}
839845

840846
/// A wildcard constructor that we split relative to the constructors in the matrix, as explained
@@ -1144,6 +1150,7 @@ impl<'p, 'tcx> Fields<'p, 'tcx> {
11441150
})
11451151
}
11461152

1153+
// tidy-ticket-wildcards
11471154
/// Creates a new list of wildcard fields for a given constructor. The result must have a
11481155
/// length of `constructor.arity()`.
11491156
#[instrument(level = "trace")]
@@ -1188,6 +1195,7 @@ impl<'p, 'tcx> Fields<'p, 'tcx> {
11881195
debug!(?ret);
11891196
ret
11901197
}
1198+
// tidy-ticket-wildcards
11911199

11921200
/// Returns the list of patterns.
11931201
pub(super) fn iter_patterns<'a>(

‎compiler/rustc_monomorphize/src/partitioning.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,13 +473,16 @@ fn merge_codegen_units<'tcx>(
473473
codegen_units.sort_by_key(|cgu| cmp::Reverse(cgu.size_estimate()));
474474
let num_digits = codegen_units.len().ilog10() as usize + 1;
475475
for (index, cgu) in codegen_units.iter_mut().enumerate() {
476+
// tidy-ticket-short_description
477+
// FIXME: is it sync?
476478
// Note: `WorkItem::short_description` depends on this name ending
477479
// with `-cgu.` followed by a numeric suffix. Please keep it in
478480
// sync with this code.
479481
let suffix = format!("{index:0num_digits$}");
480482
let numbered_codegen_unit_name =
481483
cgu_name_builder.build_cgu_name_no_mangle(LOCAL_CRATE, &["cgu"], Some(suffix));
482484
cgu.set_name(numbered_codegen_unit_name);
485+
// tidy-ticket-short_description
483486
}
484487
}
485488
}

‎compiler/rustc_parse/src/parser/expr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,6 +2081,7 @@ impl<'a> Parser<'a> {
20812081
}
20822082
}
20832083

2084+
// tidy-ticket-rustc_parse-can_begin_literal_maybe_minus
20842085
/// Matches `'-' lit | lit` (cf. `ast_validation::AstValidator::check_expr_within_pat`).
20852086
/// Keep this in sync with `Token::can_begin_literal_maybe_minus`.
20862087
pub fn parse_literal_maybe_minus(&mut self) -> PResult<'a, P<Expr>> {
@@ -2097,6 +2098,7 @@ impl<'a> Parser<'a> {
20972098
Ok(expr)
20982099
}
20992100
}
2101+
// tidy-ticket-rustc_parse-can_begin_literal_maybe_minus
21002102

21012103
fn is_array_like_block(&mut self) -> bool {
21022104
self.look_ahead(1, |t| matches!(t.kind, TokenKind::Ident(..) | TokenKind::Literal(_)))

‎compiler/rustc_session/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,7 @@ pub const fn default_lib_output() -> CrateType {
12101210

12111211
fn default_configuration(sess: &Session) -> CrateConfig {
12121212
// NOTE: This should be kept in sync with `CrateCheckConfig::fill_well_known` below.
1213+
// FIXME: what exactly sync there?
12131214
let end = &sess.target.endian;
12141215
let arch = &sess.target.arch;
12151216
let wordsz = sess.target.pointer_width.to_string();

‎compiler/rustc_session/src/config/sigpipe.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// tidy-ticket-sigpipe
12
//! NOTE: Keep these constants in sync with `library/std/src/sys/unix/mod.rs`!
23
34
/// The default value if `#[unix_sigpipe]` is not specified. This resolves
@@ -23,3 +24,4 @@ pub const SIG_IGN: u8 = 2;
2324
/// such as `head -n 1`.
2425
#[allow(dead_code)]
2526
pub const SIG_DFL: u8 = 3;
27+
// tidy-ticket-sigpipe

‎compiler/rustc_session/src/options.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,12 +1749,15 @@ written to standard error output)"),
17491749
`instructions:u` (retired instructions, userspace-only)
17501750
`instructions-minus-irqs:u` (subtracting hardware interrupt counts for extra accuracy)"
17511751
),
1752-
/// keep this in sync with the event filter names in librustc_data_structures/profiling.rs
1752+
// tidy-ticket-self-profile-events
1753+
/// keep this in sync with the event filter names in rustc_data_structures/src/profiling.rs
17531754
self_profile_events: Option<Vec<String>> = (None, parse_opt_comma_list, [UNTRACKED],
17541755
"specify the events recorded by the self profiler;
17551756
for example: `-Z self-profile-events=default,query-keys`
1756-
all options: none, all, default, generic-activity, query-provider, query-cache-hit
1757-
query-blocked, incr-cache-load, incr-result-hashing, query-keys, function-args, args, llvm, artifact-sizes"),
1757+
all options: none, all, default, generic-activity, query-provider, query-cache-hit,
1758+
query-blocked, incr-cache-load, query-keys, function-args, args, llvm, incr-result-hashing, artifact-sizes"),
1759+
// tidy-ticket-self-profile-events
1760+
17581761
share_generics: Option<bool> = (None, parse_opt_bool, [TRACKED],
17591762
"make the current crate share its generic instantiations"),
17601763
show_span: Option<String> = (None, parse_opt_string, [TRACKED],

‎compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ pub(in crate::solve) fn instantiate_constituent_tys_for_copy_clone_trait<'tcx>(
213213
}
214214
}
215215

216+
// tidy-ticket-extract_tupled_inputs_and_output_from_callable
216217
// Returns a binder of the tupled inputs types and output type from a builtin callable type.
217218
pub(in crate::solve) fn extract_tupled_inputs_and_output_from_callable<'tcx>(
218219
tcx: TyCtxt<'tcx>,
@@ -234,6 +235,7 @@ pub(in crate::solve) fn extract_tupled_inputs_and_output_from_callable<'tcx>(
234235
Err(NoSolution)
235236
}
236237
}
238+
237239
// keep this in sync with assemble_fn_pointer_candidates until the old solver is removed.
238240
ty::FnPtr(sig) => {
239241
if sig.is_fn_trait_compatible() {
@@ -291,6 +293,7 @@ pub(in crate::solve) fn extract_tupled_inputs_and_output_from_callable<'tcx>(
291293
}
292294
}
293295
}
296+
// tidy-ticket-extract_tupled_inputs_and_output_from_callable
294297

295298
/// Assemble a list of predicates that would be present on a theoretical
296299
/// user impl for an object type. These predicates must be checked any time

‎compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ fn rematch_impl<'tcx>(
216216
Ok(Some(ImplSource::UserDefined(ImplSourceUserDefinedData { impl_def_id, args, nested })))
217217
}
218218

219+
// tidy-ticket-rematch_unsize
219220
/// The `Unsize` trait is particularly important to coercion, so we try rematch it.
220221
/// NOTE: This must stay in sync with `consider_builtin_unsize_candidate` in trait
221222
/// goal assembly in the solver, both for soundness and in order to avoid ICEs.
@@ -377,6 +378,7 @@ fn rematch_unsize<'tcx>(
377378
}
378379
}
379380
}
381+
// tidy-ticket-rematch_unsize
380382

381383
fn structurally_normalize<'tcx>(
382384
ty: Ty<'tcx>,

‎compiler/rustc_trait_selection/src/solve/trait_goals.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
423423
ecx.evaluate_added_goals_and_make_canonical_response(certainty)
424424
}
425425

426+
// tidy-ticket-consider_builtin_unsize_candidate
426427
fn consider_unsize_to_dyn_candidate(
427428
ecx: &mut EvalCtxt<'_, 'tcx>,
428429
goal: Goal<'tcx, Self>,
@@ -463,6 +464,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
463464
ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
464465
})
465466
}
467+
// tidy-ticket-consider_builtin_unsize_candidate
466468

467469
/// ```ignore (builtin impl example)
468470
/// trait Trait {

‎compiler/rustc_trait_selection/src/traits/project.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,7 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
17321732
};
17331733

17341734
let eligible = match &impl_source {
1735+
// tidy-ticket-assemble_candidates_from_impls-UserDefined
17351736
ImplSource::UserDefined(impl_data) => {
17361737
// We have to be careful when projecting out of an
17371738
// impl because of specialization. If we are not in
@@ -1782,6 +1783,8 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
17821783
}
17831784
}
17841785
}
1786+
// tidy-ticket-assemble_candidates_from_impls-UserDefined
1787+
17851788
ImplSource::Builtin(BuiltinImplSource::Misc, _) => {
17861789
// While a builtin impl may be known to exist, the associated type may not yet
17871790
// be known. Any type with multiple potential associated types is therefore

‎compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
286286
}
287287
}
288288

289+
// tidy-ticket-assemble_fn_pointer_candidates
289290
/// Implements one of the `Fn()` family for a fn pointer.
290291
fn assemble_fn_pointer_candidates(
291292
&mut self,
@@ -307,12 +308,15 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
307308
debug!("assemble_fn_pointer_candidates: ambiguous self-type");
308309
candidates.ambiguous = true; // Could wind up being a fn() type.
309310
}
311+
312+
// tidy-ticket-extract_tupled_inputs_and_output_from_callable-FnPtr
310313
// Provide an impl, but only for suitable `fn` pointers.
311314
ty::FnPtr(sig) => {
312315
if sig.is_fn_trait_compatible() {
313316
candidates.vec.push(FnPointerCandidate { is_const: false });
314317
}
315318
}
319+
316320
// Provide an impl for suitable functions, rejecting `#[target_feature]` functions (RFC 2396).
317321
ty::FnDef(def_id, _) => {
318322
if self.tcx().fn_sig(def_id).skip_binder().is_fn_trait_compatible()
@@ -326,6 +330,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
326330
_ => {}
327331
}
328332
}
333+
// tidy-ticket-assemble_fn_pointer_candidates
329334

330335
/// Searches for impls that might apply to `obligation`.
331336
#[instrument(level = "debug", skip(self, candidates))]

‎compiler/rustc_ty_utils/src/instance.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ fn resolve_associated_item<'tcx>(
9595
// Now that we know which impl is being used, we can dispatch to
9696
// the actual function:
9797
Ok(match vtbl {
98+
// tidy-ticket-resolve_associated_item-UserDefined
9899
traits::ImplSource::UserDefined(impl_data) => {
99100
debug!(
100101
"resolving ImplSource::UserDefined: {:?}, {:?}, {:?}, {:?}",
@@ -196,6 +197,7 @@ fn resolve_associated_item<'tcx>(
196197

197198
Some(ty::Instance::new(leaf_def.item.def_id, args))
198199
}
200+
// tidy-ticket-resolve_associated_item-UserDefined
199201
traits::ImplSource::Builtin(BuiltinImplSource::Object { vtable_base }, _) => {
200202
traits::get_vtable_index_of_object_method(tcx, *vtable_base, trait_item_id).map(
201203
|index| Instance {

‎library/alloc/src/boxed.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ mod thin;
189189
#[lang = "owned_box"]
190190
#[fundamental]
191191
#[stable(feature = "rust1", since = "1.0.0")]
192+
// FIXME: box_free was removed in https://github.com/rust-lang/rust/commit/67b0cfc761c9ad31a1dbacca36c42803b255f17a
193+
// so fix documentation here
192194
// The declaration of the `Box` struct must be kept in sync with the
193195
// `alloc::alloc::box_free` function or ICEs will happen. See the comment
194196
// on `box_free` for more details.

‎library/core/src/ptr/metadata.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ use crate::hash::{Hash, Hasher};
5454
pub trait Pointee {
5555
/// The type for metadata in pointers and references to `Self`.
5656
#[lang = "metadata_type"]
57+
// tidy-ticket-static_assert_expected_bounds_for_metadata
5758
// NOTE: Keep trait bounds in `static_assert_expected_bounds_for_metadata`
58-
// in `library/core/src/ptr/metadata.rs`
59+
// in `library/core/tests/ptr.rs`
5960
// in sync with those here:
6061
type Metadata: Copy + Send + Sync + Ord + Hash + Unpin;
62+
// tidy-ticket-static_assert_expected_bounds_for_metadata
6163
}
6264

6365
/// Pointers to types implementing this trait alias are “thin”.

‎library/core/tests/ptr.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,12 +822,15 @@ fn ptr_metadata_bounds() {
822822
let _ = static_assert_expected_bounds_for_metadata::<<T as Pointee>::Metadata>;
823823
}
824824

825+
// tidy-ticket-static_assert_expected_bounds_for_metadata
826+
// FIXME: should be core::hash::hash?
825827
fn static_assert_expected_bounds_for_metadata<Meta>()
826828
where
827829
// Keep this in sync with the associated type in `library/core/src/ptr/metadata.rs`
828830
Meta: Copy + Send + Sync + Ord + std::hash::Hash + Unpin,
829831
{
830832
}
833+
// tidy-ticket-static_assert_expected_bounds_for_metadata
831834
}
832835

833836
#[test]

‎library/std/src/sys/unix/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
179179
target_vendor = "unikraft",
180180
)))]
181181
{
182+
// tidy-ticket-sigpipe
182183
// We don't want to add this as a public type to std, nor do we
183184
// want to `include!` a file from the compiler (which would break
184185
// Miri and xargo for example), so we choose to duplicate these
@@ -191,6 +192,7 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
191192
pub const SIG_IGN: u8 = 2;
192193
pub const SIG_DFL: u8 = 3;
193194
}
195+
// tidy-ticket-sigpipe
194196

195197
let (sigpipe_attr_specified, handler) = match sigpipe {
196198
sigpipe::DEFAULT => (false, Some(libc::SIG_IGN)),

‎src/librustdoc/core.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,13 @@ pub(crate) fn run_global_ctxt(
316316
tcx.hir().for_each_module(|module| tcx.ensure().collect_mod_item_types(module))
317317
});
318318

319-
// NOTE: This is copy/pasted from typeck/lib.rs and should be kept in sync with those changes.
319+
// tidy-ticket-sess-time-item_types_checking
320+
// NOTE: This is copy/pasted from rustc_hir_analysis/src/lib.rs and should be kept in sync with those changes.
320321
tcx.sess.time("item_types_checking", || {
321322
tcx.hir().for_each_module(|module| tcx.ensure().check_mod_item_types(module))
322323
});
324+
// tidy-ticket-sess-time-item_types_checking
325+
323326
tcx.sess.abort_if_errors();
324327
tcx.sess.time("missing_docs", || rustc_lint::check_crate(tcx));
325328
tcx.sess.time("check_mod_attrs", || {

‎src/librustdoc/doctest.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ impl DirState {
282282
}
283283
}
284284

285+
// tidy-ticket-UnusedExterns
285286
// NOTE: Keep this in sync with the equivalent structs in rustc
286287
// and cargo.
287288
// We could unify this struct the one in rustc but they have different
@@ -293,6 +294,7 @@ struct UnusedExterns {
293294
/// List of unused externs by their names.
294295
unused_extern_names: Vec<String>,
295296
}
297+
// tidy-ticket-UnusedExterns
296298

297299
fn add_exe_suffix(input: String, target: &TargetTriple) -> String {
298300
let exe_suffix = match target {

‎src/tools/opt-dist/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,11 @@ fn copy_rustc_perf(env: &Environment, dir: &Utf8Path) -> anyhow::Result<()> {
376376
fn download_rustc_perf(env: &Environment) -> anyhow::Result<()> {
377377
reset_directory(&env.rustc_perf_dir())?;
378378

379-
// FIXME: add some mechanism for synchronization of this commit SHA with
379+
// tidy-ticket-perf-commit
380380
// Linux (which builds rustc-perf in a Dockerfile)
381381
// rustc-perf version from 2023-05-30
382382
const PERF_COMMIT: &str = "8b2ac3042e1ff2c0074455a0a3618adef97156b1";
383+
// tidy-ticket-perf-commit
383384

384385
let url = format!("https://ci-mirrors.rust-lang.org/rustc/rustc-perf-{PERF_COMMIT}.zip");
385386
let client = reqwest::blocking::Client::builder()

‎src/tools/tidy/src/watcher.rs

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ fn span_hash(source: &str, tag: &str, bad: &mut bool) -> Result<String, ()> {
6161
}
6262

6363
fn check_entry(entry: &ListEntry<'_>, bad: &mut bool, root_path: &Path) {
64-
let file = fs::read_to_string(root_path.join(Path::new(entry.0))).unwrap();
64+
let file = fs::read_to_string(root_path.join(Path::new(entry.0)))
65+
.unwrap_or_else(|e| panic!("{:?}, path: {}", e, entry.0));
6566
let actual_hash = span_hash(&file, entry.2, bad).unwrap();
6667
if actual_hash != entry.1 {
6768
// Write tidy error description for wather only once.
@@ -91,8 +92,56 @@ type ListEntry<'a> = (&'a str, &'a str, &'a str);
9192
/// List of tags to watch, along with paths and hashes
9293
#[rustfmt::skip]
9394
const TIDY_WATCH_LIST: &[ListEntry<'_>] = &[
94-
("src/tools/opt-dist/src/environment/windows.rs", "dcad53f163a2775164b5d2faaa70b653", "tidy-ticket-perf-commit"),
95+
// sync perf commit across dockerfile and opt-dist
96+
("src/tools/opt-dist/src/main.rs", "728c2783154a52a30bdb1d66f8ea1f2a", "tidy-ticket-perf-commit"),
9597
("src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile", "76c8d9783e38e25a461355f82fcd7955", "tidy-ticket-perf-commit"),
98+
99+
("compiler/rustc_ast/src/token.rs", "70666de80ab0194a67524deeda3c01b8", "tidy-ticket-ast-from_token"),
100+
("compiler/rustc_ast/src/token.rs", "9a78008a2377486eadf19d67ee4fdce2", "tidy-ticket-ast-can_begin_literal_maybe_minus"),
101+
("compiler/rustc_parse/src/parser/expr.rs", "500240cdc80690209060fdce10ce065a", "tidy-ticket-rustc_parse-can_begin_literal_maybe_minus"),
102+
103+
("compiler/rustc_builtin_macros/src/assert/context.rs", "81bd6f37797c22fce5c85a4b590b3856", "tidy-ticket-all-expr-kinds"),
104+
("tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs", "78ce54cc25baeac3ae07c876db25180c", "tidy-ticket-all-expr-kinds"),
105+
106+
("compiler/rustc_const_eval/src/interpret/validity.rs", "91c69e391741f64b7624e1bda4b31bc3", "tidy-ticket-try_visit_primitive"),
107+
("compiler/rustc_const_eval/src/interpret/validity.rs", "05e496c9ca019273c49ba9de48b5da23", "tidy-ticket-visit_value"),
108+
109+
// sync self-profile-events help mesage with actual list of events
110+
("compiler/rustc_data_structures/src/profiling.rs", "881e7899c7d6904af1bc000594ee0418", "tidy-ticket-self-profile-events"),
111+
("compiler/rustc_session/src/options.rs", "012ee5a3b61ee1377744e5c6913fa00a", "tidy-ticket-self-profile-events"),
112+
113+
("compiler/rustc_errors/src/json.rs", "5907da5c0476785fe2aae4d0d62f7171", "tidy-ticket-UnusedExterns"),
114+
("src/librustdoc/doctest.rs", "b5bb5128abb4a2dbb47bb1a1a083ba9b", "tidy-ticket-UnusedExterns"),
115+
116+
("compiler/rustc_middle/src/ty/util.rs", "cae64b1bc854e7ee81894212facb5bfa", "tidy-ticket-static_ptr_ty"),
117+
("compiler/rustc_middle/src/ty/util.rs", "6f5ead08474b4d3e358db5d3c7aef970", "tidy-ticket-thread_local_ptr_ty"),
118+
119+
("compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs", "8ac64f1266a60bb7b11d80ac764e5154", "tidy-ticket-arity"),
120+
("compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs", "2bab79a2441e8ffae79b7dc3befe91cf", "tidy-ticket-wildcards"),
121+
122+
("compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs", "3844ca4b7b45be1c721c17808ee5b2e2", "tidy-ticket-is_covered_by"),
123+
("compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs", "4d296b7b1f48a9dd92e8bb8cd3344718", "tidy-ticket-is_covered_by_any"),
124+
125+
("compiler/rustc_monomorphize/src/partitioning.rs", "f4f33e9c14f4e0c3a20b5240ae36a7c8", "tidy-ticket-short_description"),
126+
("compiler/rustc_codegen_ssa/src/back/write.rs", "5286f7f76fcf564c98d7a8eaeec39b18", "tidy-ticket-short_description"),
127+
128+
("compiler/rustc_session/src/config/sigpipe.rs", "8d765a5c613d931852c0f59ed1997dcd", "tidy-ticket-sigpipe"),
129+
("library/std/src/sys/unix/mod.rs", "2cdc37081831cdcf44f3331efbe440af", "tidy-ticket-sigpipe"),
130+
131+
("compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs", "b205939890472130649d5fd4fc86a992", "tidy-ticket-extract_tupled_inputs_and_output_from_callable"),
132+
("compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs", "e9a77bba86a02702af65b2713af47394", "tidy-ticket-assemble_fn_pointer_candidates"),
133+
134+
("compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs", "d0c807d90501f3f63dffc3e7ec046c20", "tidy-ticket-rematch_unsize"),
135+
("compiler/rustc_trait_selection/src/solve/trait_goals.rs", "f1b0ce28128b5d5a5b545af3f3cf55f4", "tidy-ticket-consider_builtin_unsize_candidate"),
136+
137+
("compiler/rustc_trait_selection/src/traits/project.rs", "66585f93352fe56a5be6cc5a63bcc756", "tidy-ticket-assemble_candidates_from_impls-UserDefined"),
138+
("compiler/rustc_ty_utils/src/instance.rs", "e8b404fd4160512708f922140a8bb187", "tidy-ticket-resolve_associated_item-UserDefined"),
139+
140+
("compiler/rustc_hir_analysis/src/lib.rs", "842e23fb65caf3a96681686131093316", "tidy-ticket-sess-time-item_types_checking"),
141+
("src/librustdoc/core.rs", "d11d64105aa952bbf3c0c2f211135c43", "tidy-ticket-sess-time-item_types_checking"),
142+
143+
("library/core/src/ptr/metadata.rs", "57fc0e05c177c042c9766cc1134ae240", "tidy-ticket-static_assert_expected_bounds_for_metadata"),
144+
("library/core/tests/ptr.rs", "13ecb32e2a0db0998ff94f33a30f5cfd", "tidy-ticket-static_assert_expected_bounds_for_metadata"),
96145
];
97146

98147
pub fn check(root_path: &Path, bad: &mut bool) {

‎tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#![allow(path_statements, unused_allocation)]
88
#![feature(core_intrinsics, generic_assert)]
99

10+
// tidy-ticket-all-expr-kinds
1011
macro_rules! test {
1112
(
1213
let mut $elem_ident:ident = $elem_expr:expr;
@@ -118,3 +119,4 @@ fn main() {
118119
[ -elem == -3 ] => "Assertion failed: -elem == -3\nWith captures:\n elem = 1\n"
119120
);
120121
}
122+
// tidy-ticket-all-expr-kinds

0 commit comments

Comments
 (0)
Please sign in to comment.