Address PR's comments

This commit is contained in:
mcarton 2016-07-06 15:36:42 +02:00
parent 02547b9392
commit bf513229b1
No known key found for this signature in database
GPG key ID: 5E427C794CBA45E8
3 changed files with 5 additions and 5 deletions

View file

@ -126,8 +126,8 @@ impl<'a> Sugg<'a> {
}
/// Convenience method to create the `<lhs> as <rhs>` suggestion.
pub fn as_ty(self, rhs: &str) -> Sugg<'static> {
make_assoc(AssocOp::As, &self, &Sugg::NonParen(rhs.into()))
pub fn as_ty<R: std::fmt::Display>(self, rhs: R) -> Sugg<'static> {
make_assoc(AssocOp::As, &self, &Sugg::NonParen(rhs.to_string().into()))
}
/// Convenience method to create the `&<expr>` suggestion.