]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #95609 - compiler-errors:borrow-unsized-to-dyn, r=nagisa
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Mon, 4 Apr 2022 18:41:34 +0000 (20:41 +0200)
committerGitHub <noreply@github.com>
Mon, 4 Apr 2022 18:41:34 +0000 (20:41 +0200)
Suggest borrowing when trying to coerce unsized type into `dyn Trait`

A helpful error in response to #95598, since we can't coerce e.g. `&str` into `&dyn Display`, but we can coerce `&&str` into `&dyn Display` :)

Not sure if the suggestion message needs some help. Let me know, and I can refine this PR.


Trivial merge