File tree 3 files changed +8
-4
lines changed
test/run-pass/issue-50865-private-impl-trait
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ pub struct AccessLevels<Id = NodeId> {
42
42
43
43
impl < Id : Hash + Eq > AccessLevels < Id > {
44
44
pub fn is_reachable ( & self , id : Id ) -> bool {
45
- // self.map.contains_key(&id)
46
45
self . map . get ( & id) >= Some ( & AccessLevel :: Reachable )
47
46
}
48
47
pub fn is_exported ( & self , id : Id ) -> bool {
Original file line number Diff line number Diff line change 1
- // Copyright 2016 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 1
- // Copyright 2016 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
//
11
11
// aux-build:lib.rs
12
12
13
13
// Regression test for #50865.
14
- // FIXME: explain.
14
+ // When using generics or specifying the type directly, this example
15
+ // codegens `foo` internally. However, when using a private `impl Trait`
16
+ // function which references another private item, `foo` (in this case)
17
+ // wouldn't be codegenned until main.rs used `bar`, as with impl Trait
18
+ // it is not cast to `fn()` automatically to satisfy e.g.
19
+ // `fn foo() -> fn() { ... }`.
15
20
16
21
extern crate lib;
17
22
You can’t perform that action at this time.
0 commit comments