File tree 6 files changed +63
-5
lines changed
6 files changed +63
-5
lines changed Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ impl<'a> fold::DocFolder for ImplStripper<'a> {
320
320
if let Some ( did) = typaram. def_id ( ) {
321
321
if did. is_local ( ) && !self . retained . contains ( & did) {
322
322
debug ! ( "ImplStripper: stripped item in trait's generics; \
323
- removing impl") ;
323
+ removing impl") ;
324
324
return None ;
325
325
}
326
326
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ #![ crate_name = "inner" ]
12
+
13
+ pub struct SomeStruct ;
14
+
15
+ fn asdf ( ) {
16
+ const _FOO: ( ) = {
17
+ impl Clone for SomeStruct {
18
+ fn clone ( & self ) -> Self {
19
+ SomeStruct
20
+ }
21
+ }
22
+ } ;
23
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ // aux-build:trait-vis.rs
12
+
13
+ extern crate inner;
14
+
15
+ // @has trait_vis/struct.SomeStruct.html
16
+ // @has - '//code' 'impl Clone for SomeStruct'
17
+ pub use inner:: SomeStruct ;
Original file line number Diff line number Diff line change 1
- // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
Original file line number Diff line number Diff line change 10
10
11
11
#![ crate_name = "foo" ]
12
12
13
- // we need to reexport something from libstd so that `all_trait_implementations` is called.
14
- pub use std:: string:: String ;
15
-
16
13
include ! ( "primitive/primitive-generic-impl.rs" ) ;
17
14
18
15
// @has foo/primitive.i32.html '//h3[@id="impl-ToString"]//code' 'impl<T> ToString for T'
Original file line number Diff line number Diff line change @@ -39,3 +39,24 @@ const _FOO: () = {
39
39
impl Copy for Point { }
40
40
( )
41
41
} ;
42
+
43
+ // @has traits_in_bodies/struct.Inception.html
44
+ // @has - '//code' 'impl Clone for Inception'
45
+ pub struct Inception ;
46
+
47
+ static _BAR: usize = {
48
+ trait HiddenTrait {
49
+ fn hidden_fn ( & self ) {
50
+ for _ in 0 ..5 {
51
+ impl Clone for Inception {
52
+ fn clone ( & self ) -> Self {
53
+ // we need to go deeper
54
+ Inception
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ 5
62
+ } ;
You can’t perform that action at this time.
0 commit comments