Skip to content

Commit 10d4a98

Browse files
committed
refresh expected ones
1 parent 652f116 commit 10d4a98

File tree

27 files changed

+93
-44
lines changed

27 files changed

+93
-44
lines changed

compiler/rustc_ast/src/token.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ impl Lit {
209209
}
210210
}
211211

212+
// tidy-keep-sync-with=tidy-ticket-ast-from_token
212213
/// Keep this in sync with `Token::can_begin_literal_maybe_minus` excluding unary negation.
213214
pub fn from_token(token: &Token) -> Option<Lit> {
214215
match token.uninterpolate().kind {
@@ -223,6 +224,7 @@ impl Lit {
223224
_ => None,
224225
}
225226
}
227+
// tidy-keep-sync-with=tidy-ticket-ast-from_token
226228
}
227229

228230
impl fmt::Display for Lit {
@@ -748,6 +750,7 @@ impl Token {
748750
///
749751
/// In other words, would this token be a valid start of `parse_literal_maybe_minus`?
750752
///
753+
// tidy-keep-sync-with=tidy-ticket-ast-can_begin_literal_maybe_minus
751754
/// Keep this in sync with and `Lit::from_token`, excluding unary negation.
752755
pub fn can_begin_literal_maybe_minus(&self) -> bool {
753756
match self.uninterpolate().kind {
@@ -774,6 +777,7 @@ impl Token {
774777
_ => false,
775778
}
776779
}
780+
// tidy-keep-sync-with=tidy-ticket-ast-can_begin_literal_maybe_minus
777781

778782
pub fn can_begin_string_literal(&self) -> bool {
779783
match self.uninterpolate().kind {

compiler/rustc_builtin_macros/src/assert/context.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ impl<'cx, 'a> Context<'cx, 'a> {
291291
}
292292
// Expressions that are not worth or can not be captured.
293293
//
294+
// tidy-keep-sync-with=tidy-ticket-all-expr-kinds
294295
// Full list instead of `_` to catch possible future inclusions and to
295296
// sync with the `rfc-2011-nicer-assert-messages/all-expr-kinds.rs` test.
296297
ExprKind::Assign(_, _, _)
@@ -323,7 +324,7 @@ impl<'cx, 'a> Context<'cx, 'a> {
323324
| ExprKind::Yeet(_)
324325
| ExprKind::Become(_)
325326
| ExprKind::Yield(_)
326-
| ExprKind::UnsafeBinderCast(..) => {}
327+
| ExprKind::UnsafeBinderCast(..) => {} // tidy-keep-sync-with=tidy-ticket-all-expr-kinds
327328
}
328329
}
329330

compiler/rustc_codegen_ssa/src/back/write.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ impl<B: WriteBackendMethods> WorkItem<B> {
742742
}
743743
}
744744

745+
// tidy-keep-sync-with=tidy-ticket-short_description
745746
/// Generate a short description of this work item suitable for use as a thread name.
746747
fn short_description(&self) -> String {
747748
// `pthread_setname()` on *nix ignores anything beyond the first 15
@@ -789,6 +790,7 @@ impl<B: WriteBackendMethods> WorkItem<B> {
789790
WorkItem::LTO(m) => desc("lto", "LTO module", m.name()),
790791
}
791792
}
793+
// tidy-keep-sync-with=tidy-ticket-short_description
792794
}
793795

794796
/// A result produced by the backend.

compiler/rustc_const_eval/src/interpret/validity.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
707707
interp_ok(true)
708708
}
709709
ty::Float(_) | ty::Int(_) | ty::Uint(_) => {
710+
// tidy-keep-sync-with=tidy-ticket-try_visit_primitive
710711
// NOTE: Keep this in sync with the array optimization for int/float
711712
// types below!
712713
self.read_scalar(
@@ -722,6 +723,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
722723
self.add_data_range_place(value);
723724
}
724725
interp_ok(true)
726+
// tidy-keep-sync-with=tidy-ticket-try_visit_primitive
725727
}
726728
ty::RawPtr(..) => {
727729
let place = self.deref_pointer(value, ExpectedKind::RawPtr)?;
@@ -1188,9 +1190,10 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValueVisitor<'tcx, M> for ValidityVisitor<'rt,
11881190
}
11891191
};
11901192

1193+
// tidy-keep-sync-with=tidy-ticket-visit_value
11911194
// Optimization: we just check the entire range at once.
11921195
// NOTE: Keep this in sync with the handling of integer and float
1193-
// types above, in `visit_primitive`.
1196+
// types above, in `try_visit_primitive`.
11941197
// No need for an alignment check here, this is not an actual memory access.
11951198
let alloc = self.ecx.get_ptr_alloc(mplace.ptr(), size)?.expect("we already excluded size 0");
11961199

@@ -1230,6 +1233,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValueVisitor<'tcx, M> for ValidityVisitor<'rt,
12301233
// Also, mark this as containing data, not padding.
12311234
self.add_data_range(mplace.ptr(), size);
12321235
}
1236+
// tidy-keep-sync-with=tidy-ticket-visit_value
12331237
}
12341238
// Fast path for arrays and slices of ZSTs. We only need to check a single ZST element
12351239
// 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
@@ -126,6 +126,7 @@ bitflags::bitflags! {
126126
}
127127
}
128128

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

