You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo test
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Compiling test-trait-bounds-app v0.1.0 (/home/user/devel/gear-tech/sails/test-trait-bounds/app)
error[E0599]: the method `do_something` exists for struct `Box<TestTraitBoundsService<T>>`, but its trait bounds were not satisfied
--> app/src/lib.rs:20:12
|
20 | pub fn do_something(&mut self) -> String {
| ^^^^^^^^^^^^ method cannot be called on `Box<TestTraitBoundsService<T>>` due to unsatisfied trait bounds
|
note: trait bound `T: TestTrait` was not satisfied
--> app/src/lib.rs:13:9
|
13 | impl<T: TestTrait> TestTraitBoundsService<T>
| ^^^^^^^^^ -------------------------
| |
| unsatisfied trait bound introduced here
For more information about this error, try `rustc --explain E0599`.
error: could not compile `test-trait-bounds-app` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `test-trait-bounds-app` (lib) due to 1 previous error
The text was updated successfully, but these errors were encountered:
Problem
Inline trait bound for a service -
impl<T: TestTrait> TestTraitBoundsService<T>
- fails to compile. Log attached.Steps
Possible Solution
No response
Notes
No response
Relevant Log Output
cargo test output
The text was updated successfully, but these errors were encountered: