File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ #[ cxx:: bridge]
2
+ mod ffi {
3
+ extern "Rust" {
4
+ fn f ( ) -> Result < ( ) > ;
5
+ }
6
+ }
7
+
8
+ pub struct NonError ;
9
+
10
+ fn f ( ) -> Result < ( ) , NonError > {
11
+ Ok ( ( ) )
12
+ }
13
+
14
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error[E0277]: `NonError` doesn't implement `std::fmt::Display`
2
+ --> $DIR/result_no_display.rs:1:1
3
+ |
4
+ 1 | #[cxx::bridge]
5
+ | ^^^^^^^^^^^^^^ `NonError` cannot be formatted with the default formatter
6
+ |
7
+ ::: $WORKSPACE/src/result.rs
8
+ |
9
+ | E: Display,
10
+ | ------- required by this bound in `cxx::private::r#try`
11
+ |
12
+ = help: the trait `std::fmt::Display` is not implemented for `NonError`
13
+ = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
14
+ = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
You can’t perform that action at this time.
0 commit comments