質問編集履歴
1
エラーメッセージを読みやすく分割
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
【Rust】shakuクレートを使いDIコンテナーを導入したいがMutexをつけ
|
1
|
+
【Rust】shakuクレートを使いDIコンテナーを導入したいが、Mutexをつけるとエラーが出るので解決したい
|
test
CHANGED
@@ -106,7 +106,8 @@
|
|
106
106
|
71 | pub trait HasComponent<I: Interface + ?Sized>: ModuleInterface {
|
107
107
|
| ^^^^^^^^^ required by this bound in `HasComponent`
|
108
108
|
= note: this error originates in the derive macro `Component` (in Nightly builds, run with -Z macro-backtrace for more info)
|
109
|
-
|
109
|
+
```
|
110
|
+
```
|
110
111
|
error[E0277]: the trait bound `MyModule: HasComponent<Mutex<(dyn Logger + 'static)>>` is not satisfied
|
111
112
|
--> src/main.rs:40:1
|
112
113
|
|
|
@@ -130,7 +131,8 @@
|
|
130
131
|
24 | struct DateLoggerImpl {
|
131
132
|
| ^^^^^^^^^^^^^^
|
132
133
|
= note: this error originates in the macro `module` (in Nightly builds, run with -Z macro-backtrace for more info)
|
133
|
-
|
134
|
+
```
|
135
|
+
```
|
134
136
|
error[E0277]: the trait bound `MyModule: HasComponent<Mutex<(dyn Logger + 'static)>>` is not satisfied
|
135
137
|
--> src/main.rs:40:1
|
136
138
|
|
|
@@ -164,7 +166,8 @@
|
|
164
166
|
36 | pub trait Module: ModuleInterface {
|
165
167
|
| ^^^^^^^^^^^^^^^ required by this bound in `Module`
|
166
168
|
= note: this error originates in the macro `module` (in Nightly builds, run with -Z macro-backtrace for more info)
|
167
|
-
|
169
|
+
```
|
170
|
+
```
|
168
171
|
error[E0277]: the trait bound `MyModule: HasComponent<Mutex<(dyn Logger + 'static)>>` is not satisfied
|
169
172
|
--> src/main.rs:40:1
|
170
173
|
|
|