QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#458228#8829. Aibohphobiaucup-team3607#Compile Error//Rust3.6kb2024-06-29 16:22:282024-06-29 16:22:28

Details

error[E0599]: no function or associated item named `from_iter` found for struct `String` in the current scope
  --> answer.code:26:49
   |
26 |             return writeln!(cout, "{}", String::from_iter(letters));
   |                                                 ^^^^^^^^^ function or associated item not found in `String`
   |
note: if you're trying to build a new `String` consider using one of the following associated functions:
      String::new
      String::with_capacity
      String::from_utf8
      String::from_utf16
      and 7 others
  --> /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/alloc/src/string.rs:448:5
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
1  + use std::iter::FromIterator;
   |
help: there is an associated function with a similar name
   |
26 |             return writeln!(cout, "{}", String::from_utf8(letters));
   |                                                 ~~~~~~~~~

error[E0599]: no function or associated item named `from_iter` found for struct `String` in the current scope
  --> answer.code:53:41
   |
53 |     return writeln!(cout, "{}", String::from_iter(letters));
   |                                         ^^^^^^^^^ function or associated item not found in `String`
   |
note: if you're trying to build a new `String` consider using one of the following associated functions:
      String::new
      String::with_capacity
      String::from_utf8
      String::from_utf16
      and 7 others
  --> /build/rustc-60UC9b/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/alloc/src/string.rs:448:5
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
1  + use std::iter::FromIterator;
   |
help: there is an associated function with a similar name
   |
53 |     return writeln!(cout, "{}", String::from_utf8(letters));
   |                                         ~~~~~~~~~

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.