You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: library/core/src/primitive_docs.rs
+7-5
Original file line number
Diff line number
Diff line change
@@ -270,8 +270,8 @@ mod prim_bool {}
270
270
///
271
271
/// # Never type fallback
272
272
///
273
-
/// When the compiler sees a value of type `!` in a [coercion site](https://doc.rust-lang.org/reference/type-coercions.html#coercion-sites), it implicitly inserts a coercion
274
-
/// to allow the type checker to infer any type:
273
+
/// When the compiler sees a value of type `!` in a [coercion site], it implicitly inserts a
274
+
/// coercion to allow the type checker to infer any type:
/// This is what is known as "never type fallback".
307
307
///
308
-
/// Historically, the fallback type was [`()`], causing confusing behavior where `!` spontaneously coerced
309
-
/// to `()`, even when it would not infer `()` without the fallback. There are plans to
310
-
/// change it in the [2024 edition](https://doc.rust-lang.org/nightly/edition-guide/rust-2024/index.html) (and possibly in all editions on a later date); see
308
+
/// Historically, the fallback type was [`()`], causing confusing behavior where `!` spontaneously
309
+
/// coerced to `()`, even when it would not infer `()` without the fallback. There are plans to
310
+
/// change it in the [2024 edition] (and possibly in all editions on a later date); see
311
311
/// [Tracking Issue for making `!` fall back to `!`][fallback-ti].
0 commit comments