about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/env.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-11-23 11:55:16 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-02-21 11:51:56 +1100
commit4143b101f9b0949c4bc6db1124f86ef02b1ef7aa (patch)
treeccec1e793829bc4ce4095fc02cc647ba8b6f63f2 /compiler/rustc_builtin_macros/src/env.rs
parent6a56c3a930733b7e000cc3ec54844b0522a8bd16 (diff)
downloadrust-4143b101f9b0949c4bc6db1124f86ef02b1ef7aa.tar.gz
rust-4143b101f9b0949c4bc6db1124f86ef02b1ef7aa.zip
Use `ThinVec` in various AST types.
This commit changes the sequence parsers to produce `ThinVec`, which
triggers numerous conversions.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/env.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/env.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/env.rs b/compiler/rustc_builtin_macros/src/env.rs
index e5a5e606930..6aa900f0201 100644
--- a/compiler/rustc_builtin_macros/src/env.rs
+++ b/compiler/rustc_builtin_macros/src/env.rs
@@ -8,8 +8,8 @@ use rustc_ast::{self as ast, GenericArg};
 use rustc_expand::base::{self, *};
 use rustc_span::symbol::{kw, sym, Ident, Symbol};
 use rustc_span::Span;
-
 use std::env;
+use thin_vec::thin_vec;
 
 pub fn expand_option_env<'cx>(
     cx: &'cx mut ExtCtxt<'_>,
@@ -41,7 +41,7 @@ pub fn expand_option_env<'cx>(
         Some(value) => cx.expr_call_global(
             sp,
             cx.std_path(&[sym::option, sym::Option, sym::Some]),
-            vec![cx.expr_str(sp, value)],
+            thin_vec![cx.expr_str(sp, value)],
         ),
     };
     MacEager::expr(e)