more refined suggestions for functions that return a reference
when typing CustomByteSlice:: (see screenshot below), the first suggestion is to also borrow the result, this is fine normally, but in this case from_bytes already returns a reference (note that the result is not wrong, but does raise a clippy warning)
a special case for these unsized newtype wrappers is that they can't be constructed with &StructName(something), so this suggestion (see screenshot below) should not be here (unless this will be supported by rust some time in the future, but then still it is not supported now so should not be suggested as it results in code that has compile errors)
@rustbot claim
@Veykril I'd like to take this as my first contribution to rust-analyzer. Do you have a clue about where I might look in the source code for this bug?
The relevant bits are here https://github.com/rust-lang/rust-analyzer/blob/25d9e05c03e719c108c238c0ee798eeb71ea5928/crates/ide-completion/src/render.rs#L616-L637
Hey @Veykril , is this still up for grab?
yes
@rustbot claim