-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: set struct/union/enum fields/variants as reachable when item is
- Loading branch information
Lamb
committed
Jan 14, 2022
1 parent
22e491a
commit 1b2c64d
Showing
3 changed files
with
91 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
mod machine { | ||
pub struct A { | ||
pub b: B, | ||
} | ||
pub struct B {} | ||
impl B { | ||
pub fn f(&self) {} | ||
} | ||
} | ||
|
||
pub struct Context { | ||
pub a: machine::A, | ||
} | ||
|
||
pub fn ctx() -> Context { | ||
todo!(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// aux-build:issue-92755.rs | ||
// build-pass | ||
|
||
// Thank you @tmiasko for providing the content of this test! | ||
|
||
extern crate issue_92755; | ||
|
||
fn main() { | ||
issue_92755::ctx().a.b.f(); | ||
} |