Skip to content

Hide use std::fmt; in all examples in '_, the anonymous lifetime #189

@rusty-snake

Description

@rusty-snake

https://doc.rust-lang.org/edition-guide/rust-2018/ownership-and-lifetimes/the-anonymous-lifetime.html

// Rust 2015

use std::fmt;

fn make_wrapper(string: &str) -> StrWrap {
// Rust 2018

fn make_wrapper(string: &str) -> StrWrap<'_> {

In the 2018 example is use std::fmt by default hidden, in 2015 not. (looks inconsistent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions