From 95c8c65139c10e4de44367fead8dff88511e6d46 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 17 Jun 2021 17:37:14 +0200 Subject: Nest all the or-patterns! --- crates/hir/src/semantics.rs | 17 ++++---- crates/hir_def/src/item_tree/pretty.rs | 4 +- crates/hir_def/src/nameres/collector.rs | 2 +- crates/hir_def/src/resolver.rs | 3 +- crates/hir_def/src/visibility.rs | 5 +-- crates/hir_expand/src/hygiene.rs | 9 ++-- crates/hir_expand/src/lib.rs | 9 ++-- crates/hir_ty/src/consteval.rs | 3 +- .../src/diagnostics/match_check/deconstruct_pat.rs | 9 ++-- crates/hir_ty/src/infer/coerce.rs | 8 +--- crates/hir_ty/src/infer/expr.rs | 16 ++++--- crates/hir_ty/src/infer/pat.rs | 9 ++-- crates/hir_ty/src/op.rs | 38 +++++++---------- crates/ide/src/join_lines.rs | 2 +- crates/ide/src/references.rs | 3 +- crates/ide/src/syntax_highlighting.rs | 4 +- .../ide_assists/src/handlers/extract_function.rs | 2 +- .../src/handlers/inline_local_variable.rs | 49 ++++++++++++---------- crates/ide_assists/src/tests.rs | 7 ++-- .../src/completions/qualified_path.rs | 18 +++++--- .../src/completions/unqualified_path.rs | 8 ++-- crates/ide_completion/src/context.rs | 31 +++++++------- crates/ide_completion/src/render/builder_ext.rs | 2 +- crates/mbe/src/expander/matcher.rs | 22 ++-------- crates/vfs/src/vfs_path.rs | 2 +- xtask/src/install.rs | 2 +- 26 files changed, 133 insertions(+), 151 deletions(-) diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index 613266e07..43162797e 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs @@ -51,12 +51,14 @@ impl PathResolution { PathResolution::Def(ModuleDef::BuiltinType(builtin)) => { Some(TypeNs::BuiltinType((*builtin).into())) } - PathResolution::Def(ModuleDef::Const(_)) - | PathResolution::Def(ModuleDef::Variant(_)) - | PathResolution::Def(ModuleDef::Function(_)) - | PathResolution::Def(ModuleDef::Module(_)) - | PathResolution::Def(ModuleDef::Static(_)) - | PathResolution::Def(ModuleDef::Trait(_)) => None, + PathResolution::Def( + ModuleDef::Const(_) + | ModuleDef::Variant(_) + | ModuleDef::Function(_) + | ModuleDef::Module(_) + | ModuleDef::Static(_) + | ModuleDef::Trait(_), + ) => None, PathResolution::Def(ModuleDef::TypeAlias(alias)) => { Some(TypeNs::TypeAliasId((*alias).into())) } @@ -65,8 +67,7 @@ impl PathResolution { } PathResolution::TypeParam(param) => Some(TypeNs::GenericParam((*param).into())), PathResolution::SelfType(impl_def) => Some(TypeNs::SelfType((*impl_def).into())), - PathResolution::AssocItem(AssocItem::Const(_)) - | PathResolution::AssocItem(AssocItem::Function(_)) => None, + PathResolution::AssocItem(AssocItem::Const(_) | AssocItem::Function(_)) => None, PathResolution::AssocItem(AssocItem::TypeAlias(alias)) => { Some(TypeNs::TypeAliasId((*alias).into())) } diff --git a/crates/hir_def/src/item_tree/pretty.rs b/crates/hir_def/src/item_tree/pretty.rs index b1e1b70d0..e63bc8232 100644 --- a/crates/hir_def/src/item_tree/pretty.rs +++ b/crates/hir_def/src/item_tree/pretty.rs @@ -63,7 +63,7 @@ impl<'a> Printer<'a> { fn blank(&mut self) { let mut iter = self.buf.chars().rev().fuse(); match (iter.next(), iter.next()) { - (Some('\n'), Some('\n')) | (Some('\n'), None) | (None, None) => {} + (Some('\n'), Some('\n') | None) | (None, None) => {} (Some('\n'), Some(_)) => { self.buf.push('\n'); } @@ -77,7 +77,7 @@ impl<'a> Printer<'a> { fn whitespace(&mut self) { match self.buf.chars().next_back() { - None | Some('\n') | Some(' ') => {} + None | Some('\n' | ' ') => {} _ => self.buf.push(' '), } } diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index fc2c50fb8..927a7b6e8 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs @@ -1260,7 +1260,7 @@ impl DefCollector<'_> { for directive in &self.unresolved_imports { if let ImportSource::Import { id: import, use_tree } = &directive.import.source { match (directive.import.path.segments().first(), &directive.import.path.kind) { - (Some(krate), PathKind::Plain) | (Some(krate), PathKind::Abs) => { + (Some(krate), PathKind::Plain | PathKind::Abs) => { if diagnosed_extern_crates.contains(krate) { continue; } diff --git a/crates/hir_def/src/resolver.rs b/crates/hir_def/src/resolver.rs index d4681fa3e..47e56259f 100644 --- a/crates/hir_def/src/resolver.rs +++ b/crates/hir_def/src/resolver.rs @@ -605,8 +605,7 @@ fn to_value_ns(per_ns: PerNs) -> Option { ModuleDefId::ConstId(it) => ValueNs::ConstId(it), ModuleDefId::StaticId(it) => ValueNs::StaticId(it), - ModuleDefId::AdtId(AdtId::EnumId(_)) - | ModuleDefId::AdtId(AdtId::UnionId(_)) + ModuleDefId::AdtId(AdtId::EnumId(_) | AdtId::UnionId(_)) | ModuleDefId::TraitId(_) | ModuleDefId::TypeAliasId(_) | ModuleDefId::BuiltinType(_) diff --git a/crates/hir_def/src/visibility.rs b/crates/hir_def/src/visibility.rs index 83500f54e..aeb1e7726 100644 --- a/crates/hir_def/src/visibility.rs +++ b/crates/hir_def/src/visibility.rs @@ -172,9 +172,8 @@ impl Visibility { /// visible in unrelated modules). pub(crate) fn max(self, other: Visibility, def_map: &DefMap) -> Option { match (self, other) { - (Visibility::Module(_), Visibility::Public) - | (Visibility::Public, Visibility::Module(_)) - | (Visibility::Public, Visibility::Public) => Some(Visibility::Public), + (Visibility::Module(_) | Visibility::Public, Visibility::Public) + | (Visibility::Public, Visibility::Module(_)) => Some(Visibility::Public), (Visibility::Module(mod_a), Visibility::Module(mod_b)) => { if mod_a.krate != mod_b.krate { return None; diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs index 05c6c3fb1..848522411 100644 --- a/crates/hir_expand/src/hygiene.rs +++ b/crates/hir_expand/src/hygiene.rs @@ -146,10 +146,11 @@ impl HygieneInfo { (&self.macro_arg.1, InFile::new(loc.kind.file_id(), arg_start)) } mbe::Origin::Def => match (&*self.macro_def, self.def_start) { - (TokenExpander::MacroDef { def_site_token_map, .. }, Some(tt)) - | (TokenExpander::MacroRules { def_site_token_map, .. }, Some(tt)) => { - (def_site_token_map, tt) - } + ( + TokenExpander::MacroDef { def_site_token_map, .. } + | TokenExpander::MacroRules { def_site_token_map, .. }, + Some(tt), + ) => (def_site_token_map, tt), _ => panic!("`Origin::Def` used with non-`macro_rules!` macro"), }, }; diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 33107aa24..c31426d7c 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs @@ -368,10 +368,11 @@ impl ExpansionInfo { let (token_map, tt) = match origin { mbe::Origin::Call => (&self.macro_arg.1, self.arg.clone()), mbe::Origin::Def => match (&*self.macro_def, self.def.as_ref()) { - (db::TokenExpander::MacroRules { def_site_token_map, .. }, Some(tt)) - | (db::TokenExpander::MacroDef { def_site_token_map, .. }, Some(tt)) => { - (def_site_token_map, tt.as_ref().map(|tt| tt.syntax().clone())) - } + ( + db::TokenExpander::MacroRules { def_site_token_map, .. } + | db::TokenExpander::MacroDef { def_site_token_map, .. }, + Some(tt), + ) => (def_site_token_map, tt.as_ref().map(|tt| tt.syntax().clone())), _ => panic!("`Origin::Def` used with non-`macro_rules!` macro"), }, }; diff --git a/crates/hir_ty/src/consteval.rs b/crates/hir_ty/src/consteval.rs index 6f0bf8f8c..ab1afce08 100644 --- a/crates/hir_ty/src/consteval.rs +++ b/crates/hir_ty/src/consteval.rs @@ -38,8 +38,7 @@ impl ConstExt for Const { // FIXME: support more than just evaluating literals pub fn eval_usize(expr: &Expr) -> Option { match expr { - Expr::Literal(Literal::Uint(v, None)) - | Expr::Literal(Literal::Uint(v, Some(BuiltinUint::Usize))) => (*v).try_into().ok(), + Expr::Literal(Literal::Uint(v, None | Some(BuiltinUint::Usize))) => (*v).try_into().ok(), _ => None, } } diff --git a/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs b/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs index 471cd4921..e3d640a79 100644 --- a/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs +++ b/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs @@ -84,10 +84,7 @@ impl IntRange { #[inline] fn is_integral(ty: &Ty) -> bool { match ty.kind(&Interner) { - TyKind::Scalar(Scalar::Char) - | TyKind::Scalar(Scalar::Int(_)) - | TyKind::Scalar(Scalar::Uint(_)) - | TyKind::Scalar(Scalar::Bool) => true, + TyKind::Scalar(Scalar::Char | Scalar::Int(_) | Scalar::Uint(_) | Scalar::Bool) => true, _ => false, } } @@ -381,7 +378,7 @@ impl Constructor { // Wildcards cover anything (_, Wildcard) => true, // The missing ctors are not covered by anything in the matrix except wildcards. - (Missing, _) | (Wildcard, _) => false, + (Missing | Wildcard, _) => false, (Single, Single) => true, (Variant(self_id), Variant(other_id)) => self_id == other_id, @@ -523,7 +520,7 @@ impl SplitWildcard { } } TyKind::Scalar(Scalar::Char) => unhandled(), - TyKind::Scalar(Scalar::Int(..)) | TyKind::Scalar(Scalar::Uint(..)) => unhandled(), + TyKind::Scalar(Scalar::Int(..) | Scalar::Uint(..)) => unhandled(), TyKind::Never if !cx.feature_exhaustive_patterns() && !pcx.is_top_level => { smallvec![NonExhaustive] } diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index 4b7f31521..7be914451 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs @@ -47,10 +47,7 @@ impl<'a> InferenceContext<'a> { // pointers to have a chance at getting a match. See // https://github.com/rust-lang/rust/blob/7b805396bf46dce972692a6846ce2ad8481c5f85/src/librustc_typeck/check/coercion.rs#L877-L916 let sig = match (ty1.kind(&Interner), ty2.kind(&Interner)) { - (TyKind::FnDef(..), TyKind::FnDef(..)) - | (TyKind::Closure(..), TyKind::FnDef(..)) - | (TyKind::FnDef(..), TyKind::Closure(..)) - | (TyKind::Closure(..), TyKind::Closure(..)) => { + (TyKind::FnDef(..) | TyKind::Closure(..), TyKind::FnDef(..) | TyKind::Closure(..)) => { // FIXME: we're ignoring safety here. To be more correct, if we have one FnDef and one Closure, // we should be coercing the closure to a fn pointer of the safety of the FnDef cov_mark::hit!(coerce_fn_reification); @@ -448,8 +445,7 @@ fn safe_to_unsafe_fn_ty(fn_ty: FnPointer) -> FnPointer { fn coerce_mutabilities(from: Mutability, to: Mutability) -> Result<(), TypeError> { match (from, to) { - (Mutability::Mut, Mutability::Mut) - | (Mutability::Mut, Mutability::Not) + (Mutability::Mut, Mutability::Mut | Mutability::Not) | (Mutability::Not, Mutability::Not) => Ok(()), (Mutability::Not, Mutability::Mut) => Err(TypeError), } diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index 5ea2e5934..4e4f6e5a4 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs @@ -593,11 +593,11 @@ impl<'a> InferenceContext<'a> { UnaryOp::Neg => { match inner_ty.kind(&Interner) { // Fast path for builtins - TyKind::Scalar(Scalar::Int(_)) - | TyKind::Scalar(Scalar::Uint(_)) - | TyKind::Scalar(Scalar::Float(_)) - | TyKind::InferenceVar(_, TyVariableKind::Integer) - | TyKind::InferenceVar(_, TyVariableKind::Float) => inner_ty, + TyKind::Scalar(Scalar::Int(_) | Scalar::Uint(_) | Scalar::Float(_)) + | TyKind::InferenceVar( + _, + TyVariableKind::Integer | TyVariableKind::Float, + ) => inner_ty, // Otherwise we resolve via the std::ops::Neg trait _ => self .resolve_associated_type(inner_ty, self.resolve_ops_neg_output()), @@ -606,9 +606,7 @@ impl<'a> InferenceContext<'a> { UnaryOp::Not => { match inner_ty.kind(&Interner) { // Fast path for builtins - TyKind::Scalar(Scalar::Bool) - | TyKind::Scalar(Scalar::Int(_)) - | TyKind::Scalar(Scalar::Uint(_)) + TyKind::Scalar(Scalar::Bool | Scalar::Int(_) | Scalar::Uint(_)) | TyKind::InferenceVar(_, TyVariableKind::Integer) => inner_ty, // Otherwise we resolve via the std::ops::Not trait _ => self @@ -735,7 +733,7 @@ impl<'a> InferenceContext<'a> { Expr::Array(array) => { let elem_ty = match expected.to_option(&mut self.table).as_ref().map(|t| t.kind(&Interner)) { - Some(TyKind::Array(st, _)) | Some(TyKind::Slice(st)) => st.clone(), + Some(TyKind::Array(st, _) | TyKind::Slice(st)) => st.clone(), _ => self.table.new_type_var(), }; diff --git a/crates/hir_ty/src/infer/pat.rs b/crates/hir_ty/src/infer/pat.rs index 035f4ded6..58cb23e9d 100644 --- a/crates/hir_ty/src/infer/pat.rs +++ b/crates/hir_ty/src/infer/pat.rs @@ -297,10 +297,11 @@ fn is_non_ref_pat(body: &hir_def::body::Body, pat: PatId) -> bool { Expr::Literal(Literal::String(..)) => false, _ => true, }, - Pat::Bind { mode: BindingAnnotation::Mutable, subpat: Some(subpat), .. } - | Pat::Bind { mode: BindingAnnotation::Unannotated, subpat: Some(subpat), .. } => { - is_non_ref_pat(body, *subpat) - } + Pat::Bind { + mode: BindingAnnotation::Mutable | BindingAnnotation::Unannotated, + subpat: Some(subpat), + .. + } => is_non_ref_pat(body, *subpat), Pat::Wild | Pat::Bind { .. } | Pat::Ref { .. } | Pat::Box { .. } | Pat::Missing => false, } } diff --git a/crates/hir_ty/src/op.rs b/crates/hir_ty/src/op.rs index 0222de2bc..5ef6342d5 100644 --- a/crates/hir_ty/src/op.rs +++ b/crates/hir_ty/src/op.rs @@ -8,17 +8,15 @@ pub(super) fn binary_op_return_ty(op: BinaryOp, lhs_ty: Ty, rhs_ty: Ty) -> Ty { match op { BinaryOp::LogicOp(_) | BinaryOp::CmpOp(_) => TyKind::Scalar(Scalar::Bool).intern(&Interner), BinaryOp::Assignment { .. } => TyBuilder::unit(), - BinaryOp::ArithOp(ArithOp::Shl) | BinaryOp::ArithOp(ArithOp::Shr) => { + BinaryOp::ArithOp(ArithOp::Shl | ArithOp::Shr) => { // all integer combinations are valid here if matches!( lhs_ty.kind(&Interner), - TyKind::Scalar(Scalar::Int(_)) - | TyKind::Scalar(Scalar::Uint(_)) + TyKind::Scalar(Scalar::Int(_) | Scalar::Uint(_)) | TyKind::InferenceVar(_, TyVariableKind::Integer) ) && matches!( rhs_ty.kind(&Interner), - TyKind::Scalar(Scalar::Int(_)) - | TyKind::Scalar(Scalar::Uint(_)) + TyKind::Scalar(Scalar::Int(_) | Scalar::Uint(_)) | TyKind::InferenceVar(_, TyVariableKind::Integer) ) { lhs_ty @@ -32,15 +30,15 @@ pub(super) fn binary_op_return_ty(op: BinaryOp, lhs_ty: Ty, rhs_ty: Ty) -> Ty { | (TyKind::Scalar(Scalar::Uint(_)), TyKind::Scalar(Scalar::Uint(_))) | (TyKind::Scalar(Scalar::Float(_)), TyKind::Scalar(Scalar::Float(_))) => rhs_ty, // ({int}, int) | ({int}, uint) - (TyKind::InferenceVar(_, TyVariableKind::Integer), TyKind::Scalar(Scalar::Int(_))) - | (TyKind::InferenceVar(_, TyVariableKind::Integer), TyKind::Scalar(Scalar::Uint(_))) => { - rhs_ty - } + ( + TyKind::InferenceVar(_, TyVariableKind::Integer), + TyKind::Scalar(Scalar::Int(_) | Scalar::Uint(_)), + ) => rhs_ty, // (int, {int}) | (uint, {int}) - (TyKind::Scalar(Scalar::Int(_)), TyKind::InferenceVar(_, TyVariableKind::Integer)) - | (TyKind::Scalar(Scalar::Uint(_)), TyKind::InferenceVar(_, TyVariableKind::Integer)) => { - lhs_ty - } + ( + TyKind::Scalar(Scalar::Int(_) | Scalar::Uint(_)), + TyKind::InferenceVar(_, TyVariableKind::Integer), + ) => lhs_ty, // ({float} | float) (TyKind::InferenceVar(_, TyVariableKind::Float), TyKind::Scalar(Scalar::Float(_))) => { rhs_ty @@ -69,21 +67,15 @@ pub(super) fn binary_op_rhs_expectation(op: BinaryOp, lhs_ty: Ty) -> Ty { BinaryOp::Assignment { op: None } => lhs_ty, BinaryOp::CmpOp(CmpOp::Eq { .. }) => match lhs_ty.kind(&Interner) { TyKind::Scalar(_) | TyKind::Str => lhs_ty, - TyKind::InferenceVar(_, TyVariableKind::Integer) - | TyKind::InferenceVar(_, TyVariableKind::Float) => lhs_ty, + TyKind::InferenceVar(_, TyVariableKind::Integer | TyVariableKind::Float) => lhs_ty, _ => TyKind::Error.intern(&Interner), }, - BinaryOp::ArithOp(ArithOp::Shl) | BinaryOp::ArithOp(ArithOp::Shr) => { - TyKind::Error.intern(&Interner) - } + BinaryOp::ArithOp(ArithOp::Shl | ArithOp::Shr) => TyKind::Error.intern(&Interner), BinaryOp::CmpOp(CmpOp::Ord { .. }) | BinaryOp::Assignment { op: Some(_) } | BinaryOp::ArithOp(_) => match lhs_ty.kind(&Interner) { - TyKind::Scalar(Scalar::Int(_)) - | TyKind::Scalar(Scalar::Uint(_)) - | TyKind::Scalar(Scalar::Float(_)) => lhs_ty, - TyKind::InferenceVar(_, TyVariableKind::Integer) - | TyKind::InferenceVar(_, TyVariableKind::Float) => lhs_ty, + TyKind::Scalar(Scalar::Int(_) | Scalar::Uint(_) | Scalar::Float(_)) => lhs_ty, + TyKind::InferenceVar(_, TyVariableKind::Integer | TyVariableKind::Float) => lhs_ty, _ => TyKind::Error.intern(&Interner), }, } diff --git a/crates/ide/src/join_lines.rs b/crates/ide/src/join_lines.rs index 93d3760bf..ffa8bd182 100644 --- a/crates/ide/src/join_lines.rs +++ b/crates/ide/src/join_lines.rs @@ -197,7 +197,7 @@ fn join_single_use_tree(edit: &mut TextEditBuilder, token: &SyntaxToken) -> Opti } fn is_trailing_comma(left: SyntaxKind, right: SyntaxKind) -> bool { - matches!((left, right), (T![,], T![')']) | (T![,], T![']'])) + matches!((left, right), (T![,], T![')'] | T![']'])) } fn compute_ws(left: SyntaxKind, right: SyntaxKind) -> &'static str { diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 945c9b9e1..5808562a7 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -79,8 +79,7 @@ pub(crate) fn find_all_refs( }); usages.references.retain(|_, it| !it.is_empty()); } - Definition::ModuleDef(hir::ModuleDef::Adt(_)) - | Definition::ModuleDef(hir::ModuleDef::Variant(_)) => { + Definition::ModuleDef(hir::ModuleDef::Adt(_) | hir::ModuleDef::Variant(_)) => { refs.for_each(|it| { it.retain(|reference| { reference.name.as_name_ref().map_or(false, is_lit_name_ref) diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index e186b82b7..d44a1b45f 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs @@ -294,7 +294,7 @@ fn traverse( Some(parent) => { // We only care Name and Name_ref match (token.kind(), parent.kind()) { - (IDENT, NAME) | (IDENT, NAME_REF) => parent.into(), + (IDENT, NAME | NAME_REF) => parent.into(), _ => token.into(), } } @@ -310,7 +310,7 @@ fn traverse( Some(parent) => { // We only care Name and Name_ref match (token.kind(), parent.kind()) { - (IDENT, NAME) | (IDENT, NAME_REF) => parent.into(), + (IDENT, NAME | NAME_REF) => parent.into(), _ => token.into(), } } diff --git a/crates/ide_assists/src/handlers/extract_function.rs b/crates/ide_assists/src/handlers/extract_function.rs index f2be091f4..7085a0c48 100644 --- a/crates/ide_assists/src/handlers/extract_function.rs +++ b/crates/ide_assists/src/handlers/extract_function.rs @@ -1384,7 +1384,7 @@ fn fix_param_usages(ctx: &AssistContext, params: &[Param], syntax: &SyntaxNode) for (param, usages) in usages_for_param { for usage in usages { match usage.syntax().ancestors().skip(1).find_map(ast::Expr::cast) { - Some(ast::Expr::MethodCallExpr(_)) | Some(ast::Expr::FieldExpr(_)) => { + Some(ast::Expr::MethodCallExpr(_) | ast::Expr::FieldExpr(_)) => { // do nothing } Some(ast::Expr::RefExpr(node)) diff --git a/crates/ide_assists/src/handlers/inline_local_variable.rs b/crates/ide_assists/src/handlers/inline_local_variable.rs index 2441dbb8b..bf4ba16f0 100644 --- a/crates/ide_assists/src/handlers/inline_local_variable.rs +++ b/crates/ide_assists/src/handlers/inline_local_variable.rs @@ -68,28 +68,33 @@ pub(crate) fn inline_local_variable(acc: &mut Assists, ctx: &AssistContext) -> O Some(!matches!( (&initializer_expr, usage_parent), - (ast::Expr::CallExpr(_), _) - | (ast::Expr::IndexExpr(_), _) - | (ast::Expr::MethodCallExpr(_), _) - | (ast::Expr::FieldExpr(_), _) - | (ast::Expr::TryExpr(_), _) - | (ast::Expr::RefExpr(_), _) - | (ast::Expr::Literal(_), _) - | (ast::Expr::TupleExpr(_), _) - | (ast::Expr::ArrayExpr(_), _) - | (ast::Expr::ParenExpr(_), _) - | (ast::Expr::PathExpr(_), _) - | (ast::Expr::BlockExpr(_), _) - | (ast::Expr::EffectExpr(_), _) - | (_, ast::Expr::CallExpr(_)) - | (_, ast::Expr::TupleExpr(_)) - | (_, ast::Expr::ArrayExpr(_)) - | (_, ast::Expr::ParenExpr(_)) - | (_, ast::Expr::ForExpr(_)) - | (_, ast::Expr::WhileExpr(_)) - | (_, ast::Expr::BreakExpr(_)) - | (_, ast::Expr::ReturnExpr(_)) - | (_, ast::Expr::MatchExpr(_)) + ( + ast::Expr::CallExpr(_) + | ast::Expr::IndexExpr(_) + | ast::Expr::MethodCallExpr(_) + | ast::Expr::FieldExpr(_) + | ast::Expr::TryExpr(_) + | ast::Expr::RefExpr(_) + | ast::Expr::Literal(_) + | ast::Expr::TupleExpr(_) + | ast::Expr::ArrayExpr(_) + | ast::Expr::ParenExpr(_) + | ast::Expr::PathExpr(_) + | ast::Expr::BlockExpr(_) + | ast::Expr::EffectExpr(_), + _ + ) | ( + _, + ast::Expr::CallExpr(_) + | ast::Expr::TupleExpr(_) + | ast::Expr::ArrayExpr(_) + | ast::Expr::ParenExpr(_) + | ast::Expr::ForExpr(_) + | ast::Expr::WhileExpr(_) + | ast::Expr::BreakExpr(_) + | ast::Expr::ReturnExpr(_) + | ast::Expr::MatchExpr(_) + ) )) }) .collect::>() diff --git a/crates/ide_assists/src/tests.rs b/crates/ide_assists/src/tests.rs index 60cecd94c..29bd4a563 100644 --- a/crates/ide_assists/src/tests.rs +++ b/crates/ide_assists/src/tests.rs @@ -179,9 +179,10 @@ fn check(handler: Handler, before: &str, expected: ExpectedResult, assist_label: "unresolved assist should not contain source changes" ), (Some(_), ExpectedResult::NotApplicable) => panic!("assist should not be applicable!"), - (None, ExpectedResult::After(_)) - | (None, ExpectedResult::Target(_)) - | (None, ExpectedResult::Unresolved) => { + ( + None, + ExpectedResult::After(_) | ExpectedResult::Target(_) | ExpectedResult::Unresolved, + ) => { panic!("code action is not applicable") } (None, ExpectedResult::NotApplicable) => (), diff --git a/crates/ide_completion/src/completions/qualified_path.rs b/crates/ide_completion/src/completions/qualified_path.rs index 0597879ac..da3385bdc 100644 --- a/crates/ide_completion/src/completions/qualified_path.rs +++ b/crates/ide_completion/src/completions/qualified_path.rs @@ -65,9 +65,11 @@ pub(crate) fn complete_qualified_path(acc: &mut Completions, ctx: &CompletionCon // Don't suggest attribute macros and derives. hir::ScopeDef::MacroDef(mac) => mac.is_fn_like(), // no values in type places - hir::ScopeDef::ModuleDef(hir::ModuleDef::Function(_)) - | hir::ScopeDef::ModuleDef(hir::ModuleDef::Variant(_)) - | hir::ScopeDef::ModuleDef(hir::ModuleDef::Static(_)) + hir::ScopeDef::ModuleDef( + hir::ModuleDef::Function(_) + | hir::ModuleDef::Variant(_) + | hir::ModuleDef::Static(_), + ) | hir::ScopeDef::Local(_) => !ctx.expects_type(), // unless its a constant in a generic arg list position hir::ScopeDef::ModuleDef(hir::ModuleDef::Const(_)) => { @@ -81,9 +83,13 @@ pub(crate) fn complete_qualified_path(acc: &mut Completions, ctx: &CompletionCon } } } - hir::PathResolution::Def(def @ hir::ModuleDef::Adt(_)) - | hir::PathResolution::Def(def @ hir::ModuleDef::TypeAlias(_)) - | hir::PathResolution::Def(def @ hir::ModuleDef::BuiltinType(_)) => { + hir::PathResolution::Def( + def + @ + (hir::ModuleDef::Adt(_) + | hir::ModuleDef::TypeAlias(_) + | hir::ModuleDef::BuiltinType(_)), + ) => { if let hir::ModuleDef::Adt(hir::Adt::Enum(e)) = def { add_enum_variants(acc, ctx, e); } diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs index 6f96eceb9..77c6d706f 100644 --- a/crates/ide_completion/src/completions/unqualified_path.rs +++ b/crates/ide_completion/src/completions/unqualified_path.rs @@ -71,9 +71,11 @@ pub(crate) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionC // Don't suggest attribute macros and derives. ScopeDef::MacroDef(mac) => mac.is_fn_like(), // no values in type places - ScopeDef::ModuleDef(hir::ModuleDef::Function(_)) - | ScopeDef::ModuleDef(hir::ModuleDef::Variant(_)) - | ScopeDef::ModuleDef(hir::ModuleDef::Static(_)) + ScopeDef::ModuleDef( + hir::ModuleDef::Function(_) + | hir::ModuleDef::Variant(_) + | hir::ModuleDef::Static(_), + ) | ScopeDef::Local(_) => !ctx.expects_type(), // unless its a constant in a generic arg list position ScopeDef::ModuleDef(hir::ModuleDef::Const(_)) diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs index 240cac1de..84b2bcf9f 100644 --- a/crates/ide_completion/src/context.rs +++ b/crates/ide_completion/src/context.rs @@ -242,24 +242,23 @@ impl<'a> CompletionContext<'a> { } pub(crate) fn expects_assoc_item(&self) -> bool { - matches!( - self.completion_location, - Some(ImmediateLocation::Trait) | Some(ImmediateLocation::Impl) - ) + matches!(self.completion_location, Some(ImmediateLocation::Trait | ImmediateLocation::Impl)) } pub(crate) fn has_dot_receiver(&self) -> bool { matches!( &self.completion_location, - Some(ImmediateLocation::FieldAccess { receiver, .. }) | Some(ImmediateLocation::MethodCall { receiver,.. }) + Some(ImmediateLocation::FieldAccess { receiver, .. } | ImmediateLocation::MethodCall { receiver,.. }) if receiver.is_some() ) } pub(crate) fn dot_receiver(&self) -> Option<&ast::Expr> { match &self.completion_location { - Some(ImmediateLocation::MethodCall { receiver, .. }) - | Some(ImmediateLocation::FieldAccess { receiver, .. }) => receiver.as_ref(), + Some( + ImmediateLocation::MethodCall { receiver, .. } + | ImmediateLocation::FieldAccess { receiver, .. }, + ) => receiver.as_ref(), _ => None, } } @@ -283,7 +282,7 @@ impl<'a> CompletionContext<'a> { pub(crate) fn expects_ident_pat_or_ref_expr(&self) -> bool { matches!( self.completion_location, - Some(ImmediateLocation::IdentPat) | Some(ImmediateLocation::RefExpr) + Some(ImmediateLocation::IdentPat | ImmediateLocation::RefExpr) ) } @@ -294,14 +293,14 @@ impl<'a> CompletionContext<'a> { pub(crate) fn in_use_tree(&self) -> bool { matches!( self.completion_location, - Some(ImmediateLocation::Use) | Some(ImmediateLocation::UseTree) + Some(ImmediateLocation::Use | ImmediateLocation::UseTree) ) } pub(crate) fn has_impl_or_trait_prev_sibling(&self) -> bool { matches!( self.prev_sibling, - Some(ImmediatePrevSibling::ImplDefType) | Some(ImmediatePrevSibling::TraitDefName) + Some(ImmediatePrevSibling::ImplDefType | ImmediatePrevSibling::TraitDefName) ) } @@ -318,14 +317,16 @@ impl<'a> CompletionContext<'a> { || self.previous_token_is(T![unsafe]) || matches!( self.prev_sibling, - Some(ImmediatePrevSibling::Attribute) | Some(ImmediatePrevSibling::Visibility) + Some(ImmediatePrevSibling::Attribute | ImmediatePrevSibling::Visibility) ) || matches!( self.completion_location, - Some(ImmediateLocation::Attribute(_)) - | Some(ImmediateLocation::ModDeclaration(_)) - | Some(ImmediateLocation::RecordPat(_)) - | Some(ImmediateLocation::RecordExpr(_)) + Some( + ImmediateLocation::Attribute(_) + | ImmediateLocation::ModDeclaration(_) + | ImmediateLocation::RecordPat(_) + | ImmediateLocation::RecordExpr(_) + ) ) } diff --git a/crates/ide_completion/src/render/builder_ext.rs b/crates/ide_completion/src/render/builder_ext.rs index 749dfc665..33d3a5ee1 100644 --- a/crates/ide_completion/src/render/builder_ext.rs +++ b/crates/ide_completion/src/render/builder_ext.rs @@ -32,7 +32,7 @@ impl Builder { cov_mark::hit!(no_parens_in_use_item); return false; } - if matches!(ctx.path_call_kind(), Some(CallKind::Expr) | Some(CallKind::Pat)) + if matches!(ctx.path_call_kind(), Some(CallKind::Expr | CallKind::Pat)) | matches!( ctx.completion_location, Some(ImmediateLocation::MethodCall { has_parens: true, .. }) diff --git a/crates/mbe/src/expander/matcher.rs b/crates/mbe/src/expander/matcher.rs index c2a9a38c9..b4f2fe9a4 100644 --- a/crates/mbe/src/expander/matcher.rs +++ b/crates/mbe/src/expander/matcher.rs @@ -804,33 +804,17 @@ impl<'a> TtIter<'a> { }; match (punct.char, second, third) { - ('.', '.', Some('.')) - | ('.', '.', Some('=')) - | ('<', '<', Some('=')) - | ('>', '>', Some('=')) => { + ('.', '.', Some('.' | '=')) | ('<', '<', Some('=')) | ('>', '>', Some('=')) => { let tt2 = self.next().unwrap().clone(); let tt3 = self.next().unwrap().clone(); Ok(tt::Subtree { delimiter: None, token_trees: vec![tt, tt2, tt3] }.into()) } - ('-', '=', _) - | ('-', '>', _) + ('-' | '!' | '*' | '/' | '&' | '%' | '^' | '+' | '<' | '=' | '>' | '|', '=', _) + | ('-' | '=' | '>', '>', _) | (':', ':', _) - | ('!', '=', _) | ('.', '.', _) - | ('*', '=', _) - | ('/', '=', _) | ('&', '&', _) - | ('&', '=', _) - | ('%', '=', _) - | ('^', '=', _) - | ('+', '=', _) | ('<', '<', _) - | ('<', '=', _) - | ('=', '=', _) - | ('=', '>', _) - | ('>', '=', _) - | ('>', '>', _) - | ('|', '=', _) | ('|', '|', _) => { let tt2 = self.next().unwrap().clone(); Ok(tt::Subtree { delimiter: None, token_trees: vec![tt, tt2] }.into()) diff --git a/crates/vfs/src/vfs_path.rs b/crates/vfs/src/vfs_path.rs index 2b3d7fd84..ef2d7657a 100644 --- a/crates/vfs/src/vfs_path.rs +++ b/crates/vfs/src/vfs_path.rs @@ -389,7 +389,7 @@ impl VirtualPath { match (file_stem, extension) { (None, None) => None, - (None, Some(_)) | (Some(""), Some(_)) => Some((file_name, None)), + (None | Some(""), Some(_)) => Some((file_name, None)), (Some(file_stem), extension) => Some((file_stem, extension)), } } diff --git a/xtask/src/install.rs b/xtask/src/install.rs index 7e2dccdfe..64ab12b42 100644 --- a/xtask/src/install.rs +++ b/xtask/src/install.rs @@ -8,7 +8,7 @@ use xshell::{cmd, pushd}; use crate::flags; // Latest stable, feel free to send a PR if this lags behind. -const REQUIRED_RUST_VERSION: u32 = 52; +const REQUIRED_RUST_VERSION: u32 = 53; impl flags::Install { pub(crate) fn run(self) -> Result<()> { -- cgit v1.2.3 From b6cb6d5abeca51abc7e805d847f3bf3b4ba71151 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 17 Jun 2021 17:46:06 +0200 Subject: simplify --- crates/ide_assists/src/handlers/inline_local_variable.rs | 16 +++++++--------- .../src/diagnostics/test_data/handles_macro_location.txt | 2 +- .../test_data/rustc_incompatible_type_for_trait.txt | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/crates/ide_assists/src/handlers/inline_local_variable.rs b/crates/ide_assists/src/handlers/inline_local_variable.rs index bf4ba16f0..945d28650 100644 --- a/crates/ide_assists/src/handlers/inline_local_variable.rs +++ b/crates/ide_assists/src/handlers/inline_local_variable.rs @@ -65,10 +65,9 @@ pub(crate) fn inline_local_variable(acc: &mut Assists, ctx: &AssistContext) -> O Some(u) => u, None => return Some(false), }; - - Some(!matches!( - (&initializer_expr, usage_parent), - ( + Some( + !(matches!( + initializer_expr, ast::Expr::CallExpr(_) | ast::Expr::IndexExpr(_) | ast::Expr::MethodCallExpr(_) @@ -82,9 +81,8 @@ pub(crate) fn inline_local_variable(acc: &mut Assists, ctx: &AssistContext) -> O | ast::Expr::PathExpr(_) | ast::Expr::BlockExpr(_) | ast::Expr::EffectExpr(_), - _ - ) | ( - _, + ) || matches!( + usage_parent, ast::Expr::CallExpr(_) | ast::Expr::TupleExpr(_) | ast::Expr::ArrayExpr(_) @@ -94,8 +92,8 @@ pub(crate) fn inline_local_variable(acc: &mut Assists, ctx: &AssistContext) -> O | ast::Expr::BreakExpr(_) | ast::Expr::ReturnExpr(_) | ast::Expr::MatchExpr(_) - ) - )) + )), + ) }) .collect::>() .map(|b| (file_id, b)) diff --git a/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt b/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt index d5ab03576..a7f936a70 100644 --- a/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt +++ b/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt @@ -54,7 +54,7 @@ source: Some( "rustc", ), - message: "can\'t compare `{integer}` with `&str`\nthe trait `std::cmp::PartialEq<&str>` is not implemented for `{integer}`", + message: "can't compare `{integer}` with `&str`\nthe trait `std::cmp::PartialEq<&str>` is not implemented for `{integer}`", related_information: None, tags: None, data: None, diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt index ada540ea6..afc562a0e 100644 --- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt +++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt @@ -54,7 +54,7 @@ source: Some( "rustc", ), - message: "method `next` has an incompatible type for trait\nexpected type `fn(&mut ty::list_iter::ListIterator<\'list, M>) -> std::option::Option<&ty::Ref>`\n found type `fn(&ty::list_iter::ListIterator<\'list, M>) -> std::option::Option<&\'list ty::Ref>`", + message: "method `next` has an incompatible type for trait\nexpected type `fn(&mut ty::list_iter::ListIterator<'list, M>) -> std::option::Option<&ty::Ref>`\n found type `fn(&ty::list_iter::ListIterator<'list, M>) -> std::option::Option<&'list ty::Ref>`", related_information: None, tags: None, data: None, -- cgit v1.2.3 From 02d25ab60d2701ce71fe2dfaca36627ad902e229 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 17 Jun 2021 18:09:44 +0200 Subject: Fix parser tests for 1.53 --- .../lexer/err/0001_unclosed_char_at_eof.txt | 4 +-- .../lexer/err/0002_unclosed_char_with_ferris.txt | 4 +-- .../err/0003_unclosed_char_with_ascii_escape.txt | 4 +-- .../err/0004_unclosed_char_with_unicode_escape.txt | 4 +-- .../lexer/err/0005_unclosed_char_with_space.txt | 4 +-- .../lexer/err/0006_unclosed_char_with_slash.txt | 4 +-- .../lexer/err/0007_unclosed_char_with_slash_n.txt | 4 +-- .../0008_unclosed_char_with_slash_single_quote.txt | 4 +-- .../lexer/err/0009_unclosed_byte_at_eof.txt | 4 +-- .../lexer/err/0010_unclosed_byte_with_ferris.txt | 4 +-- .../err/0011_unclosed_byte_with_ascii_escape.txt | 4 +-- .../err/0012_unclosed_byte_with_unicode_escape.txt | 4 +-- .../lexer/err/0013_unclosed_byte_with_space.txt | 4 +-- .../lexer/err/0014_unclosed_byte_with_slash.txt | 4 +-- .../lexer/err/0015_unclosed_byte_with_slash_n.txt | 4 +-- .../0016_unclosed_byte_with_slash_single_quote.txt | 4 +-- .../err/0057_lifetime_starts_with_a_number.txt | 8 ++--- crates/syntax/test_data/lexer/ok/0006_chars.txt | 16 +++++----- .../syntax/test_data/lexer/ok/0007_lifetimes.txt | 8 ++--- .../test_data/lexer/ok/0008_byte_strings.txt | 14 ++++----- .../parser/err/0024_many_type_parens.rast | 16 +++++----- .../parser/err/0027_incomplere_where_for.rast | 2 +- .../test_data/parser/err/0043_weird_blocks.rast | 2 +- .../parser/err/0044_unexpected_for_type.rast | 30 +++++++++---------- .../parser/err/0046_ambiguous_trait_object.rast | 6 ++-- .../inline/err/0002_misplaced_label_err.rast | 2 +- .../parser/inline/ok/0003_where_pred_for.rast | 4 +-- .../parser/inline/ok/0006_self_param.rast | 4 +-- .../parser/inline/ok/0007_type_param_bounds.rast | 2 +- .../parser/inline/ok/0015_continue_expr.rast | 2 +- .../parser/inline/ok/0028_impl_trait_type.rast | 4 +-- .../parser/inline/ok/0033_reference_type;.rast | 2 +- .../parser/inline/ok/0034_break_expr.rast | 4 +-- .../test_data/parser/inline/ok/0039_type_arg.rast | 2 +- .../inline/ok/0045_param_list_opt_patterns.rast | 2 +- .../inline/ok/0048_path_type_with_bounds.rast | 4 +-- .../parser/inline/ok/0055_literal_pattern.rast | 2 +- .../parser/inline/ok/0056_where_clause.rast | 12 ++++---- .../parser/inline/ok/0065_dyn_trait_type.rast | 4 +-- .../test_data/parser/inline/ok/0081_for_type.rast | 10 +++---- .../parser/inline/ok/0085_expr_literals.rast | 4 +-- .../test_data/parser/inline/ok/0109_label.rast | 6 ++-- .../ok/0122_generic_lifetime_type_attribute.rast | 4 +-- .../inline/ok/0154_no_dyn_trait_leading_for.rast | 4 +-- .../parser/inline/ok/0161_labeled_block.rast | 2 +- .../parser/ok/0018_struct_type_params.rast | 34 +++++++++++----------- .../parser/ok/0020_type_param_bounds.rast | 28 +++++++++--------- .../test_data/parser/ok/0030_string_suffixes.rast | 4 +-- .../syntax/test_data/parser/ok/0032_where_for.rast | 4 +-- .../test_data/parser/ok/0033_label_break.rast | 14 ++++----- .../test_data/parser/ok/0035_weird_exprs.rast | 18 ++++++------ .../test_data/parser/ok/0051_parameter_attrs.rast | 12 ++++---- .../test_data/parser/ok/0067_where_for_pred.rast | 30 +++++++++---------- .../parser/ok/0069_multi_trait_object.rast | 6 ++-- 54 files changed, 198 insertions(+), 198 deletions(-) diff --git a/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt b/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt index 4d5ad74df..135f49552 100644 --- a/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt +++ b/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt @@ -1,2 +1,2 @@ -CHAR 1 "\'" -> error0..1 token("\'") msg(Missing trailing `'` symbol to terminate the character literal) +CHAR 1 "'" +> error0..1 token("'") msg(Missing trailing `'` symbol to terminate the character literal) diff --git a/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt b/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt index eafdb3c7c..cc3933d95 100644 --- a/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt +++ b/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt @@ -1,2 +1,2 @@ -CHAR 5 "\'🦀" -> error0..5 token("\'🦀") msg(Missing trailing `'` symbol to terminate the character literal) +CHAR 5 "'🦀" +> error0..5 token("'🦀") msg(Missing trailing `'` symbol to terminate the character literal) diff --git a/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt b/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt index cc2b4866a..21d990e6f 100644 --- a/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt +++ b/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt @@ -1,2 +1,2 @@ -CHAR 5 "\'\\x7f" -> error0..5 token("\'\\x7f") msg(Missing trailing `'` symbol to terminate the character literal) +CHAR 5 "'\\x7f" +> error0..5 token("'\\x7f") msg(Missing trailing `'` symbol to terminate the character literal) diff --git a/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt b/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt index a6d422cb3..055dba64c 100644 --- a/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt +++ b/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt @@ -1,2 +1,2 @@ -CHAR 9 "\'\\u{20AA}" -> error0..9 token("\'\\u{20AA}") msg(Missing trailing `'` symbol to terminate the character literal) +CHAR 9 "'\\u{20AA}" +> error0..9 token("'\\u{20AA}") msg(Missing trailing `'` symbol to terminate the character literal) diff --git a/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt b/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt index 47e7baa70..9ee5e93fa 100644 --- a/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt +++ b/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt @@ -1,2 +1,2 @@ -CHAR 2 "\' " -> error0..2 token("\' ") msg(Missing trailing `'` symbol to terminate the character literal) +CHAR 2 "' " +> error0..2 token("' ") msg(Missing trailing `'` symbol to terminate the character literal) diff --git a/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt b/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt index 511029d80..dc3a596f6 100644 --- a/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt +++ b/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt @@ -1,2 +1,2 @@ -CHAR 2 "\'\\" -> error0..2 token("\'\\") msg(Missing trailing `'` symbol to terminate the character literal) +CHAR 2 "'\\" +> error0..2 token("'\\") msg(Missing trailing `'` symbol to terminate the character literal) diff --git a/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt b/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt index d2ba5742c..e46edea98 100644 --- a/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt +++ b/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt @@ -1,2 +1,2 @@ -CHAR 3 "\'\\n" -> error0..3 token("\'\\n") msg(Missing trailing `'` symbol to terminate the character literal) +CHAR 3 "'\\n" +> error0..3 token("'\\n") msg(Missing trailing `'` symbol to terminate the character literal) diff --git a/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt b/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt index ae9a7f0e2..8ad1e913a 100644 --- a/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt +++ b/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt @@ -1,2 +1,2 @@ -CHAR 3 "\'\\\'" -> error0..3 token("\'\\\'") msg(Missing trailing `'` symbol to terminate the character literal) +CHAR 3 "'\\'" +> error0..3 token("'\\'") msg(Missing trailing `'` symbol to terminate the character literal) diff --git a/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt b/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt index ff1504592..9d30c7466 100644 --- a/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt +++ b/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt @@ -1,2 +1,2 @@ -BYTE 2 "b\'" -> error0..2 token("b\'") msg(Missing trailing `'` symbol to terminate the byte literal) +BYTE 2 "b'" +> error0..2 token("b'") msg(Missing trailing `'` symbol to terminate the byte literal) diff --git a/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt b/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt index 34f7bd6d4..9dbf4203e 100644 --- a/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt +++ b/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt @@ -1,2 +1,2 @@ -BYTE 6 "b\'🦀" -> error0..6 token("b\'🦀") msg(Missing trailing `'` symbol to terminate the byte literal) +BYTE 6 "b'🦀" +> error0..6 token("b'🦀") msg(Missing trailing `'` symbol to terminate the byte literal) diff --git a/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt b/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt index c964d0f00..d5d9c2ef7 100644 --- a/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt +++ b/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt @@ -1,2 +1,2 @@ -BYTE 6 "b\'\\x7f" -> error0..6 token("b\'\\x7f") msg(Missing trailing `'` symbol to terminate the byte literal) +BYTE 6 "b'\\x7f" +> error0..6 token("b'\\x7f") msg(Missing trailing `'` symbol to terminate the byte literal) diff --git a/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt b/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt index cc65fb86f..a99b9666a 100644 --- a/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt +++ b/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt @@ -1,2 +1,2 @@ -BYTE 10 "b\'\\u{20AA}" -> error0..10 token("b\'\\u{20AA}") msg(Missing trailing `'` symbol to terminate the byte literal) +BYTE 10 "b'\\u{20AA}" +> error0..10 token("b'\\u{20AA}") msg(Missing trailing `'` symbol to terminate the byte literal) diff --git a/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt b/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt index 800834a14..8a344f712 100644 --- a/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt +++ b/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt @@ -1,2 +1,2 @@ -BYTE 3 "b\' " -> error0..3 token("b\' ") msg(Missing trailing `'` symbol to terminate the byte literal) +BYTE 3 "b' " +> error0..3 token("b' ") msg(Missing trailing `'` symbol to terminate the byte literal) diff --git a/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt b/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt index 7b85ee646..b78a43c02 100644 --- a/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt +++ b/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt @@ -1,2 +1,2 @@ -BYTE 3 "b\'\\" -> error0..3 token("b\'\\") msg(Missing trailing `'` symbol to terminate the byte literal) +BYTE 3 "b'\\" +> error0..3 token("b'\\") msg(Missing trailing `'` symbol to terminate the byte literal) diff --git a/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt b/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt index 4b9a63117..5147363ba 100644 --- a/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt +++ b/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt @@ -1,2 +1,2 @@ -BYTE 4 "b\'\\n" -> error0..4 token("b\'\\n") msg(Missing trailing `'` symbol to terminate the byte literal) +BYTE 4 "b'\\n" +> error0..4 token("b'\\n") msg(Missing trailing `'` symbol to terminate the byte literal) diff --git a/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt b/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt index fe337f8d3..261c0894f 100644 --- a/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt +++ b/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt @@ -1,2 +1,2 @@ -BYTE 4 "b\'\\\'" -> error0..4 token("b\'\\\'") msg(Missing trailing `'` symbol to terminate the byte literal) +BYTE 4 "b'\\'" +> error0..4 token("b'\\'") msg(Missing trailing `'` symbol to terminate the byte literal) diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt index 11e0ae14a..b746404d2 100644 --- a/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt +++ b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt @@ -1,6 +1,6 @@ -LIFETIME_IDENT 2 "\'1" +LIFETIME_IDENT 2 "'1" WHITESPACE 1 "\n" -LIFETIME_IDENT 10 "\'1lifetime" +LIFETIME_IDENT 10 "'1lifetime" WHITESPACE 1 "\n" -> error0..2 token("\'1") msg(Lifetime name cannot start with a number) -> error3..13 token("\'1lifetime") msg(Lifetime name cannot start with a number) +> error0..2 token("'1") msg(Lifetime name cannot start with a number) +> error3..13 token("'1lifetime") msg(Lifetime name cannot start with a number) diff --git a/crates/syntax/test_data/lexer/ok/0006_chars.txt b/crates/syntax/test_data/lexer/ok/0006_chars.txt index 950954fbc..756477dc9 100644 --- a/crates/syntax/test_data/lexer/ok/0006_chars.txt +++ b/crates/syntax/test_data/lexer/ok/0006_chars.txt @@ -1,16 +1,16 @@ -CHAR 3 "\'x\'" +CHAR 3 "'x'" WHITESPACE 1 " " -CHAR 3 "\' \'" +CHAR 3 "' '" WHITESPACE 1 " " -CHAR 3 "\'0\'" +CHAR 3 "'0'" WHITESPACE 1 " " -CHAR 7 "\'hello\'" +CHAR 7 "'hello'" WHITESPACE 1 " " -CHAR 6 "\'\\x7f\'" +CHAR 6 "'\\x7f'" WHITESPACE 1 " " -CHAR 4 "\'\\n\'" +CHAR 4 "'\\n'" WHITESPACE 1 " " -CHAR 4 "\'\\\\\'" +CHAR 4 "'\\\\'" WHITESPACE 1 " " -CHAR 4 "\'\\\'\'" +CHAR 4 "'\\''" WHITESPACE 1 "\n" diff --git a/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt b/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt index 4d6625c3a..32ed9ed50 100644 --- a/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt +++ b/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt @@ -1,8 +1,8 @@ -LIFETIME_IDENT 2 "\'a" +LIFETIME_IDENT 2 "'a" WHITESPACE 1 " " -LIFETIME_IDENT 4 "\'foo" +LIFETIME_IDENT 4 "'foo" WHITESPACE 1 " " -LIFETIME_IDENT 12 "\'foo_bar_baz" +LIFETIME_IDENT 12 "'foo_bar_baz" WHITESPACE 1 " " -LIFETIME_IDENT 2 "\'_" +LIFETIME_IDENT 2 "'_" WHITESPACE 1 "\n" diff --git a/crates/syntax/test_data/lexer/ok/0008_byte_strings.txt b/crates/syntax/test_data/lexer/ok/0008_byte_strings.txt index e61ad99be..06d6bdd1f 100644 --- a/crates/syntax/test_data/lexer/ok/0008_byte_strings.txt +++ b/crates/syntax/test_data/lexer/ok/0008_byte_strings.txt @@ -1,22 +1,22 @@ -BYTE 3 "b\'\'" +BYTE 3 "b''" WHITESPACE 1 " " -BYTE 4 "b\'x\'" +BYTE 4 "b'x'" WHITESPACE 1 " " BYTE_STRING 6 "b\"foo\"" WHITESPACE 1 " " BYTE_STRING 4 "br\"\"" WHITESPACE 1 "\n" -BYTE 6 "b\'\'suf" +BYTE 6 "b''suf" WHITESPACE 1 " " BYTE_STRING 5 "b\"\"ix" WHITESPACE 1 " " BYTE_STRING 6 "br\"\"br" WHITESPACE 1 "\n" -BYTE 5 "b\'\\n\'" +BYTE 5 "b'\\n'" WHITESPACE 1 " " -BYTE 5 "b\'\\\\\'" +BYTE 5 "b'\\\\'" WHITESPACE 1 " " -BYTE 5 "b\'\\\'\'" +BYTE 5 "b'\\''" WHITESPACE 1 " " -BYTE 8 "b\'hello\'" +BYTE 8 "b'hello'" WHITESPACE 1 "\n" diff --git a/crates/syntax/test_data/parser/err/0024_many_type_parens.rast b/crates/syntax/test_data/parser/err/0024_many_type_parens.rast index 4c4ddf5ec..be4a62940 100644 --- a/crates/syntax/test_data/parser/err/0024_many_type_parens.rast +++ b/crates/syntax/test_data/parser/err/0024_many_type_parens.rast @@ -43,7 +43,7 @@ SOURCE_FILE@0..240 L_ANGLE@32..33 "<" LIFETIME_PARAM@33..35 LIFETIME@33..35 - LIFETIME_IDENT@33..35 "\'a" + LIFETIME_IDENT@33..35 "'a" R_ANGLE@35..36 ">" WHITESPACE@36..37 " " PATH_TYPE@37..46 @@ -55,7 +55,7 @@ SOURCE_FILE@0..240 L_ANGLE@42..43 "<" LIFETIME_ARG@43..45 LIFETIME@43..45 - LIFETIME_IDENT@43..45 "\'a" + LIFETIME_IDENT@43..45 "'a" R_ANGLE@45..46 ">" R_PAREN@46..47 ")" R_ANGLE@47..48 ">" @@ -128,7 +128,7 @@ SOURCE_FILE@0..240 L_ANGLE@106..107 "<" LIFETIME_PARAM@107..109 LIFETIME@107..109 - LIFETIME_IDENT@107..109 "\'a" + LIFETIME_IDENT@107..109 "'a" R_ANGLE@109..110 ">" WHITESPACE@110..111 " " PATH_TYPE@111..120 @@ -140,7 +140,7 @@ SOURCE_FILE@0..240 L_ANGLE@116..117 "<" LIFETIME_ARG@117..119 LIFETIME@117..119 - LIFETIME_IDENT@117..119 "\'a" + LIFETIME_IDENT@117..119 "'a" R_ANGLE@119..120 ">" R_PAREN@120..121 ")" EXPR_STMT@121..123 @@ -191,7 +191,7 @@ SOURCE_FILE@0..240 PATH_SEGMENT@154..158 L_ANGLE@154..155 "<" ERROR@155..157 - LIFETIME_IDENT@155..157 "\'a" + LIFETIME_IDENT@155..157 "'a" R_ANGLE@157..158 ">" WHITESPACE@158..159 " " BIN_EXPR@159..180 @@ -205,7 +205,7 @@ SOURCE_FILE@0..240 IDENT@159..164 "Trait" L_ANGLE@164..165 "<" ERROR@165..167 - LIFETIME_IDENT@165..167 "\'a" + LIFETIME_IDENT@165..167 "'a" R_ANGLE@167..168 ">" ERROR@168..169 R_PAREN@168..169 ")" @@ -250,7 +250,7 @@ SOURCE_FILE@0..240 L_ANGLE@200..201 "<" LIFETIME_PARAM@201..203 LIFETIME@201..203 - LIFETIME_IDENT@201..203 "\'a" + LIFETIME_IDENT@201..203 "'a" R_ANGLE@203..204 ">" WHITESPACE@204..205 " " PATH_TYPE@205..214 @@ -262,7 +262,7 @@ SOURCE_FILE@0..240 L_ANGLE@210..211 "<" LIFETIME_ARG@211..213 LIFETIME@211..213 - LIFETIME_IDENT@211..213 "\'a" + LIFETIME_IDENT@211..213 "'a" R_ANGLE@213..214 ">" R_PAREN@214..215 ")" WHITESPACE@215..216 " " diff --git a/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast b/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast index c5215d6b1..b021783fc 100644 --- a/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast +++ b/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast @@ -17,7 +17,7 @@ SOURCE_FILE@0..30 L_ANGLE@22..23 "<" LIFETIME_PARAM@23..25 LIFETIME@23..25 - LIFETIME_IDENT@23..25 "\'a" + LIFETIME_IDENT@23..25 "'a" R_ANGLE@25..26 ">" WHITESPACE@26..27 "\n" BLOCK_EXPR@27..29 diff --git a/crates/syntax/test_data/parser/err/0043_weird_blocks.rast b/crates/syntax/test_data/parser/err/0043_weird_blocks.rast index e73bd1aea..e24f01e29 100644 --- a/crates/syntax/test_data/parser/err/0043_weird_blocks.rast +++ b/crates/syntax/test_data/parser/err/0043_weird_blocks.rast @@ -55,7 +55,7 @@ SOURCE_FILE@0..83 ERROR@68..75 LABEL@68..75 LIFETIME@68..74 - LIFETIME_IDENT@68..74 "\'label" + LIFETIME_IDENT@68..74 "'label" COLON@74..75 ":" WHITESPACE@75..76 " " LITERAL@76..78 diff --git a/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast b/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast index cc54185e5..a2460a7ec 100644 --- a/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast +++ b/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast @@ -13,13 +13,13 @@ SOURCE_FILE@0..239 L_ANGLE@17..18 "<" LIFETIME_PARAM@18..20 LIFETIME@18..20 - LIFETIME_IDENT@18..20 "\'a" + LIFETIME_IDENT@18..20 "'a" R_ANGLE@20..21 ">" WHITESPACE@21..22 " " REF_TYPE@22..29 AMP@22..23 "&" LIFETIME@23..25 - LIFETIME_IDENT@23..25 "\'a" + LIFETIME_IDENT@23..25 "'a" WHITESPACE@25..26 " " PATH_TYPE@26..29 PATH@26..29 @@ -42,7 +42,7 @@ SOURCE_FILE@0..239 L_ANGLE@48..49 "<" LIFETIME_PARAM@49..51 LIFETIME@49..51 - LIFETIME_IDENT@49..51 "\'a" + LIFETIME_IDENT@49..51 "'a" R_ANGLE@51..52 ">" WHITESPACE@52..53 " " TUPLE_TYPE@53..63 @@ -50,7 +50,7 @@ SOURCE_FILE@0..239 REF_TYPE@54..61 AMP@54..55 "&" LIFETIME@55..57 - LIFETIME_IDENT@55..57 "\'a" + LIFETIME_IDENT@55..57 "'a" WHITESPACE@57..58 " " PATH_TYPE@58..61 PATH@58..61 @@ -75,7 +75,7 @@ SOURCE_FILE@0..239 L_ANGLE@84..85 "<" LIFETIME_PARAM@85..87 LIFETIME@85..87 - LIFETIME_IDENT@85..87 "\'a" + LIFETIME_IDENT@85..87 "'a" R_ANGLE@87..88 ">" WHITESPACE@88..89 " " SLICE_TYPE@89..94 @@ -102,7 +102,7 @@ SOURCE_FILE@0..239 L_ANGLE@115..116 "<" LIFETIME_PARAM@116..118 LIFETIME@116..118 - LIFETIME_IDENT@116..118 "\'a" + LIFETIME_IDENT@116..118 "'a" R_ANGLE@118..119 ">" WHITESPACE@119..120 " " FOR_TYPE@120..148 @@ -111,7 +111,7 @@ SOURCE_FILE@0..239 L_ANGLE@123..124 "<" LIFETIME_PARAM@124..126 LIFETIME@124..126 - LIFETIME_IDENT@124..126 "\'b" + LIFETIME_IDENT@124..126 "'b" R_ANGLE@126..127 ">" WHITESPACE@127..128 " " FN_PTR_TYPE@128..148 @@ -122,7 +122,7 @@ SOURCE_FILE@0..239 REF_TYPE@131..138 AMP@131..132 "&" LIFETIME@132..134 - LIFETIME_IDENT@132..134 "\'a" + LIFETIME_IDENT@132..134 "'a" WHITESPACE@134..135 " " PATH_TYPE@135..138 PATH@135..138 @@ -135,7 +135,7 @@ SOURCE_FILE@0..239 REF_TYPE@140..147 AMP@140..141 "&" LIFETIME@141..143 - LIFETIME_IDENT@141..143 "\'b" + LIFETIME_IDENT@141..143 "'b" WHITESPACE@143..144 " " PATH_TYPE@144..147 PATH@144..147 @@ -169,7 +169,7 @@ SOURCE_FILE@0..239 L_ANGLE@183..184 "<" LIFETIME_PARAM@184..186 LIFETIME@184..186 - LIFETIME_IDENT@184..186 "\'a" + LIFETIME_IDENT@184..186 "'a" R_ANGLE@186..187 ">" WHITESPACE@187..188 " " FOR_TYPE@188..227 @@ -178,7 +178,7 @@ SOURCE_FILE@0..239 L_ANGLE@191..192 "<" LIFETIME_PARAM@192..194 LIFETIME@192..194 - LIFETIME_IDENT@192..194 "\'b" + LIFETIME_IDENT@192..194 "'b" R_ANGLE@194..195 ">" WHITESPACE@195..196 " " FOR_TYPE@196..227 @@ -187,7 +187,7 @@ SOURCE_FILE@0..239 L_ANGLE@199..200 "<" LIFETIME_PARAM@200..202 LIFETIME@200..202 - LIFETIME_IDENT@200..202 "\'c" + LIFETIME_IDENT@200..202 "'c" R_ANGLE@202..203 ">" WHITESPACE@203..204 " " FN_PTR_TYPE@204..227 @@ -198,7 +198,7 @@ SOURCE_FILE@0..239 REF_TYPE@207..212 AMP@207..208 "&" LIFETIME@208..210 - LIFETIME_IDENT@208..210 "\'a" + LIFETIME_IDENT@208..210 "'a" WHITESPACE@210..211 " " PATH_TYPE@211..212 PATH@211..212 @@ -211,7 +211,7 @@ SOURCE_FILE@0..239 REF_TYPE@214..219 AMP@214..215 "&" LIFETIME@215..217 - LIFETIME_IDENT@215..217 "\'b" + LIFETIME_IDENT@215..217 "'b" WHITESPACE@217..218 " " PATH_TYPE@218..219 PATH@218..219 @@ -224,7 +224,7 @@ SOURCE_FILE@0..239 REF_TYPE@221..226 AMP@221..222 "&" LIFETIME@222..224 - LIFETIME_IDENT@222..224 "\'c" + LIFETIME_IDENT@222..224 "'c" WHITESPACE@224..225 " " PATH_TYPE@225..226 PATH@225..226 diff --git a/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast b/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast index 7049f4734..6eaa32b96 100644 --- a/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast +++ b/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast @@ -8,7 +8,7 @@ SOURCE_FILE@0..187 L_ANGLE@8..9 "<" LIFETIME_PARAM@9..11 LIFETIME@9..11 - LIFETIME_IDENT@9..11 "\'a" + LIFETIME_IDENT@9..11 "'a" R_ANGLE@11..12 ">" WHITESPACE@12..13 " " EQ@13..14 "=" @@ -16,7 +16,7 @@ SOURCE_FILE@0..187 REF_TYPE@15..34 AMP@15..16 "&" LIFETIME@16..18 - LIFETIME_IDENT@16..18 "\'a" + LIFETIME_IDENT@16..18 "'a" WHITESPACE@18..19 " " DYN_TRAIT_TYPE@19..34 DYN_KW@19..22 "dyn" @@ -104,7 +104,7 @@ SOURCE_FILE@0..187 WHITESPACE@100..101 " " TYPE_BOUND@101..108 LIFETIME@101..108 - LIFETIME_IDENT@101..108 "\'static" + LIFETIME_IDENT@101..108 "'static" SEMICOLON@108..109 ";" WHITESPACE@109..110 "\n" FN@110..186 diff --git a/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast b/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast index 0adf2cd5a..97bb5059d 100644 --- a/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast +++ b/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast @@ -15,7 +15,7 @@ SOURCE_FILE@0..30 ERROR@16..22 LABEL@16..22 LIFETIME@16..21 - LIFETIME_IDENT@16..21 "\'loop" + LIFETIME_IDENT@16..21 "'loop" COLON@21..22 ":" WHITESPACE@22..23 " " IMPL@23..27 diff --git a/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast b/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast index 6cdfd058b..12f5040f9 100644 --- a/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast +++ b/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast @@ -23,7 +23,7 @@ SOURCE_FILE@0..54 L_ANGLE@30..31 "<" LIFETIME_PARAM@31..33 LIFETIME@31..33 - LIFETIME_IDENT@31..33 "\'a" + LIFETIME_IDENT@31..33 "'a" R_ANGLE@33..34 ">" WHITESPACE@34..35 " " PATH_TYPE@35..36 @@ -46,7 +46,7 @@ SOURCE_FILE@0..54 REF_TYPE@41..48 AMP@41..42 "&" LIFETIME@42..44 - LIFETIME_IDENT@42..44 "\'a" + LIFETIME_IDENT@42..44 "'a" WHITESPACE@44..45 " " PATH_TYPE@45..48 PATH@45..48 diff --git a/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast b/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast index f0d152d33..d4c8b9d67 100644 --- a/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast +++ b/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast @@ -55,7 +55,7 @@ SOURCE_FILE@0..128 SELF_PARAM@56..64 AMP@56..57 "&" LIFETIME@57..59 - LIFETIME_IDENT@57..59 "\'a" + LIFETIME_IDENT@57..59 "'a" WHITESPACE@59..60 " " NAME@60..64 SELF_KW@60..64 "self" @@ -76,7 +76,7 @@ SOURCE_FILE@0..128 SELF_PARAM@79..91 AMP@79..80 "&" LIFETIME@80..82 - LIFETIME_IDENT@80..82 "\'a" + LIFETIME_IDENT@80..82 "'a" WHITESPACE@82..83 " " MUT_KW@83..86 "mut" WHITESPACE@86..87 " " diff --git a/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast b/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast index 075b438d2..121c3966a 100644 --- a/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast +++ b/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast @@ -14,7 +14,7 @@ SOURCE_FILE@0..35 TYPE_BOUND_LIST@12..32 TYPE_BOUND@12..14 LIFETIME@12..14 - LIFETIME_IDENT@12..14 "\'a" + LIFETIME_IDENT@12..14 "'a" WHITESPACE@14..15 " " PLUS@15..16 "+" WHITESPACE@16..17 " " diff --git a/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast b/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast index b9e92b57a..b67ea2682 100644 --- a/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast +++ b/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast @@ -27,7 +27,7 @@ SOURCE_FILE@0..69 CONTINUE_KW@48..56 "continue" WHITESPACE@56..57 " " LIFETIME@57..59 - LIFETIME_IDENT@57..59 "\'l" + LIFETIME_IDENT@57..59 "'l" SEMICOLON@59..60 ";" WHITESPACE@60..65 "\n " R_CURLY@65..66 "}" diff --git a/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast b/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast index dad4362b7..b44f46f05 100644 --- a/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast @@ -32,7 +32,7 @@ SOURCE_FILE@0..43 L_ANGLE@31..32 "<" LIFETIME_ARG@32..34 LIFETIME@32..34 - LIFETIME_IDENT@32..34 "\'a" + LIFETIME_IDENT@32..34 "'a" R_ANGLE@34..35 ">" R_ANGLE@35..36 ">" WHITESPACE@36..37 " " @@ -40,6 +40,6 @@ SOURCE_FILE@0..43 WHITESPACE@38..39 " " TYPE_BOUND@39..41 LIFETIME@39..41 - LIFETIME_IDENT@39..41 "\'a" + LIFETIME_IDENT@39..41 "'a" SEMICOLON@41..42 ";" WHITESPACE@42..43 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast b/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast index ac0299268..7cb288bf0 100644 --- a/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast +++ b/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast @@ -25,7 +25,7 @@ SOURCE_FILE@0..54 REF_TYPE@23..34 AMP@23..24 "&" LIFETIME@24..31 - LIFETIME_IDENT@24..31 "\'static" + LIFETIME_IDENT@24..31 "'static" WHITESPACE@31..32 " " TUPLE_TYPE@32..34 L_PAREN@32..33 "(" diff --git a/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast b/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast index 828013d45..783b25338 100644 --- a/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast +++ b/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast @@ -27,7 +27,7 @@ SOURCE_FILE@0..102 BREAK_KW@45..50 "break" WHITESPACE@50..51 " " LIFETIME@51..53 - LIFETIME_IDENT@51..53 "\'l" + LIFETIME_IDENT@51..53 "'l" SEMICOLON@53..54 ";" WHITESPACE@54..63 "\n " EXPR_STMT@63..72 @@ -43,7 +43,7 @@ SOURCE_FILE@0..102 BREAK_KW@81..86 "break" WHITESPACE@86..87 " " LIFETIME@87..89 - LIFETIME_IDENT@87..89 "\'l" + LIFETIME_IDENT@87..89 "'l" WHITESPACE@89..90 " " LITERAL@90..92 INT_NUMBER@90..92 "92" diff --git a/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast b/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast index 68c0f1c66..11efa23a4 100644 --- a/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast +++ b/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast @@ -16,7 +16,7 @@ SOURCE_FILE@0..59 L_ANGLE@10..11 "<" LIFETIME_ARG@11..18 LIFETIME@11..18 - LIFETIME_IDENT@11..18 "\'static" + LIFETIME_IDENT@11..18 "'static" COMMA@18..19 "," WHITESPACE@19..20 " " TYPE_ARG@20..23 diff --git a/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast b/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast index b6f5a5689..abc258b33 100644 --- a/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast +++ b/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast @@ -34,7 +34,7 @@ SOURCE_FILE@0..35 L_ANGLE@24..25 "<" LIFETIME_ARG@25..27 LIFETIME@25..27 - LIFETIME_IDENT@25..27 "\'a" + LIFETIME_IDENT@25..27 "'a" R_ANGLE@27..28 ">" R_PAREN@28..29 ")" R_ANGLE@29..30 ">" diff --git a/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast b/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast index 7df6e190a..e1b88c5db 100644 --- a/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast +++ b/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast @@ -32,7 +32,7 @@ SOURCE_FILE@0..58 WHITESPACE@19..20 " " TYPE_BOUND@20..22 LIFETIME@20..22 - LIFETIME_IDENT@20..22 "\'f" + LIFETIME_IDENT@20..22 "'f" R_ANGLE@22..23 ">" WHITESPACE@23..24 " " BLOCK_EXPR@24..26 @@ -74,7 +74,7 @@ SOURCE_FILE@0..58 WHITESPACE@50..51 " " TYPE_BOUND@51..53 LIFETIME@51..53 - LIFETIME_IDENT@51..53 "\'f" + LIFETIME_IDENT@51..53 "'f" R_ANGLE@53..54 ">" WHITESPACE@54..55 " " BLOCK_EXPR@55..57 diff --git a/crates/syntax/test_data/parser/inline/ok/0055_literal_pattern.rast b/crates/syntax/test_data/parser/inline/ok/0055_literal_pattern.rast index 68bb43852..acf18fc2b 100644 --- a/crates/syntax/test_data/parser/inline/ok/0055_literal_pattern.rast +++ b/crates/syntax/test_data/parser/inline/ok/0055_literal_pattern.rast @@ -49,7 +49,7 @@ SOURCE_FILE@0..113 MATCH_ARM@71..80 LITERAL_PAT@71..74 LITERAL@71..74 - CHAR@71..74 "\'c\'" + CHAR@71..74 "'c'" WHITESPACE@74..75 " " FAT_ARROW@75..77 "=>" WHITESPACE@77..78 " " diff --git a/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast b/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast index 61dea413d..d42a7e295 100644 --- a/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast +++ b/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast @@ -13,19 +13,19 @@ SOURCE_FILE@0..116 WHITESPACE@14..18 "\n " WHERE_PRED@18..29 LIFETIME@18..20 - LIFETIME_IDENT@18..20 "\'a" + LIFETIME_IDENT@18..20 "'a" COLON@20..21 ":" WHITESPACE@21..22 " " TYPE_BOUND_LIST@22..29 TYPE_BOUND@22..24 LIFETIME@22..24 - LIFETIME_IDENT@22..24 "\'b" + LIFETIME_IDENT@22..24 "'b" WHITESPACE@24..25 " " PLUS@25..26 "+" WHITESPACE@26..27 " " TYPE_BOUND@27..29 LIFETIME@27..29 - LIFETIME_IDENT@27..29 "\'c" + LIFETIME_IDENT@27..29 "'c" COMMA@29..30 "," WHITESPACE@30..34 "\n " WHERE_PRED@34..59 @@ -57,7 +57,7 @@ SOURCE_FILE@0..116 WHITESPACE@51..52 " " TYPE_BOUND@52..59 LIFETIME@52..59 - LIFETIME_IDENT@52..59 "\'static" + LIFETIME_IDENT@52..59 "'static" COMMA@59..60 "," WHITESPACE@60..64 "\n " WHERE_PRED@64..82 @@ -76,7 +76,7 @@ SOURCE_FILE@0..116 TYPE_BOUND_LIST@80..82 TYPE_BOUND@80..82 LIFETIME@80..82 - LIFETIME_IDENT@80..82 "\'a" + LIFETIME_IDENT@80..82 "'a" COMMA@82..83 "," WHITESPACE@83..87 "\n " WHERE_PRED@87..112 @@ -108,7 +108,7 @@ SOURCE_FILE@0..116 TYPE_BOUND_LIST@110..112 TYPE_BOUND@110..112 LIFETIME@110..112 - LIFETIME_IDENT@110..112 "\'a" + LIFETIME_IDENT@110..112 "'a" WHITESPACE@112..113 "\n" BLOCK_EXPR@113..115 L_CURLY@113..114 "{" diff --git a/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast b/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast index 49d26cef4..8f76177d1 100644 --- a/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast @@ -32,7 +32,7 @@ SOURCE_FILE@0..42 L_ANGLE@30..31 "<" LIFETIME_ARG@31..33 LIFETIME@31..33 - LIFETIME_IDENT@31..33 "\'a" + LIFETIME_IDENT@31..33 "'a" R_ANGLE@33..34 ">" R_ANGLE@34..35 ">" WHITESPACE@35..36 " " @@ -40,6 +40,6 @@ SOURCE_FILE@0..42 WHITESPACE@37..38 " " TYPE_BOUND@38..40 LIFETIME@38..40 - LIFETIME_IDENT@38..40 "\'a" + LIFETIME_IDENT@38..40 "'a" SEMICOLON@40..41 ";" WHITESPACE@41..42 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast b/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast index 8c909b5af..7958e32e5 100644 --- a/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast @@ -13,7 +13,7 @@ SOURCE_FILE@0..121 L_ANGLE@12..13 "<" LIFETIME_PARAM@13..15 LIFETIME@13..15 - LIFETIME_IDENT@13..15 "\'a" + LIFETIME_IDENT@13..15 "'a" R_ANGLE@15..16 ">" WHITESPACE@16..17 " " FN_PTR_TYPE@17..27 @@ -44,7 +44,7 @@ SOURCE_FILE@0..121 L_ANGLE@41..42 "<" LIFETIME_PARAM@42..44 LIFETIME@42..44 - LIFETIME_IDENT@42..44 "\'a" + LIFETIME_IDENT@42..44 "'a" R_ANGLE@44..45 ">" WHITESPACE@45..46 " " FN_PTR_TYPE@46..80 @@ -62,7 +62,7 @@ SOURCE_FILE@0..121 REF_TYPE@67..73 AMP@67..68 "&" LIFETIME@68..70 - LIFETIME_IDENT@68..70 "\'a" + LIFETIME_IDENT@68..70 "'a" WHITESPACE@70..71 " " TUPLE_TYPE@71..73 L_PAREN@71..72 "(" @@ -91,7 +91,7 @@ SOURCE_FILE@0..121 L_ANGLE@96..97 "<" LIFETIME_PARAM@97..99 LIFETIME@97..99 - LIFETIME_IDENT@97..99 "\'a" + LIFETIME_IDENT@97..99 "'a" R_ANGLE@99..100 ">" WHITESPACE@100..101 " " PATH_TYPE@101..119 @@ -105,7 +105,7 @@ SOURCE_FILE@0..121 REF_TYPE@111..118 AMP@111..112 "&" LIFETIME@112..114 - LIFETIME_IDENT@112..114 "\'a" + LIFETIME_IDENT@112..114 "'a" WHITESPACE@114..115 " " PATH_TYPE@115..118 PATH@115..118 diff --git a/crates/syntax/test_data/parser/inline/ok/0085_expr_literals.rast b/crates/syntax/test_data/parser/inline/ok/0085_expr_literals.rast index ae838105d..f784e96e0 100644 --- a/crates/syntax/test_data/parser/inline/ok/0085_expr_literals.rast +++ b/crates/syntax/test_data/parser/inline/ok/0085_expr_literals.rast @@ -68,7 +68,7 @@ SOURCE_FILE@0..189 EQ@90..91 "=" WHITESPACE@91..92 " " LITERAL@92..96 - BYTE@92..96 "b\'a\'" + BYTE@92..96 "b'a'" SEMICOLON@96..97 ";" WHITESPACE@97..102 "\n " LET_STMT@102..114 @@ -80,7 +80,7 @@ SOURCE_FILE@0..189 EQ@108..109 "=" WHITESPACE@109..110 " " LITERAL@110..113 - CHAR@110..113 "\'b\'" + CHAR@110..113 "'b'" SEMICOLON@113..114 ";" WHITESPACE@114..119 "\n " LET_STMT@119..131 diff --git a/crates/syntax/test_data/parser/inline/ok/0109_label.rast b/crates/syntax/test_data/parser/inline/ok/0109_label.rast index 860dfe608..8540b8520 100644 --- a/crates/syntax/test_data/parser/inline/ok/0109_label.rast +++ b/crates/syntax/test_data/parser/inline/ok/0109_label.rast @@ -15,7 +15,7 @@ SOURCE_FILE@0..74 LOOP_EXPR@15..26 LABEL@15..18 LIFETIME@15..17 - LIFETIME_IDENT@15..17 "\'a" + LIFETIME_IDENT@15..17 "'a" COLON@17..18 ":" WHITESPACE@18..19 " " LOOP_KW@19..23 "loop" @@ -28,7 +28,7 @@ SOURCE_FILE@0..74 WHILE_EXPR@31..48 LABEL@31..34 LIFETIME@31..33 - LIFETIME_IDENT@31..33 "\'b" + LIFETIME_IDENT@31..33 "'b" COLON@33..34 ":" WHITESPACE@34..35 " " WHILE_KW@35..40 "while" @@ -44,7 +44,7 @@ SOURCE_FILE@0..74 FOR_EXPR@53..71 LABEL@53..56 LIFETIME@53..55 - LIFETIME_IDENT@53..55 "\'c" + LIFETIME_IDENT@53..55 "'c" COLON@55..56 ":" WHITESPACE@56..57 " " FOR_KW@57..60 "for" diff --git a/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast b/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast index 840181383..5682bd28c 100644 --- a/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast +++ b/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast @@ -22,7 +22,7 @@ SOURCE_FILE@0..64 R_BRACK@25..26 "]" WHITESPACE@26..27 " " LIFETIME@27..29 - LIFETIME_IDENT@27..29 "\'a" + LIFETIME_IDENT@27..29 "'a" COMMA@29..30 "," WHITESPACE@30..31 " " TYPE_PARAM@31..48 @@ -53,7 +53,7 @@ SOURCE_FILE@0..64 REF_TYPE@53..58 AMP@53..54 "&" LIFETIME@54..56 - LIFETIME_IDENT@54..56 "\'a" + LIFETIME_IDENT@54..56 "'a" WHITESPACE@56..57 " " PATH_TYPE@57..58 PATH@57..58 diff --git a/crates/syntax/test_data/parser/inline/ok/0154_no_dyn_trait_leading_for.rast b/crates/syntax/test_data/parser/inline/ok/0154_no_dyn_trait_leading_for.rast index edfcb288c..860684b29 100644 --- a/crates/syntax/test_data/parser/inline/ok/0154_no_dyn_trait_leading_for.rast +++ b/crates/syntax/test_data/parser/inline/ok/0154_no_dyn_trait_leading_for.rast @@ -16,7 +16,7 @@ SOURCE_FILE@0..34 L_ANGLE@12..13 "<" LIFETIME_PARAM@13..15 LIFETIME@13..15 - LIFETIME_IDENT@13..15 "\'a" + LIFETIME_IDENT@13..15 "'a" R_ANGLE@15..16 ">" WHITESPACE@16..17 " " PATH_TYPE@17..25 @@ -28,7 +28,7 @@ SOURCE_FILE@0..34 L_ANGLE@21..22 "<" LIFETIME_ARG@22..24 LIFETIME@22..24 - LIFETIME_IDENT@22..24 "\'a" + LIFETIME_IDENT@22..24 "'a" R_ANGLE@24..25 ">" WHITESPACE@25..26 " " PLUS@26..27 "+" diff --git a/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast b/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast index c2dea1cc1..47e8859ed 100644 --- a/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast +++ b/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast @@ -15,7 +15,7 @@ SOURCE_FILE@0..23 EFFECT_EXPR@9..19 LABEL@9..16 LIFETIME@9..15 - LIFETIME_IDENT@9..15 "\'label" + LIFETIME_IDENT@9..15 "'label" COLON@15..16 ":" WHITESPACE@16..17 " " BLOCK_EXPR@17..19 diff --git a/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast b/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast index 83e17757b..f845d5cff 100644 --- a/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast +++ b/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast @@ -81,7 +81,7 @@ SOURCE_FILE@0..290 L_ANGLE@80..81 "<" LIFETIME_PARAM@81..83 LIFETIME@81..83 - LIFETIME_IDENT@81..83 "\'a" + LIFETIME_IDENT@81..83 "'a" R_ANGLE@83..84 ">" SEMICOLON@84..85 ";" WHITESPACE@85..86 "\n" @@ -94,7 +94,7 @@ SOURCE_FILE@0..290 L_ANGLE@95..96 "<" LIFETIME_PARAM@96..99 LIFETIME@96..98 - LIFETIME_IDENT@96..98 "\'a" + LIFETIME_IDENT@96..98 "'a" COLON@98..99 ":" R_ANGLE@99..100 ">" SEMICOLON@100..101 ";" @@ -108,11 +108,11 @@ SOURCE_FILE@0..290 L_ANGLE@111..112 "<" LIFETIME_PARAM@112..118 LIFETIME@112..114 - LIFETIME_IDENT@112..114 "\'a" + LIFETIME_IDENT@112..114 "'a" COLON@114..115 ":" WHITESPACE@115..116 " " LIFETIME@116..118 - LIFETIME_IDENT@116..118 "\'b" + LIFETIME_IDENT@116..118 "'b" R_ANGLE@118..119 ">" SEMICOLON@119..120 ";" WHITESPACE@120..121 "\n" @@ -125,11 +125,11 @@ SOURCE_FILE@0..290 L_ANGLE@130..131 "<" LIFETIME_PARAM@131..139 LIFETIME@131..133 - LIFETIME_IDENT@131..133 "\'a" + LIFETIME_IDENT@131..133 "'a" COLON@133..134 ":" WHITESPACE@134..135 " " LIFETIME@135..137 - LIFETIME_IDENT@135..137 "\'b" + LIFETIME_IDENT@135..137 "'b" WHITESPACE@137..138 " " PLUS@138..139 "+" WHITESPACE@139..140 " " @@ -145,16 +145,16 @@ SOURCE_FILE@0..290 L_ANGLE@152..153 "<" LIFETIME_PARAM@153..164 LIFETIME@153..155 - LIFETIME_IDENT@153..155 "\'a" + LIFETIME_IDENT@153..155 "'a" COLON@155..156 ":" WHITESPACE@156..157 " " LIFETIME@157..159 - LIFETIME_IDENT@157..159 "\'b" + LIFETIME_IDENT@157..159 "'b" WHITESPACE@159..160 " " PLUS@160..161 "+" WHITESPACE@161..162 " " LIFETIME@162..164 - LIFETIME_IDENT@162..164 "\'c" + LIFETIME_IDENT@162..164 "'c" R_ANGLE@164..165 ">" SEMICOLON@165..166 ";" WHITESPACE@166..167 "\n" @@ -167,7 +167,7 @@ SOURCE_FILE@0..290 L_ANGLE@177..178 "<" LIFETIME_PARAM@178..180 LIFETIME@178..180 - LIFETIME_IDENT@178..180 "\'a" + LIFETIME_IDENT@178..180 "'a" COMMA@180..181 "," R_ANGLE@181..182 ">" SEMICOLON@182..183 ";" @@ -181,12 +181,12 @@ SOURCE_FILE@0..290 L_ANGLE@194..195 "<" LIFETIME_PARAM@195..197 LIFETIME@195..197 - LIFETIME_IDENT@195..197 "\'a" + LIFETIME_IDENT@195..197 "'a" COMMA@197..198 "," WHITESPACE@198..199 " " LIFETIME_PARAM@199..201 LIFETIME@199..201 - LIFETIME_IDENT@199..201 "\'b" + LIFETIME_IDENT@199..201 "'b" R_ANGLE@201..202 ">" SEMICOLON@202..203 ";" WHITESPACE@203..204 "\n" @@ -199,21 +199,21 @@ SOURCE_FILE@0..290 L_ANGLE@214..215 "<" LIFETIME_PARAM@215..222 LIFETIME@215..217 - LIFETIME_IDENT@215..217 "\'a" + LIFETIME_IDENT@215..217 "'a" COLON@217..218 ":" WHITESPACE@218..219 " " LIFETIME@219..221 - LIFETIME_IDENT@219..221 "\'b" + LIFETIME_IDENT@219..221 "'b" PLUS@221..222 "+" COMMA@222..223 "," WHITESPACE@223..224 " " LIFETIME_PARAM@224..230 LIFETIME@224..226 - LIFETIME_IDENT@224..226 "\'b" + LIFETIME_IDENT@224..226 "'b" COLON@226..227 ":" WHITESPACE@227..228 " " LIFETIME@228..230 - LIFETIME_IDENT@228..230 "\'c" + LIFETIME_IDENT@228..230 "'c" COMMA@230..231 "," R_ANGLE@231..232 ">" SEMICOLON@232..233 ";" @@ -258,7 +258,7 @@ SOURCE_FILE@0..290 L_ANGLE@278..279 "<" LIFETIME_PARAM@279..281 LIFETIME@279..281 - LIFETIME_IDENT@279..281 "\'a" + LIFETIME_IDENT@279..281 "'a" COMMA@281..282 "," WHITESPACE@282..283 " " TYPE_PARAM@283..284 diff --git a/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast b/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast index 21c564a20..9d4b001ae 100644 --- a/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast +++ b/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast @@ -42,7 +42,7 @@ SOURCE_FILE@0..250 TYPE_BOUND_LIST@39..41 TYPE_BOUND@39..41 LIFETIME@39..41 - LIFETIME_IDENT@39..41 "\'a" + LIFETIME_IDENT@39..41 "'a" R_ANGLE@41..42 ">" SEMICOLON@42..43 ";" WHITESPACE@43..44 "\n" @@ -61,7 +61,7 @@ SOURCE_FILE@0..250 TYPE_BOUND_LIST@56..60 TYPE_BOUND@56..58 LIFETIME@56..58 - LIFETIME_IDENT@56..58 "\'a" + LIFETIME_IDENT@56..58 "'a" WHITESPACE@58..59 " " PLUS@59..60 "+" WHITESPACE@60..61 " " @@ -83,13 +83,13 @@ SOURCE_FILE@0..250 TYPE_BOUND_LIST@76..83 TYPE_BOUND@76..78 LIFETIME@76..78 - LIFETIME_IDENT@76..78 "\'a" + LIFETIME_IDENT@76..78 "'a" WHITESPACE@78..79 " " PLUS@79..80 "+" WHITESPACE@80..81 " " TYPE_BOUND@81..83 LIFETIME@81..83 - LIFETIME_IDENT@81..83 "\'d" + LIFETIME_IDENT@81..83 "'d" WHITESPACE@83..84 " " R_ANGLE@84..85 ">" SEMICOLON@85..86 ";" @@ -109,13 +109,13 @@ SOURCE_FILE@0..250 TYPE_BOUND_LIST@99..114 TYPE_BOUND@99..101 LIFETIME@99..101 - LIFETIME_IDENT@99..101 "\'a" + LIFETIME_IDENT@99..101 "'a" WHITESPACE@101..102 " " PLUS@102..103 "+" WHITESPACE@103..104 " " TYPE_BOUND@104..106 LIFETIME@104..106 - LIFETIME_IDENT@104..106 "\'d" + LIFETIME_IDENT@104..106 "'d" WHITESPACE@106..107 " " PLUS@107..108 "+" WHITESPACE@108..109 " " @@ -198,7 +198,7 @@ SOURCE_FILE@0..250 WHITESPACE@175..176 " " TYPE_BOUND@176..178 LIFETIME@176..178 - LIFETIME_IDENT@176..178 "\'a" + LIFETIME_IDENT@176..178 "'a" R_ANGLE@178..179 ">" SEMICOLON@179..180 ";" WHITESPACE@180..181 "\n" @@ -234,25 +234,25 @@ SOURCE_FILE@0..250 L_ANGLE@208..209 "<" LIFETIME_PARAM@209..215 LIFETIME@209..211 - LIFETIME_IDENT@209..211 "\'a" + LIFETIME_IDENT@209..211 "'a" COLON@211..212 ":" WHITESPACE@212..213 " " LIFETIME@213..215 - LIFETIME_IDENT@213..215 "\'d" + LIFETIME_IDENT@213..215 "'d" COMMA@215..216 "," WHITESPACE@216..217 " " LIFETIME_PARAM@217..228 LIFETIME@217..219 - LIFETIME_IDENT@217..219 "\'d" + LIFETIME_IDENT@217..219 "'d" COLON@219..220 ":" WHITESPACE@220..221 " " LIFETIME@221..223 - LIFETIME_IDENT@221..223 "\'a" + LIFETIME_IDENT@221..223 "'a" WHITESPACE@223..224 " " PLUS@224..225 "+" WHITESPACE@225..226 " " LIFETIME@226..228 - LIFETIME_IDENT@226..228 "\'b" + LIFETIME_IDENT@226..228 "'b" COMMA@228..229 "," WHITESPACE@229..230 " " TYPE_PARAM@230..248 @@ -263,13 +263,13 @@ SOURCE_FILE@0..250 TYPE_BOUND_LIST@233..248 TYPE_BOUND@233..235 LIFETIME@233..235 - LIFETIME_IDENT@233..235 "\'a" + LIFETIME_IDENT@233..235 "'a" WHITESPACE@235..236 " " PLUS@236..237 "+" WHITESPACE@237..238 " " TYPE_BOUND@238..240 LIFETIME@238..240 - LIFETIME_IDENT@238..240 "\'d" + LIFETIME_IDENT@238..240 "'d" WHITESPACE@240..241 " " PLUS@241..242 "+" WHITESPACE@242..243 " " diff --git a/crates/syntax/test_data/parser/ok/0030_string_suffixes.rast b/crates/syntax/test_data/parser/ok/0030_string_suffixes.rast index 80f7f5942..115861585 100644 --- a/crates/syntax/test_data/parser/ok/0030_string_suffixes.rast +++ b/crates/syntax/test_data/parser/ok/0030_string_suffixes.rast @@ -20,7 +20,7 @@ SOURCE_FILE@0..112 EQ@22..23 "=" WHITESPACE@23..24 " " LITERAL@24..30 - CHAR@24..30 "\'c\'u32" + CHAR@24..30 "'c'u32" SEMICOLON@30..31 ";" WHITESPACE@31..36 "\n " LET_STMT@36..60 @@ -44,7 +44,7 @@ SOURCE_FILE@0..112 EQ@71..72 "=" WHITESPACE@72..73 " " LITERAL@73..82 - BYTE@73..82 "b\'b\'_suff" + BYTE@73..82 "b'b'_suff" SEMICOLON@82..83 ";" WHITESPACE@83..88 "\n " LET_STMT@88..109 diff --git a/crates/syntax/test_data/parser/ok/0032_where_for.rast b/crates/syntax/test_data/parser/ok/0032_where_for.rast index 0cb2eca33..b527cc3ac 100644 --- a/crates/syntax/test_data/parser/ok/0032_where_for.rast +++ b/crates/syntax/test_data/parser/ok/0032_where_for.rast @@ -42,7 +42,7 @@ SOURCE_FILE@0..116 L_ANGLE@59..60 "<" LIFETIME_PARAM@60..63 LIFETIME@60..63 - LIFETIME_IDENT@60..63 "\'de" + LIFETIME_IDENT@60..63 "'de" R_ANGLE@63..64 ">" WHITESPACE@64..65 " " PATH_TYPE@65..81 @@ -54,7 +54,7 @@ SOURCE_FILE@0..116 L_ANGLE@76..77 "<" LIFETIME_ARG@77..80 LIFETIME@77..80 - LIFETIME_IDENT@77..80 "\'de" + LIFETIME_IDENT@77..80 "'de" R_ANGLE@80..81 ">" WHITESPACE@81..82 " " PLUS@82..83 "+" diff --git a/crates/syntax/test_data/parser/ok/0033_label_break.rast b/crates/syntax/test_data/parser/ok/0033_label_break.rast index 487e073ba..4b0f0997e 100644 --- a/crates/syntax/test_data/parser/ok/0033_label_break.rast +++ b/crates/syntax/test_data/parser/ok/0033_label_break.rast @@ -17,7 +17,7 @@ SOURCE_FILE@0..506 EFFECT_EXPR@50..66 LABEL@50..63 LIFETIME@50..62 - LIFETIME_IDENT@50..62 "\'empty_block" + LIFETIME_IDENT@50..62 "'empty_block" COLON@62..63 ":" WHITESPACE@63..64 " " BLOCK_EXPR@64..66 @@ -28,7 +28,7 @@ SOURCE_FILE@0..506 EFFECT_EXPR@72..295 LABEL@72..79 LIFETIME@72..78 - LIFETIME_IDENT@72..78 "\'block" + LIFETIME_IDENT@72..78 "'block" COLON@78..79 ":" WHITESPACE@79..80 " " BLOCK_EXPR@80..295 @@ -69,7 +69,7 @@ SOURCE_FILE@0..506 BREAK_KW@147..152 "break" WHITESPACE@152..153 " " LIFETIME@153..159 - LIFETIME_IDENT@153..159 "\'block" + LIFETIME_IDENT@153..159 "'block" SEMICOLON@159..160 ";" WHITESPACE@160..169 "\n " R_CURLY@169..170 "}" @@ -109,7 +109,7 @@ SOURCE_FILE@0..506 BREAK_KW@241..246 "break" WHITESPACE@246..247 " " LIFETIME@247..253 - LIFETIME_IDENT@247..253 "\'block" + LIFETIME_IDENT@247..253 "'block" SEMICOLON@253..254 ";" WHITESPACE@254..263 "\n " R_CURLY@263..264 "}" @@ -140,7 +140,7 @@ SOURCE_FILE@0..506 EFFECT_EXPR@314..502 LABEL@314..321 LIFETIME@314..320 - LIFETIME_IDENT@314..320 "\'block" + LIFETIME_IDENT@314..320 "'block" COLON@320..321 ":" WHITESPACE@321..322 " " BLOCK_EXPR@322..502 @@ -171,7 +171,7 @@ SOURCE_FILE@0..506 BREAK_KW@378..383 "break" WHITESPACE@383..384 " " LIFETIME@384..390 - LIFETIME_IDENT@384..390 "\'block" + LIFETIME_IDENT@384..390 "'block" WHITESPACE@390..391 " " LITERAL@391..392 INT_NUMBER@391..392 "1" @@ -204,7 +204,7 @@ SOURCE_FILE@0..506 BREAK_KW@461..466 "break" WHITESPACE@466..467 " " LIFETIME@467..473 - LIFETIME_IDENT@467..473 "\'block" + LIFETIME_IDENT@467..473 "'block" WHITESPACE@473..474 " " LITERAL@474..475 INT_NUMBER@474..475 "2" diff --git a/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast b/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast index 20675dbf5..2fa46ad2d 100644 --- a/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast +++ b/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast @@ -1378,14 +1378,14 @@ SOURCE_FILE@0..3813 WHITESPACE@2376..2377 " " IDENT@2377..2379 "u8" L_ANGLE@2379..2380 "<" - LIFETIME_IDENT@2380..2383 "\'u8" + LIFETIME_IDENT@2380..2383 "'u8" COLON@2383..2384 ":" WHITESPACE@2384..2385 " " - LIFETIME_IDENT@2385..2388 "\'u8" + LIFETIME_IDENT@2385..2388 "'u8" WHITESPACE@2388..2389 " " PLUS@2389..2390 "+" WHITESPACE@2390..2391 " " - LIFETIME_IDENT@2391..2394 "\'u8" + LIFETIME_IDENT@2391..2394 "'u8" R_ANGLE@2394..2395 ">" TOKEN_TREE@2395..2408 L_PAREN@2395..2396 "(" @@ -1393,7 +1393,7 @@ SOURCE_FILE@0..3813 COLON@2398..2399 ":" WHITESPACE@2399..2400 " " AMP@2400..2401 "&" - LIFETIME_IDENT@2401..2404 "\'u8" + LIFETIME_IDENT@2401..2404 "'u8" WHITESPACE@2404..2405 " " IDENT@2405..2407 "u8" R_PAREN@2407..2408 ")" @@ -1402,7 +1402,7 @@ SOURCE_FILE@0..3813 R_ANGLE@2410..2411 ">" WHITESPACE@2411..2412 " " AMP@2412..2413 "&" - LIFETIME_IDENT@2413..2416 "\'u8" + LIFETIME_IDENT@2413..2416 "'u8" WHITESPACE@2416..2417 " " IDENT@2417..2419 "u8" WHITESPACE@2419..2420 " " @@ -1574,7 +1574,7 @@ SOURCE_FILE@0..3813 L_ANGLE@2862..2863 "<" LIFETIME_PARAM@2863..2869 LIFETIME@2863..2869 - LIFETIME_IDENT@2863..2869 "\'union" + LIFETIME_IDENT@2863..2869 "'union" R_ANGLE@2869..2870 ">" WHITESPACE@2870..2871 " " RECORD_FIELD_LIST@2871..2904 @@ -1588,7 +1588,7 @@ SOURCE_FILE@0..3813 REF_TYPE@2880..2901 AMP@2880..2881 "&" LIFETIME@2881..2887 - LIFETIME_IDENT@2881..2887 "\'union" + LIFETIME_IDENT@2881..2887 "'union" WHITESPACE@2887..2888 " " PATH_TYPE@2888..2901 PATH@2888..2901 @@ -1599,7 +1599,7 @@ SOURCE_FILE@0..3813 L_ANGLE@2893..2894 "<" LIFETIME_ARG@2894..2900 LIFETIME@2894..2900 - LIFETIME_IDENT@2894..2900 "\'union" + LIFETIME_IDENT@2894..2900 "'union" R_ANGLE@2900..2901 ">" COMMA@2901..2902 "," WHITESPACE@2902..2903 " " @@ -1681,7 +1681,7 @@ SOURCE_FILE@0..3813 STRING@2975..2979 "\"\\\\\"" COMMA@2979..2980 "," LITERAL@2980..2986 - CHAR@2980..2986 "\'🤔\'" + CHAR@2980..2986 "'🤔'" R_PAREN@2986..2987 ")" COMMENT@2987..2991 "/**/" COMMA@2991..2992 "," diff --git a/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast b/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast index f935a0df5..a7f0f7bc6 100644 --- a/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast +++ b/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast @@ -181,7 +181,7 @@ SOURCE_FILE@0..519 L_ANGLE@162..163 "<" LIFETIME_ARG@163..165 LIFETIME@163..165 - LIFETIME_IDENT@163..165 "\'a" + LIFETIME_IDENT@163..165 "'a" R_ANGLE@165..166 ">" R_PAREN@166..167 ")" R_ANGLE@167..168 ">" @@ -359,7 +359,7 @@ SOURCE_FILE@0..519 L_ANGLE@345..346 "<" LIFETIME_PARAM@346..348 LIFETIME@346..348 - LIFETIME_IDENT@346..348 "\'a" + LIFETIME_IDENT@346..348 "'a" R_ANGLE@348..349 ">" PARAM_LIST@349..368 L_PAREN@349..350 "(" @@ -394,7 +394,7 @@ SOURCE_FILE@0..519 L_ANGLE@382..383 "<" LIFETIME_PARAM@383..385 LIFETIME@383..385 - LIFETIME_IDENT@383..385 "\'a" + LIFETIME_IDENT@383..385 "'a" R_ANGLE@385..386 ">" PARAM_LIST@386..404 L_PAREN@386..387 "(" @@ -411,7 +411,7 @@ SOURCE_FILE@0..519 WHITESPACE@394..395 " " AMP@395..396 "&" LIFETIME@396..398 - LIFETIME_IDENT@396..398 "\'a" + LIFETIME_IDENT@396..398 "'a" WHITESPACE@398..399 " " NAME@399..403 SELF_KW@399..403 "self" @@ -430,7 +430,7 @@ SOURCE_FILE@0..519 L_ANGLE@418..419 "<" LIFETIME_PARAM@419..421 LIFETIME@419..421 - LIFETIME_IDENT@419..421 "\'a" + LIFETIME_IDENT@419..421 "'a" R_ANGLE@421..422 ">" PARAM_LIST@422..444 L_PAREN@422..423 "(" @@ -447,7 +447,7 @@ SOURCE_FILE@0..519 WHITESPACE@430..431 " " AMP@431..432 "&" LIFETIME@432..434 - LIFETIME_IDENT@432..434 "\'a" + LIFETIME_IDENT@432..434 "'a" WHITESPACE@434..435 " " MUT_KW@435..438 "mut" WHITESPACE@438..439 " " diff --git a/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast b/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast index 325e9e655..79e2b2867 100644 --- a/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast +++ b/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast @@ -23,7 +23,7 @@ SOURCE_FILE@0..374 L_ANGLE@31..32 "<" LIFETIME_PARAM@32..34 LIFETIME@32..34 - LIFETIME_IDENT@32..34 "\'a" + LIFETIME_IDENT@32..34 "'a" R_ANGLE@34..35 ">" WHITESPACE@35..36 " " PATH_TYPE@36..37 @@ -46,7 +46,7 @@ SOURCE_FILE@0..374 REF_TYPE@42..49 AMP@42..43 "&" LIFETIME@43..45 - LIFETIME_IDENT@43..45 "\'a" + LIFETIME_IDENT@43..45 "'a" WHITESPACE@45..46 " " PATH_TYPE@46..49 PATH@46..49 @@ -85,13 +85,13 @@ SOURCE_FILE@0..374 L_ANGLE@85..86 "<" LIFETIME_PARAM@86..88 LIFETIME@86..88 - LIFETIME_IDENT@86..88 "\'a" + LIFETIME_IDENT@86..88 "'a" R_ANGLE@88..89 ">" WHITESPACE@89..90 " " REF_TYPE@90..95 AMP@90..91 "&" LIFETIME@91..93 - LIFETIME_IDENT@91..93 "\'a" + LIFETIME_IDENT@91..93 "'a" WHITESPACE@93..94 " " PATH_TYPE@94..95 PATH@94..95 @@ -138,7 +138,7 @@ SOURCE_FILE@0..374 L_ANGLE@140..141 "<" LIFETIME_PARAM@141..143 LIFETIME@141..143 - LIFETIME_IDENT@141..143 "\'a" + LIFETIME_IDENT@141..143 "'a" R_ANGLE@143..144 ">" WHITESPACE@144..145 " " PAREN_TYPE@145..152 @@ -146,7 +146,7 @@ SOURCE_FILE@0..374 REF_TYPE@146..151 AMP@146..147 "&" LIFETIME@147..149 - LIFETIME_IDENT@147..149 "\'a" + LIFETIME_IDENT@147..149 "'a" WHITESPACE@149..150 " " PATH_TYPE@150..151 PATH@150..151 @@ -169,7 +169,7 @@ SOURCE_FILE@0..374 REF_TYPE@157..164 AMP@157..158 "&" LIFETIME@158..160 - LIFETIME_IDENT@158..160 "\'a" + LIFETIME_IDENT@158..160 "'a" WHITESPACE@160..161 " " PATH_TYPE@161..164 PATH@161..164 @@ -208,7 +208,7 @@ SOURCE_FILE@0..374 L_ANGLE@202..203 "<" LIFETIME_PARAM@203..205 LIFETIME@203..205 - LIFETIME_IDENT@203..205 "\'a" + LIFETIME_IDENT@203..205 "'a" R_ANGLE@205..206 ">" WHITESPACE@206..207 " " SLICE_TYPE@207..214 @@ -216,7 +216,7 @@ SOURCE_FILE@0..374 REF_TYPE@208..213 AMP@208..209 "&" LIFETIME@209..211 - LIFETIME_IDENT@209..211 "\'a" + LIFETIME_IDENT@209..211 "'a" WHITESPACE@211..212 " " PATH_TYPE@212..213 PATH@212..213 @@ -277,7 +277,7 @@ SOURCE_FILE@0..374 L_ANGLE@261..262 "<" LIFETIME_PARAM@262..264 LIFETIME@262..264 - LIFETIME_IDENT@262..264 "\'a" + LIFETIME_IDENT@262..264 "'a" R_ANGLE@264..265 ">" WHITESPACE@265..266 " " PATH_TYPE@266..285 @@ -288,7 +288,7 @@ SOURCE_FILE@0..374 REF_TYPE@267..272 AMP@267..268 "&" LIFETIME@268..270 - LIFETIME_IDENT@268..270 "\'a" + LIFETIME_IDENT@268..270 "'a" WHITESPACE@270..271 " " PATH_TYPE@271..272 PATH@271..272 @@ -348,7 +348,7 @@ SOURCE_FILE@0..374 L_ANGLE@333..334 "<" LIFETIME_PARAM@334..336 LIFETIME@334..336 - LIFETIME_IDENT@334..336 "\'a" + LIFETIME_IDENT@334..336 "'a" R_ANGLE@336..337 ">" WHITESPACE@337..338 " " FOR_TYPE@338..362 @@ -357,7 +357,7 @@ SOURCE_FILE@0..374 L_ANGLE@341..342 "<" LIFETIME_PARAM@342..344 LIFETIME@342..344 - LIFETIME_IDENT@342..344 "\'b" + LIFETIME_IDENT@342..344 "'b" R_ANGLE@344..345 ">" WHITESPACE@345..346 " " FN_PTR_TYPE@346..362 @@ -368,7 +368,7 @@ SOURCE_FILE@0..374 REF_TYPE@349..354 AMP@349..350 "&" LIFETIME@350..352 - LIFETIME_IDENT@350..352 "\'a" + LIFETIME_IDENT@350..352 "'a" WHITESPACE@352..353 " " PATH_TYPE@353..354 PATH@353..354 @@ -381,7 +381,7 @@ SOURCE_FILE@0..374 REF_TYPE@356..361 AMP@356..357 "&" LIFETIME@357..359 - LIFETIME_IDENT@357..359 "\'b" + LIFETIME_IDENT@357..359 "'b" WHITESPACE@359..360 " " PATH_TYPE@360..361 PATH@360..361 diff --git a/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast b/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast index 8d3e187ae..026c776e2 100644 --- a/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast +++ b/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast @@ -8,7 +8,7 @@ SOURCE_FILE@0..195 L_ANGLE@8..9 "<" LIFETIME_PARAM@9..11 LIFETIME@9..11 - LIFETIME_IDENT@9..11 "\'a" + LIFETIME_IDENT@9..11 "'a" R_ANGLE@11..12 ">" WHITESPACE@12..13 " " EQ@13..14 "=" @@ -16,7 +16,7 @@ SOURCE_FILE@0..195 REF_TYPE@15..36 AMP@15..16 "&" LIFETIME@16..18 - LIFETIME_IDENT@16..18 "\'a" + LIFETIME_IDENT@16..18 "'a" WHITESPACE@18..19 " " PAREN_TYPE@19..36 L_PAREN@19..20 "(" @@ -112,7 +112,7 @@ SOURCE_FILE@0..195 WHITESPACE@105..106 " " TYPE_BOUND@106..113 LIFETIME@106..113 - LIFETIME_IDENT@106..113 "\'static" + LIFETIME_IDENT@106..113 "'static" R_PAREN@113..114 ")" SEMICOLON@114..115 ";" WHITESPACE@115..116 "\n" -- cgit v1.2.3