Commit 43cb5d9
committed
Fixed
```text
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
--> main/utility/macros.rs:148:13
|
147 | const $const_name : () = {
| ---------------------- move the `impl` block outside of this associated constant `_syscall_logger_waitid`
148 | impl crate::utility::macros::SyscallLogger {
| ^^^^^-------------------------------------
| |
| `SyscallLogger` is not local
|
::: main/host/syscall/handler/wait.rs:232:5
|
232 | / log_syscall!(
233 | | waitid,
234 | | /* rv */ kernel_pid_t,
235 | | /* which */ c_int,
... |
239 | | /* uru */ *const std::ffi::c_void,
240 | | );
| |_____- in this macro invocation
|
= note: the macro `log_syscall` defines the non-local `impl`, and may need to be changed
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <rust-lang/rust#120363>
= note: this warning originates in the macro `log_syscall` (in Nightly builds, run with -Z macro-backtrace for more info)
```non_local_definitions warning1 parent bc2c74f commit 43cb5d9
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
0 commit comments