File tree 3 files changed +18
-3
lines changed
itest/rust/src/register_tests
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -322,9 +322,10 @@ where
322
322
{
323
323
let mut found = None ;
324
324
for ( index, attr) in attributes. iter ( ) . enumerate ( ) {
325
- let attr_name = attr
326
- . get_single_path_segment ( )
327
- . expect ( "get_single_path_segment" ) ;
325
+ let Some ( attr_name) = attr. get_single_path_segment ( ) else {
326
+ // Attribute of the form #[segmented::path] can't be what we are looking for
327
+ continue ;
328
+ } ;
328
329
329
330
let new_found = match attr_name {
330
331
name if name == "func" => {
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ impl HasConstants {
24
24
25
25
#[ constant]
26
26
const D : usize = 20 + 33 * 45 ;
27
+
28
+ #[ constant]
29
+ #[ rustfmt:: skip]
30
+ const DONT_PANIC_WITH_SEGMENTED_PATH_ATTRIBUTE : bool = true ;
27
31
}
28
32
29
33
#[ itest]
Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ impl GdSelfReference {
60
60
self . internal_value = new_value;
61
61
}
62
62
63
+ #[ func]
64
+ #[ rustfmt:: skip]
65
+ fn func_shouldnt_panic_with_segmented_path_attribute ( ) -> bool {
66
+ true
67
+ }
68
+
69
+ #[ signal]
70
+ #[ rustfmt:: skip]
71
+ fn signal_shouldnt_panic_with_segmented_path_attribute ( ) ;
72
+
63
73
#[ func]
64
74
fn fail_to_update_internal_value_due_to_conflicting_borrow (
65
75
& mut self ,
You can’t perform that action at this time.
0 commit comments