Content-Length: 12855 | pFad | https://doc.rust-lang.org/std/iter/../convert/../../std/../std/../error_codes/././E0657.html

E0657 - Error codes index

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error code E0657

An impl Trait captured a higher-ranked lifetime, which is not supported.

Currently, impl Trait types are only allowed to capture lifetimes from their parent items, and not from any for<'a> binders in scope.

Erroneous code example:

#![allow(unused)]
fn main() {
trait BorrowInto<'a> {
    type Target;

    fn borrow_into(&'a self) -> Self::Target;
}

impl<'a> BorrowInto<'a> for () {
    type Target = &'a ();

    fn borrow_into(&'a self) -> Self::Target {
        self
    }
}

fn opaque() -> impl for<'a> BorrowInto<'a, Target = impl Sized + 'a> {
    ()
}
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/iter/../convert/../../std/../std/../error_codes/././E0657.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy