-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(boxed_field): Confirm
Foo::bar
is boxed (#1168)
- Loading branch information
1 parent
67a76c8
commit 9b9f5d3
Showing
2 changed files
with
13 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
include!(concat!(env!("OUT_DIR"), "/boxed_field.rs")); | ||
|
||
#[test] | ||
/// Confirm `Foo::bar` is boxed by creating an instance | ||
fn test_bar_is_boxed() { | ||
use alloc::boxed::Box; | ||
let _ = Foo { | ||
bar: Some(Box::new(Bar {})), | ||
}; | ||
} |
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