Use ThinVec
in various AST types.
This commit changes the sequence parsers to produce `ThinVec`, which triggers numerous conversions.
This commit is contained in:
parent
6a56c3a930
commit
4143b101f9
52 changed files with 355 additions and 292 deletions
|
@ -3,6 +3,7 @@ use super::*;
|
|||
use rustc_ast as ast;
|
||||
use rustc_span::create_default_session_globals_then;
|
||||
use rustc_span::symbol::Ident;
|
||||
use thin_vec::ThinVec;
|
||||
|
||||
fn fun_to_string(
|
||||
decl: &ast::FnDecl,
|
||||
|
@ -27,8 +28,10 @@ fn test_fun_to_string() {
|
|||
create_default_session_globals_then(|| {
|
||||
let abba_ident = Ident::from_str("abba");
|
||||
|
||||
let decl =
|
||||
ast::FnDecl { inputs: Vec::new(), output: ast::FnRetTy::Default(rustc_span::DUMMY_SP) };
|
||||
let decl = ast::FnDecl {
|
||||
inputs: ThinVec::new(),
|
||||
output: ast::FnRetTy::Default(rustc_span::DUMMY_SP),
|
||||
};
|
||||
let generics = ast::Generics::default();
|
||||
assert_eq!(
|
||||
fun_to_string(&decl, ast::FnHeader::default(), abba_ident, &generics),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue