rust/compiler/rustc_borrowck
Trevor Gross ee25d99299
Rollup merge of #128241 - compiler-errors:clone-sugg, r=jieyouxu
Remove logic to suggest clone of function output

I can't exactly tell, but I believe that this suggestion is operating off of a heuristic that the lifetime of a function's input is correlated with the lifetime of a function's output in such a way that cloning would fix an error. I don't think that actually manages to hit the bar of "actually provides useful suggestions" most of the time.

Specifically, I've hit false-positives due to this suggestion *twice* when fixing ICEs in the compiler, so I don't think it's worthwhile having this logic around. Neither of the two affected UI tests are actually fixed by the suggestion.
2024-07-27 13:32:57 -04:00
..
src Rollup merge of #128241 - compiler-errors:clone-sugg, r=jieyouxu 2024-07-27 13:32:57 -04:00
Cargo.toml
messages.ftl