File tree 3 files changed +39
-1
lines changed
3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ impl<'self> Visitor<()> for EmbargoVisitor<'self> {
243
243
ast:: sty_static => public_ty,
244
244
_ => true ,
245
245
} && method. vis == ast:: public;
246
- if meth_public || public_trait {
246
+ if meth_public || tr . is_some ( ) {
247
247
self . exported_items . insert ( method. id ) ;
248
248
}
249
249
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2013 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
+ trait A {
12
+ fn frob ( & self ) ;
13
+ }
14
+
15
+ impl A for int { fn frob ( & self ) { } }
16
+
17
+ pub fn frob < T : A > ( t : T ) {
18
+ t. frob ( ) ;
19
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2013 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
+ // xfail-fast
12
+ // aux-build:priv-impl-prim-ty.rs
13
+
14
+ extern mod bar ( name = "priv-impl-prim-ty" ) ;
15
+
16
+ fn main ( ) {
17
+ bar:: frob ( 1 i) ;
18
+
19
+ }
You can’t perform that action at this time.
0 commit comments