Use RHS's struct def ID for error messages in pattern matching

Fixes #14541
auto merge of #14562 : jakub-/rust/issue-14541, r=alexcrichton

Fixes #14541
Make the match arm type mismatch message point to the arm's span

Fixes #11319
Rename variable in tutorial

Renamed `owned_box` to `on_the_heap` to use a consistent
naming across the tutorial and the life time guide.
Also it makes the example easier to grasp.
Fix example in lifetime guide

This rewrites the example to also be more aligned with
the same example given in the main tutorial.
auto merge of #14566 : cburgdorf/rust/patch-1, r=cmr

Renamed `owned_box` to `on_the_heap` to use a consistent
naming across the tutorial and the life time guide.
Also it makes the example easier to grasp.
auto merge of #14567 : cburgdorf/rust/patch-2, r=brson

This rewrites the example to also be more aligned with
the same example given in the main tutorial.
auto merge of #14561 : jakub-/rust/issue-11319, r=alexcrichton

Fixes #11319
Fix docs for `core::result::Result::map`.

`reader.read_line()` includes trailing newline char, which makes
`from_str` always return `None`, and the sum is 0.