-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Closed
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
This does not compile, because the open < is parsed as a comparison operator. Possibly, this is a bug, and it should be parsed as it is intended - opening a type scope. But I don't know.
pub fn stringify<T: ToString>(arg: T) -> String {
return <T as ToString>::to_string(&arg);
}If the current parse is correct, adding parens should not produce an unused_parens error, because these parens are necessary to make it parse as intended. However, it does:
pub fn stringify<T: ToString>(arg: T) -> String {
return (<T as ToString>::to_string(&arg));
}Metadata
Metadata
Assignees
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.