Closed wuanzhuan closed 4 days ago
Thanks for filling an issue.
What version of Slint are you using? I believe this is already fixed in the master branch.
slint version is 1.6
Actually, the warning comes from the const-field-offset crate, and it should have been fixed in the 0.5.1 version of it in commit aa7360a91a622b2eb17181f6b963271b7646545f
Can you try to run cargo update
and see if that helps?
Have already been solved after cargo update. thanks
(I believe all the warning were fixed as part of #4706 , so now i updated the Cargo.toml to make sure an old version can't be used)
There are too many warning when i update rust to nightly1.81(from nightly 1.75)
impl
definition,impl
blocks should be written at the same level as their item --> out\main.rs:12:17InnerEnablesData
is not localUnpin
is not local= note: the derive macro
sp::FieldOffsets
defines the non-localimpl
, and may need to be changed = note: the derive macrosp::FieldOffsets
may come from an old version of theconst_field_offset_macro
crate, try updating your dependency withcargo update -p const_field_offset_macro
= note:impl
may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type = note: animpl
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 theimpl
help: move theimpl
block outside of this associated constantFIELD_OFFSETS
--> C:\Users\wuanz\dev\github.com\wuanzhuan\system_monitor\target\debug\build\sys_monitor-cd7b756010b34e61\out\main.rs:12:17 | 12 | # [derive (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin] struct InnerEnablesData { | ^^^^^^^^^^^^^^^^^^ may need to be moved as well = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue https://github.com/rust-lang/rust/issues/120363 = note:#[warn(non_local_definitions)]
on by default = note: this warning originates in the derive macrosp::FieldOffsets
(in Nightly builds, run with -Z macro-backtrace for more info)impl
definition,impl
blocks should be written at the same level as their item --> C:\Users\wuanz\dev\github.com\wuanzhuan\system_monitor\target\debug\build\sys_monitor-cd7b756010b34e61\out\main.rs:70:17InnerEventsViewData
is not localUnpin
is not local= note: the derive macro
sp::FieldOffsets
defines the non-localimpl
, and may need to be changed = note: the derive macrosp::FieldOffsets
may come from an old version of theconst_field_offset_macro
crate, try updating your dependency withcargo update -p const_field_offset_macro
= note:impl
may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type = note: animpl
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 theimpl
help: move theimpl
block outside of this associated constantFIELD_OFFSETS
--> C:\Users\wuanz\dev\github.com\wuanzhuan\system_monitor\target\debug\build\sys_monitor-cd7b756010b34e61\out\main.rs:70:17 | 70 | # [derive (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin] struct InnerEventsViewData { | ^^^^^^^^^^^^^^^^^^ may need to be moved as well = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue https://github.com/rust-lang/rust/issues/120363 = note: this warning originates in the derive macrosp::FieldOffsets
(in Nightly builds, run with -Z macro-backtrace for more info)impl
definition,impl
blocks should be written at the same level as their item --> C:\Users\wuanz\dev\github.com\wuanzhuan\system_monitor\target\debug\build\sys_monitor-cd7b756010b34e61\out\main.rs:163:17InnerColorSchemeSelector_261
is not localUnpin
is not localhelp: move the
impl
block outside of this associated constantFIELD_OFFSETS
--> C:\Users\wuanz\dev\github.com\wuanzhuan\system_monitor\target\debug\build\sys_monitor-cd7b756010b34e61\out\main.rs:163:17 | 163 | # [derive (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin] struct InnerColorSchemeSelector_261 { | ^^^^^^^^^^^^^^^^^^ may need to be moved as well = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue https://github.com/rust-lang/rust/issues/120363 = note: this warning originates in the derive macrosp::FieldOffsets
(in Nightly builds, run with -Z macro-backtrace for more info)