]> git.lizzy.rs Git - rust.git/commitdiff
More space for qself paths
authorNick Cameron <ncameron@mozilla.com>
Tue, 7 Mar 2017 01:53:10 +0000 (14:53 +1300)
committerNick Cameron <ncameron@mozilla.com>
Tue, 7 Mar 2017 01:53:10 +0000 (14:53 +1300)
Fixes #1349

src/types.rs
tests/target/issue-811.rs

index 39f9d40a627f41a7a485e1d6ae454dc3568deecc..0162ac851f3833b73d5de3ce1e15842edbb88f36 100644 (file)
@@ -87,8 +87,6 @@ pub fn rewrite_path(context: &RewriteContext,
         span_lo = qself.ty.span.hi + BytePos(1);
     }
 
-    let extra_offset = extra_offset(&result, shape);
-    let shape = try_opt!(shape.shrink_left(extra_offset));
     rewrite_path_segments(path_context,
                           result,
                           path.segments.iter().skip(skip_count),
index 2b58c06941d93709d72880b03644b7bf481fdabe..b7a89b5d0f9dc3a10abced001a68abd4d9e864c8 100644 (file)
@@ -7,8 +7,7 @@ trait BarTrait<T>: Sized {
     fn foo();
 }
 
-type Foo<T: FooTrait> =
-    <<T as FooTrait<U>>::Bar as BarTrait<U>>::Baz;
+type Foo<T: FooTrait> = <<T as FooTrait<U>>::Bar as BarTrait<U>>::Baz;
 type Bar<T: BarTrait> = <T as BarTrait<U>>::Baz;
 
 fn some_func<T: FooTrait<U>, U>() {