(text: &str)
| 993 | nested_field, |
| 994 | index, |
| 995 | ); |
| 996 | } |
| 997 | } |
| 998 | } |
| 999 | |
| 1000 | fn validate_one_node_ref_hint( |
| 1001 | ctx: &mut NodeRefValidationCtx<'_>, |
| 1002 | label: &str, |
| 1003 | raw_ref: &str, |
| 1004 | hint: NodeRefHint, |
| 1005 | ) { |
| 1006 | if hint.allowed.is_empty() { |
| 1007 | return; |
| 1008 | } |
| 1009 | let target = raw_ref.trim().trim_start_matches('@'); |
| 1010 | if matches!(target, "" | "null" | "none" | "-") { |
| 1011 | return; |
| 1012 | } |
| 1013 | let Some(target_type) = ctx.node_types.get(target).copied() else { |
| 1014 | return; |
| 1015 | }; |
| 1016 | if hint.allows(target_type) { |
| 1017 | return; |
| 1018 | } |
no test coverage detected