Rust 1.32.0-nightly
6bfb46e4a

# Borrow and AsRef

There is a new edition of the book and this is an old link.

> A cheap reference-to-reference conversion. Used to convert a value to a reference value within generic code.

    fn is_hello<T: AsRef<str>>(s: T) {
       assert_eq!("hello", s.as_ref());
    }Run

This chapter does not exist in the second edition. The best place to learn more about this is the Rust documentation.

- In the Rust documentation: `convert::AsRef`
- In the first edition: Ch 4.10 — Borrow and AsRef