Can't return &mut str
("values differ in mutability") from a method when implementing a trait for str
#17361
Labels
A-DSTs
Area: Dynamically-sized types (DSTs)
STR
Output
Version
The compiler complains that
&mut str
and&mut Self where Self = str
differ in mutability, but that looks like a bug to me.As a side note, I found this issue while trying to implement the
Borrow
trait forstr
as proposed by the Collections reform RFC.cc @nick29581
The text was updated successfully, but these errors were encountered: