-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #92781 - lambinoo:I-92755-no-mir-missing-reachable, r=p…
…etrochenkov Set struct/union/enum fields/variants as reachable when item is Fixes #92755
- Loading branch information
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(); | ||
} |