Skip to content

Commit

Permalink
add fixmes
Browse files Browse the repository at this point in the history
  • Loading branch information
klensy committed Jan 17, 2025
1 parent 10d4a98 commit 429ca32
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_codegen_ssa/src/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
//
// This exception needs to be kept in sync with allowing
// `#[target_feature]` on `main` and `start`.
// FIXME: sync me
} else if !tcx.features().target_feature_11() {
feature_err(
&tcx.sess,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_errors/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3188,6 +3188,7 @@ fn num_decimal_digits(num: usize) -> usize {

// We replace some characters so the CLI output is always consistent and underlines aligned.
// Keep the following list in sync with `rustc_span::char_width`.
// FIXME: sync me
const OUTPUT_REPLACEMENTS: &[(char, &str)] = &[
// In terminals without Unicode support the following will be garbled, but in *all* terminals
// the underlying codepoint will be as well. We could gate this replacement behind a "unicode
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_metadata/src/native_libs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub fn walk_native_lib_search_dirs<R>(
// FIXME: On AIX this also has the side-effect of making the list of library search paths
// non-empty, which is needed or the linker may decide to record the LIBPATH env, if
// defined, as the search path instead of appending the default search paths.
// FIXME: sync me
if sess.target.vendor == "fortanix"
|| sess.target.os == "linux"
|| sess.target.os == "fuchsia"
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ macro_rules! define_dep_nodes {
// struct, and there we can take advantage of the unused bits in the u16.
#[allow(non_camel_case_types)]
#[repr(u16)] // Must be kept in sync with the inner type of `DepKind`.
// FIXME: sync me
enum DepKindDefs {
$( $( #[$attr] )* $variant),*
}
Expand All @@ -96,6 +97,7 @@ macro_rules! define_dep_nodes {

$(
// The `as u16` cast must be kept in sync with the inner type of `DepKind`.
// FIXME: sync me
pub const $variant: DepKind = DepKind::new(DepKindDefs::$variant as u16);
)*
}
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/mir/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ impl UnwindAction {
impl UnwindTerminateReason {
pub fn as_str(self) -> &'static str {
// Keep this in sync with the messages in `core/src/panicking.rs`.
// FIXME: sync me
match self {
UnwindTerminateReason::Abi => "panic in a function that cannot unwind",
UnwindTerminateReason::InCleanup => "panic in a destructor during cleanup",
Expand Down Expand Up @@ -304,6 +305,7 @@ impl<O> AssertKind<O> {
/// `AssertKind::panic_function` and the lang items mentioned in its docs).
/// Note that we deliberately show more details here than we do at runtime, such as the actual
/// numbers that overflowed -- it is much easier to do so here than at runtime.
// FIXME: sync me
pub fn diagnostic_message(&self) -> DiagMessage {
use AssertKind::*;

Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/ty/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ impl<'tcx> Instance<'tcx> {

#[inline(always)]
// Keep me in sync with try_instantiate_mir_and_normalize_erasing_regions
// FIXME: sync me
pub fn instantiate_mir_and_normalize_erasing_regions<T>(
&self,
tcx: TyCtxt<'tcx>,
Expand All @@ -918,6 +919,7 @@ impl<'tcx> Instance<'tcx> {

#[inline(always)]
// Keep me in sync with instantiate_mir_and_normalize_erasing_regions
// FIXME: sync me
pub fn try_instantiate_mir_and_normalize_erasing_regions<T>(
&self,
tcx: TyCtxt<'tcx>,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/ty/predicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ impl<'tcx> Predicate<'tcx> {
/// unsoundly accept some programs. See #91068.
#[inline]
pub fn allow_normalization(self) -> bool {
// FIXME: sync me
// Keep this in sync with the one in `rustc_type_ir::inherent`!
match self.kind().skip_binder() {
PredicateKind::Clause(ClauseKind::WellFormed(_))
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_mir_transform/src/coverage/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ fn coverage_ids_info<'tcx>(
// to any particular point in the control-flow graph.
// (Keep this in sync with the injection of `ExpressionUsed`
// statements in the `InstrumentCoverage` MIR pass.)
// FIXME: sync me
if let MappingKind::Code(CovTerm::Expression(id)) = mapping.kind {
expressions_seen.remove(id);
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_mir_transform/src/mentioned_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ impl<'tcx> crate::MirPass<'tcx> for MentionedItems {
// visiting the exact same places but then instead of monomorphizing and creating `MonoItems`, we
// have to remain generic and just recording the relevant information in `mentioned_items`, where it
// will then be monomorphized later during "mentioned items" collection.
// FIXME: sync me
impl<'tcx> Visitor<'tcx> for MentionedItemsVisitor<'_, 'tcx> {
fn visit_terminator(&mut self, terminator: &mir::Terminator<'tcx>, location: Location) {
self.super_terminator(terminator, location);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ pub(in crate::solve) fn extract_fn_def_from_const_callable<I: Interner>(

// NOTE: Keep this in sync with `evaluate_host_effect_for_destruct_goal` in
// the old solver, for as long as that exists.
// FIXME: sync me
pub(in crate::solve) fn const_conditions_for_destruct<I: Interner>(
cx: I,
self_ty: I::Ty,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_session/src/config/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ pub(crate) fn default_configuration(sess: &Session) -> Cfg {
//
// NOTE: These insertions should be kept in sync with
// `CheckCfg::fill_well_known` below.
// FIXME: sync me

if sess.opts.debug_assertions {
ins_none!(sym::debug_assertions);
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2210,6 +2210,7 @@ pub fn char_width(ch: char) -> usize {
// Keep the following list in sync with `rustc_errors::emitter::OUTPUT_REPLACEMENTS`. These
// are control points that we replace before printing with a visible codepoint for the sake
// of being able to point at them with underlines.
// FIXME: sync me
'\u{0000}' | '\u{0001}' | '\u{0002}' | '\u{0003}' | '\u{0004}' | '\u{0005}'
| '\u{0006}' | '\u{0007}' | '\u{0008}' | '\u{000B}' | '\u{000C}' | '\u{000D}'
| '\u{000E}' | '\u{000F}' | '\u{0010}' | '\u{0011}' | '\u{0012}' | '\u{0013}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ fn virtual_call_violations_for_method<'tcx>(
} else {
// We confirm that the `receiver_is_dispatchable` is accurate later,
// see `check_receiver_correct`. It should be kept in sync with this code.
// FIXME: sync me
}
}

Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_trait_selection/src/traits/effects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ fn evaluate_host_effect_from_builtin_impls<'tcx>(
}

// NOTE: Keep this in sync with `const_conditions_for_destruct` in the new solver.
// FIXME: sync me
fn evaluate_host_effect_for_destruct_goal<'tcx>(
selcx: &mut SelectionContext<'_, 'tcx>,
obligation: &HostEffectObligation<'tcx>,
Expand Down
2 changes: 2 additions & 0 deletions library/core/src/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ fn panic_misaligned_pointer_dereference(required: usize, found: usize) -> ! {
#[rustc_nounwind]
fn panic_cannot_unwind() -> ! {
// Keep the text in sync with `UnwindTerminateReason::as_str` in `rustc_middle`.
// FIXME: sync me
panic_nounwind("panic in a function that cannot unwind")
}

Expand All @@ -320,6 +321,7 @@ fn panic_cannot_unwind() -> ! {
#[rustc_nounwind]
fn panic_in_cleanup() -> ! {
// Keep the text in sync with `UnwindTerminateReason::as_str` in `rustc_middle`.
// FIXME: sync me
panic_nounwind_nobacktrace("panic in a destructor during cleanup")
}

Expand Down

0 comments on commit 429ca32

Please sign in to comment.