about summary refs log tree commit diff
path: root/src/libsyntax/attr
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-10-14 17:52:35 -0700
committerGitHub <noreply@github.com>2019-10-14 17:52:35 -0700
commit6d28ed1ae6c3f44f03e30e4884d6701e36744246 (patch)
treea0d427b499474c674bec40a57bb905ddbc64556c /src/libsyntax/attr
parenta9a4d4033d3d5b4d8ad2593088196114f7254eda (diff)
parent18b48bf4b9158611cd77bd5fae123a5fa3f052a5 (diff)
downloadrust-6d28ed1ae6c3f44f03e30e4884d6701e36744246.tar.gz
rust-6d28ed1ae6c3f44f03e30e4884d6701e36744246.zip
Rollup merge of #65261 - nnethercote:rm-Option-from-TokenStream, r=petrochenkov
Remove `Option` from `TokenStream`

A code simplification.

r? @petrochenkov
Diffstat (limited to 'src/libsyntax/attr')
-rw-r--r--src/libsyntax/attr/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs
index 7bef693a5be..c2c883fd20e 100644
--- a/src/libsyntax/attr/mod.rs
+++ b/src/libsyntax/attr/mod.rs
@@ -551,7 +551,7 @@ impl MetaItem {
 impl MetaItemKind {
     pub fn tokens(&self, span: Span) -> TokenStream {
         match *self {
-            MetaItemKind::Word => TokenStream::empty(),
+            MetaItemKind::Word => TokenStream::default(),
             MetaItemKind::NameValue(ref lit) => {
                 let mut vec = vec![TokenTree::token(token::Eq, span).into()];
                 lit.tokens().append_to_tree_and_joint_vec(&mut vec);