-
Notifications
You must be signed in to change notification settings - Fork 714
Open
Labels
a:language-rustRust API and codegen (mO,mS)Rust API and codegen (mO,mS)
Description
Bug Description
Sorry for low quality report, I'm a bit focused on other things right now but thought better to do this than nothing.
Defining a struct with a field named self
in slint results in a panic in when building the rust crate.
export struct PlayerData {
name: string,
self: bool,
}
error: failed to run custom build command for `slint-rust-template v0.1.0 (/home/mykolas/Projects/rust/slint-playtest)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `/home/mykolas/Projects/rust/slint-playtest/target/release/build/slint-rust-template-54020ec4c4283cc6/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at /home/mykolas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.40/src/runtime.rs:442:9:
`r#self` cannot be a raw identifier
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: proc_macro2::fallback::validate_ident_raw
3: proc_macro2::fallback::Ident::new_raw_checked
4: proc_macro2::imp::Ident::new_raw_checked
5: proc_macro2::Ident::new_raw
6: quote::__private::ident_maybe_raw
7: quote::__private::mk_ident
8: i_slint_compiler::generator::rust::ident
9: i_slint_compiler::generator::rust::generate_struct::{{closure}}
10: core::iter::adapters::map::map_fold::{{closure}}
11: core::iter::traits::iterator::Iterator::fold
12: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
13: core::iter::traits::collect::default_extend_tuple_b
14: <Iter as core::iter::traits::collect::TraitB<EB,EA>>::extend
15: core::iter::traits::iterator::Iterator::unzip
16: i_slint_compiler::generator::rust::generate_struct
17: i_slint_compiler::generator::rust::generate::{{closure}}
18: core::iter::adapters::filter_map::filter_map_fold::{{closure}}
19: <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::fold
20: <core::iter::adapters::filter_map::FilterMap<I,F> as core::iter::traits::iterator::Iterator>::fold
21: core::iter::traits::collect::default_extend_tuple_b
22: <Iter as core::iter::traits::collect::TraitB<EB,EA>>::extend
23: core::iter::traits::iterator::Iterator::unzip
24: i_slint_compiler::generator::rust::generate
25: slint_build::compile_with_output_path
26: slint_build::compile_with_config
27: build_script_build::main
28: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Reproducible Code (if applicable)
Environment Details
- Slint Version: 1.8.0
- Platform/OS:
- Programming Language: Rust
- Backend/Renderer:
Product Impact
minor inconvenience
Metadata
Metadata
Assignees
Labels
a:language-rustRust API and codegen (mO,mS)Rust API and codegen (mO,mS)