Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/ref-cast/tests/ui/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Impressum impl-trait.stderr   Sprache: unbekannt

 
Haftungsausschluß.stderr KontaktUnknown {[0] [0] [0]}diese Dinge liegen außhalb unserer Verantwortung

error[E0106]: missing lifetime specifier
 --> tests/ui/impl-trait.rs:9:44
  |
9 |     pub fn ref_cast(s: impl AsRef<str>) -> &Self;
  |                                            ^ expected named lifetime parameter
  |
  = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
  |
9 |     pub fn ref_cast(s: impl AsRef<str>) -> &'static Self;
  |                                             +++++++
help: consider introducing a named lifetime parameter
  |
9 |     pub fn ref_cast<'a>(s: impl AsRef<str>) -> &'a Self;
  |                    ++++                         ++

error[E0562]: `impl Trait` is not allowed in paths
 --> tests/ui/impl-trait.rs:9:24
  |
9 |     pub fn ref_cast(s: impl AsRef<str>) -> &Self;
  |                        ^^^^^^^^^^^^^^^
  |
  = note: `impl Trait` is only allowed in arguments and return types of functions and methods

error[E0562]: `impl Trait` is not allowed in paths
  --> tests/ui/impl-trait.rs:12:26
   |
12 |     pub fn ref_cast2(s: &impl AsRef<str>) -> &Self;
   |                          ^^^^^^^^^^^^^^^
   |
   = note: `impl Trait` is only allowed in arguments and return types of functions and methods

[Seitenstruktur0.108Drucken]