diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-01-30 14:37:06 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-21 11:51:56 +1100 |
| commit | 1807027248f57d98a1490bfbe9eb3d3de944e60f (patch) | |
| tree | d38f48b8559d600ae095d27aeebbed9fa1d6d32b /compiler/rustc_ast/src | |
| parent | b14b7ba5dd13c76834a6a3bcab3f600a1d1b198d (diff) | |
| download | rust-1807027248f57d98a1490bfbe9eb3d3de944e60f.tar.gz rust-1807027248f57d98a1490bfbe9eb3d3de944e60f.zip | |
Use `ThinVec` in `ast::AngleBracketedArgs`.
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/mut_visit.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index e485bdc0972..79cb2c946c8 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -209,7 +209,7 @@ pub struct AngleBracketedArgs { /// The overall span. pub span: Span, /// The comma separated parts in the `<...>`. - pub args: Vec<AngleBracketedArg>, + pub args: ThinVec<AngleBracketedArg>, } /// Either an argument for a parameter e.g., `'a`, `Vec<u8>`, `0`, diff --git a/compiler/rustc_ast/src/mut_visit.rs b/compiler/rustc_ast/src/mut_visit.rs index 6fac99e6d89..7dcb03b4c78 100644 --- a/compiler/rustc_ast/src/mut_visit.rs +++ b/compiler/rustc_ast/src/mut_visit.rs @@ -577,7 +577,7 @@ pub fn noop_visit_angle_bracketed_parameter_data<T: MutVisitor>( vis: &mut T, ) { let AngleBracketedArgs { args, span } = data; - visit_vec(args, |arg| match arg { + visit_thin_vec(args, |arg| match arg { AngleBracketedArg::Arg(arg) => vis.visit_generic_arg(arg), AngleBracketedArg::Constraint(constraint) => vis.visit_constraint(constraint), }); |
