accept impl display instead of From<String> (#2501)
This commit is contained in:
1 parent
d795995e20
commit
c0246c26e0
1 file changed
+2
@@ -213,6 +213,8 @@ mod field_info {
|
|||||||
|| field.ty == parse_quote!(String)
|
|| field.ty == parse_quote!(String)
|
||||||
{
|
{
|
||||||
builder_attr.from_displayable = true;
|
builder_attr.from_displayable = true;
|
||||||
|
// ToString is both more general and provides a more useful error message than From<String>. If the user tries to use `#[into]`, use ToString instead.
|
||||||
|
builder_attr.auto_into = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// extended field is automatically empty
|
// extended field is automatically empty
|
||||||
|
|||||||
Reference in new issue
Block a user