]> git.lizzy.rs Git - rust.git/commitdiff
Fix overflow
authorNick Cameron <ncameron@mozilla.com>
Tue, 13 Jun 2017 03:09:48 +0000 (15:09 +1200)
committerNick Cameron <ncameron@mozilla.com>
Tue, 13 Jun 2017 03:09:48 +0000 (15:09 +1200)
cc #1665

src/items.rs

index 156528301be301ffc4683672813a9ac82260be03..c9b278d9c03336e05914eb375f5aa543117ec31c 100644 (file)
@@ -1697,7 +1697,7 @@ fn rewrite_explicit_self(
             let mutability = explicit_self_mutability(&args[0]);
             let type_str = try_opt!(ty.rewrite(
                 context,
-                Shape::legacy(usize::max_value(), Indent::empty()),
+                Shape::legacy(context.config.max_width(), Indent::empty()),
             ));
 
             Some(format!(