Skip to content

Commit e492343

Browse files
committed
doc fixes
1 parent e44a6c3 commit e492343

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

compiler/rustc_hir_typeck/src/fallback.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,21 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
102102
fallback_occurred
103103
}
104104

105-
// Tries to apply a fallback to `ty` if it is an unsolved variable.
106-
//
107-
// - Unconstrained ints are replaced with `i32`.
108-
//
109-
// - Unconstrained floats are replaced with `f64`.
110-
//
111-
// - Non-numerics may get replaced with `()` or `!`, depending on
112-
// how they were categorized by `calculate_diverging_fallback`
113-
// (and the setting of `#![feature(never_type_fallback)]`).
114-
//
115-
// Fallback becomes very dubious if we have encountered
116-
// type-checking errors. In that case, fallback to Error.
117-
//
118-
// Sets `FnCtxt::fallback_has_occurred` if fallback is performed
119-
// during this call.
105+
/// Tries to apply a fallback to `ty` if it is an unsolved variable.
106+
///
107+
/// - Unconstrained ints are replaced with `i32`.
108+
///
109+
/// - Unconstrained floats are replaced with `f64`.
110+
///
111+
/// - Non-numerics may get replaced with `()` or `!`, depending on how they
112+
/// were categorized by [`Self::calculate_diverging_fallback`], crate's
113+
/// edition, and the setting of `#![rustc_never_type_options(fallback = ...)]`.
114+
///
115+
/// Fallback becomes very dubious if we have encountered
116+
/// type-checking errors. In that case, fallback to Error.
117+
///
118+
/// Sets [`FnCtxt::fallback_has_occurred`] if fallback is performed
119+
/// during this call.
120120
fn fallback_if_possible(
121121
&self,
122122
ty: Ty<'tcx>,

compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
548548
});
549549
let unit_obligation = obligation.with(tcx, predicate);
550550
if self.predicate_may_hold(&unit_obligation) {
551+
// FIXME: make a new issue for this
551552
err.note(
552553
"this error might have been caused by changes to \
553554
Rust's type-inference algorithm (see issue #48950 \

0 commit comments

Comments
 (0)