mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 13:06:28 +03:00
66ce7b0106
Clarify "infinite size" in cyclic-type diagnostic refers to the type name Closes rust-lang/rust#149842 The `TypeError::CyclicTy` diagnostic currently emits "cyclic type of infinite size". As discussed in the issue, "infinite size" reads as the in-memory `size_of::<T>()` of values, when it actually refers to the textual representation of the type name (an iso-recursive occurs-check failure). This rewords the message so the qualifier "infinite-size" clearly modifies the *name*, matching the direction `@fmease`, `@BoxyUwU`, and the issue author converged on: ``` - cyclic type of infinite size + recursive type with infinite-size name ``` Nine existing UI `.stderr` baselines and two `//~ NOTE` annotations are updated to track the new wording. No semantics change. Tested: - ./x test tests/ui/const-generics/occurs-check/ tests/ui/closures/ tests/ui/unboxed-closures/ tests/ui/typeck/ tests/ui/coroutine/ --force-rerun - ./x test tidy
For more information about how rustc works, see the rustc dev guide.