-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test(ui): Extend block tests for with_encoding
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
- Loading branch information
Showing
6 changed files
with
291 additions
and
3 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
crates/test-ui/ui/stack_block_with_encoding_requires_clone.rs
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,20 @@ | ||
use block2::{ManualBlockEncoding, StackBlock}; | ||
use std::ffi::CStr; | ||
|
||
struct Foo; | ||
|
||
fn main() { | ||
struct FooBlockEncoding; | ||
unsafe impl ManualBlockEncoding for FooBlockEncoding { | ||
type Arguments = (); | ||
type Return = (); | ||
const ENCODING_CSTR: &'static CStr = c"v8@?0"; | ||
} | ||
|
||
let foo = Foo; | ||
let _ = unsafe { | ||
StackBlock::with_encoding::<FooBlockEncoding>(move || { | ||
let _ = &foo; | ||
}) | ||
}; | ||
} |
31 changes: 31 additions & 0 deletions
31
crates/test-ui/ui/stack_block_with_encoding_requires_clone.stderr
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.