147149
/// Something that uniquely identifies a query invocation.
148150
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
@@ -275,6 +275,8 @@ struct FutureIncompatReport<'a> {
275275
future_incompat_report: Vec<FutureBreakageItem<'a>>,
276276
}
277277

278+
// tidy-keep-sync-with=tidy-ticket-UnusedExterns
279+
// FIXME: where it located in cargo?
278280
// NOTE: Keep this in sync with the equivalent structs in rustdoc's
279281
// doctest component (as well as cargo).
280282
// We could unify this struct the one in rustdoc but they have different
@@ -286,6 +288,7 @@ struct UnusedExterns<'a> {
286288
/// List of unused externs by their names.
287289
unused_extern_names: &'a [&'a str],
288290
}
291+
// tidy-keep-sync-with=tidy-ticket-UnusedExterns
289292

290293
impl Diagnostic {
291294
/// Converts from `rustc_errors::DiagInner` to `Diagnostic`.

compiler/rustc_hir_analysis/src/check/region.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ fn resolve_block<'tcx>(visitor: &mut ScopeResolutionVisitor<'tcx>, blk: &'tcx hi
116116
visitor.cx.var_parent = visitor.cx.parent;
117117

118118
{
119+
// FIXME: sync with exactly where?
119120
// This block should be kept approximately in sync with
120121
// `intravisit::walk_block`. (We manually walk the block, rather
121122
// than call `walk_block`, in order to maintain precise

compiler/rustc_middle/src/ty/util.rs

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

696+
// tidy-keep-sync-with=tidy-ticket-thread_local_ptr_ty
696697
/// Returns the type a reference to the thread local takes in MIR.
697698
pub fn thread_local_ptr_ty(self, def_id: DefId) -> Ty<'tcx> {
698699
let static_ty = self.type_of(def_id).instantiate_identity();
@@ -705,14 +706,17 @@ impl<'tcx> TyCtxt<'tcx> {
705706
Ty::new_imm_ref(self, self.lifetimes.re_static, static_ty)
706707
}
707708
}
709+
// tidy-keep-sync-with=tidy-ticket-thread_local_ptr_ty
708710

709711
/// Get the type of the pointer to the static that we use in MIR.
710712
pub fn static_ptr_ty(self, def_id: DefId, typing_env: ty::TypingEnv<'tcx>) -> Ty<'tcx> {
711713
// Make sure that any constants in the static's type are evaluated.
712714
let static_ty =
713715
self.normalize_erasing_regions(typing_env, self.type_of(def_id).instantiate_identity());
714716

717+
// tidy-keep-sync-with=tidy-ticket-static_ptr_ty
715718
// Make sure that accesses to unsafe statics end up using raw pointers.
719+
// FIXME: should it said sync with thread_local_ptr_ty?
716720
// For thread-locals, this needs to be kept in sync with `Rvalue::ty`.
717721
if self.is_mutable_static(def_id) {
718722
Ty::new_mut_ptr(self, static_ty)
@@ -721,6 +725,7 @@ impl<'tcx> TyCtxt<'tcx> {
721725
} else {
722726
Ty::new_imm_ref(self, self.lifetimes.re_erased, static_ty)
723727
}
728+
// tidy-keep-sync-with=tidy-ticket-static_ptr_ty
724729
}
725730

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

compiler/rustc_monomorphize/src/partitioning.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,16 @@ fn merge_codegen_units<'tcx>(
488488
codegen_units.sort_by_key(|cgu| cmp::Reverse(cgu.size_estimate()));
489489
let num_digits = codegen_units.len().ilog10() as usize + 1;
490490
for (index, cgu) in codegen_units.iter_mut().enumerate() {
491+
// tidy-keep-sync-with=tidy-ticket-short_description
492+
// FIXME: is it sync?
491493
// Note: `WorkItem::short_description` depends on this name ending
492494
// with `-cgu.` followed by a numeric suffix. Please keep it in
493495
// sync with this code.
494496
let suffix = format!("{index:0num_digits$}");
495497
let numbered_codegen_unit_name =
496498
cgu_name_builder.build_cgu_name_no_mangle(LOCAL_CRATE, &["cgu"], Some(suffix));
497499
cgu.set_name(numbered_codegen_unit_name);
500+
// tidy-keep-sync-with=tidy-ticket-short_description
498501
}
499502
}
500503
}

compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ where
255255
}
256256
}
257257

258+
// tidy-keep-sync-with=tidy-ticket-extract_tupled_inputs_and_output_from_callable
258259
// Returns a binder of the tupled inputs types and output type from a builtin callable type.
259260
pub(in crate::solve) fn extract_tupled_inputs_and_output_from_callable<I: Interner>(
260261
cx: I,
@@ -393,6 +394,7 @@ pub(in crate::solve) fn extract_tupled_inputs_and_output_from_callable<I: Intern
393394
}
394395
}
395396
}
397+
// tidy-keep-sync-with=tidy-ticket-extract_tupled_inputs_and_output_from_callable
396398

397399
/// Relevant types for an async callable, including its inputs, output,
398400
/// and the return type you get from awaiting the output.

0 commit comments

Comments
 (0)