]> git.proxmox.com Git - rustc.git/blobdiff - vendor/const_fn/src/to_tokens.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / vendor / const_fn / src / to_tokens.rs
diff --git a/vendor/const_fn/src/to_tokens.rs b/vendor/const_fn/src/to_tokens.rs
deleted file mode 100644 (file)
index 771c7f6..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-use proc_macro::{Ident, Literal, TokenStream, TokenTree};
-use std::iter;
-
-pub(crate) trait ToTokens {
-    fn to_tokens(&self, tokens: &mut TokenStream);
-
-    fn to_token_stream(&self) -> TokenStream {
-        let mut tokens = TokenStream::new();
-        self.to_tokens(&mut tokens);
-        tokens
-    }
-}
-
-impl ToTokens for Ident {
-    fn to_tokens(&self, tokens: &mut TokenStream) {
-        tokens.extend(iter::once(TokenTree::Ident(self.clone())));
-    }
-}
-
-impl ToTokens for Literal {
-    fn to_tokens(&self, tokens: &mut TokenStream) {
-        tokens.extend(iter::once(TokenTree::Literal(self.clone())));
-    }
-}
-
-impl ToTokens for TokenTree {
-    fn to_tokens(&self, tokens: &mut TokenStream) {
-        tokens.extend(iter::once(self.clone()));
-    }
-}
-
-impl ToTokens for TokenStream {
-    fn to_tokens(&self, tokens: &mut TokenStream) {
-        tokens.extend(self.clone());
-    }
-}