···35283528 // If there are some suggestions about public values in imported
35293529 // modules put a "did you mean" text after the main message
35303530 if !possible_modules.is_empty() {
35313531- text.push_str("\nDid you mean one of these:\n\n");
35313531+ let message = if possible_modules.len() == 1 {
35323532+ "\nDid you mean:\n\n"
35333533+ } else {
35343534+ "\nDid you mean one of these:\n\n"
35353535+ };
35363536+ text.push_str(message);
35323537 for module_name in possible_modules {
35333538 text.push_str(&format!(" - {module_name}.{name}\n"))
35343539 }
···2828 │ ^^^^^^^^
29293030The custom type variant constructor `MyRecord` is not in scope here.
3131-Did you mean one of these:
3131+Did you mean:
32323333 - module.MyRecord
···2828 │ ^^^
29293030The custom type variant constructor `One` is not in scope here.
3131-Did you mean one of these:
3131+Did you mean:
32323333 - module.One
···3434 │ ^^^^^^^^
35353636The custom type variant constructor `MyRecord` is not in scope here.
3737-Did you mean one of these:
3737+Did you mean:
38383939 - moduletwo.MyRecord
···2727 │ ^^^
28282929The custom type variant constructor `One` is not in scope here.
3030-Did you mean one of these:
3030+Did you mean:
31313232 - module.One