-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a warning on no_std and the expected output for Result
Since invalid `Result<T>` output changed, the expected file had to be updated. The output actually got better, since now the location of the actual declaration of the offending struct is also shown, not only the usage.
- Loading branch information
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -1,8 +1,18 @@ | ||
error[E0277]: `NonError` doesn't implement `std::fmt::Display` | ||
error[E0599]: the method `to_cxx_exception` exists for reference `&NonError`, but its trait bounds were not satisfied | ||
--> tests/ui/result_no_display.rs:4:19 | ||
| | ||
4 | fn f() -> Result<()>; | ||
| ^^^^^^^^^^ `NonError` cannot be formatted with the default formatter | ||
| ^^^^^^^^^^ method cannot be called on `&NonError` due to unsatisfied trait bounds | ||
... | ||
8 | pub struct NonError; | ||
| ------------------- doesn't satisfy `NonError: std::fmt::Display` | ||
| | ||
= help: the trait `std::fmt::Display` is not implemented for `NonError` | ||
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead | ||
= note: the following trait bounds were not satisfied: | ||
`NonError: std::fmt::Display` | ||
which is required by `&NonError: ToCxxExceptionDefault` | ||
note: the trait `std::fmt::Display` must be implemented | ||
--> $RUST/core/src/fmt/mod.rs | ||
| | ||
| pub trait Display { | ||
| ^^^^^^^^^^^^^^^^^ | ||
= note: this error originates in the macro `::cxx::map_rust_error_to_cxx_exception` (in Nightly builds, run with -Z macro-backtrace for more info) |