Upgrade rust/crates/quote to 1.0.6

Test: None
Change-Id: Ib889d8215aed93497bdf06b8621eb9bb98f9425f
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index cb4ee7b..067bf7b 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "b4f1671357770f8422a0b4d5e299267d0c48fd97"
+    "sha1": "d67d687aebbc7d6f1692951a15ffff5cb2c33673"
   }
 }
diff --git a/Cargo.toml b/Cargo.toml
index c9e1d15..6a004f9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 [package]
 edition = "2018"
 name = "quote"
-version = "1.0.5"
+version = "1.0.6"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 include = ["Cargo.toml", "src/**/*.rs", "tests/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
 description = "Quasi-quoting macro quote!(...)"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 1153bbb..793de24 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "quote"
-version = "1.0.5" # don't forget to update html_root_url, version in readme for breaking changes
+version = "1.0.6" # don't forget to update html_root_url, version in readme for breaking changes
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 license = "MIT OR Apache-2.0"
 description = "Quasi-quoting macro quote!(...)"
diff --git a/METADATA b/METADATA
index 401eaa8..6cef131 100644
--- a/METADATA
+++ b/METADATA
@@ -9,11 +9,11 @@
     type: GIT
     value: "https://github.com/dtolnay/quote"
   }
-  version: "1.0.5"
+  version: "1.0.6"
   license_type: NOTICE
   last_upgrade_date {
     year: 2020
     month: 5
-    day: 13
+    day: 18
   }
 }
diff --git a/README.md b/README.md
index dce12f7..57b2a62 100644
--- a/README.md
+++ b/README.md
@@ -29,15 +29,16 @@
 general-purpose Rust quasi-quoting library and is not specific to procedural
 macros.
 
-*Version requirement: Quote supports rustc 1.31 and up.*
-
-[*Release notes*](https://github.com/dtolnay/quote/releases)
-
 ```toml
 [dependencies]
 quote = "1.0"
 ```
 
+*Version requirement: Quote supports rustc 1.31 and up.*<br>
+[*Release notes*](https://github.com/dtolnay/quote/releases)
+
+<br>
+
 ## Syntax
 
 The quote crate provides a [`quote!`] macro within which you can write Rust code
@@ -76,6 +77,8 @@
 };
 ```
 
+<br>
+
 ## Repetition
 
 Repetition is done using `#(...)*` or `#(...),*` similar to `macro_rules!`. This
@@ -93,6 +96,8 @@
 does not produce a trailing comma. This matches the behavior of delimiters in
 `macro_rules!`.
 
+<br>
+
 ## Returning tokens to the compiler
 
 The `quote!` macro evaluates to an expression of type
@@ -112,6 +117,8 @@
 
 [`From`]: https://doc.rust-lang.org/std/convert/trait.From.html
 
+<br>
+
 ## Examples
 
 ### Combining quoted fragments
@@ -206,6 +213,8 @@
 }
 ```
 
+<br>
+
 ## Hygiene
 
 Any interpolated tokens preserve the `Span` information provided by their
@@ -221,6 +230,21 @@
 
 <br>
 
+## Non-macro code generators
+
+When using `quote` in a build.rs or main.rs and writing the output out to a
+file, consider having the code generator pass the tokens through [rustfmt]
+before writing (either by shelling out to the `rustfmt` binary or by pulling in
+the `rustfmt` library as a dependency). This way if an error occurs in the
+generated code it is convenient for a human to read and debug.
+
+Be aware that no kind of hygiene or span information is retained when tokens are
+written to a file; the conversion from tokens to source code is lossy.
+
+[rustfmt]: https://github.com/rust-lang/rustfmt
+
+<br>
+
 #### License
 
 <sup>
diff --git a/src/ident_fragment.rs b/src/ident_fragment.rs
index c8198cc..e7472fe 100644
--- a/src/ident_fragment.rs
+++ b/src/ident_fragment.rs
@@ -1,4 +1,5 @@
 use proc_macro2::{Ident, Span};
+use std::borrow::Cow;
 use std::fmt;
 
 /// Specialized formatting trait used by `format_ident!`.
@@ -54,6 +55,19 @@
     }
 }
 
+impl<T> IdentFragment for Cow<'_, T>
+where
+    T: IdentFragment + ToOwned + ?Sized,
+{
+    fn span(&self) -> Option<Span> {
+        T::span(self)
+    }
+
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        T::fmt(self, f)
+    }
+}
+
 // Limited set of types which this is implemented for, as we want to avoid types
 // which will often include non-identifier characters in their `Display` impl.
 macro_rules! ident_fragment_display {
diff --git a/src/lib.rs b/src/lib.rs
index 7339134..dd7ef3c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -83,7 +83,7 @@
 #![forbid(unsafe_code)]
 
 // Quote types in rustdoc of other crates get linked to here.
-#![doc(html_root_url = "https://docs.rs/quote/1.0.5")]
+#![doc(html_root_url = "https://docs.rs/quote/1.0.6")]
 
 #[cfg(all(
     not(all(target_arch = "wasm32", target_os = "unknown")),
diff --git a/tests/test.rs b/tests/test.rs
index be2b66b..df857fd 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -341,12 +341,14 @@
     let id2 = format_ident!("Hello{x}", x = 5usize);
     let id3 = format_ident!("Hello{}_{x}", id0, x = 10usize);
     let id4 = format_ident!("Aa", span = Span::call_site());
+    let id5 = format_ident!("Hello{}", Cow::Borrowed("World"));
 
     assert_eq!(id0, "Aa");
     assert_eq!(id1, "HelloAa");
     assert_eq!(id2, "Hello5");
     assert_eq!(id3, "HelloAa_10");
     assert_eq!(id4, "Aa");
+    assert_eq!(id5, "HelloWorld");
 }
 
 #[test]