Closed
Description
Spawned off of #54825 (comment)
For this code:
rust/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.rs
Lines 12 to 15 in fe8ace8
which produces this diagnostic output:
@nikomatsakis made this comment about the HELP on line 8:
Pre-existing but: it is...strange that we make this suggestion. It seems almost certainly wrong. It doesn't preserve the type or "intent" of the code in any particular way...? It's also distinct from what the AST checker says, which is to suggest
&*x
(though I would argue that is also wrong, for similar reasons). It feels like the best suggestion might beptr::read
but I'm sort of inclined to just not suggest anything at all.