The top level message shouldn't be too long; the replaced-by-coercion/temporary-variable advice can live in a note. Also, don't mention type ascription when it's not actually available as a real thing. (The current state of discussion on the type ascription tracking issue #23416 makes one rather suspect it will never be a stable thing in its current form, but that's not for us to adjudicate in this commit.) While we're here, yank out the differentiating parts of the numeric/other conditional and only have one codepath emitting the diagnostic. |
||
|---|---|---|
| .. | ||
| check | ||
| coherence | ||
| outlives | ||
| variance | ||
| astconv.rs | ||
| Cargo.toml | ||
| check_unused.rs | ||
| collect.rs | ||
| constrained_type_params.rs | ||
| diagnostics.rs | ||
| impl_wf_check.rs | ||
| lib.rs | ||
| namespace.rs | ||
| README.md | ||
| structured_errors.rs | ||
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc guide.