Unnamed repository; edit this file 'description' to name the repository.
Rollup merge of #152879 - nnethercote:rm-impl-IntoQueryParam-ref-P, r=oli-obk
Remove `impl IntoQueryParam<P> for &'a P`. `IntoQueryParam` is a trait that lets query callers be a bit sloppy with the passed-in key. - Types similar to `DefId` will be auto-converted to `DefId`. Likewise for `LocalDefId`. - Reference types will be auto-derefed. The auto-conversion is genuinely useful; the auto-derefing much less so. In practice it's only used for passing `&DefId` to queries that accept `DefId`, which is an anti-pattern because `DefId` is marked with `#[rustc_pass_by_value]`. This commit removes the auto-deref impl and makes the necessary sigil adjustments. (I generally avoid using `*` to deref manually at call sites, preferring to deref via `&` in patterns or via `*` in match expressions. Mostly because that way a single deref often covers multiple call sites.) r? @cjgillot
Jonathan Brouwer 8 weeks ago
parent 7489b5f · parent cd38bcd · commit 5a6f980
0 files changed, 0 insertions, 0 deletions