From: Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> Date: Mon, 4 Apr 2022 18:41:34 +0000 (+0200) Subject: Rollup merge of #95609 - compiler-errors:borrow-unsized-to-dyn, r=nagisa X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=0c5f8792037e860351ddb7c5cd9e6761d2bba704;p=rust.git Rollup merge of #95609 - compiler-errors:borrow-unsized-to-dyn, r=nagisa 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. --- 0c5f8792037e860351ddb7c5cd9e6761d2bba704