diff options
Diffstat (limited to 'crates/ra_hir_ty/src')
-rw-r--r-- | crates/ra_hir_ty/src/db.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/expr.rs | 14 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/infer.rs | 16 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/infer/expr.rs | 8 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/infer/pat.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/lower.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/coercion.rs | 582 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/macros.rs | 202 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/method_resolution.rs | 376 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/patterns.rs | 480 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/regression.rs | 278 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/simple.rs | 1360 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/tests/traits.rs | 1106 |
14 files changed, 2219 insertions, 2221 deletions
diff --git a/crates/ra_hir_ty/src/db.rs b/crates/ra_hir_ty/src/db.rs index 9e5dfeab3..fdb49560b 100644 --- a/crates/ra_hir_ty/src/db.rs +++ b/crates/ra_hir_ty/src/db.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use hir_def::{ | 5 | use hir_def::{ |
6 | db::DefDatabase, DefWithBodyId, GenericDefId, ImplId, LocalStructFieldId, TraitId, TypeParamId, | 6 | db::DefDatabase, DefWithBodyId, GenericDefId, ImplId, LocalFieldId, TraitId, TypeParamId, |
7 | VariantId, | 7 | VariantId, |
8 | }; | 8 | }; |
9 | use ra_arena::map::ArenaMap; | 9 | use ra_arena::map::ArenaMap; |
@@ -43,7 +43,7 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> { | |||
43 | fn impl_trait(&self, def: ImplId) -> Option<Binders<TraitRef>>; | 43 | fn impl_trait(&self, def: ImplId) -> Option<Binders<TraitRef>>; |
44 | 44 | ||
45 | #[salsa::invoke(crate::lower::field_types_query)] | 45 | #[salsa::invoke(crate::lower::field_types_query)] |
46 | fn field_types(&self, var: VariantId) -> Arc<ArenaMap<LocalStructFieldId, Binders<Ty>>>; | 46 | fn field_types(&self, var: VariantId) -> Arc<ArenaMap<LocalFieldId, Binders<Ty>>>; |
47 | 47 | ||
48 | #[salsa::invoke(crate::callable_item_sig)] | 48 | #[salsa::invoke(crate::callable_item_sig)] |
49 | fn callable_item_signature(&self, def: CallableDef) -> PolyFnSig; | 49 | fn callable_item_signature(&self, def: CallableDef) -> PolyFnSig; |
diff --git a/crates/ra_hir_ty/src/expr.rs b/crates/ra_hir_ty/src/expr.rs index fd59f4320..f04968e14 100644 --- a/crates/ra_hir_ty/src/expr.rs +++ b/crates/ra_hir_ty/src/expr.rs | |||
@@ -24,7 +24,7 @@ pub use hir_def::{ | |||
24 | ArithOp, Array, BinaryOp, BindingAnnotation, CmpOp, Expr, ExprId, Literal, LogicOp, | 24 | ArithOp, Array, BinaryOp, BindingAnnotation, CmpOp, Expr, ExprId, Literal, LogicOp, |
25 | MatchArm, Ordering, Pat, PatId, RecordFieldPat, RecordLitField, Statement, UnaryOp, | 25 | MatchArm, Ordering, Pat, PatId, RecordFieldPat, RecordLitField, Statement, UnaryOp, |
26 | }, | 26 | }, |
27 | LocalStructFieldId, VariantId, | 27 | LocalFieldId, VariantId, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | pub struct ExprValidator<'a, 'b: 'a> { | 30 | pub struct ExprValidator<'a, 'b: 'a> { |
@@ -83,7 +83,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
83 | id: ExprId, | 83 | id: ExprId, |
84 | db: &dyn HirDatabase, | 84 | db: &dyn HirDatabase, |
85 | variant_def: VariantId, | 85 | variant_def: VariantId, |
86 | missed_fields: Vec<LocalStructFieldId>, | 86 | missed_fields: Vec<LocalFieldId>, |
87 | ) { | 87 | ) { |
88 | // XXX: only look at source_map if we do have missing fields | 88 | // XXX: only look at source_map if we do have missing fields |
89 | let (_, source_map) = db.body_with_source_map(self.func.into()); | 89 | let (_, source_map) = db.body_with_source_map(self.func.into()); |
@@ -112,7 +112,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
112 | id: PatId, | 112 | id: PatId, |
113 | db: &dyn HirDatabase, | 113 | db: &dyn HirDatabase, |
114 | variant_def: VariantId, | 114 | variant_def: VariantId, |
115 | missed_fields: Vec<LocalStructFieldId>, | 115 | missed_fields: Vec<LocalFieldId>, |
116 | ) { | 116 | ) { |
117 | // XXX: only look at source_map if we do have missing fields | 117 | // XXX: only look at source_map if we do have missing fields |
118 | let (_, source_map) = db.body_with_source_map(self.func.into()); | 118 | let (_, source_map) = db.body_with_source_map(self.func.into()); |
@@ -256,7 +256,7 @@ pub fn record_literal_missing_fields( | |||
256 | infer: &InferenceResult, | 256 | infer: &InferenceResult, |
257 | id: ExprId, | 257 | id: ExprId, |
258 | expr: &Expr, | 258 | expr: &Expr, |
259 | ) -> Option<(VariantId, Vec<LocalStructFieldId>, /*exhaustive*/ bool)> { | 259 | ) -> Option<(VariantId, Vec<LocalFieldId>, /*exhaustive*/ bool)> { |
260 | let (fields, exhausitve) = match expr { | 260 | let (fields, exhausitve) = match expr { |
261 | Expr::RecordLit { path: _, fields, spread } => (fields, spread.is_none()), | 261 | Expr::RecordLit { path: _, fields, spread } => (fields, spread.is_none()), |
262 | _ => return None, | 262 | _ => return None, |
@@ -270,7 +270,7 @@ pub fn record_literal_missing_fields( | |||
270 | let variant_data = variant_data(db.upcast(), variant_def); | 270 | let variant_data = variant_data(db.upcast(), variant_def); |
271 | 271 | ||
272 | let specified_fields: FxHashSet<_> = fields.iter().map(|f| &f.name).collect(); | 272 | let specified_fields: FxHashSet<_> = fields.iter().map(|f| &f.name).collect(); |
273 | let missed_fields: Vec<LocalStructFieldId> = variant_data | 273 | let missed_fields: Vec<LocalFieldId> = variant_data |
274 | .fields() | 274 | .fields() |
275 | .iter() | 275 | .iter() |
276 | .filter_map(|(f, d)| if specified_fields.contains(&d.name) { None } else { Some(f) }) | 276 | .filter_map(|(f, d)| if specified_fields.contains(&d.name) { None } else { Some(f) }) |
@@ -286,7 +286,7 @@ pub fn record_pattern_missing_fields( | |||
286 | infer: &InferenceResult, | 286 | infer: &InferenceResult, |
287 | id: PatId, | 287 | id: PatId, |
288 | pat: &Pat, | 288 | pat: &Pat, |
289 | ) -> Option<(VariantId, Vec<LocalStructFieldId>, /*exhaustive*/ bool)> { | 289 | ) -> Option<(VariantId, Vec<LocalFieldId>, /*exhaustive*/ bool)> { |
290 | let (fields, exhaustive) = match pat { | 290 | let (fields, exhaustive) = match pat { |
291 | Pat::Record { path: _, args, ellipsis } => (args, !ellipsis), | 291 | Pat::Record { path: _, args, ellipsis } => (args, !ellipsis), |
292 | _ => return None, | 292 | _ => return None, |
@@ -300,7 +300,7 @@ pub fn record_pattern_missing_fields( | |||
300 | let variant_data = variant_data(db.upcast(), variant_def); | 300 | let variant_data = variant_data(db.upcast(), variant_def); |
301 | 301 | ||
302 | let specified_fields: FxHashSet<_> = fields.iter().map(|f| &f.name).collect(); | 302 | let specified_fields: FxHashSet<_> = fields.iter().map(|f| &f.name).collect(); |
303 | let missed_fields: Vec<LocalStructFieldId> = variant_data | 303 | let missed_fields: Vec<LocalFieldId> = variant_data |
304 | .fields() | 304 | .fields() |
305 | .iter() | 305 | .iter() |
306 | .filter_map(|(f, d)| if specified_fields.contains(&d.name) { None } else { Some(f) }) | 306 | .filter_map(|(f, d)| if specified_fields.contains(&d.name) { None } else { Some(f) }) |
diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs index dfb6a435f..6a53be621 100644 --- a/crates/ra_hir_ty/src/infer.rs +++ b/crates/ra_hir_ty/src/infer.rs | |||
@@ -28,7 +28,7 @@ use hir_def::{ | |||
28 | path::{path, Path}, | 28 | path::{path, Path}, |
29 | resolver::{HasResolver, Resolver, TypeNs}, | 29 | resolver::{HasResolver, Resolver, TypeNs}, |
30 | type_ref::{Mutability, TypeRef}, | 30 | type_ref::{Mutability, TypeRef}, |
31 | AdtId, AssocItemId, DefWithBodyId, FunctionId, StructFieldId, TraitId, TypeAliasId, VariantId, | 31 | AdtId, AssocItemId, DefWithBodyId, FieldId, FunctionId, TraitId, TypeAliasId, VariantId, |
32 | }; | 32 | }; |
33 | use hir_expand::{diagnostics::DiagnosticSink, name::name}; | 33 | use hir_expand::{diagnostics::DiagnosticSink, name::name}; |
34 | use ra_arena::map::ArenaMap; | 34 | use ra_arena::map::ArenaMap; |
@@ -124,10 +124,10 @@ pub struct InferenceResult { | |||
124 | /// For each method call expr, records the function it resolves to. | 124 | /// For each method call expr, records the function it resolves to. |
125 | method_resolutions: FxHashMap<ExprId, FunctionId>, | 125 | method_resolutions: FxHashMap<ExprId, FunctionId>, |
126 | /// For each field access expr, records the field it resolves to. | 126 | /// For each field access expr, records the field it resolves to. |
127 | field_resolutions: FxHashMap<ExprId, StructFieldId>, | 127 | field_resolutions: FxHashMap<ExprId, FieldId>, |
128 | /// For each field in record literal, records the field it resolves to. | 128 | /// For each field in record literal, records the field it resolves to. |
129 | record_field_resolutions: FxHashMap<ExprId, StructFieldId>, | 129 | record_field_resolutions: FxHashMap<ExprId, FieldId>, |
130 | record_field_pat_resolutions: FxHashMap<PatId, StructFieldId>, | 130 | record_field_pat_resolutions: FxHashMap<PatId, FieldId>, |
131 | /// For each struct literal, records the variant it resolves to. | 131 | /// For each struct literal, records the variant it resolves to. |
132 | variant_resolutions: FxHashMap<ExprOrPatId, VariantId>, | 132 | variant_resolutions: FxHashMap<ExprOrPatId, VariantId>, |
133 | /// For each associated item record what it resolves to | 133 | /// For each associated item record what it resolves to |
@@ -142,13 +142,13 @@ impl InferenceResult { | |||
142 | pub fn method_resolution(&self, expr: ExprId) -> Option<FunctionId> { | 142 | pub fn method_resolution(&self, expr: ExprId) -> Option<FunctionId> { |
143 | self.method_resolutions.get(&expr).copied() | 143 | self.method_resolutions.get(&expr).copied() |
144 | } | 144 | } |
145 | pub fn field_resolution(&self, expr: ExprId) -> Option<StructFieldId> { | 145 | pub fn field_resolution(&self, expr: ExprId) -> Option<FieldId> { |
146 | self.field_resolutions.get(&expr).copied() | 146 | self.field_resolutions.get(&expr).copied() |
147 | } | 147 | } |
148 | pub fn record_field_resolution(&self, expr: ExprId) -> Option<StructFieldId> { | 148 | pub fn record_field_resolution(&self, expr: ExprId) -> Option<FieldId> { |
149 | self.record_field_resolutions.get(&expr).copied() | 149 | self.record_field_resolutions.get(&expr).copied() |
150 | } | 150 | } |
151 | pub fn record_field_pat_resolution(&self, pat: PatId) -> Option<StructFieldId> { | 151 | pub fn record_field_pat_resolution(&self, pat: PatId) -> Option<FieldId> { |
152 | self.record_field_pat_resolutions.get(&pat).copied() | 152 | self.record_field_pat_resolutions.get(&pat).copied() |
153 | } | 153 | } |
154 | pub fn variant_resolution_for_expr(&self, id: ExprId) -> Option<VariantId> { | 154 | pub fn variant_resolution_for_expr(&self, id: ExprId) -> Option<VariantId> { |
@@ -249,7 +249,7 @@ impl<'a> InferenceContext<'a> { | |||
249 | self.result.method_resolutions.insert(expr, func); | 249 | self.result.method_resolutions.insert(expr, func); |
250 | } | 250 | } |
251 | 251 | ||
252 | fn write_field_resolution(&mut self, expr: ExprId, field: StructFieldId) { | 252 | fn write_field_resolution(&mut self, expr: ExprId, field: FieldId) { |
253 | self.result.field_resolutions.insert(expr, field); | 253 | self.result.field_resolutions.insert(expr, field); |
254 | } | 254 | } |
255 | 255 | ||
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index 1fdb235a0..83f946eee 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs | |||
@@ -8,7 +8,7 @@ use hir_def::{ | |||
8 | expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp}, | 8 | expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp}, |
9 | path::{GenericArg, GenericArgs}, | 9 | path::{GenericArg, GenericArgs}, |
10 | resolver::resolver_for_expr, | 10 | resolver::resolver_for_expr, |
11 | AdtId, AssocContainerId, Lookup, StructFieldId, | 11 | AdtId, AssocContainerId, FieldId, Lookup, |
12 | }; | 12 | }; |
13 | use hir_expand::name::Name; | 13 | use hir_expand::name::Name; |
14 | use ra_syntax::ast::RangeOp; | 14 | use ra_syntax::ast::RangeOp; |
@@ -216,9 +216,7 @@ impl<'a> InferenceContext<'a> { | |||
216 | for (field_idx, field) in fields.iter().enumerate() { | 216 | for (field_idx, field) in fields.iter().enumerate() { |
217 | let field_def = | 217 | let field_def = |
218 | variant_data.as_ref().and_then(|it| match it.field(&field.name) { | 218 | variant_data.as_ref().and_then(|it| match it.field(&field.name) { |
219 | Some(local_id) => { | 219 | Some(local_id) => Some(FieldId { parent: def_id.unwrap(), local_id }), |
220 | Some(StructFieldId { parent: def_id.unwrap(), local_id }) | ||
221 | } | ||
222 | None => { | 220 | None => { |
223 | self.push_diagnostic(InferenceDiagnostic::NoSuchField { | 221 | self.push_diagnostic(InferenceDiagnostic::NoSuchField { |
224 | expr: tgt_expr, | 222 | expr: tgt_expr, |
@@ -257,7 +255,7 @@ impl<'a> InferenceContext<'a> { | |||
257 | .and_then(|idx| a_ty.parameters.0.get(idx).cloned()), | 255 | .and_then(|idx| a_ty.parameters.0.get(idx).cloned()), |
258 | TypeCtor::Adt(AdtId::StructId(s)) => { | 256 | TypeCtor::Adt(AdtId::StructId(s)) => { |
259 | self.db.struct_data(s).variant_data.field(name).map(|local_id| { | 257 | self.db.struct_data(s).variant_data.field(name).map(|local_id| { |
260 | let field = StructFieldId { parent: s.into(), local_id }; | 258 | let field = FieldId { parent: s.into(), local_id }; |
261 | self.write_field_resolution(tgt_expr, field); | 259 | self.write_field_resolution(tgt_expr, field); |
262 | self.db.field_types(s.into())[field.local_id] | 260 | self.db.field_types(s.into())[field.local_id] |
263 | .clone() | 261 | .clone() |
diff --git a/crates/ra_hir_ty/src/infer/pat.rs b/crates/ra_hir_ty/src/infer/pat.rs index 7c2ad4384..54ec870df 100644 --- a/crates/ra_hir_ty/src/infer/pat.rs +++ b/crates/ra_hir_ty/src/infer/pat.rs | |||
@@ -7,7 +7,7 @@ use hir_def::{ | |||
7 | expr::{BindingAnnotation, Pat, PatId, RecordFieldPat}, | 7 | expr::{BindingAnnotation, Pat, PatId, RecordFieldPat}, |
8 | path::Path, | 8 | path::Path, |
9 | type_ref::Mutability, | 9 | type_ref::Mutability, |
10 | StructFieldId, | 10 | FieldId, |
11 | }; | 11 | }; |
12 | use hir_expand::name::Name; | 12 | use hir_expand::name::Name; |
13 | use test_utils::tested_by; | 13 | use test_utils::tested_by; |
@@ -69,7 +69,7 @@ impl<'a> InferenceContext<'a> { | |||
69 | for subpat in subpats { | 69 | for subpat in subpats { |
70 | let matching_field = var_data.as_ref().and_then(|it| it.field(&subpat.name)); | 70 | let matching_field = var_data.as_ref().and_then(|it| it.field(&subpat.name)); |
71 | if let Some(local_id) = matching_field { | 71 | if let Some(local_id) = matching_field { |
72 | let field_def = StructFieldId { parent: def.unwrap(), local_id }; | 72 | let field_def = FieldId { parent: def.unwrap(), local_id }; |
73 | self.result.record_field_pat_resolutions.insert(subpat.pat, field_def); | 73 | self.result.record_field_pat_resolutions.insert(subpat.pat, field_def); |
74 | } | 74 | } |
75 | 75 | ||
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs index c2812e178..b57214296 100644 --- a/crates/ra_hir_ty/src/lower.rs +++ b/crates/ra_hir_ty/src/lower.rs | |||
@@ -18,8 +18,8 @@ use hir_def::{ | |||
18 | resolver::{HasResolver, Resolver, TypeNs}, | 18 | resolver::{HasResolver, Resolver, TypeNs}, |
19 | type_ref::{TypeBound, TypeRef}, | 19 | type_ref::{TypeBound, TypeRef}, |
20 | AdtId, AssocContainerId, ConstId, EnumId, EnumVariantId, FunctionId, GenericDefId, HasModule, | 20 | AdtId, AssocContainerId, ConstId, EnumId, EnumVariantId, FunctionId, GenericDefId, HasModule, |
21 | ImplId, LocalStructFieldId, Lookup, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, | 21 | ImplId, LocalFieldId, Lookup, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, UnionId, |
22 | UnionId, VariantId, | 22 | VariantId, |
23 | }; | 23 | }; |
24 | use ra_arena::map::ArenaMap; | 24 | use ra_arena::map::ArenaMap; |
25 | use ra_db::CrateId; | 25 | use ra_db::CrateId; |
@@ -682,7 +682,7 @@ pub fn callable_item_sig(db: &dyn HirDatabase, def: CallableDef) -> PolyFnSig { | |||
682 | pub(crate) fn field_types_query( | 682 | pub(crate) fn field_types_query( |
683 | db: &dyn HirDatabase, | 683 | db: &dyn HirDatabase, |
684 | variant_id: VariantId, | 684 | variant_id: VariantId, |
685 | ) -> Arc<ArenaMap<LocalStructFieldId, Binders<Ty>>> { | 685 | ) -> Arc<ArenaMap<LocalFieldId, Binders<Ty>>> { |
686 | let var_data = variant_data(db.upcast(), variant_id); | 686 | let var_data = variant_data(db.upcast(), variant_id); |
687 | let (resolver, def): (_, GenericDefId) = match variant_id { | 687 | let (resolver, def): (_, GenericDefId) = match variant_id { |
688 | VariantId::StructId(it) => (it.resolver(db.upcast()), it.into()), | 688 | VariantId::StructId(it) => (it.resolver(db.upcast()), it.into()), |
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs index 846005baa..b6a96bb5c 100644 --- a/crates/ra_hir_ty/src/tests.rs +++ b/crates/ra_hir_ty/src/tests.rs | |||
@@ -117,7 +117,7 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String { | |||
117 | let macro_prefix = if node.file_id != file_id.into() { "!" } else { "" }; | 117 | let macro_prefix = if node.file_id != file_id.into() { "!" } else { "" }; |
118 | format_to!( | 118 | format_to!( |
119 | buf, | 119 | buf, |
120 | "{}{} '{}': {}\n", | 120 | "{}{:?} '{}': {}\n", |
121 | macro_prefix, | 121 | macro_prefix, |
122 | range, | 122 | range, |
123 | ellipsize(text, 15), | 123 | ellipsize(text, 15), |
@@ -134,7 +134,7 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String { | |||
134 | let macro_prefix = if src_ptr.file_id != file_id.into() { "!" } else { "" }; | 134 | let macro_prefix = if src_ptr.file_id != file_id.into() { "!" } else { "" }; |
135 | format_to!( | 135 | format_to!( |
136 | buf, | 136 | buf, |
137 | "{}{}: expected {}, got {}\n", | 137 | "{}{:?}: expected {}, got {}\n", |
138 | macro_prefix, | 138 | macro_prefix, |
139 | range, | 139 | range, |
140 | mismatch.expected.display(&db), | 140 | mismatch.expected.display(&db), |
diff --git a/crates/ra_hir_ty/src/tests/coercion.rs b/crates/ra_hir_ty/src/tests/coercion.rs index b2c971f02..e6fb3e123 100644 --- a/crates/ra_hir_ty/src/tests/coercion.rs +++ b/crates/ra_hir_ty/src/tests/coercion.rs | |||
@@ -29,10 +29,10 @@ fn test() { | |||
29 | } | 29 | } |
30 | "#), | 30 | "#), |
31 | @r###" | 31 | @r###" |
32 | [11; 41) '{ ...4 }; }': () | 32 | 11..41 '{ ...4 }; }': () |
33 | [21; 22) 'a': i32 | 33 | 21..22 'a': i32 |
34 | [30; 38) '{ 1i64 }': i64 | 34 | 30..38 '{ 1i64 }': i64 |
35 | [32; 36) '1i64': i64 | 35 | 32..36 '1i64': i64 |
36 | "###); | 36 | "###); |
37 | } | 37 | } |
38 | 38 | ||
@@ -63,50 +63,50 @@ fn test2() { | |||
63 | } | 63 | } |
64 | "#), | 64 | "#), |
65 | @r###" | 65 | @r###" |
66 | [31; 32) '_': &[T] | 66 | 31..32 '_': &[T] |
67 | [45; 56) '{ loop {} }': T | 67 | 45..56 '{ loop {} }': T |
68 | [47; 54) 'loop {}': ! | 68 | 47..54 'loop {}': ! |
69 | [52; 54) '{}': () | 69 | 52..54 '{}': () |
70 | [65; 66) '_': S<&[T]> | 70 | 65..66 '_': S<&[T]> |
71 | [82; 93) '{ loop {} }': T | 71 | 82..93 '{ loop {} }': T |
72 | [84; 91) 'loop {}': ! | 72 | 84..91 'loop {}': ! |
73 | [89; 91) '{}': () | 73 | 89..91 '{}': () |
74 | [122; 133) '{ loop {} }': *mut [T; _] | 74 | 122..133 '{ loop {} }': *mut [T; _] |
75 | [124; 131) 'loop {}': ! | 75 | 124..131 'loop {}': ! |
76 | [129; 131) '{}': () | 76 | 129..131 '{}': () |
77 | [160; 173) '{ gen() }': *mut [U] | 77 | 160..173 '{ gen() }': *mut [U] |
78 | [166; 169) 'gen': fn gen<U>() -> *mut [U; _] | 78 | 166..169 'gen': fn gen<U>() -> *mut [U; _] |
79 | [166; 171) 'gen()': *mut [U; _] | 79 | 166..171 'gen()': *mut [U; _] |
80 | [186; 420) '{ ...rr); }': () | 80 | 186..420 '{ ...rr); }': () |
81 | [196; 199) 'arr': &[u8; _] | 81 | 196..199 'arr': &[u8; _] |
82 | [212; 216) '&[1]': &[u8; _] | 82 | 212..216 '&[1]': &[u8; _] |
83 | [213; 216) '[1]': [u8; _] | 83 | 213..216 '[1]': [u8; _] |
84 | [214; 215) '1': u8 | 84 | 214..215 '1': u8 |
85 | [227; 228) 'a': &[u8] | 85 | 227..228 'a': &[u8] |
86 | [237; 240) 'arr': &[u8; _] | 86 | 237..240 'arr': &[u8; _] |
87 | [250; 251) 'b': u8 | 87 | 250..251 'b': u8 |
88 | [254; 255) 'f': fn f<u8>(&[u8]) -> u8 | 88 | 254..255 'f': fn f<u8>(&[u8]) -> u8 |
89 | [254; 260) 'f(arr)': u8 | 89 | 254..260 'f(arr)': u8 |
90 | [256; 259) 'arr': &[u8; _] | 90 | 256..259 'arr': &[u8; _] |
91 | [270; 271) 'c': &[u8] | 91 | 270..271 'c': &[u8] |
92 | [280; 287) '{ arr }': &[u8] | 92 | 280..287 '{ arr }': &[u8] |
93 | [282; 285) 'arr': &[u8; _] | 93 | 282..285 'arr': &[u8; _] |
94 | [297; 298) 'd': u8 | 94 | 297..298 'd': u8 |
95 | [301; 302) 'g': fn g<u8>(S<&[u8]>) -> u8 | 95 | 301..302 'g': fn g<u8>(S<&[u8]>) -> u8 |
96 | [301; 316) 'g(S { a: arr })': u8 | 96 | 301..316 'g(S { a: arr })': u8 |
97 | [303; 315) 'S { a: arr }': S<&[u8]> | 97 | 303..315 'S { a: arr }': S<&[u8]> |
98 | [310; 313) 'arr': &[u8; _] | 98 | 310..313 'arr': &[u8; _] |
99 | [326; 327) 'e': [&[u8]; _] | 99 | 326..327 'e': [&[u8]; _] |
100 | [341; 346) '[arr]': [&[u8]; _] | 100 | 341..346 '[arr]': [&[u8]; _] |
101 | [342; 345) 'arr': &[u8; _] | 101 | 342..345 'arr': &[u8; _] |
102 | [356; 357) 'f': [&[u8]; _] | 102 | 356..357 'f': [&[u8]; _] |
103 | [371; 379) '[arr; 2]': [&[u8]; _] | 103 | 371..379 '[arr; 2]': [&[u8]; _] |
104 | [372; 375) 'arr': &[u8; _] | 104 | 372..375 'arr': &[u8; _] |
105 | [377; 378) '2': usize | 105 | 377..378 '2': usize |
106 | [389; 390) 'g': (&[u8], &[u8]) | 106 | 389..390 'g': (&[u8], &[u8]) |
107 | [407; 417) '(arr, arr)': (&[u8], &[u8]) | 107 | 407..417 '(arr, arr)': (&[u8], &[u8]) |
108 | [408; 411) 'arr': &[u8; _] | 108 | 408..411 'arr': &[u8; _] |
109 | [413; 416) 'arr': &[u8; _] | 109 | 413..416 'arr': &[u8; _] |
110 | "### | 110 | "### |
111 | ); | 111 | ); |
112 | } | 112 | } |
@@ -120,11 +120,11 @@ fn test() { | |||
120 | } | 120 | } |
121 | "#), | 121 | "#), |
122 | @r###" | 122 | @r###" |
123 | [11; 40) '{ ...[1]; }': () | 123 | 11..40 '{ ...[1]; }': () |
124 | [21; 22) 'x': &[i32] | 124 | 21..22 'x': &[i32] |
125 | [33; 37) '&[1]': &[i32; _] | 125 | 33..37 '&[1]': &[i32; _] |
126 | [34; 37) '[1]': [i32; _] | 126 | 34..37 '[1]': [i32; _] |
127 | [35; 36) '1': i32 | 127 | 35..36 '1': i32 |
128 | "###); | 128 | "###); |
129 | } | 129 | } |
130 | 130 | ||
@@ -150,31 +150,31 @@ fn test(a: A<[u8; 2]>, b: B<[u8; 2]>, c: C<[u8; 2]>) { | |||
150 | } | 150 | } |
151 | "#), | 151 | "#), |
152 | @r###" | 152 | @r###" |
153 | [258; 259) 'x': A<[T]> | 153 | 258..259 'x': A<[T]> |
154 | [279; 284) '{ x }': A<[T]> | 154 | 279..284 '{ x }': A<[T]> |
155 | [281; 282) 'x': A<[T]> | 155 | 281..282 'x': A<[T]> |
156 | [296; 297) 'x': B<[T]> | 156 | 296..297 'x': B<[T]> |
157 | [317; 322) '{ x }': B<[T]> | 157 | 317..322 '{ x }': B<[T]> |
158 | [319; 320) 'x': B<[T]> | 158 | 319..320 'x': B<[T]> |
159 | [334; 335) 'x': C<[T]> | 159 | 334..335 'x': C<[T]> |
160 | [355; 360) '{ x }': C<[T]> | 160 | 355..360 '{ x }': C<[T]> |
161 | [357; 358) 'x': C<[T]> | 161 | 357..358 'x': C<[T]> |
162 | [370; 371) 'a': A<[u8; _]> | 162 | 370..371 'a': A<[u8; _]> |
163 | [385; 386) 'b': B<[u8; _]> | 163 | 385..386 'b': B<[u8; _]> |
164 | [400; 401) 'c': C<[u8; _]> | 164 | 400..401 'c': C<[u8; _]> |
165 | [415; 481) '{ ...(c); }': () | 165 | 415..481 '{ ...(c); }': () |
166 | [425; 426) 'd': A<[{unknown}]> | 166 | 425..426 'd': A<[{unknown}]> |
167 | [429; 433) 'foo1': fn foo1<{unknown}>(A<[{unknown}]>) -> A<[{unknown}]> | 167 | 429..433 'foo1': fn foo1<{unknown}>(A<[{unknown}]>) -> A<[{unknown}]> |
168 | [429; 436) 'foo1(a)': A<[{unknown}]> | 168 | 429..436 'foo1(a)': A<[{unknown}]> |
169 | [434; 435) 'a': A<[u8; _]> | 169 | 434..435 'a': A<[u8; _]> |
170 | [446; 447) 'e': B<[u8]> | 170 | 446..447 'e': B<[u8]> |
171 | [450; 454) 'foo2': fn foo2<u8>(B<[u8]>) -> B<[u8]> | 171 | 450..454 'foo2': fn foo2<u8>(B<[u8]>) -> B<[u8]> |
172 | [450; 457) 'foo2(b)': B<[u8]> | 172 | 450..457 'foo2(b)': B<[u8]> |
173 | [455; 456) 'b': B<[u8; _]> | 173 | 455..456 'b': B<[u8; _]> |
174 | [467; 468) 'f': C<[u8]> | 174 | 467..468 'f': C<[u8]> |
175 | [471; 475) 'foo3': fn foo3<u8>(C<[u8]>) -> C<[u8]> | 175 | 471..475 'foo3': fn foo3<u8>(C<[u8]>) -> C<[u8]> |
176 | [471; 478) 'foo3(c)': C<[u8]> | 176 | 471..478 'foo3(c)': C<[u8]> |
177 | [476; 477) 'c': C<[u8; _]> | 177 | 476..477 'c': C<[u8; _]> |
178 | "### | 178 | "### |
179 | ); | 179 | ); |
180 | } | 180 | } |
@@ -193,24 +193,24 @@ fn test() { | |||
193 | } | 193 | } |
194 | "#), | 194 | "#), |
195 | @r###" | 195 | @r###" |
196 | [11; 12) 'x': &[T] | 196 | 11..12 'x': &[T] |
197 | [28; 39) '{ loop {} }': &[T] | 197 | 28..39 '{ loop {} }': &[T] |
198 | [30; 37) 'loop {}': ! | 198 | 30..37 'loop {}': ! |
199 | [35; 37) '{}': () | 199 | 35..37 '{}': () |
200 | [50; 126) '{ ... }; }': () | 200 | 50..126 '{ ... }; }': () |
201 | [60; 61) 'x': &[i32] | 201 | 60..61 'x': &[i32] |
202 | [64; 123) 'if tru... }': &[i32] | 202 | 64..123 'if tru... }': &[i32] |
203 | [67; 71) 'true': bool | 203 | 67..71 'true': bool |
204 | [72; 97) '{ ... }': &[i32] | 204 | 72..97 '{ ... }': &[i32] |
205 | [82; 85) 'foo': fn foo<i32>(&[i32]) -> &[i32] | 205 | 82..85 'foo': fn foo<i32>(&[i32]) -> &[i32] |
206 | [82; 91) 'foo(&[1])': &[i32] | 206 | 82..91 'foo(&[1])': &[i32] |
207 | [86; 90) '&[1]': &[i32; _] | 207 | 86..90 '&[1]': &[i32; _] |
208 | [87; 90) '[1]': [i32; _] | 208 | 87..90 '[1]': [i32; _] |
209 | [88; 89) '1': i32 | 209 | 88..89 '1': i32 |
210 | [103; 123) '{ ... }': &[i32; _] | 210 | 103..123 '{ ... }': &[i32; _] |
211 | [113; 117) '&[1]': &[i32; _] | 211 | 113..117 '&[1]': &[i32; _] |
212 | [114; 117) '[1]': [i32; _] | 212 | 114..117 '[1]': [i32; _] |
213 | [115; 116) '1': i32 | 213 | 115..116 '1': i32 |
214 | "### | 214 | "### |
215 | ); | 215 | ); |
216 | } | 216 | } |
@@ -229,24 +229,24 @@ fn test() { | |||
229 | } | 229 | } |
230 | "#), | 230 | "#), |
231 | @r###" | 231 | @r###" |
232 | [11; 12) 'x': &[T] | 232 | 11..12 'x': &[T] |
233 | [28; 39) '{ loop {} }': &[T] | 233 | 28..39 '{ loop {} }': &[T] |
234 | [30; 37) 'loop {}': ! | 234 | 30..37 'loop {}': ! |
235 | [35; 37) '{}': () | 235 | 35..37 '{}': () |
236 | [50; 126) '{ ... }; }': () | 236 | 50..126 '{ ... }; }': () |
237 | [60; 61) 'x': &[i32] | 237 | 60..61 'x': &[i32] |
238 | [64; 123) 'if tru... }': &[i32] | 238 | 64..123 'if tru... }': &[i32] |
239 | [67; 71) 'true': bool | 239 | 67..71 'true': bool |
240 | [72; 92) '{ ... }': &[i32; _] | 240 | 72..92 '{ ... }': &[i32; _] |
241 | [82; 86) '&[1]': &[i32; _] | 241 | 82..86 '&[1]': &[i32; _] |
242 | [83; 86) '[1]': [i32; _] | 242 | 83..86 '[1]': [i32; _] |
243 | [84; 85) '1': i32 | 243 | 84..85 '1': i32 |
244 | [98; 123) '{ ... }': &[i32] | 244 | 98..123 '{ ... }': &[i32] |
245 | [108; 111) 'foo': fn foo<i32>(&[i32]) -> &[i32] | 245 | 108..111 'foo': fn foo<i32>(&[i32]) -> &[i32] |
246 | [108; 117) 'foo(&[1])': &[i32] | 246 | 108..117 'foo(&[1])': &[i32] |
247 | [112; 116) '&[1]': &[i32; _] | 247 | 112..116 '&[1]': &[i32; _] |
248 | [113; 116) '[1]': [i32; _] | 248 | 113..116 '[1]': [i32; _] |
249 | [114; 115) '1': i32 | 249 | 114..115 '1': i32 |
250 | "### | 250 | "### |
251 | ); | 251 | ); |
252 | } | 252 | } |
@@ -265,31 +265,31 @@ fn test(i: i32) { | |||
265 | } | 265 | } |
266 | "#), | 266 | "#), |
267 | @r###" | 267 | @r###" |
268 | [11; 12) 'x': &[T] | 268 | 11..12 'x': &[T] |
269 | [28; 39) '{ loop {} }': &[T] | 269 | 28..39 '{ loop {} }': &[T] |
270 | [30; 37) 'loop {}': ! | 270 | 30..37 'loop {}': ! |
271 | [35; 37) '{}': () | 271 | 35..37 '{}': () |
272 | [48; 49) 'i': i32 | 272 | 48..49 'i': i32 |
273 | [56; 150) '{ ... }; }': () | 273 | 56..150 '{ ... }; }': () |
274 | [66; 67) 'x': &[i32] | 274 | 66..67 'x': &[i32] |
275 | [70; 147) 'match ... }': &[i32] | 275 | 70..147 'match ... }': &[i32] |
276 | [76; 77) 'i': i32 | 276 | 76..77 'i': i32 |
277 | [88; 89) '2': i32 | 277 | 88..89 '2': i32 |
278 | [88; 89) '2': i32 | 278 | 88..89 '2': i32 |
279 | [93; 96) 'foo': fn foo<i32>(&[i32]) -> &[i32] | 279 | 93..96 'foo': fn foo<i32>(&[i32]) -> &[i32] |
280 | [93; 102) 'foo(&[2])': &[i32] | 280 | 93..102 'foo(&[2])': &[i32] |
281 | [97; 101) '&[2]': &[i32; _] | 281 | 97..101 '&[2]': &[i32; _] |
282 | [98; 101) '[2]': [i32; _] | 282 | 98..101 '[2]': [i32; _] |
283 | [99; 100) '2': i32 | 283 | 99..100 '2': i32 |
284 | [112; 113) '1': i32 | 284 | 112..113 '1': i32 |
285 | [112; 113) '1': i32 | 285 | 112..113 '1': i32 |
286 | [117; 121) '&[1]': &[i32; _] | 286 | 117..121 '&[1]': &[i32; _] |
287 | [118; 121) '[1]': [i32; _] | 287 | 118..121 '[1]': [i32; _] |
288 | [119; 120) '1': i32 | 288 | 119..120 '1': i32 |
289 | [131; 132) '_': i32 | 289 | 131..132 '_': i32 |
290 | [136; 140) '&[3]': &[i32; _] | 290 | 136..140 '&[3]': &[i32; _] |
291 | [137; 140) '[3]': [i32; _] | 291 | 137..140 '[3]': [i32; _] |
292 | [138; 139) '3': i32 | 292 | 138..139 '3': i32 |
293 | "### | 293 | "### |
294 | ); | 294 | ); |
295 | } | 295 | } |
@@ -308,31 +308,31 @@ fn test(i: i32) { | |||
308 | } | 308 | } |
309 | "#), | 309 | "#), |
310 | @r###" | 310 | @r###" |
311 | [11; 12) 'x': &[T] | 311 | 11..12 'x': &[T] |
312 | [28; 39) '{ loop {} }': &[T] | 312 | 28..39 '{ loop {} }': &[T] |
313 | [30; 37) 'loop {}': ! | 313 | 30..37 'loop {}': ! |
314 | [35; 37) '{}': () | 314 | 35..37 '{}': () |
315 | [48; 49) 'i': i32 | 315 | 48..49 'i': i32 |
316 | [56; 150) '{ ... }; }': () | 316 | 56..150 '{ ... }; }': () |
317 | [66; 67) 'x': &[i32] | 317 | 66..67 'x': &[i32] |
318 | [70; 147) 'match ... }': &[i32] | 318 | 70..147 'match ... }': &[i32] |
319 | [76; 77) 'i': i32 | 319 | 76..77 'i': i32 |
320 | [88; 89) '1': i32 | 320 | 88..89 '1': i32 |
321 | [88; 89) '1': i32 | 321 | 88..89 '1': i32 |
322 | [93; 97) '&[1]': &[i32; _] | 322 | 93..97 '&[1]': &[i32; _] |
323 | [94; 97) '[1]': [i32; _] | 323 | 94..97 '[1]': [i32; _] |
324 | [95; 96) '1': i32 | 324 | 95..96 '1': i32 |
325 | [107; 108) '2': i32 | 325 | 107..108 '2': i32 |
326 | [107; 108) '2': i32 | 326 | 107..108 '2': i32 |
327 | [112; 115) 'foo': fn foo<i32>(&[i32]) -> &[i32] | 327 | 112..115 'foo': fn foo<i32>(&[i32]) -> &[i32] |
328 | [112; 121) 'foo(&[2])': &[i32] | 328 | 112..121 'foo(&[2])': &[i32] |
329 | [116; 120) '&[2]': &[i32; _] | 329 | 116..120 '&[2]': &[i32; _] |
330 | [117; 120) '[2]': [i32; _] | 330 | 117..120 '[2]': [i32; _] |
331 | [118; 119) '2': i32 | 331 | 118..119 '2': i32 |
332 | [131; 132) '_': i32 | 332 | 131..132 '_': i32 |
333 | [136; 140) '&[3]': &[i32; _] | 333 | 136..140 '&[3]': &[i32; _] |
334 | [137; 140) '[3]': [i32; _] | 334 | 137..140 '[3]': [i32; _] |
335 | [138; 139) '3': i32 | 335 | 138..139 '3': i32 |
336 | "### | 336 | "### |
337 | ); | 337 | ); |
338 | } | 338 | } |
@@ -353,24 +353,24 @@ fn test() { | |||
353 | } | 353 | } |
354 | "#), | 354 | "#), |
355 | @r###" | 355 | @r###" |
356 | [11; 145) '{ ... }; }': () | 356 | 11..145 '{ ... }; }': () |
357 | [21; 22) 't': &mut i32 | 357 | 21..22 't': &mut i32 |
358 | [25; 31) '&mut 1': &mut i32 | 358 | 25..31 '&mut 1': &mut i32 |
359 | [30; 31) '1': i32 | 359 | 30..31 '1': i32 |
360 | [41; 42) 'x': *const i32 | 360 | 41..42 'x': *const i32 |
361 | [45; 142) 'match ... }': *const i32 | 361 | 45..142 'match ... }': *const i32 |
362 | [51; 52) '1': i32 | 362 | 51..52 '1': i32 |
363 | [63; 64) '1': i32 | 363 | 63..64 '1': i32 |
364 | [63; 64) '1': i32 | 364 | 63..64 '1': i32 |
365 | [68; 69) 't': &mut i32 | 365 | 68..69 't': &mut i32 |
366 | [68; 81) 't as *mut i32': *mut i32 | 366 | 68..81 't as *mut i32': *mut i32 |
367 | [91; 92) '2': i32 | 367 | 91..92 '2': i32 |
368 | [91; 92) '2': i32 | 368 | 91..92 '2': i32 |
369 | [96; 97) 't': &mut i32 | 369 | 96..97 't': &mut i32 |
370 | [96; 105) 't as &i32': &i32 | 370 | 96..105 't as &i32': &i32 |
371 | [115; 116) '_': i32 | 371 | 115..116 '_': i32 |
372 | [120; 121) 't': &mut i32 | 372 | 120..121 't': &mut i32 |
373 | [120; 135) 't as *const i32': *const i32 | 373 | 120..135 't as *const i32': *const i32 |
374 | "### | 374 | "### |
375 | ); | 375 | ); |
376 | } | 376 | } |
@@ -384,9 +384,9 @@ fn foo() -> u32 { | |||
384 | } | 384 | } |
385 | "#, true), | 385 | "#, true), |
386 | @r###" | 386 | @r###" |
387 | [17; 40) '{ ...own; }': ! | 387 | 17..40 '{ ...own; }': ! |
388 | [23; 37) 'return unknown': ! | 388 | 23..37 'return unknown': ! |
389 | [30; 37) 'unknown': u32 | 389 | 30..37 'unknown': u32 |
390 | "### | 390 | "### |
391 | ); | 391 | ); |
392 | } | 392 | } |
@@ -404,24 +404,24 @@ fn test() { | |||
404 | } | 404 | } |
405 | "#, true), | 405 | "#, true), |
406 | @r###" | 406 | @r###" |
407 | [30; 31) 'x': &Foo | 407 | 30..31 'x': &Foo |
408 | [39; 41) '{}': () | 408 | 39..41 '{}': () |
409 | [52; 133) '{ ...oo); }': () | 409 | 52..133 '{ ...oo); }': () |
410 | [58; 71) 'takes_ref_foo': fn takes_ref_foo(&Foo) | 410 | 58..71 'takes_ref_foo': fn takes_ref_foo(&Foo) |
411 | [58; 77) 'takes_...(&Foo)': () | 411 | 58..77 'takes_...(&Foo)': () |
412 | [72; 76) '&Foo': &Foo | 412 | 72..76 '&Foo': &Foo |
413 | [73; 76) 'Foo': Foo | 413 | 73..76 'Foo': Foo |
414 | [83; 96) 'takes_ref_foo': fn takes_ref_foo(&Foo) | 414 | 83..96 'takes_ref_foo': fn takes_ref_foo(&Foo) |
415 | [83; 103) 'takes_...&&Foo)': () | 415 | 83..103 'takes_...&&Foo)': () |
416 | [97; 102) '&&Foo': &&Foo | 416 | 97..102 '&&Foo': &&Foo |
417 | [98; 102) '&Foo': &Foo | 417 | 98..102 '&Foo': &Foo |
418 | [99; 102) 'Foo': Foo | 418 | 99..102 'Foo': Foo |
419 | [109; 122) 'takes_ref_foo': fn takes_ref_foo(&Foo) | 419 | 109..122 'takes_ref_foo': fn takes_ref_foo(&Foo) |
420 | [109; 130) 'takes_...&&Foo)': () | 420 | 109..130 'takes_...&&Foo)': () |
421 | [123; 129) '&&&Foo': &&&Foo | 421 | 123..129 '&&&Foo': &&&Foo |
422 | [124; 129) '&&Foo': &&Foo | 422 | 124..129 '&&Foo': &&Foo |
423 | [125; 129) '&Foo': &Foo | 423 | 125..129 '&Foo': &Foo |
424 | [126; 129) 'Foo': Foo | 424 | 126..129 'Foo': Foo |
425 | "### | 425 | "### |
426 | ); | 426 | ); |
427 | } | 427 | } |
@@ -439,26 +439,26 @@ fn test() { | |||
439 | } | 439 | } |
440 | "#, true), | 440 | "#, true), |
441 | @r###" | 441 | @r###" |
442 | [29; 30) 'x': &T | 442 | 29..30 'x': &T |
443 | [41; 47) '{ *x }': T | 443 | 41..47 '{ *x }': T |
444 | [43; 45) '*x': T | 444 | 43..45 '*x': T |
445 | [44; 45) 'x': &T | 445 | 44..45 'x': &T |
446 | [58; 127) '{ ...oo); }': () | 446 | 58..127 '{ ...oo); }': () |
447 | [64; 73) 'takes_ref': fn takes_ref<Foo>(&Foo) -> Foo | 447 | 64..73 'takes_ref': fn takes_ref<Foo>(&Foo) -> Foo |
448 | [64; 79) 'takes_ref(&Foo)': Foo | 448 | 64..79 'takes_ref(&Foo)': Foo |
449 | [74; 78) '&Foo': &Foo | 449 | 74..78 '&Foo': &Foo |
450 | [75; 78) 'Foo': Foo | 450 | 75..78 'Foo': Foo |
451 | [85; 94) 'takes_ref': fn takes_ref<&Foo>(&&Foo) -> &Foo | 451 | 85..94 'takes_ref': fn takes_ref<&Foo>(&&Foo) -> &Foo |
452 | [85; 101) 'takes_...&&Foo)': &Foo | 452 | 85..101 'takes_...&&Foo)': &Foo |
453 | [95; 100) '&&Foo': &&Foo | 453 | 95..100 '&&Foo': &&Foo |
454 | [96; 100) '&Foo': &Foo | 454 | 96..100 '&Foo': &Foo |
455 | [97; 100) 'Foo': Foo | 455 | 97..100 'Foo': Foo |
456 | [107; 116) 'takes_ref': fn takes_ref<&&Foo>(&&&Foo) -> &&Foo | 456 | 107..116 'takes_ref': fn takes_ref<&&Foo>(&&&Foo) -> &&Foo |
457 | [107; 124) 'takes_...&&Foo)': &&Foo | 457 | 107..124 'takes_...&&Foo)': &&Foo |
458 | [117; 123) '&&&Foo': &&&Foo | 458 | 117..123 '&&&Foo': &&&Foo |
459 | [118; 123) '&&Foo': &&Foo | 459 | 118..123 '&&Foo': &&Foo |
460 | [119; 123) '&Foo': &Foo | 460 | 119..123 '&Foo': &Foo |
461 | [120; 123) 'Foo': Foo | 461 | 120..123 'Foo': Foo |
462 | "### | 462 | "### |
463 | ); | 463 | ); |
464 | } | 464 | } |
@@ -478,18 +478,18 @@ fn test() { | |||
478 | } | 478 | } |
479 | "#, true), | 479 | "#, true), |
480 | @r###" | 480 | @r###" |
481 | [127; 128) 'x': &str | 481 | 127..128 'x': &str |
482 | [136; 138) '{}': () | 482 | 136..138 '{}': () |
483 | [169; 180) '{ loop {} }': String | 483 | 169..180 '{ loop {} }': String |
484 | [171; 178) 'loop {}': ! | 484 | 171..178 'loop {}': ! |
485 | [176; 178) '{}': () | 485 | 176..178 '{}': () |
486 | [191; 236) '{ ... }); }': () | 486 | 191..236 '{ ... }); }': () |
487 | [197; 210) 'takes_ref_str': fn takes_ref_str(&str) | 487 | 197..210 'takes_ref_str': fn takes_ref_str(&str) |
488 | [197; 233) 'takes_...g() })': () | 488 | 197..233 'takes_...g() })': () |
489 | [211; 232) '&{ ret...ng() }': &String | 489 | 211..232 '&{ ret...ng() }': &String |
490 | [212; 232) '{ retu...ng() }': String | 490 | 212..232 '{ retu...ng() }': String |
491 | [214; 228) 'returns_string': fn returns_string() -> String | 491 | 214..228 'returns_string': fn returns_string() -> String |
492 | [214; 230) 'return...ring()': String | 492 | 214..230 'return...ring()': String |
493 | "### | 493 | "### |
494 | ); | 494 | ); |
495 | } | 495 | } |
@@ -508,19 +508,19 @@ fn foo() { | |||
508 | } | 508 | } |
509 | "#, true), | 509 | "#, true), |
510 | @r###" | 510 | @r###" |
511 | [10; 106) '{ ... }; }': () | 511 | 10..106 '{ ... }; }': () |
512 | [20; 21) 'x': || -> &u32 | 512 | 20..21 'x': || -> &u32 |
513 | [24; 103) '|| { ... }': || -> &u32 | 513 | 24..103 '|| { ... }': || -> &u32 |
514 | [27; 103) '{ ... }': &u32 | 514 | 27..103 '{ ... }': &u32 |
515 | [37; 82) 'if tru... }': () | 515 | 37..82 'if tru... }': () |
516 | [40; 44) 'true': bool | 516 | 40..44 'true': bool |
517 | [45; 82) '{ ... }': ! | 517 | 45..82 '{ ... }': ! |
518 | [59; 71) 'return &1u32': ! | 518 | 59..71 'return &1u32': ! |
519 | [66; 71) '&1u32': &u32 | 519 | 66..71 '&1u32': &u32 |
520 | [67; 71) '1u32': u32 | 520 | 67..71 '1u32': u32 |
521 | [91; 97) '&&1u32': &&u32 | 521 | 91..97 '&&1u32': &&u32 |
522 | [92; 97) '&1u32': &u32 | 522 | 92..97 '&1u32': &u32 |
523 | [93; 97) '1u32': u32 | 523 | 93..97 '1u32': u32 |
524 | "### | 524 | "### |
525 | ); | 525 | ); |
526 | } | 526 | } |
@@ -535,12 +535,12 @@ fn test() { | |||
535 | } | 535 | } |
536 | "#, true), | 536 | "#, true), |
537 | @r###" | 537 | @r###" |
538 | [8; 9) 'x': u32 | 538 | 8..9 'x': u32 |
539 | [25; 30) '{ 1 }': isize | 539 | 25..30 '{ 1 }': isize |
540 | [27; 28) '1': isize | 540 | 27..28 '1': isize |
541 | [41; 79) '{ ...foo; }': () | 541 | 41..79 '{ ...foo; }': () |
542 | [51; 52) 'f': fn(u32) -> isize | 542 | 51..52 'f': fn(u32) -> isize |
543 | [73; 76) 'foo': fn foo(u32) -> isize | 543 | 73..76 'foo': fn foo(u32) -> isize |
544 | "### | 544 | "### |
545 | ); | 545 | ); |
546 | } | 546 | } |
@@ -554,12 +554,12 @@ fn test() { | |||
554 | } | 554 | } |
555 | "#, true), | 555 | "#, true), |
556 | @r###" | 556 | @r###" |
557 | [11; 55) '{ ...1 }; }': () | 557 | 11..55 '{ ...1 }; }': () |
558 | [21; 22) 'f': fn(u32) -> isize | 558 | 21..22 'f': fn(u32) -> isize |
559 | [43; 52) '|x| { 1 }': |u32| -> isize | 559 | 43..52 '|x| { 1 }': |u32| -> isize |
560 | [44; 45) 'x': u32 | 560 | 44..45 'x': u32 |
561 | [47; 52) '{ 1 }': isize | 561 | 47..52 '{ 1 }': isize |
562 | [49; 50) '1': isize | 562 | 49..50 '1': isize |
563 | "### | 563 | "### |
564 | ); | 564 | ); |
565 | } | 565 | } |
@@ -577,11 +577,11 @@ impl<TT> S<TT> { | |||
577 | } | 577 | } |
578 | "#, true), | 578 | "#, true), |
579 | @r###" | 579 | @r###" |
580 | [51; 55) 'self': &S<TT> | 580 | 51..55 'self': &S<TT> |
581 | [64; 87) '{ ... }': &TT | 581 | 64..87 '{ ... }': &TT |
582 | [74; 81) '&self.t': &TT | 582 | 74..81 '&self.t': &TT |
583 | [75; 79) 'self': &S<TT> | 583 | 75..79 'self': &S<TT> |
584 | [75; 81) 'self.t': TT | 584 | 75..81 'self.t': TT |
585 | "### | 585 | "### |
586 | ); | 586 | ); |
587 | } | 587 | } |
@@ -602,13 +602,13 @@ fn test() { | |||
602 | } | 602 | } |
603 | "#, true), | 603 | "#, true), |
604 | @r###" | 604 | @r###" |
605 | [162; 199) '{ ... 3]; }': () | 605 | 162..199 '{ ... 3]; }': () |
606 | [172; 173) 'f': &[usize] | 606 | 172..173 'f': &[usize] |
607 | [186; 196) '&[1, 2, 3]': &[usize; _] | 607 | 186..196 '&[1, 2, 3]': &[usize; _] |
608 | [187; 196) '[1, 2, 3]': [usize; _] | 608 | 187..196 '[1, 2, 3]': [usize; _] |
609 | [188; 189) '1': usize | 609 | 188..189 '1': usize |
610 | [191; 192) '2': usize | 610 | 191..192 '2': usize |
611 | [194; 195) '3': usize | 611 | 194..195 '3': usize |
612 | "### | 612 | "### |
613 | ); | 613 | ); |
614 | } | 614 | } |
@@ -642,19 +642,19 @@ fn test() { | |||
642 | } | 642 | } |
643 | "#, true), | 643 | "#, true), |
644 | @r###" | 644 | @r###" |
645 | [388; 573) '{ ...bj2; }': () | 645 | 388..573 '{ ...bj2; }': () |
646 | [398; 401) 'obj': &dyn Baz<i8, i16> | 646 | 398..401 'obj': &dyn Baz<i8, i16> |
647 | [423; 425) '&S': &S<i8, i16> | 647 | 423..425 '&S': &S<i8, i16> |
648 | [424; 425) 'S': S<i8, i16> | 648 | 424..425 'S': S<i8, i16> |
649 | [435; 438) 'obj': &dyn Bar<usize, i8, i16> | 649 | 435..438 'obj': &dyn Bar<usize, i8, i16> |
650 | [460; 463) 'obj': &dyn Baz<i8, i16> | 650 | 460..463 'obj': &dyn Baz<i8, i16> |
651 | [473; 476) 'obj': &dyn Foo<i8, usize> | 651 | 473..476 'obj': &dyn Foo<i8, usize> |
652 | [495; 498) 'obj': &dyn Bar<usize, i8, i16> | 652 | 495..498 'obj': &dyn Bar<usize, i8, i16> |
653 | [508; 512) 'obj2': &dyn Baz<i8, i16> | 653 | 508..512 'obj2': &dyn Baz<i8, i16> |
654 | [534; 536) '&S': &S<i8, i16> | 654 | 534..536 '&S': &S<i8, i16> |
655 | [535; 536) 'S': S<i8, i16> | 655 | 535..536 'S': S<i8, i16> |
656 | [546; 547) '_': &dyn Foo<i8, usize> | 656 | 546..547 '_': &dyn Foo<i8, usize> |
657 | [566; 570) 'obj2': &dyn Baz<i8, i16> | 657 | 566..570 'obj2': &dyn Baz<i8, i16> |
658 | "### | 658 | "### |
659 | ); | 659 | ); |
660 | } | 660 | } |
@@ -687,12 +687,12 @@ fn test() { | |||
687 | } | 687 | } |
688 | "#, true), | 688 | "#, true), |
689 | @r###" | 689 | @r###" |
690 | [292; 348) '{ ...obj; }': () | 690 | 292..348 '{ ...obj; }': () |
691 | [302; 305) 'obj': &dyn D | 691 | 302..305 'obj': &dyn D |
692 | [316; 318) '&S': &S | 692 | 316..318 '&S': &S |
693 | [317; 318) 'S': S | 693 | 317..318 'S': S |
694 | [328; 331) 'obj': &dyn A | 694 | 328..331 'obj': &dyn A |
695 | [342; 345) 'obj': &dyn D | 695 | 342..345 'obj': &dyn D |
696 | "### | 696 | "### |
697 | ); | 697 | ); |
698 | } | 698 | } |
diff --git a/crates/ra_hir_ty/src/tests/macros.rs b/crates/ra_hir_ty/src/tests/macros.rs index f2a9b1c40..6b5267232 100644 --- a/crates/ra_hir_ty/src/tests/macros.rs +++ b/crates/ra_hir_ty/src/tests/macros.rs | |||
@@ -67,12 +67,12 @@ fn main() { | |||
67 | } | 67 | } |
68 | "#), | 68 | "#), |
69 | @r###" | 69 | @r###" |
70 | ![0; 17) '{Foo(v...,2,])}': Foo | 70 | !0..17 '{Foo(v...,2,])}': Foo |
71 | ![1; 4) 'Foo': Foo({unknown}) -> Foo | 71 | !1..4 'Foo': Foo({unknown}) -> Foo |
72 | ![1; 16) 'Foo(vec![1,2,])': Foo | 72 | !1..16 'Foo(vec![1,2,])': Foo |
73 | ![5; 15) 'vec![1,2,]': {unknown} | 73 | !5..15 'vec![1,2,]': {unknown} |
74 | [156; 182) '{ ...,2); }': () | 74 | 156..182 '{ ...,2); }': () |
75 | [166; 167) 'x': Foo | 75 | 166..167 'x': Foo |
76 | "### | 76 | "### |
77 | ); | 77 | ); |
78 | } | 78 | } |
@@ -100,14 +100,14 @@ fn main() { | |||
100 | } | 100 | } |
101 | "#), | 101 | "#), |
102 | @r###" | 102 | @r###" |
103 | ![0; 17) '{Foo(v...,2,])}': Foo | 103 | !0..17 '{Foo(v...,2,])}': Foo |
104 | ![1; 4) 'Foo': Foo({unknown}) -> Foo | 104 | !1..4 'Foo': Foo({unknown}) -> Foo |
105 | ![1; 16) 'Foo(vec![1,2,])': Foo | 105 | !1..16 'Foo(vec![1,2,])': Foo |
106 | ![5; 15) 'vec![1,2,]': {unknown} | 106 | !5..15 'vec![1,2,]': {unknown} |
107 | [195; 251) '{ ...,2); }': () | 107 | 195..251 '{ ...,2); }': () |
108 | [205; 206) 'x': Foo | 108 | 205..206 'x': Foo |
109 | [228; 229) 'y': {unknown} | 109 | 228..229 'y': {unknown} |
110 | [232; 248) 'crate:...!(1,2)': {unknown} | 110 | 232..248 'crate:...!(1,2)': {unknown} |
111 | "### | 111 | "### |
112 | ); | 112 | ); |
113 | } | 113 | } |
@@ -131,11 +131,11 @@ fn main() { | |||
131 | } | 131 | } |
132 | "#), | 132 | "#), |
133 | @r###" | 133 | @r###" |
134 | ![0; 5) '42i32': i32 | 134 | !0..5 '42i32': i32 |
135 | ![0; 5) '42i32': i32 | 135 | !0..5 '42i32': i32 |
136 | [111; 164) '{ ...!(); }': () | 136 | 111..164 '{ ...!(); }': () |
137 | [121; 122) 'x': i32 | 137 | 121..122 'x': i32 |
138 | [148; 149) 'y': i32 | 138 | 148..149 'y': i32 |
139 | "### | 139 | "### |
140 | ); | 140 | ); |
141 | } | 141 | } |
@@ -172,51 +172,51 @@ fn spam() { | |||
172 | } | 172 | } |
173 | "#), | 173 | "#), |
174 | @r###" | 174 | @r###" |
175 | ![0; 6) '1isize': isize | 175 | !0..6 '1isize': isize |
176 | ![0; 6) '1isize': isize | 176 | !0..6 '1isize': isize |
177 | ![0; 6) '1isize': isize | 177 | !0..6 '1isize': isize |
178 | ![0; 6) '1isize': isize | 178 | !0..6 '1isize': isize |
179 | ![0; 6) '1isize': isize | 179 | !0..6 '1isize': isize |
180 | ![0; 6) '1isize': isize | 180 | !0..6 '1isize': isize |
181 | ![0; 6) '1isize': isize | 181 | !0..6 '1isize': isize |
182 | ![0; 6) '1isize': isize | 182 | !0..6 '1isize': isize |
183 | ![0; 6) '1isize': isize | 183 | !0..6 '1isize': isize |
184 | ![0; 6) '1isize': isize | 184 | !0..6 '1isize': isize |
185 | ![0; 6) '1isize': isize | 185 | !0..6 '1isize': isize |
186 | ![0; 6) '1isize': isize | 186 | !0..6 '1isize': isize |
187 | ![0; 6) '1isize': isize | 187 | !0..6 '1isize': isize |
188 | ![0; 6) '1isize': isize | 188 | !0..6 '1isize': isize |
189 | ![0; 6) '1isize': isize | 189 | !0..6 '1isize': isize |
190 | ![0; 6) '1isize': isize | 190 | !0..6 '1isize': isize |
191 | ![0; 6) '1isize': isize | 191 | !0..6 '1isize': isize |
192 | ![0; 6) '1isize': isize | 192 | !0..6 '1isize': isize |
193 | ![0; 6) '1isize': isize | 193 | !0..6 '1isize': isize |
194 | ![0; 6) '1isize': isize | 194 | !0..6 '1isize': isize |
195 | ![0; 6) '1isize': isize | 195 | !0..6 '1isize': isize |
196 | ![0; 6) '1isize': isize | 196 | !0..6 '1isize': isize |
197 | ![0; 6) '1isize': isize | 197 | !0..6 '1isize': isize |
198 | ![0; 6) '1isize': isize | 198 | !0..6 '1isize': isize |
199 | ![0; 6) '1isize': isize | 199 | !0..6 '1isize': isize |
200 | [54; 457) '{ ...!(); }': ! | 200 | 54..457 '{ ...!(); }': ! |
201 | [88; 109) 'spam!(...am!())': {unknown} | 201 | 88..109 'spam!(...am!())': {unknown} |
202 | [115; 134) 'for _ ...!() {}': () | 202 | 115..134 'for _ ...!() {}': () |
203 | [119; 120) '_': {unknown} | 203 | 119..120 '_': {unknown} |
204 | [132; 134) '{}': () | 204 | 132..134 '{}': () |
205 | [139; 149) '|| spam!()': || -> isize | 205 | 139..149 '|| spam!()': || -> isize |
206 | [155; 171) 'while ...!() {}': () | 206 | 155..171 'while ...!() {}': () |
207 | [169; 171) '{}': () | 207 | 169..171 '{}': () |
208 | [176; 189) 'break spam!()': ! | 208 | 176..189 'break spam!()': ! |
209 | [195; 209) 'return spam!()': ! | 209 | 195..209 'return spam!()': ! |
210 | [215; 269) 'match ... }': isize | 210 | 215..269 'match ... }': isize |
211 | [239; 240) '_': isize | 211 | 239..240 '_': isize |
212 | [274; 290) 'spam!(...am!())': {unknown} | 212 | 274..290 'spam!(...am!())': {unknown} |
213 | [296; 318) 'Spam {...m!() }': {unknown} | 213 | 296..318 'Spam {...m!() }': {unknown} |
214 | [324; 340) 'spam!(...am!()]': {unknown} | 214 | 324..340 'spam!(...am!()]': {unknown} |
215 | [365; 381) 'spam!(... usize': usize | 215 | 365..381 'spam!(... usize': usize |
216 | [387; 395) '&spam!()': &isize | 216 | 387..395 '&spam!()': &isize |
217 | [401; 409) '-spam!()': isize | 217 | 401..409 '-spam!()': isize |
218 | [415; 431) 'spam!(...pam!()': {unknown} | 218 | 415..431 'spam!(...pam!()': {unknown} |
219 | [437; 454) 'spam!(...pam!()': isize | 219 | 437..454 'spam!(...pam!()': isize |
220 | "### | 220 | "### |
221 | ); | 221 | ); |
222 | } | 222 | } |
@@ -244,9 +244,9 @@ fn foo() { | |||
244 | } | 244 | } |
245 | "#), | 245 | "#), |
246 | @r###" | 246 | @r###" |
247 | ![0; 5) '42i32': i32 | 247 | !0..5 '42i32': i32 |
248 | [171; 206) '{ ...32); }': () | 248 | 171..206 '{ ...32); }': () |
249 | [181; 184) 'foo': i32 | 249 | 181..184 'foo': i32 |
250 | "### | 250 | "### |
251 | ); | 251 | ); |
252 | } | 252 | } |
@@ -357,12 +357,12 @@ fn main() { | |||
357 | } | 357 | } |
358 | "#), | 358 | "#), |
359 | @r###" | 359 | @r###" |
360 | [159; 164) '{ 0 }': u64 | 360 | 159..164 '{ 0 }': u64 |
361 | [161; 162) '0': u64 | 361 | 161..162 '0': u64 |
362 | [175; 197) '{ ...f(); }': () | 362 | 175..197 '{ ...f(); }': () |
363 | [185; 187) '_a': u64 | 363 | 185..187 '_a': u64 |
364 | [191; 192) 'f': fn f() -> u64 | 364 | 191..192 'f': fn f() -> u64 |
365 | [191; 194) 'f()': u64 | 365 | 191..194 'f()': u64 |
366 | "### | 366 | "### |
367 | ); | 367 | ); |
368 | } | 368 | } |
@@ -379,10 +379,10 @@ fn main() { | |||
379 | } | 379 | } |
380 | "#), | 380 | "#), |
381 | @r###" | 381 | @r###" |
382 | ![0; 6) '1usize': usize | 382 | !0..6 '1usize': usize |
383 | [11; 90) '{ ...!(); }': () | 383 | 11..90 '{ ...!(); }': () |
384 | [17; 66) 'macro_... }': {unknown} | 384 | 17..66 'macro_... }': {unknown} |
385 | [75; 77) '_a': usize | 385 | 75..77 '_a': usize |
386 | "### | 386 | "### |
387 | ); | 387 | ); |
388 | } | 388 | } |
@@ -399,9 +399,9 @@ fn main() { | |||
399 | } | 399 | } |
400 | "#), | 400 | "#), |
401 | @r###" | 401 | @r###" |
402 | ![0; 1) '0': i32 | 402 | !0..1 '0': i32 |
403 | [64; 88) '{ ...!(); }': () | 403 | 64..88 '{ ...!(); }': () |
404 | [74; 75) 'x': i32 | 404 | 74..75 'x': i32 |
405 | "### | 405 | "### |
406 | ); | 406 | ); |
407 | } | 407 | } |
@@ -418,9 +418,9 @@ fn main() { | |||
418 | } | 418 | } |
419 | "#), | 419 | "#), |
420 | @r###" | 420 | @r###" |
421 | ![0; 2) '""': &str | 421 | !0..2 '""': &str |
422 | [64; 88) '{ ...!(); }': () | 422 | 64..88 '{ ...!(); }': () |
423 | [74; 75) 'x': &str | 423 | 74..75 'x': &str |
424 | "### | 424 | "### |
425 | ); | 425 | ); |
426 | } | 426 | } |
@@ -437,9 +437,9 @@ fn main() { | |||
437 | } | 437 | } |
438 | "#), | 438 | "#), |
439 | @r###" | 439 | @r###" |
440 | ![0; 1) '0': i32 | 440 | !0..1 '0': i32 |
441 | [66; 92) '{ ...!(); }': () | 441 | 66..92 '{ ...!(); }': () |
442 | [76; 77) 'x': i32 | 442 | 76..77 'x': i32 |
443 | "### | 443 | "### |
444 | ); | 444 | ); |
445 | } | 445 | } |
@@ -456,9 +456,9 @@ fn main() { | |||
456 | } | 456 | } |
457 | "#), | 457 | "#), |
458 | @r###" | 458 | @r###" |
459 | ![0; 13) '"helloworld!"': &str | 459 | !0..13 '"helloworld!"': &str |
460 | [66; 122) '{ ...")); }': () | 460 | 66..122 '{ ...")); }': () |
461 | [76; 77) 'x': &str | 461 | 76..77 'x': &str |
462 | "### | 462 | "### |
463 | ); | 463 | ); |
464 | } | 464 | } |
@@ -591,9 +591,9 @@ fn main() { | |||
591 | } | 591 | } |
592 | "#), | 592 | "#), |
593 | @r###" | 593 | @r###" |
594 | ![0; 13) '"helloworld!"': &str | 594 | !0..13 '"helloworld!"': &str |
595 | [104; 161) '{ ...")); }': () | 595 | 104..161 '{ ...")); }': () |
596 | [114; 115) 'x': &str | 596 | 114..115 'x': &str |
597 | "### | 597 | "### |
598 | ); | 598 | ); |
599 | } | 599 | } |
@@ -611,9 +611,9 @@ fn main() { | |||
611 | } | 611 | } |
612 | "#), | 612 | "#), |
613 | @r###" | 613 | @r###" |
614 | ![0; 5) '"bar"': &str | 614 | !0..5 '"bar"': &str |
615 | [88; 116) '{ ...o"); }': () | 615 | 88..116 '{ ...o"); }': () |
616 | [98; 99) 'x': &str | 616 | 98..99 'x': &str |
617 | "### | 617 | "### |
618 | ); | 618 | ); |
619 | } | 619 | } |
@@ -703,12 +703,12 @@ fn main() { | |||
703 | } | 703 | } |
704 | "#), | 704 | "#), |
705 | @r###" | 705 | @r###" |
706 | [52; 111) '{ ... }; }': () | 706 | 52..111 '{ ... }; }': () |
707 | [62; 63) 'x': u32 | 707 | 62..63 'x': u32 |
708 | [66; 108) 'match ... }': u32 | 708 | 66..108 'match ... }': u32 |
709 | [72; 74) '()': () | 709 | 72..74 '()': () |
710 | [85; 92) 'unit!()': () | 710 | 85..92 'unit!()': () |
711 | [96; 101) '92u32': u32 | 711 | 96..101 '92u32': u32 |
712 | "### | 712 | "### |
713 | ); | 713 | ); |
714 | } | 714 | } |
diff --git a/crates/ra_hir_ty/src/tests/method_resolution.rs b/crates/ra_hir_ty/src/tests/method_resolution.rs index af3e5b12c..ab87f598a 100644 --- a/crates/ra_hir_ty/src/tests/method_resolution.rs +++ b/crates/ra_hir_ty/src/tests/method_resolution.rs | |||
@@ -22,14 +22,14 @@ fn test() { | |||
22 | } | 22 | } |
23 | "#), | 23 | "#), |
24 | @r###" | 24 | @r###" |
25 | [45; 49) 'self': &[T] | 25 | 45..49 'self': &[T] |
26 | [56; 79) '{ ... }': T | 26 | 56..79 '{ ... }': T |
27 | [66; 73) 'loop {}': ! | 27 | 66..73 'loop {}': ! |
28 | [71; 73) '{}': () | 28 | 71..73 '{}': () |
29 | [133; 160) '{ ...o"); }': () | 29 | 133..160 '{ ...o"); }': () |
30 | [139; 149) '<[_]>::foo': fn foo<u8>(&[u8]) -> u8 | 30 | 139..149 '<[_]>::foo': fn foo<u8>(&[u8]) -> u8 |
31 | [139; 157) '<[_]>:..."foo")': u8 | 31 | 139..157 '<[_]>:..."foo")': u8 |
32 | [150; 156) 'b"foo"': &[u8] | 32 | 150..156 'b"foo"': &[u8] |
33 | "### | 33 | "### |
34 | ); | 34 | ); |
35 | } | 35 | } |
@@ -51,15 +51,15 @@ fn test() { | |||
51 | } | 51 | } |
52 | "#), | 52 | "#), |
53 | @r###" | 53 | @r###" |
54 | [49; 75) '{ ... }': A | 54 | 49..75 '{ ... }': A |
55 | [59; 69) 'A { x: 0 }': A | 55 | 59..69 'A { x: 0 }': A |
56 | [66; 67) '0': u32 | 56 | 66..67 '0': u32 |
57 | [88; 122) '{ ...a.x; }': () | 57 | 88..122 '{ ...a.x; }': () |
58 | [98; 99) 'a': A | 58 | 98..99 'a': A |
59 | [102; 108) 'A::new': fn new() -> A | 59 | 102..108 'A::new': fn new() -> A |
60 | [102; 110) 'A::new()': A | 60 | 102..110 'A::new()': A |
61 | [116; 117) 'a': A | 61 | 116..117 'a': A |
62 | [116; 119) 'a.x': u32 | 62 | 116..119 'a.x': u32 |
63 | "### | 63 | "### |
64 | ); | 64 | ); |
65 | } | 65 | } |
@@ -86,19 +86,19 @@ fn test() { | |||
86 | } | 86 | } |
87 | "#), | 87 | "#), |
88 | @r###" | 88 | @r###" |
89 | [47; 67) '{ ... }': A | 89 | 47..67 '{ ... }': A |
90 | [57; 61) 'A::B': A | 90 | 57..61 'A::B': A |
91 | [88; 108) '{ ... }': A | 91 | 88..108 '{ ... }': A |
92 | [98; 102) 'A::C': A | 92 | 98..102 'A::C': A |
93 | [121; 178) '{ ... c; }': () | 93 | 121..178 '{ ... c; }': () |
94 | [131; 132) 'a': A | 94 | 131..132 'a': A |
95 | [135; 139) 'A::b': fn b() -> A | 95 | 135..139 'A::b': fn b() -> A |
96 | [135; 141) 'A::b()': A | 96 | 135..141 'A::b()': A |
97 | [147; 148) 'a': A | 97 | 147..148 'a': A |
98 | [158; 159) 'c': A | 98 | 158..159 'c': A |
99 | [162; 166) 'A::c': fn c() -> A | 99 | 162..166 'A::c': fn c() -> A |
100 | [162; 168) 'A::c()': A | 100 | 162..168 'A::c()': A |
101 | [174; 175) 'c': A | 101 | 174..175 'c': A |
102 | "### | 102 | "### |
103 | ); | 103 | ); |
104 | } | 104 | } |
@@ -130,22 +130,22 @@ fn test() { | |||
130 | } | 130 | } |
131 | "#), | 131 | "#), |
132 | @r###" | 132 | @r###" |
133 | [56; 64) '{ A {} }': A | 133 | 56..64 '{ A {} }': A |
134 | [58; 62) 'A {}': A | 134 | 58..62 'A {}': A |
135 | [126; 132) '{ 99 }': u32 | 135 | 126..132 '{ 99 }': u32 |
136 | [128; 130) '99': u32 | 136 | 128..130 '99': u32 |
137 | [202; 210) '{ C {} }': C | 137 | 202..210 '{ C {} }': C |
138 | [204; 208) 'C {}': C | 138 | 204..208 'C {}': C |
139 | [241; 325) '{ ...g(); }': () | 139 | 241..325 '{ ...g(); }': () |
140 | [251; 252) 'x': A | 140 | 251..252 'x': A |
141 | [255; 266) 'a::A::thing': fn thing() -> A | 141 | 255..266 'a::A::thing': fn thing() -> A |
142 | [255; 268) 'a::A::thing()': A | 142 | 255..268 'a::A::thing()': A |
143 | [278; 279) 'y': u32 | 143 | 278..279 'y': u32 |
144 | [282; 293) 'b::B::thing': fn thing() -> u32 | 144 | 282..293 'b::B::thing': fn thing() -> u32 |
145 | [282; 295) 'b::B::thing()': u32 | 145 | 282..295 'b::B::thing()': u32 |
146 | [305; 306) 'z': C | 146 | 305..306 'z': C |
147 | [309; 320) 'c::C::thing': fn thing() -> C | 147 | 309..320 'c::C::thing': fn thing() -> C |
148 | [309; 322) 'c::C::thing()': C | 148 | 309..322 'c::C::thing()': C |
149 | "### | 149 | "### |
150 | ); | 150 | ); |
151 | } | 151 | } |
@@ -169,15 +169,15 @@ fn test() { | |||
169 | } | 169 | } |
170 | "#), | 170 | "#), |
171 | @r###" | 171 | @r###" |
172 | [64; 67) 'val': T | 172 | 64..67 'val': T |
173 | [82; 109) '{ ... }': Gen<T> | 173 | 82..109 '{ ... }': Gen<T> |
174 | [92; 103) 'Gen { val }': Gen<T> | 174 | 92..103 'Gen { val }': Gen<T> |
175 | [98; 101) 'val': T | 175 | 98..101 'val': T |
176 | [123; 155) '{ ...32); }': () | 176 | 123..155 '{ ...32); }': () |
177 | [133; 134) 'a': Gen<u32> | 177 | 133..134 'a': Gen<u32> |
178 | [137; 146) 'Gen::make': fn make<u32>(u32) -> Gen<u32> | 178 | 137..146 'Gen::make': fn make<u32>(u32) -> Gen<u32> |
179 | [137; 152) 'Gen::make(0u32)': Gen<u32> | 179 | 137..152 'Gen::make(0u32)': Gen<u32> |
180 | [147; 151) '0u32': u32 | 180 | 147..151 '0u32': u32 |
181 | "### | 181 | "### |
182 | ); | 182 | ); |
183 | } | 183 | } |
@@ -201,13 +201,13 @@ fn test() { | |||
201 | } | 201 | } |
202 | "#), | 202 | "#), |
203 | @r###" | 203 | @r###" |
204 | [80; 104) '{ ... }': Gen<T> | 204 | 80..104 '{ ... }': Gen<T> |
205 | [90; 98) 'loop { }': ! | 205 | 90..98 'loop { }': ! |
206 | [95; 98) '{ }': () | 206 | 95..98 '{ }': () |
207 | [118; 146) '{ ...e(); }': () | 207 | 118..146 '{ ...e(); }': () |
208 | [128; 129) 'a': Gen<u32> | 208 | 128..129 'a': Gen<u32> |
209 | [132; 141) 'Gen::make': fn make<u32>() -> Gen<u32> | 209 | 132..141 'Gen::make': fn make<u32>() -> Gen<u32> |
210 | [132; 143) 'Gen::make()': Gen<u32> | 210 | 132..143 'Gen::make()': Gen<u32> |
211 | "### | 211 | "### |
212 | ); | 212 | ); |
213 | } | 213 | } |
@@ -255,13 +255,13 @@ fn test() { | |||
255 | } | 255 | } |
256 | "#), | 256 | "#), |
257 | @r###" | 257 | @r###" |
258 | [76; 100) '{ ... }': Gen<T> | 258 | 76..100 '{ ... }': Gen<T> |
259 | [86; 94) 'loop { }': ! | 259 | 86..94 'loop { }': ! |
260 | [91; 94) '{ }': () | 260 | 91..94 '{ }': () |
261 | [114; 149) '{ ...e(); }': () | 261 | 114..149 '{ ...e(); }': () |
262 | [124; 125) 'a': Gen<u32> | 262 | 124..125 'a': Gen<u32> |
263 | [128; 144) 'Gen::<...::make': fn make<u32>() -> Gen<u32> | 263 | 128..144 'Gen::<...::make': fn make<u32>() -> Gen<u32> |
264 | [128; 146) 'Gen::<...make()': Gen<u32> | 264 | 128..146 'Gen::<...make()': Gen<u32> |
265 | "### | 265 | "### |
266 | ); | 266 | ); |
267 | } | 267 | } |
@@ -286,13 +286,13 @@ fn test() { | |||
286 | } | 286 | } |
287 | "#), | 287 | "#), |
288 | @r###" | 288 | @r###" |
289 | [102; 126) '{ ... }': Gen<u32, T> | 289 | 102..126 '{ ... }': Gen<u32, T> |
290 | [112; 120) 'loop { }': ! | 290 | 112..120 'loop { }': ! |
291 | [117; 120) '{ }': () | 291 | 117..120 '{ }': () |
292 | [140; 180) '{ ...e(); }': () | 292 | 140..180 '{ ...e(); }': () |
293 | [150; 151) 'a': Gen<u32, u64> | 293 | 150..151 'a': Gen<u32, u64> |
294 | [154; 175) 'Gen::<...::make': fn make<u64>() -> Gen<u32, u64> | 294 | 154..175 'Gen::<...::make': fn make<u64>() -> Gen<u32, u64> |
295 | [154; 177) 'Gen::<...make()': Gen<u32, u64> | 295 | 154..177 'Gen::<...make()': Gen<u32, u64> |
296 | "### | 296 | "### |
297 | ); | 297 | ); |
298 | } | 298 | } |
@@ -340,13 +340,13 @@ fn test() { | |||
340 | } | 340 | } |
341 | "#), | 341 | "#), |
342 | @r###" | 342 | @r###" |
343 | [31; 35) 'self': &Self | 343 | 31..35 'self': &Self |
344 | [110; 114) 'self': &Self | 344 | 110..114 'self': &Self |
345 | [170; 228) '{ ...i128 }': () | 345 | 170..228 '{ ...i128 }': () |
346 | [176; 178) 'S1': S1 | 346 | 176..178 'S1': S1 |
347 | [176; 187) 'S1.method()': u32 | 347 | 176..187 'S1.method()': u32 |
348 | [203; 205) 'S2': S2 | 348 | 203..205 'S2': S2 |
349 | [203; 214) 'S2.method()': i128 | 349 | 203..214 'S2.method()': i128 |
350 | "### | 350 | "### |
351 | ); | 351 | ); |
352 | } | 352 | } |
@@ -387,14 +387,14 @@ mod bar_test { | |||
387 | } | 387 | } |
388 | "#), | 388 | "#), |
389 | @r###" | 389 | @r###" |
390 | [63; 67) 'self': &Self | 390 | 63..67 'self': &Self |
391 | [169; 173) 'self': &Self | 391 | 169..173 'self': &Self |
392 | [300; 337) '{ ... }': () | 392 | 300..337 '{ ... }': () |
393 | [310; 311) 'S': S | 393 | 310..311 'S': S |
394 | [310; 320) 'S.method()': u32 | 394 | 310..320 'S.method()': u32 |
395 | [416; 454) '{ ... }': () | 395 | 416..454 '{ ... }': () |
396 | [426; 427) 'S': S | 396 | 426..427 'S': S |
397 | [426; 436) 'S.method()': i128 | 397 | 426..436 'S.method()': i128 |
398 | "### | 398 | "### |
399 | ); | 399 | ); |
400 | } | 400 | } |
@@ -414,10 +414,10 @@ fn test() { | |||
414 | } | 414 | } |
415 | "#), | 415 | "#), |
416 | @r###" | 416 | @r###" |
417 | [33; 37) 'self': &Self | 417 | 33..37 'self': &Self |
418 | [92; 111) '{ ...d(); }': () | 418 | 92..111 '{ ...d(); }': () |
419 | [98; 99) 'S': S | 419 | 98..99 'S': S |
420 | [98; 108) 'S.method()': u32 | 420 | 98..108 'S.method()': u32 |
421 | "### | 421 | "### |
422 | ); | 422 | ); |
423 | } | 423 | } |
@@ -443,17 +443,17 @@ fn test() { | |||
443 | } | 443 | } |
444 | "#), | 444 | "#), |
445 | @r###" | 445 | @r###" |
446 | [43; 47) 'self': &Self | 446 | 43..47 'self': &Self |
447 | [82; 86) 'self': &Self | 447 | 82..86 'self': &Self |
448 | [210; 361) '{ ..., i8 }': () | 448 | 210..361 '{ ..., i8 }': () |
449 | [216; 218) 'S1': S1 | 449 | 216..218 'S1': S1 |
450 | [216; 228) 'S1.method1()': (u8, u16, u32) | 450 | 216..228 'S1.method1()': (u8, u16, u32) |
451 | [250; 252) 'S1': S1 | 451 | 250..252 'S1': S1 |
452 | [250; 262) 'S1.method2()': (u32, u16, u8) | 452 | 250..262 'S1.method2()': (u32, u16, u8) |
453 | [284; 286) 'S2': S2 | 453 | 284..286 'S2': S2 |
454 | [284; 296) 'S2.method1()': (i8, i16, {unknown}) | 454 | 284..296 'S2.method1()': (i8, i16, {unknown}) |
455 | [324; 326) 'S2': S2 | 455 | 324..326 'S2': S2 |
456 | [324; 336) 'S2.method2()': ({unknown}, i16, i8) | 456 | 324..336 'S2.method2()': ({unknown}, i16, i8) |
457 | "### | 457 | "### |
458 | ); | 458 | ); |
459 | } | 459 | } |
@@ -473,12 +473,12 @@ fn test() { | |||
473 | } | 473 | } |
474 | "#), | 474 | "#), |
475 | @r###" | 475 | @r###" |
476 | [33; 37) 'self': &Self | 476 | 33..37 'self': &Self |
477 | [102; 127) '{ ...d(); }': () | 477 | 102..127 '{ ...d(); }': () |
478 | [108; 109) 'S': S<u32>(u32) -> S<u32> | 478 | 108..109 'S': S<u32>(u32) -> S<u32> |
479 | [108; 115) 'S(1u32)': S<u32> | 479 | 108..115 'S(1u32)': S<u32> |
480 | [108; 124) 'S(1u32...thod()': u32 | 480 | 108..124 'S(1u32...thod()': u32 |
481 | [110; 114) '1u32': u32 | 481 | 110..114 '1u32': u32 |
482 | "### | 482 | "### |
483 | ); | 483 | ); |
484 | } | 484 | } |
@@ -499,16 +499,16 @@ fn test() { | |||
499 | } | 499 | } |
500 | "#), | 500 | "#), |
501 | @r###" | 501 | @r###" |
502 | [87; 193) '{ ...t(); }': () | 502 | 87..193 '{ ...t(); }': () |
503 | [97; 99) 's1': S | 503 | 97..99 's1': S |
504 | [105; 121) 'Defaul...efault': fn default<S>() -> S | 504 | 105..121 'Defaul...efault': fn default<S>() -> S |
505 | [105; 123) 'Defaul...ault()': S | 505 | 105..123 'Defaul...ault()': S |
506 | [133; 135) 's2': S | 506 | 133..135 's2': S |
507 | [138; 148) 'S::default': fn default<S>() -> S | 507 | 138..148 'S::default': fn default<S>() -> S |
508 | [138; 150) 'S::default()': S | 508 | 138..150 'S::default()': S |
509 | [160; 162) 's3': S | 509 | 160..162 's3': S |
510 | [165; 188) '<S as ...efault': fn default<S>() -> S | 510 | 165..188 '<S as ...efault': fn default<S>() -> S |
511 | [165; 190) '<S as ...ault()': S | 511 | 165..190 '<S as ...ault()': S |
512 | "### | 512 | "### |
513 | ); | 513 | ); |
514 | } | 514 | } |
@@ -531,16 +531,16 @@ fn test() { | |||
531 | } | 531 | } |
532 | "#), | 532 | "#), |
533 | @r###" | 533 | @r###" |
534 | [127; 211) '{ ...e(); }': () | 534 | 127..211 '{ ...e(); }': () |
535 | [137; 138) 'a': u32 | 535 | 137..138 'a': u32 |
536 | [141; 148) 'S::make': fn make<S, u32>() -> u32 | 536 | 141..148 'S::make': fn make<S, u32>() -> u32 |
537 | [141; 150) 'S::make()': u32 | 537 | 141..150 'S::make()': u32 |
538 | [160; 161) 'b': u64 | 538 | 160..161 'b': u64 |
539 | [164; 178) 'G::<u64>::make': fn make<G<u64>, u64>() -> u64 | 539 | 164..178 'G::<u64>::make': fn make<G<u64>, u64>() -> u64 |
540 | [164; 180) 'G::<u6...make()': u64 | 540 | 164..180 'G::<u6...make()': u64 |
541 | [190; 191) 'c': f64 | 541 | 190..191 'c': f64 |
542 | [199; 206) 'G::make': fn make<G<f64>, f64>() -> f64 | 542 | 199..206 'G::make': fn make<G<f64>, f64>() -> f64 |
543 | [199; 208) 'G::make()': f64 | 543 | 199..208 'G::make()': f64 |
544 | "### | 544 | "### |
545 | ); | 545 | ); |
546 | } | 546 | } |
@@ -565,22 +565,22 @@ fn test() { | |||
565 | } | 565 | } |
566 | "#), | 566 | "#), |
567 | @r###" | 567 | @r###" |
568 | [135; 313) '{ ...e(); }': () | 568 | 135..313 '{ ...e(); }': () |
569 | [145; 146) 'a': (u32, i64) | 569 | 145..146 'a': (u32, i64) |
570 | [149; 163) 'S::make::<i64>': fn make<S, u32, i64>() -> (u32, i64) | 570 | 149..163 'S::make::<i64>': fn make<S, u32, i64>() -> (u32, i64) |
571 | [149; 165) 'S::mak...i64>()': (u32, i64) | 571 | 149..165 'S::mak...i64>()': (u32, i64) |
572 | [175; 176) 'b': (u32, i64) | 572 | 175..176 'b': (u32, i64) |
573 | [189; 196) 'S::make': fn make<S, u32, i64>() -> (u32, i64) | 573 | 189..196 'S::make': fn make<S, u32, i64>() -> (u32, i64) |
574 | [189; 198) 'S::make()': (u32, i64) | 574 | 189..198 'S::make()': (u32, i64) |
575 | [208; 209) 'c': (u32, i64) | 575 | 208..209 'c': (u32, i64) |
576 | [212; 233) 'G::<u3...:<i64>': fn make<G<u32>, u32, i64>() -> (u32, i64) | 576 | 212..233 'G::<u3...:<i64>': fn make<G<u32>, u32, i64>() -> (u32, i64) |
577 | [212; 235) 'G::<u3...i64>()': (u32, i64) | 577 | 212..235 'G::<u3...i64>()': (u32, i64) |
578 | [245; 246) 'd': (u32, i64) | 578 | 245..246 'd': (u32, i64) |
579 | [259; 273) 'G::make::<i64>': fn make<G<u32>, u32, i64>() -> (u32, i64) | 579 | 259..273 'G::make::<i64>': fn make<G<u32>, u32, i64>() -> (u32, i64) |
580 | [259; 275) 'G::mak...i64>()': (u32, i64) | 580 | 259..275 'G::mak...i64>()': (u32, i64) |
581 | [285; 286) 'e': (u32, i64) | 581 | 285..286 'e': (u32, i64) |
582 | [301; 308) 'G::make': fn make<G<u32>, u32, i64>() -> (u32, i64) | 582 | 301..308 'G::make': fn make<G<u32>, u32, i64>() -> (u32, i64) |
583 | [301; 310) 'G::make()': (u32, i64) | 583 | 301..310 'G::make()': (u32, i64) |
584 | "### | 584 | "### |
585 | ); | 585 | ); |
586 | } | 586 | } |
@@ -599,10 +599,10 @@ fn test() { | |||
599 | } | 599 | } |
600 | "#), | 600 | "#), |
601 | @r###" | 601 | @r###" |
602 | [101; 127) '{ ...e(); }': () | 602 | 101..127 '{ ...e(); }': () |
603 | [111; 112) 'a': (S<i32>, i64) | 603 | 111..112 'a': (S<i32>, i64) |
604 | [115; 122) 'S::make': fn make<S<i32>, i64>() -> (S<i32>, i64) | 604 | 115..122 'S::make': fn make<S<i32>, i64>() -> (S<i32>, i64) |
605 | [115; 124) 'S::make()': (S<i32>, i64) | 605 | 115..124 'S::make()': (S<i32>, i64) |
606 | "### | 606 | "### |
607 | ); | 607 | ); |
608 | } | 608 | } |
@@ -623,13 +623,13 @@ fn test() { | |||
623 | } | 623 | } |
624 | "#), | 624 | "#), |
625 | @r###" | 625 | @r###" |
626 | [131; 203) '{ ...e(); }': () | 626 | 131..203 '{ ...e(); }': () |
627 | [141; 142) 'a': (S<u64>, i64) | 627 | 141..142 'a': (S<u64>, i64) |
628 | [158; 165) 'S::make': fn make<S<u64>, i64>() -> (S<u64>, i64) | 628 | 158..165 'S::make': fn make<S<u64>, i64>() -> (S<u64>, i64) |
629 | [158; 167) 'S::make()': (S<u64>, i64) | 629 | 158..167 'S::make()': (S<u64>, i64) |
630 | [177; 178) 'b': (S<u32>, i32) | 630 | 177..178 'b': (S<u32>, i32) |
631 | [191; 198) 'S::make': fn make<S<u32>, i32>() -> (S<u32>, i32) | 631 | 191..198 'S::make': fn make<S<u32>, i32>() -> (S<u32>, i32) |
632 | [191; 200) 'S::make()': (S<u32>, i32) | 632 | 191..200 'S::make()': (S<u32>, i32) |
633 | "### | 633 | "### |
634 | ); | 634 | ); |
635 | } | 635 | } |
@@ -649,13 +649,13 @@ fn test() { | |||
649 | } | 649 | } |
650 | "#), | 650 | "#), |
651 | @r###" | 651 | @r###" |
652 | [107; 211) '{ ...>(); }': () | 652 | 107..211 '{ ...>(); }': () |
653 | [117; 118) 'a': (S<u64>, i64, u8) | 653 | 117..118 'a': (S<u64>, i64, u8) |
654 | [121; 150) '<S as ...::<u8>': fn make<S<u64>, i64, u8>() -> (S<u64>, i64, u8) | 654 | 121..150 '<S as ...::<u8>': fn make<S<u64>, i64, u8>() -> (S<u64>, i64, u8) |
655 | [121; 152) '<S as ...<u8>()': (S<u64>, i64, u8) | 655 | 121..152 '<S as ...<u8>()': (S<u64>, i64, u8) |
656 | [162; 163) 'b': (S<u64>, i64, u8) | 656 | 162..163 'b': (S<u64>, i64, u8) |
657 | [182; 206) 'Trait:...::<u8>': fn make<S<u64>, i64, u8>() -> (S<u64>, i64, u8) | 657 | 182..206 'Trait:...::<u8>': fn make<S<u64>, i64, u8>() -> (S<u64>, i64, u8) |
658 | [182; 208) 'Trait:...<u8>()': (S<u64>, i64, u8) | 658 | 182..208 'Trait:...<u8>()': (S<u64>, i64, u8) |
659 | "### | 659 | "### |
660 | ); | 660 | ); |
661 | } | 661 | } |
@@ -672,11 +672,11 @@ fn test<T: Trait>(t: T) { | |||
672 | } | 672 | } |
673 | "#), | 673 | "#), |
674 | @r###" | 674 | @r###" |
675 | [30; 34) 'self': &Self | 675 | 30..34 'self': &Self |
676 | [64; 65) 't': T | 676 | 64..65 't': T |
677 | [70; 89) '{ ...d(); }': () | 677 | 70..89 '{ ...d(); }': () |
678 | [76; 77) 't': T | 678 | 76..77 't': T |
679 | [76; 86) 't.method()': u32 | 679 | 76..86 't.method()': u32 |
680 | "### | 680 | "### |
681 | ); | 681 | ); |
682 | } | 682 | } |
@@ -693,11 +693,11 @@ fn test<U, T: Trait<U>>(t: T) { | |||
693 | } | 693 | } |
694 | "#), | 694 | "#), |
695 | @r###" | 695 | @r###" |
696 | [33; 37) 'self': &Self | 696 | 33..37 'self': &Self |
697 | [71; 72) 't': T | 697 | 71..72 't': T |
698 | [77; 96) '{ ...d(); }': () | 698 | 77..96 '{ ...d(); }': () |
699 | [83; 84) 't': T | 699 | 83..84 't': T |
700 | [83; 93) 't.method()': U | 700 | 83..93 't.method()': U |
701 | "### | 701 | "### |
702 | ); | 702 | ); |
703 | } | 703 | } |
@@ -719,18 +719,18 @@ fn test() { | |||
719 | } | 719 | } |
720 | "#), | 720 | "#), |
721 | @r###" | 721 | @r###" |
722 | [29; 33) 'self': Self | 722 | 29..33 'self': Self |
723 | [111; 202) '{ ...(S); }': () | 723 | 111..202 '{ ...(S); }': () |
724 | [121; 122) 'x': u32 | 724 | 121..122 'x': u32 |
725 | [130; 131) 'S': S | 725 | 130..131 'S': S |
726 | [130; 138) 'S.into()': u32 | 726 | 130..138 'S.into()': u32 |
727 | [148; 149) 'y': u64 | 727 | 148..149 'y': u64 |
728 | [157; 158) 'S': S | 728 | 157..158 'S': S |
729 | [157; 165) 'S.into()': u64 | 729 | 157..165 'S.into()': u64 |
730 | [175; 176) 'z': u64 | 730 | 175..176 'z': u64 |
731 | [179; 196) 'Into::...::into': fn into<S, u64>(S) -> u64 | 731 | 179..196 'Into::...::into': fn into<S, u64>(S) -> u64 |
732 | [179; 199) 'Into::...nto(S)': u64 | 732 | 179..199 'Into::...nto(S)': u64 |
733 | [197; 198) 'S': S | 733 | 197..198 'S': S |
734 | "### | 734 | "### |
735 | ); | 735 | ); |
736 | } | 736 | } |
diff --git a/crates/ra_hir_ty/src/tests/patterns.rs b/crates/ra_hir_ty/src/tests/patterns.rs index 6ea51d5d3..af291092d 100644 --- a/crates/ra_hir_ty/src/tests/patterns.rs +++ b/crates/ra_hir_ty/src/tests/patterns.rs | |||
@@ -30,54 +30,54 @@ fn test(x: &i32) { | |||
30 | } | 30 | } |
31 | "#), | 31 | "#), |
32 | @r###" | 32 | @r###" |
33 | [9; 10) 'x': &i32 | 33 | 9..10 'x': &i32 |
34 | [18; 369) '{ ...o_x; }': () | 34 | 18..369 '{ ...o_x; }': () |
35 | [28; 29) 'y': &i32 | 35 | 28..29 'y': &i32 |
36 | [32; 33) 'x': &i32 | 36 | 32..33 'x': &i32 |
37 | [43; 45) '&z': &i32 | 37 | 43..45 '&z': &i32 |
38 | [44; 45) 'z': i32 | 38 | 44..45 'z': i32 |
39 | [48; 49) 'x': &i32 | 39 | 48..49 'x': &i32 |
40 | [59; 60) 'a': i32 | 40 | 59..60 'a': i32 |
41 | [63; 64) 'z': i32 | 41 | 63..64 'z': i32 |
42 | [74; 80) '(c, d)': (i32, &str) | 42 | 74..80 '(c, d)': (i32, &str) |
43 | [75; 76) 'c': i32 | 43 | 75..76 'c': i32 |
44 | [78; 79) 'd': &str | 44 | 78..79 'd': &str |
45 | [83; 95) '(1, "hello")': (i32, &str) | 45 | 83..95 '(1, "hello")': (i32, &str) |
46 | [84; 85) '1': i32 | 46 | 84..85 '1': i32 |
47 | [87; 94) '"hello"': &str | 47 | 87..94 '"hello"': &str |
48 | [102; 152) 'for (e... }': () | 48 | 102..152 'for (e... }': () |
49 | [106; 112) '(e, f)': ({unknown}, {unknown}) | 49 | 106..112 '(e, f)': ({unknown}, {unknown}) |
50 | [107; 108) 'e': {unknown} | 50 | 107..108 'e': {unknown} |
51 | [110; 111) 'f': {unknown} | 51 | 110..111 'f': {unknown} |
52 | [116; 125) 'some_iter': {unknown} | 52 | 116..125 'some_iter': {unknown} |
53 | [126; 152) '{ ... }': () | 53 | 126..152 '{ ... }': () |
54 | [140; 141) 'g': {unknown} | 54 | 140..141 'g': {unknown} |
55 | [144; 145) 'e': {unknown} | 55 | 144..145 'e': {unknown} |
56 | [158; 205) 'if let... }': () | 56 | 158..205 'if let... }': () |
57 | [165; 170) '[val]': [{unknown}] | 57 | 165..170 '[val]': [{unknown}] |
58 | [166; 169) 'val': {unknown} | 58 | 166..169 'val': {unknown} |
59 | [173; 176) 'opt': [{unknown}] | 59 | 173..176 'opt': [{unknown}] |
60 | [177; 205) '{ ... }': () | 60 | 177..205 '{ ... }': () |
61 | [191; 192) 'h': {unknown} | 61 | 191..192 'h': {unknown} |
62 | [195; 198) 'val': {unknown} | 62 | 195..198 'val': {unknown} |
63 | [215; 221) 'lambda': |u64, u64, i32| -> i32 | 63 | 215..221 'lambda': |u64, u64, i32| -> i32 |
64 | [224; 256) '|a: u6...b; c }': |u64, u64, i32| -> i32 | 64 | 224..256 '|a: u6...b; c }': |u64, u64, i32| -> i32 |
65 | [225; 226) 'a': u64 | 65 | 225..226 'a': u64 |
66 | [233; 234) 'b': u64 | 66 | 233..234 'b': u64 |
67 | [236; 237) 'c': i32 | 67 | 236..237 'c': i32 |
68 | [244; 256) '{ a + b; c }': i32 | 68 | 244..256 '{ a + b; c }': i32 |
69 | [246; 247) 'a': u64 | 69 | 246..247 'a': u64 |
70 | [246; 251) 'a + b': u64 | 70 | 246..251 'a + b': u64 |
71 | [250; 251) 'b': u64 | 71 | 250..251 'b': u64 |
72 | [253; 254) 'c': i32 | 72 | 253..254 'c': i32 |
73 | [267; 279) 'ref ref_to_x': &&i32 | 73 | 267..279 'ref ref_to_x': &&i32 |
74 | [282; 283) 'x': &i32 | 74 | 282..283 'x': &i32 |
75 | [293; 302) 'mut mut_x': &i32 | 75 | 293..302 'mut mut_x': &i32 |
76 | [305; 306) 'x': &i32 | 76 | 305..306 'x': &i32 |
77 | [316; 336) 'ref mu...f_to_x': &mut &i32 | 77 | 316..336 'ref mu...f_to_x': &mut &i32 |
78 | [339; 340) 'x': &i32 | 78 | 339..340 'x': &i32 |
79 | [350; 351) 'k': &mut &i32 | 79 | 350..351 'k': &mut &i32 |
80 | [354; 366) 'mut_ref_to_x': &mut &i32 | 80 | 354..366 'mut_ref_to_x': &mut &i32 |
81 | "### | 81 | "### |
82 | ); | 82 | ); |
83 | } | 83 | } |
@@ -97,47 +97,47 @@ fn test(x: &i32) { | |||
97 | } | 97 | } |
98 | "#, true), | 98 | "#, true), |
99 | @r###" | 99 | @r###" |
100 | [18; 29) '{ loop {} }': T | 100 | 18..29 '{ loop {} }': T |
101 | [20; 27) 'loop {}': ! | 101 | 20..27 'loop {}': ! |
102 | [25; 27) '{}': () | 102 | 25..27 '{}': () |
103 | [38; 39) 'x': &i32 | 103 | 38..39 'x': &i32 |
104 | [47; 209) '{ ...) {} }': () | 104 | 47..209 '{ ...) {} }': () |
105 | [53; 76) 'if let...y() {}': () | 105 | 53..76 'if let...y() {}': () |
106 | [60; 65) '"foo"': &str | 106 | 60..65 '"foo"': &str |
107 | [60; 65) '"foo"': &str | 107 | 60..65 '"foo"': &str |
108 | [68; 71) 'any': fn any<&str>() -> &str | 108 | 68..71 'any': fn any<&str>() -> &str |
109 | [68; 73) 'any()': &str | 109 | 68..73 'any()': &str |
110 | [74; 76) '{}': () | 110 | 74..76 '{}': () |
111 | [81; 100) 'if let...y() {}': () | 111 | 81..100 'if let...y() {}': () |
112 | [88; 89) '1': i32 | 112 | 88..89 '1': i32 |
113 | [88; 89) '1': i32 | 113 | 88..89 '1': i32 |
114 | [92; 95) 'any': fn any<i32>() -> i32 | 114 | 92..95 'any': fn any<i32>() -> i32 |
115 | [92; 97) 'any()': i32 | 115 | 92..97 'any()': i32 |
116 | [98; 100) '{}': () | 116 | 98..100 '{}': () |
117 | [105; 127) 'if let...y() {}': () | 117 | 105..127 'if let...y() {}': () |
118 | [112; 116) '1u32': u32 | 118 | 112..116 '1u32': u32 |
119 | [112; 116) '1u32': u32 | 119 | 112..116 '1u32': u32 |
120 | [119; 122) 'any': fn any<u32>() -> u32 | 120 | 119..122 'any': fn any<u32>() -> u32 |
121 | [119; 124) 'any()': u32 | 121 | 119..124 'any()': u32 |
122 | [125; 127) '{}': () | 122 | 125..127 '{}': () |
123 | [132; 154) 'if let...y() {}': () | 123 | 132..154 'if let...y() {}': () |
124 | [139; 143) '1f32': f32 | 124 | 139..143 '1f32': f32 |
125 | [139; 143) '1f32': f32 | 125 | 139..143 '1f32': f32 |
126 | [146; 149) 'any': fn any<f32>() -> f32 | 126 | 146..149 'any': fn any<f32>() -> f32 |
127 | [146; 151) 'any()': f32 | 127 | 146..151 'any()': f32 |
128 | [152; 154) '{}': () | 128 | 152..154 '{}': () |
129 | [159; 180) 'if let...y() {}': () | 129 | 159..180 'if let...y() {}': () |
130 | [166; 169) '1.0': f64 | 130 | 166..169 '1.0': f64 |
131 | [166; 169) '1.0': f64 | 131 | 166..169 '1.0': f64 |
132 | [172; 175) 'any': fn any<f64>() -> f64 | 132 | 172..175 'any': fn any<f64>() -> f64 |
133 | [172; 177) 'any()': f64 | 133 | 172..177 'any()': f64 |
134 | [178; 180) '{}': () | 134 | 178..180 '{}': () |
135 | [185; 207) 'if let...y() {}': () | 135 | 185..207 'if let...y() {}': () |
136 | [192; 196) 'true': bool | 136 | 192..196 'true': bool |
137 | [192; 196) 'true': bool | 137 | 192..196 'true': bool |
138 | [199; 202) 'any': fn any<bool>() -> bool | 138 | 199..202 'any': fn any<bool>() -> bool |
139 | [199; 204) 'any()': bool | 139 | 199..204 'any()': bool |
140 | [205; 207) '{}': () | 140 | 205..207 '{}': () |
141 | "### | 141 | "### |
142 | ); | 142 | ); |
143 | } | 143 | } |
@@ -152,16 +152,16 @@ fn test(x: &i32) { | |||
152 | } | 152 | } |
153 | "#, true), | 153 | "#, true), |
154 | @r###" | 154 | @r###" |
155 | [9; 10) 'x': &i32 | 155 | 9..10 'x': &i32 |
156 | [18; 76) '{ ...2 {} }': () | 156 | 18..76 '{ ...2 {} }': () |
157 | [24; 46) 'if let...u32 {}': () | 157 | 24..46 'if let...u32 {}': () |
158 | [31; 36) '1..76': u32 | 158 | 31..36 '1..76': u32 |
159 | [39; 43) '2u32': u32 | 159 | 39..43 '2u32': u32 |
160 | [44; 46) '{}': () | 160 | 44..46 '{}': () |
161 | [51; 74) 'if let...u32 {}': () | 161 | 51..74 'if let...u32 {}': () |
162 | [58; 64) '1..=76': u32 | 162 | 58..64 '1..=76': u32 |
163 | [67; 71) '2u32': u32 | 163 | 67..71 '2u32': u32 |
164 | [72; 74) '{}': () | 164 | 72..74 '{}': () |
165 | "### | 165 | "### |
166 | ); | 166 | ); |
167 | } | 167 | } |
@@ -178,19 +178,19 @@ fn test() { | |||
178 | } | 178 | } |
179 | "#), | 179 | "#), |
180 | @r###" | 180 | @r###" |
181 | [28; 79) '{ ...(1); }': () | 181 | 28..79 '{ ...(1); }': () |
182 | [38; 42) 'A(n)': A<i32> | 182 | 38..42 'A(n)': A<i32> |
183 | [40; 41) 'n': &i32 | 183 | 40..41 'n': &i32 |
184 | [45; 50) '&A(1)': &A<i32> | 184 | 45..50 '&A(1)': &A<i32> |
185 | [46; 47) 'A': A<i32>(i32) -> A<i32> | 185 | 46..47 'A': A<i32>(i32) -> A<i32> |
186 | [46; 50) 'A(1)': A<i32> | 186 | 46..50 'A(1)': A<i32> |
187 | [48; 49) '1': i32 | 187 | 48..49 '1': i32 |
188 | [60; 64) 'A(n)': A<i32> | 188 | 60..64 'A(n)': A<i32> |
189 | [62; 63) 'n': &mut i32 | 189 | 62..63 'n': &mut i32 |
190 | [67; 76) '&mut A(1)': &mut A<i32> | 190 | 67..76 '&mut A(1)': &mut A<i32> |
191 | [72; 73) 'A': A<i32>(i32) -> A<i32> | 191 | 72..73 'A': A<i32>(i32) -> A<i32> |
192 | [72; 76) 'A(1)': A<i32> | 192 | 72..76 'A(1)': A<i32> |
193 | [74; 75) '1': i32 | 193 | 74..75 '1': i32 |
194 | "### | 194 | "### |
195 | ); | 195 | ); |
196 | } | 196 | } |
@@ -206,18 +206,18 @@ fn test() { | |||
206 | } | 206 | } |
207 | "#), | 207 | "#), |
208 | @r###" | 208 | @r###" |
209 | [11; 57) '{ ...= v; }': () | 209 | 11..57 '{ ...= v; }': () |
210 | [21; 22) 'v': &(i32, &i32) | 210 | 21..22 'v': &(i32, &i32) |
211 | [25; 33) '&(1, &2)': &(i32, &i32) | 211 | 25..33 '&(1, &2)': &(i32, &i32) |
212 | [26; 33) '(1, &2)': (i32, &i32) | 212 | 26..33 '(1, &2)': (i32, &i32) |
213 | [27; 28) '1': i32 | 213 | 27..28 '1': i32 |
214 | [30; 32) '&2': &i32 | 214 | 30..32 '&2': &i32 |
215 | [31; 32) '2': i32 | 215 | 31..32 '2': i32 |
216 | [43; 50) '(_, &w)': (i32, &i32) | 216 | 43..50 '(_, &w)': (i32, &i32) |
217 | [44; 45) '_': i32 | 217 | 44..45 '_': i32 |
218 | [47; 49) '&w': &i32 | 218 | 47..49 '&w': &i32 |
219 | [48; 49) 'w': i32 | 219 | 48..49 'w': i32 |
220 | [53; 54) 'v': &(i32, &i32) | 220 | 53..54 'v': &(i32, &i32) |
221 | "### | 221 | "### |
222 | ); | 222 | ); |
223 | } | 223 | } |
@@ -242,30 +242,30 @@ fn test() { | |||
242 | } | 242 | } |
243 | "#), | 243 | "#), |
244 | @r###" | 244 | @r###" |
245 | [11; 210) '{ ... } }': () | 245 | 11..210 '{ ... } }': () |
246 | [21; 26) 'slice': &[f64] | 246 | 21..26 'slice': &[f64] |
247 | [37; 43) '&[0.0]': &[f64; _] | 247 | 37..43 '&[0.0]': &[f64; _] |
248 | [38; 43) '[0.0]': [f64; _] | 248 | 38..43 '[0.0]': [f64; _] |
249 | [39; 42) '0.0': f64 | 249 | 39..42 '0.0': f64 |
250 | [49; 208) 'match ... }': () | 250 | 49..208 'match ... }': () |
251 | [55; 60) 'slice': &[f64] | 251 | 55..60 'slice': &[f64] |
252 | [71; 74) '&[]': &[f64] | 252 | 71..74 '&[]': &[f64] |
253 | [72; 74) '[]': [f64] | 253 | 72..74 '[]': [f64] |
254 | [78; 80) '{}': () | 254 | 78..80 '{}': () |
255 | [90; 94) '&[a]': &[f64] | 255 | 90..94 '&[a]': &[f64] |
256 | [91; 94) '[a]': [f64] | 256 | 91..94 '[a]': [f64] |
257 | [92; 93) 'a': f64 | 257 | 92..93 'a': f64 |
258 | [98; 124) '{ ... }': () | 258 | 98..124 '{ ... }': () |
259 | [112; 113) 'a': f64 | 259 | 112..113 'a': f64 |
260 | [134; 141) '&[b, c]': &[f64] | 260 | 134..141 '&[b, c]': &[f64] |
261 | [135; 141) '[b, c]': [f64] | 261 | 135..141 '[b, c]': [f64] |
262 | [136; 137) 'b': f64 | 262 | 136..137 'b': f64 |
263 | [139; 140) 'c': f64 | 263 | 139..140 'c': f64 |
264 | [145; 186) '{ ... }': () | 264 | 145..186 '{ ... }': () |
265 | [159; 160) 'b': f64 | 265 | 159..160 'b': f64 |
266 | [174; 175) 'c': f64 | 266 | 174..175 'c': f64 |
267 | [195; 196) '_': &[f64] | 267 | 195..196 '_': &[f64] |
268 | [200; 202) '{}': () | 268 | 200..202 '{}': () |
269 | "### | 269 | "### |
270 | ); | 270 | ); |
271 | } | 271 | } |
@@ -288,25 +288,25 @@ fn test() { | |||
288 | } | 288 | } |
289 | "#), | 289 | "#), |
290 | @r###" | 290 | @r###" |
291 | [11; 180) '{ ... } }': () | 291 | 11..180 '{ ... } }': () |
292 | [21; 24) 'arr': [f64; _] | 292 | 21..24 'arr': [f64; _] |
293 | [37; 47) '[0.0, 1.0]': [f64; _] | 293 | 37..47 '[0.0, 1.0]': [f64; _] |
294 | [38; 41) '0.0': f64 | 294 | 38..41 '0.0': f64 |
295 | [43; 46) '1.0': f64 | 295 | 43..46 '1.0': f64 |
296 | [53; 178) 'match ... }': () | 296 | 53..178 'match ... }': () |
297 | [59; 62) 'arr': [f64; _] | 297 | 59..62 'arr': [f64; _] |
298 | [73; 81) '[1.0, a]': [f64; _] | 298 | 73..81 '[1.0, a]': [f64; _] |
299 | [74; 77) '1.0': f64 | 299 | 74..77 '1.0': f64 |
300 | [74; 77) '1.0': f64 | 300 | 74..77 '1.0': f64 |
301 | [79; 80) 'a': f64 | 301 | 79..80 'a': f64 |
302 | [85; 111) '{ ... }': () | 302 | 85..111 '{ ... }': () |
303 | [99; 100) 'a': f64 | 303 | 99..100 'a': f64 |
304 | [121; 127) '[b, c]': [f64; _] | 304 | 121..127 '[b, c]': [f64; _] |
305 | [122; 123) 'b': f64 | 305 | 122..123 'b': f64 |
306 | [125; 126) 'c': f64 | 306 | 125..126 'c': f64 |
307 | [131; 172) '{ ... }': () | 307 | 131..172 '{ ... }': () |
308 | [145; 146) 'b': f64 | 308 | 145..146 'b': f64 |
309 | [160; 161) 'c': f64 | 309 | 160..161 'c': f64 |
310 | "### | 310 | "### |
311 | ); | 311 | ); |
312 | } | 312 | } |
@@ -339,31 +339,31 @@ fn test() { | |||
339 | } | 339 | } |
340 | "#), | 340 | "#), |
341 | @r###" | 341 | @r###" |
342 | [68; 289) '{ ... d; }': () | 342 | 68..289 '{ ... d; }': () |
343 | [78; 79) 'e': E | 343 | 78..79 'e': E |
344 | [82; 95) 'E::A { x: 3 }': E | 344 | 82..95 'E::A { x: 3 }': E |
345 | [92; 93) '3': usize | 345 | 92..93 '3': usize |
346 | [106; 113) 'S(y, z)': S | 346 | 106..113 'S(y, z)': S |
347 | [108; 109) 'y': u32 | 347 | 108..109 'y': u32 |
348 | [111; 112) 'z': E | 348 | 111..112 'z': E |
349 | [116; 119) 'foo': S | 349 | 116..119 'foo': S |
350 | [129; 148) 'E::A {..._var }': E | 350 | 129..148 'E::A {..._var }': E |
351 | [139; 146) 'new_var': usize | 351 | 139..146 'new_var': usize |
352 | [151; 152) 'e': E | 352 | 151..152 'e': E |
353 | [159; 245) 'match ... }': usize | 353 | 159..245 'match ... }': usize |
354 | [165; 166) 'e': E | 354 | 165..166 'e': E |
355 | [177; 187) 'E::A { x }': E | 355 | 177..187 'E::A { x }': E |
356 | [184; 185) 'x': usize | 356 | 184..185 'x': usize |
357 | [191; 192) 'x': usize | 357 | 191..192 'x': usize |
358 | [202; 206) 'E::B': E | 358 | 202..206 'E::B': E |
359 | [210; 213) 'foo': bool | 359 | 210..213 'foo': bool |
360 | [217; 218) '1': usize | 360 | 217..218 '1': usize |
361 | [228; 232) 'E::B': E | 361 | 228..232 'E::B': E |
362 | [236; 238) '10': usize | 362 | 236..238 '10': usize |
363 | [256; 275) 'ref d ...{ .. }': &E | 363 | 256..275 'ref d ...{ .. }': &E |
364 | [264; 275) 'E::A { .. }': E | 364 | 264..275 'E::A { .. }': E |
365 | [278; 279) 'e': E | 365 | 278..279 'e': E |
366 | [285; 286) 'd': &E | 366 | 285..286 'd': &E |
367 | "### | 367 | "### |
368 | ); | 368 | ); |
369 | } | 369 | } |
@@ -391,23 +391,23 @@ fn test(a1: A<u32>, o: Option<u64>) { | |||
391 | } | 391 | } |
392 | "#), | 392 | "#), |
393 | @r###" | 393 | @r###" |
394 | [79; 81) 'a1': A<u32> | 394 | 79..81 'a1': A<u32> |
395 | [91; 92) 'o': Option<u64> | 395 | 91..92 'o': Option<u64> |
396 | [107; 244) '{ ... }; }': () | 396 | 107..244 '{ ... }; }': () |
397 | [117; 128) 'A { x: x2 }': A<u32> | 397 | 117..128 'A { x: x2 }': A<u32> |
398 | [124; 126) 'x2': u32 | 398 | 124..126 'x2': u32 |
399 | [131; 133) 'a1': A<u32> | 399 | 131..133 'a1': A<u32> |
400 | [143; 161) 'A::<i6...: x3 }': A<i64> | 400 | 143..161 'A::<i6...: x3 }': A<i64> |
401 | [157; 159) 'x3': i64 | 401 | 157..159 'x3': i64 |
402 | [164; 174) 'A { x: 1 }': A<i64> | 402 | 164..174 'A { x: 1 }': A<i64> |
403 | [171; 172) '1': i64 | 403 | 171..172 '1': i64 |
404 | [180; 241) 'match ... }': u64 | 404 | 180..241 'match ... }': u64 |
405 | [186; 187) 'o': Option<u64> | 405 | 186..187 'o': Option<u64> |
406 | [198; 213) 'Option::Some(t)': Option<u64> | 406 | 198..213 'Option::Some(t)': Option<u64> |
407 | [211; 212) 't': u64 | 407 | 211..212 't': u64 |
408 | [217; 218) 't': u64 | 408 | 217..218 't': u64 |
409 | [228; 229) '_': Option<u64> | 409 | 228..229 '_': Option<u64> |
410 | [233; 234) '1': u64 | 410 | 233..234 '1': u64 |
411 | "### | 411 | "### |
412 | ); | 412 | ); |
413 | } | 413 | } |
@@ -431,27 +431,27 @@ fn test() { | |||
431 | } | 431 | } |
432 | "#, true), | 432 | "#, true), |
433 | @r###" | 433 | @r###" |
434 | [74; 75) '1': usize | 434 | 74..75 '1': usize |
435 | [88; 310) '{ ...atch }': () | 435 | 88..310 '{ ...atch }': () |
436 | [98; 99) 'a': Option<u32> | 436 | 98..99 'a': Option<u32> |
437 | [115; 119) 'None': Option<u32> | 437 | 115..119 'None': Option<u32> |
438 | [129; 130) 'b': Option<i64> | 438 | 129..130 'b': Option<i64> |
439 | [146; 183) 'match ... }': Option<i64> | 439 | 146..183 'match ... }': Option<i64> |
440 | [152; 153) 'a': Option<u32> | 440 | 152..153 'a': Option<u32> |
441 | [164; 168) 'None': Option<u32> | 441 | 164..168 'None': Option<u32> |
442 | [172; 176) 'None': Option<i64> | 442 | 172..176 'None': Option<i64> |
443 | [193; 194) '_': () | 443 | 193..194 '_': () |
444 | [201; 224) 'match ... Foo }': Foo | 444 | 201..224 'match ... Foo }': Foo |
445 | [207; 209) '()': () | 445 | 207..209 '()': () |
446 | [212; 215) 'Foo': Foo | 446 | 212..215 'Foo': Foo |
447 | [219; 222) 'Foo': Foo | 447 | 219..222 'Foo': Foo |
448 | [255; 256) '_': () | 448 | 255..256 '_': () |
449 | [263; 286) 'match ... Bar }': usize | 449 | 263..286 'match ... Bar }': usize |
450 | [269; 271) '()': () | 450 | 269..271 '()': () |
451 | [274; 277) 'Bar': usize | 451 | 274..277 'Bar': usize |
452 | [281; 284) 'Bar': usize | 452 | 281..284 'Bar': usize |
453 | [201; 224): expected (), got Foo | 453 | 201..224: expected (), got Foo |
454 | [263; 286): expected (), got usize | 454 | 263..286: expected (), got usize |
455 | "### | 455 | "### |
456 | ); | 456 | ); |
457 | } | 457 | } |
@@ -469,15 +469,15 @@ fn main() { | |||
469 | } | 469 | } |
470 | } | 470 | } |
471 | "#), @" | 471 | "#), @" |
472 | [28; 32) 'self': &S | 472 | 28..32 'self': &S |
473 | [42; 51) '{ false }': bool | 473 | 42..51 '{ false }': bool |
474 | [44; 49) 'false': bool | 474 | 44..49 'false': bool |
475 | [65; 116) '{ ... } }': () | 475 | 65..116 '{ ... } }': () |
476 | [71; 114) 'match ... }': () | 476 | 71..114 'match ... }': () |
477 | [77; 78) 'S': S | 477 | 77..78 'S': S |
478 | [89; 90) 's': S | 478 | 89..90 's': S |
479 | [94; 95) 's': S | 479 | 94..95 's': S |
480 | [94; 101) 's.foo()': bool | 480 | 94..101 's.foo()': bool |
481 | [105; 107) '()': () | 481 | 105..107 '()': () |
482 | ") | 482 | ") |
483 | } | 483 | } |
diff --git a/crates/ra_hir_ty/src/tests/regression.rs b/crates/ra_hir_ty/src/tests/regression.rs index 61a6801fc..8a1292c7a 100644 --- a/crates/ra_hir_ty/src/tests/regression.rs +++ b/crates/ra_hir_ty/src/tests/regression.rs | |||
@@ -14,11 +14,11 @@ fn test() { | |||
14 | } | 14 | } |
15 | "#), | 15 | "#), |
16 | @r###" | 16 | @r###" |
17 | [11; 37) '{ l... {}; }': () | 17 | 11..37 '{ l... {}; }': () |
18 | [20; 21) 'x': () | 18 | 20..21 'x': () |
19 | [24; 34) 'if true {}': () | 19 | 24..34 'if true {}': () |
20 | [27; 31) 'true': bool | 20 | 27..31 'true': bool |
21 | [32; 34) '{}': () | 21 | 32..34 '{}': () |
22 | "### | 22 | "### |
23 | ); | 23 | ); |
24 | } | 24 | } |
@@ -34,10 +34,10 @@ fn test(x: X) { | |||
34 | } | 34 | } |
35 | "#), | 35 | "#), |
36 | @r###" | 36 | @r###" |
37 | [20; 21) 'x': X | 37 | 20..21 'x': X |
38 | [26; 47) '{ ...eld; }': () | 38 | 26..47 '{ ...eld; }': () |
39 | [32; 33) 'x': X | 39 | 32..33 'x': X |
40 | [32; 44) 'x.some_field': {unknown} | 40 | 32..44 'x.some_field': {unknown} |
41 | "### | 41 | "### |
42 | ); | 42 | ); |
43 | } | 43 | } |
@@ -55,14 +55,14 @@ fn test() { | |||
55 | } | 55 | } |
56 | "#), | 56 | "#), |
57 | @r###" | 57 | @r###" |
58 | [11; 89) '{ ... } }': () | 58 | 11..89 '{ ... } }': () |
59 | [17; 21) 'X {}': {unknown} | 59 | 17..21 'X {}': {unknown} |
60 | [27; 87) 'match ... }': () | 60 | 27..87 'match ... }': () |
61 | [33; 34) 'x': {unknown} | 61 | 33..34 'x': {unknown} |
62 | [45; 52) 'A::B {}': {unknown} | 62 | 45..52 'A::B {}': {unknown} |
63 | [56; 58) '()': () | 63 | 56..58 '()': () |
64 | [68; 74) 'A::Y()': {unknown} | 64 | 68..74 'A::Y()': {unknown} |
65 | [78; 80) '()': () | 65 | 78..80 '()': () |
66 | "### | 66 | "### |
67 | ); | 67 | ); |
68 | } | 68 | } |
@@ -77,12 +77,12 @@ fn quux() { | |||
77 | } | 77 | } |
78 | "#), | 78 | "#), |
79 | @r###" | 79 | @r###" |
80 | [11; 41) '{ ...+ y; }': () | 80 | 11..41 '{ ...+ y; }': () |
81 | [21; 22) 'y': i32 | 81 | 21..22 'y': i32 |
82 | [25; 27) '92': i32 | 82 | 25..27 '92': i32 |
83 | [33; 34) '1': i32 | 83 | 33..34 '1': i32 |
84 | [33; 38) '1 + y': i32 | 84 | 33..38 '1 + y': i32 |
85 | [37; 38) 'y': i32 | 85 | 37..38 'y': i32 |
86 | "### | 86 | "### |
87 | ); | 87 | ); |
88 | } | 88 | } |
@@ -99,13 +99,13 @@ fn test() { | |||
99 | } | 99 | } |
100 | "#), | 100 | "#), |
101 | @r###" | 101 | @r###" |
102 | [11; 48) '{ ...&y]; }': () | 102 | 11..48 '{ ...&y]; }': () |
103 | [21; 22) 'y': &{unknown} | 103 | 21..22 'y': &{unknown} |
104 | [25; 32) 'unknown': &{unknown} | 104 | 25..32 'unknown': &{unknown} |
105 | [38; 45) '[y, &y]': [&&{unknown}; _] | 105 | 38..45 '[y, &y]': [&&{unknown}; _] |
106 | [39; 40) 'y': &{unknown} | 106 | 39..40 'y': &{unknown} |
107 | [42; 44) '&y': &&{unknown} | 107 | 42..44 '&y': &&{unknown} |
108 | [43; 44) 'y': &{unknown} | 108 | 43..44 'y': &{unknown} |
109 | "### | 109 | "### |
110 | ); | 110 | ); |
111 | } | 111 | } |
@@ -123,20 +123,20 @@ fn test() { | |||
123 | } | 123 | } |
124 | "#), | 124 | "#), |
125 | @r###" | 125 | @r###" |
126 | [11; 80) '{ ...x)]; }': () | 126 | 11..80 '{ ...x)]; }': () |
127 | [21; 22) 'x': &&{unknown} | 127 | 21..22 'x': &&{unknown} |
128 | [25; 32) 'unknown': &&{unknown} | 128 | 25..32 'unknown': &&{unknown} |
129 | [42; 43) 'y': &&{unknown} | 129 | 42..43 'y': &&{unknown} |
130 | [46; 53) 'unknown': &&{unknown} | 130 | 46..53 'unknown': &&{unknown} |
131 | [59; 77) '[(x, y..., &x)]': [(&&&{unknown}, &&&{unknown}); _] | 131 | 59..77 '[(x, y..., &x)]': [(&&&{unknown}, &&&{unknown}); _] |
132 | [60; 66) '(x, y)': (&&&{unknown}, &&&{unknown}) | 132 | 60..66 '(x, y)': (&&&{unknown}, &&&{unknown}) |
133 | [61; 62) 'x': &&{unknown} | 133 | 61..62 'x': &&{unknown} |
134 | [64; 65) 'y': &&{unknown} | 134 | 64..65 'y': &&{unknown} |
135 | [68; 76) '(&y, &x)': (&&&{unknown}, &&&{unknown}) | 135 | 68..76 '(&y, &x)': (&&&{unknown}, &&&{unknown}) |
136 | [69; 71) '&y': &&&{unknown} | 136 | 69..71 '&y': &&&{unknown} |
137 | [70; 71) 'y': &&{unknown} | 137 | 70..71 'y': &&{unknown} |
138 | [73; 75) '&x': &&&{unknown} | 138 | 73..75 '&x': &&&{unknown} |
139 | [74; 75) 'x': &&{unknown} | 139 | 74..75 'x': &&{unknown} |
140 | "### | 140 | "### |
141 | ); | 141 | ); |
142 | } | 142 | } |
@@ -158,12 +158,12 @@ fn write() { | |||
158 | } | 158 | } |
159 | "#), | 159 | "#), |
160 | @r###" | 160 | @r###" |
161 | [54; 139) '{ ... } }': () | 161 | 54..139 '{ ... } }': () |
162 | [60; 137) 'match ... }': () | 162 | 60..137 'match ... }': () |
163 | [66; 83) 'someth...nknown': Maybe<{unknown}> | 163 | 66..83 'someth...nknown': Maybe<{unknown}> |
164 | [94; 124) 'Maybe:...thing)': Maybe<{unknown}> | 164 | 94..124 'Maybe:...thing)': Maybe<{unknown}> |
165 | [106; 123) 'ref mu...ething': &mut {unknown} | 165 | 106..123 'ref mu...ething': &mut {unknown} |
166 | [128; 130) '()': () | 166 | 128..130 '()': () |
167 | "### | 167 | "### |
168 | ); | 168 | ); |
169 | } | 169 | } |
@@ -179,13 +179,13 @@ fn test_line_buffer() { | |||
179 | } | 179 | } |
180 | "#), | 180 | "#), |
181 | @r###" | 181 | @r###" |
182 | [23; 53) '{ ...n']; }': () | 182 | 23..53 '{ ...n']; }': () |
183 | [29; 50) '&[0, b...b'\n']': &[u8; _] | 183 | 29..50 '&[0, b...b'\n']': &[u8; _] |
184 | [30; 50) '[0, b'...b'\n']': [u8; _] | 184 | 30..50 '[0, b'...b'\n']': [u8; _] |
185 | [31; 32) '0': u8 | 185 | 31..32 '0': u8 |
186 | [34; 39) 'b'\n'': u8 | 186 | 34..39 'b'\n'': u8 |
187 | [41; 42) '1': u8 | 187 | 41..42 '1': u8 |
188 | [44; 49) 'b'\n'': u8 | 188 | 44..49 'b'\n'': u8 |
189 | "### | 189 | "### |
190 | ); | 190 | ); |
191 | } | 191 | } |
@@ -202,14 +202,14 @@ pub fn compute() { | |||
202 | } | 202 | } |
203 | "#), | 203 | "#), |
204 | @r###" | 204 | @r###" |
205 | [18; 108) '{ ... } }': () | 205 | 18..108 '{ ... } }': () |
206 | [24; 106) 'match ... }': () | 206 | 24..106 'match ... }': () |
207 | [30; 37) 'nope!()': {unknown} | 207 | 30..37 'nope!()': {unknown} |
208 | [48; 94) 'SizeSk...tail }': {unknown} | 208 | 48..94 'SizeSk...tail }': {unknown} |
209 | [82; 86) 'true': bool | 209 | 82..86 'true': bool |
210 | [82; 86) 'true': bool | 210 | 82..86 'true': bool |
211 | [88; 92) 'tail': {unknown} | 211 | 88..92 'tail': {unknown} |
212 | [98; 100) '{}': () | 212 | 98..100 '{}': () |
213 | "### | 213 | "### |
214 | ); | 214 | ); |
215 | } | 215 | } |
@@ -226,14 +226,14 @@ pub fn primitive_type() { | |||
226 | } | 226 | } |
227 | "#), | 227 | "#), |
228 | @r###" | 228 | @r###" |
229 | [25; 106) '{ ... } }': () | 229 | 25..106 '{ ... } }': () |
230 | [31; 104) 'match ... }': () | 230 | 31..104 'match ... }': () |
231 | [37; 42) '*self': {unknown} | 231 | 37..42 '*self': {unknown} |
232 | [38; 42) 'self': {unknown} | 232 | 38..42 'self': {unknown} |
233 | [53; 91) 'Borrow...), ..}': {unknown} | 233 | 53..91 'Borrow...), ..}': {unknown} |
234 | [74; 86) 'Primitive(p)': {unknown} | 234 | 74..86 'Primitive(p)': {unknown} |
235 | [84; 85) 'p': {unknown} | 235 | 84..85 'p': {unknown} |
236 | [95; 97) '{}': () | 236 | 95..97 '{}': () |
237 | "### | 237 | "### |
238 | ); | 238 | ); |
239 | } | 239 | } |
@@ -260,29 +260,29 @@ fn extra_compiler_flags() { | |||
260 | } | 260 | } |
261 | "#), | 261 | "#), |
262 | @r###" | 262 | @r###" |
263 | [27; 323) '{ ... } }': () | 263 | 27..323 '{ ... } }': () |
264 | [33; 321) 'for co... }': () | 264 | 33..321 'for co... }': () |
265 | [37; 44) 'content': &{unknown} | 265 | 37..44 'content': &{unknown} |
266 | [48; 61) 'doesnt_matter': {unknown} | 266 | 48..61 'doesnt_matter': {unknown} |
267 | [62; 321) '{ ... }': () | 267 | 62..321 '{ ... }': () |
268 | [76; 80) 'name': &&{unknown} | 268 | 76..80 'name': &&{unknown} |
269 | [83; 167) 'if doe... }': &&{unknown} | 269 | 83..167 'if doe... }': &&{unknown} |
270 | [86; 99) 'doesnt_matter': bool | 270 | 86..99 'doesnt_matter': bool |
271 | [100; 129) '{ ... }': &&{unknown} | 271 | 100..129 '{ ... }': &&{unknown} |
272 | [114; 119) 'first': &&{unknown} | 272 | 114..119 'first': &&{unknown} |
273 | [135; 167) '{ ... }': &&{unknown} | 273 | 135..167 '{ ... }': &&{unknown} |
274 | [149; 157) '&content': &&{unknown} | 274 | 149..157 '&content': &&{unknown} |
275 | [150; 157) 'content': &{unknown} | 275 | 150..157 'content': &{unknown} |
276 | [182; 189) 'content': &{unknown} | 276 | 182..189 'content': &{unknown} |
277 | [192; 314) 'if ICE... }': &{unknown} | 277 | 192..314 'if ICE... }': &{unknown} |
278 | [195; 232) 'ICE_RE..._VALUE': {unknown} | 278 | 195..232 'ICE_RE..._VALUE': {unknown} |
279 | [195; 248) 'ICE_RE...&name)': bool | 279 | 195..248 'ICE_RE...&name)': bool |
280 | [242; 247) '&name': &&&{unknown} | 280 | 242..247 '&name': &&&{unknown} |
281 | [243; 247) 'name': &&{unknown} | 281 | 243..247 'name': &&{unknown} |
282 | [249; 277) '{ ... }': &&{unknown} | 282 | 249..277 '{ ... }': &&{unknown} |
283 | [263; 267) 'name': &&{unknown} | 283 | 263..267 'name': &&{unknown} |
284 | [283; 314) '{ ... }': &{unknown} | 284 | 283..314 '{ ... }': &{unknown} |
285 | [297; 304) 'content': &{unknown} | 285 | 297..304 'content': &{unknown} |
286 | "### | 286 | "### |
287 | ); | 287 | ); |
288 | } | 288 | } |
@@ -303,11 +303,11 @@ fn test<R>(query_response: Canonical<QueryResponse<R>>) { | |||
303 | } | 303 | } |
304 | "#), | 304 | "#), |
305 | @r###" | 305 | @r###" |
306 | [92; 106) 'query_response': Canonical<QueryResponse<R>> | 306 | 92..106 'query_response': Canonical<QueryResponse<R>> |
307 | [137; 167) '{ ...lue; }': () | 307 | 137..167 '{ ...lue; }': () |
308 | [143; 164) '&query....value': &QueryResponse<R> | 308 | 143..164 '&query....value': &QueryResponse<R> |
309 | [144; 158) 'query_response': Canonical<QueryResponse<R>> | 309 | 144..158 'query_response': Canonical<QueryResponse<R>> |
310 | [144; 164) 'query_....value': QueryResponse<R> | 310 | 144..164 'query_....value': QueryResponse<R> |
311 | "### | 311 | "### |
312 | ); | 312 | ); |
313 | } | 313 | } |
@@ -322,9 +322,9 @@ fn test() { | |||
322 | } | 322 | } |
323 | "#), | 323 | "#), |
324 | @r###" | 324 | @r###" |
325 | ![0; 4) '0u32': u32 | 325 | !0..4 '0u32': u32 |
326 | [45; 70) '{ ...()); }': () | 326 | 45..70 '{ ...()); }': () |
327 | [55; 56) 'a': u32 | 327 | 55..56 'a': u32 |
328 | "### | 328 | "### |
329 | ); | 329 | ); |
330 | } | 330 | } |
@@ -345,10 +345,10 @@ pub fn main_loop() { | |||
345 | } | 345 | } |
346 | "#), | 346 | "#), |
347 | @r###" | 347 | @r###" |
348 | [144; 146) '{}': () | 348 | 144..146 '{}': () |
349 | [169; 198) '{ ...t(); }': () | 349 | 169..198 '{ ...t(); }': () |
350 | [175; 193) 'FxHash...efault': fn default<{unknown}, FxHasher>() -> HashSet<{unknown}, FxHasher> | 350 | 175..193 'FxHash...efault': fn default<{unknown}, FxHasher>() -> HashSet<{unknown}, FxHasher> |
351 | [175; 195) 'FxHash...ault()': HashSet<{unknown}, FxHasher> | 351 | 175..195 'FxHash...ault()': HashSet<{unknown}, FxHasher> |
352 | "### | 352 | "### |
353 | ); | 353 | ); |
354 | } | 354 | } |
@@ -375,13 +375,13 @@ fn issue_2669() { | |||
375 | }"# | 375 | }"# |
376 | ), | 376 | ), |
377 | @r###" | 377 | @r###" |
378 | [147; 262) '{ ... }': () | 378 | 147..262 '{ ... }': () |
379 | [161; 164) 'end': fn end<{unknown}>() | 379 | 161..164 'end': fn end<{unknown}>() |
380 | [161; 166) 'end()': () | 380 | 161..166 'end()': () |
381 | [199; 252) '{ ... }': () | 381 | 199..252 '{ ... }': () |
382 | [221; 223) '_x': ! | 382 | 221..223 '_x': ! |
383 | [230; 237) 'loop {}': ! | 383 | 230..237 'loop {}': ! |
384 | [235; 237) '{}': () | 384 | 235..237 '{}': () |
385 | "### | 385 | "### |
386 | ) | 386 | ) |
387 | } | 387 | } |
@@ -396,9 +396,9 @@ fn test() { | |||
396 | } | 396 | } |
397 | "#), | 397 | "#), |
398 | @r###" | 398 | @r###" |
399 | [26; 53) '{ ...oo() }': () | 399 | 26..53 '{ ...oo() }': () |
400 | [32; 49) '<Trait...>::foo': {unknown} | 400 | 32..49 '<Trait...>::foo': {unknown} |
401 | [32; 51) '<Trait...:foo()': () | 401 | 32..51 '<Trait...:foo()': () |
402 | "### | 402 | "### |
403 | ); | 403 | ); |
404 | } | 404 | } |
@@ -496,13 +496,13 @@ fn foo(params: &[usize]) { | |||
496 | } | 496 | } |
497 | "#), | 497 | "#), |
498 | @r###" | 498 | @r###" |
499 | [8; 14) 'params': &[usize] | 499 | 8..14 'params': &[usize] |
500 | [26; 81) '{ ... } }': () | 500 | 26..81 '{ ... } }': () |
501 | [32; 79) 'match ... }': () | 501 | 32..79 'match ... }': () |
502 | [38; 44) 'params': &[usize] | 502 | 38..44 'params': &[usize] |
503 | [55; 67) '[ps @ .., _]': [usize] | 503 | 55..67 '[ps @ .., _]': [usize] |
504 | [65; 66) '_': usize | 504 | 65..66 '_': usize |
505 | [71; 73) '{}': () | 505 | 71..73 '{}': () |
506 | "### | 506 | "### |
507 | ); | 507 | ); |
508 | } | 508 | } |
@@ -523,13 +523,13 @@ fn foo(b: Bar) { | |||
523 | } | 523 | } |
524 | "#), | 524 | "#), |
525 | @r###" | 525 | @r###" |
526 | [36; 37) 'b': Bar | 526 | 36..37 'b': Bar |
527 | [44; 96) '{ ... } }': () | 527 | 44..96 '{ ... } }': () |
528 | [50; 94) 'match ... }': () | 528 | 50..94 'match ... }': () |
529 | [56; 57) 'b': Bar | 529 | 56..57 'b': Bar |
530 | [68; 81) 'Bar { a: .. }': Bar | 530 | 68..81 'Bar { a: .. }': Bar |
531 | [77; 79) '..': bool | 531 | 77..79 '..': bool |
532 | [85; 87) '{}': () | 532 | 85..87 '{}': () |
533 | "### | 533 | "### |
534 | ); | 534 | ); |
535 | } | 535 | } |
@@ -564,13 +564,13 @@ where | |||
564 | } | 564 | } |
565 | "#), | 565 | "#), |
566 | @r###" | 566 | @r###" |
567 | [66; 70) 'self': Self | 567 | 66..70 'self': Self |
568 | [268; 272) 'self': Self | 568 | 268..272 'self': Self |
569 | [467; 471) 'self': SelectStatement<F, S, D, W, O, LOf, {unknown}, {unknown}> | 569 | 467..471 'self': SelectStatement<F, S, D, W, O, LOf, {unknown}, {unknown}> |
570 | [489; 523) '{ ... }': () | 570 | 489..523 '{ ... }': () |
571 | [499; 503) 'self': SelectStatement<F, S, D, W, O, LOf, {unknown}, {unknown}> | 571 | 499..503 'self': SelectStatement<F, S, D, W, O, LOf, {unknown}, {unknown}> |
572 | [499; 509) 'self.order': O | 572 | 499..509 'self.order': O |
573 | [499; 516) 'self.o...into()': dyn QueryFragment<DB> | 573 | 499..516 'self.o...into()': dyn QueryFragment<DB> |
574 | "### | 574 | "### |
575 | ); | 575 | ); |
576 | } | 576 | } |
diff --git a/crates/ra_hir_ty/src/tests/simple.rs b/crates/ra_hir_ty/src/tests/simple.rs index c2f1ded2f..56abc65b8 100644 --- a/crates/ra_hir_ty/src/tests/simple.rs +++ b/crates/ra_hir_ty/src/tests/simple.rs | |||
@@ -64,9 +64,9 @@ impl S<u32> { | |||
64 | } | 64 | } |
65 | "#, | 65 | "#, |
66 | ), @r###" | 66 | ), @r###" |
67 | [63; 93) '{ ... }': () | 67 | 63..93 '{ ... }': () |
68 | [73; 86) 'Self { x: 1 }': S<u32> | 68 | 73..86 'Self { x: 1 }': S<u32> |
69 | [83; 84) '1': u32 | 69 | 83..84 '1': u32 |
70 | "###); | 70 | "###); |
71 | } | 71 | } |
72 | 72 | ||
@@ -85,9 +85,9 @@ fn foo() { | |||
85 | 85 | ||
86 | "#, | 86 | "#, |
87 | ), @r###" | 87 | ), @r###" |
88 | [64; 84) '{ ...1 }; }': () | 88 | 64..84 '{ ...1 }; }': () |
89 | [70; 81) 'SS { x: 1 }': S<u32> | 89 | 70..81 'SS { x: 1 }': S<u32> |
90 | [78; 79) '1': u32 | 90 | 78..79 '1': u32 |
91 | "###); | 91 | "###); |
92 | } | 92 | } |
93 | 93 | ||
@@ -175,19 +175,19 @@ fn test(a: u32, b: isize, c: !, d: &str) { | |||
175 | 1.0f32; | 175 | 1.0f32; |
176 | }"#), | 176 | }"#), |
177 | @r###" | 177 | @r###" |
178 | [9; 10) 'a': u32 | 178 | 9..10 'a': u32 |
179 | [17; 18) 'b': isize | 179 | 17..18 'b': isize |
180 | [27; 28) 'c': ! | 180 | 27..28 'c': ! |
181 | [33; 34) 'd': &str | 181 | 33..34 'd': &str |
182 | [42; 121) '{ ...f32; }': ! | 182 | 42..121 '{ ...f32; }': ! |
183 | [48; 49) 'a': u32 | 183 | 48..49 'a': u32 |
184 | [55; 56) 'b': isize | 184 | 55..56 'b': isize |
185 | [62; 63) 'c': ! | 185 | 62..63 'c': ! |
186 | [69; 70) 'd': &str | 186 | 69..70 'd': &str |
187 | [76; 82) '1usize': usize | 187 | 76..82 '1usize': usize |
188 | [88; 94) '1isize': isize | 188 | 88..94 '1isize': isize |
189 | [100; 106) '"test"': &str | 189 | 100..106 '"test"': &str |
190 | [112; 118) '1.0f32': f32 | 190 | 112..118 '1.0f32': f32 |
191 | "### | 191 | "### |
192 | ); | 192 | ); |
193 | } | 193 | } |
@@ -206,17 +206,17 @@ fn test() { | |||
206 | } | 206 | } |
207 | "#), | 207 | "#), |
208 | @r###" | 208 | @r###" |
209 | [11; 118) '{ ...= e; }': () | 209 | 11..118 '{ ...= e; }': () |
210 | [21; 22) 'a': isize | 210 | 21..22 'a': isize |
211 | [25; 31) '1isize': isize | 211 | 25..31 '1isize': isize |
212 | [41; 42) 'b': usize | 212 | 41..42 'b': usize |
213 | [52; 53) '1': usize | 213 | 52..53 '1': usize |
214 | [63; 64) 'c': usize | 214 | 63..64 'c': usize |
215 | [67; 68) 'b': usize | 215 | 67..68 'b': usize |
216 | [78; 79) 'd': u32 | 216 | 78..79 'd': u32 |
217 | [94; 95) 'e': i32 | 217 | 94..95 'e': i32 |
218 | [105; 106) 'f': i32 | 218 | 105..106 'f': i32 |
219 | [114; 115) 'e': i32 | 219 | 114..115 'e': i32 |
220 | "### | 220 | "### |
221 | ); | 221 | ); |
222 | } | 222 | } |
@@ -237,15 +237,15 @@ fn test() { | |||
237 | } | 237 | } |
238 | "#), | 238 | "#), |
239 | @r###" | 239 | @r###" |
240 | [15; 20) '{ 1 }': u32 | 240 | 15..20 '{ 1 }': u32 |
241 | [17; 18) '1': u32 | 241 | 17..18 '1': u32 |
242 | [48; 53) '{ 1 }': u32 | 242 | 48..53 '{ 1 }': u32 |
243 | [50; 51) '1': u32 | 243 | 50..51 '1': u32 |
244 | [67; 91) '{ ...c(); }': () | 244 | 67..91 '{ ...c(); }': () |
245 | [73; 74) 'a': fn a() -> u32 | 245 | 73..74 'a': fn a() -> u32 |
246 | [73; 76) 'a()': u32 | 246 | 73..76 'a()': u32 |
247 | [82; 86) 'b::c': fn c() -> u32 | 247 | 82..86 'b::c': fn c() -> u32 |
248 | [82; 88) 'b::c()': u32 | 248 | 82..88 'b::c()': u32 |
249 | "### | 249 | "### |
250 | ); | 250 | ); |
251 | } | 251 | } |
@@ -266,13 +266,13 @@ fn test() { | |||
266 | } | 266 | } |
267 | "#), | 267 | "#), |
268 | @r###" | 268 | @r###" |
269 | [41; 46) '{ 1 }': i32 | 269 | 41..46 '{ 1 }': i32 |
270 | [43; 44) '1': i32 | 270 | 43..44 '1': i32 |
271 | [60; 93) '{ ...o(); }': () | 271 | 60..93 '{ ...o(); }': () |
272 | [66; 72) 'S::foo': fn foo() -> i32 | 272 | 66..72 'S::foo': fn foo() -> i32 |
273 | [66; 74) 'S::foo()': i32 | 273 | 66..74 'S::foo()': i32 |
274 | [80; 88) '<S>::foo': fn foo() -> i32 | 274 | 80..88 '<S>::foo': fn foo() -> i32 |
275 | [80; 90) '<S>::foo()': i32 | 275 | 80..90 '<S>::foo()': i32 |
276 | "### | 276 | "### |
277 | ); | 277 | ); |
278 | } | 278 | } |
@@ -297,22 +297,22 @@ fn test() { | |||
297 | } | 297 | } |
298 | "#), | 298 | "#), |
299 | @r###" | 299 | @r###" |
300 | [72; 154) '{ ...a.c; }': () | 300 | 72..154 '{ ...a.c; }': () |
301 | [82; 83) 'c': C | 301 | 82..83 'c': C |
302 | [86; 87) 'C': C(usize) -> C | 302 | 86..87 'C': C(usize) -> C |
303 | [86; 90) 'C(1)': C | 303 | 86..90 'C(1)': C |
304 | [88; 89) '1': usize | 304 | 88..89 '1': usize |
305 | [96; 97) 'B': B | 305 | 96..97 'B': B |
306 | [107; 108) 'a': A | 306 | 107..108 'a': A |
307 | [114; 133) 'A { b:...C(1) }': A | 307 | 114..133 'A { b:...C(1) }': A |
308 | [121; 122) 'B': B | 308 | 121..122 'B': B |
309 | [127; 128) 'C': C(usize) -> C | 309 | 127..128 'C': C(usize) -> C |
310 | [127; 131) 'C(1)': C | 310 | 127..131 'C(1)': C |
311 | [129; 130) '1': usize | 311 | 129..130 '1': usize |
312 | [139; 140) 'a': A | 312 | 139..140 'a': A |
313 | [139; 142) 'a.b': B | 313 | 139..142 'a.b': B |
314 | [148; 149) 'a': A | 314 | 148..149 'a': A |
315 | [148; 151) 'a.c': C | 315 | 148..151 'a.c': C |
316 | "### | 316 | "### |
317 | ); | 317 | ); |
318 | } | 318 | } |
@@ -330,10 +330,10 @@ fn test() { | |||
330 | E::V2; | 330 | E::V2; |
331 | }"#), | 331 | }"#), |
332 | @r###" | 332 | @r###" |
333 | [48; 82) '{ E:...:V2; }': () | 333 | 48..82 '{ E:...:V2; }': () |
334 | [52; 70) 'E::V1 ...d: 1 }': E | 334 | 52..70 'E::V1 ...d: 1 }': E |
335 | [67; 68) '1': u32 | 335 | 67..68 '1': u32 |
336 | [74; 79) 'E::V2': E | 336 | 74..79 'E::V2': E |
337 | "### | 337 | "### |
338 | ); | 338 | ); |
339 | } | 339 | } |
@@ -357,29 +357,29 @@ fn test(a: &u32, b: &mut u32, c: *const u32, d: *mut u32) { | |||
357 | } | 357 | } |
358 | "#), | 358 | "#), |
359 | @r###" | 359 | @r###" |
360 | [9; 10) 'a': &u32 | 360 | 9..10 'a': &u32 |
361 | [18; 19) 'b': &mut u32 | 361 | 18..19 'b': &mut u32 |
362 | [31; 32) 'c': *const u32 | 362 | 31..32 'c': *const u32 |
363 | [46; 47) 'd': *mut u32 | 363 | 46..47 'd': *mut u32 |
364 | [59; 150) '{ ... *d; }': () | 364 | 59..150 '{ ... *d; }': () |
365 | [65; 66) 'a': &u32 | 365 | 65..66 'a': &u32 |
366 | [72; 74) '*a': u32 | 366 | 72..74 '*a': u32 |
367 | [73; 74) 'a': &u32 | 367 | 73..74 'a': &u32 |
368 | [80; 82) '&a': &&u32 | 368 | 80..82 '&a': &&u32 |
369 | [81; 82) 'a': &u32 | 369 | 81..82 'a': &u32 |
370 | [88; 94) '&mut a': &mut &u32 | 370 | 88..94 '&mut a': &mut &u32 |
371 | [93; 94) 'a': &u32 | 371 | 93..94 'a': &u32 |
372 | [100; 101) 'b': &mut u32 | 372 | 100..101 'b': &mut u32 |
373 | [107; 109) '*b': u32 | 373 | 107..109 '*b': u32 |
374 | [108; 109) 'b': &mut u32 | 374 | 108..109 'b': &mut u32 |
375 | [115; 117) '&b': &&mut u32 | 375 | 115..117 '&b': &&mut u32 |
376 | [116; 117) 'b': &mut u32 | 376 | 116..117 'b': &mut u32 |
377 | [123; 124) 'c': *const u32 | 377 | 123..124 'c': *const u32 |
378 | [130; 132) '*c': u32 | 378 | 130..132 '*c': u32 |
379 | [131; 132) 'c': *const u32 | 379 | 131..132 'c': *const u32 |
380 | [138; 139) 'd': *mut u32 | 380 | 138..139 'd': *mut u32 |
381 | [145; 147) '*d': u32 | 381 | 145..147 '*d': u32 |
382 | [146; 147) 'd': *mut u32 | 382 | 146..147 'd': *mut u32 |
383 | "### | 383 | "### |
384 | ); | 384 | ); |
385 | } | 385 | } |
@@ -409,20 +409,20 @@ fn test() { | |||
409 | } | 409 | } |
410 | "##), | 410 | "##), |
411 | @r###" | 411 | @r###" |
412 | [11; 221) '{ ...o"#; }': () | 412 | 11..221 '{ ...o"#; }': () |
413 | [17; 21) '5i32': i32 | 413 | 17..21 '5i32': i32 |
414 | [27; 31) '5f32': f32 | 414 | 27..31 '5f32': f32 |
415 | [37; 41) '5f64': f64 | 415 | 37..41 '5f64': f64 |
416 | [47; 54) '"hello"': &str | 416 | 47..54 '"hello"': &str |
417 | [60; 68) 'b"bytes"': &[u8] | 417 | 60..68 'b"bytes"': &[u8] |
418 | [74; 77) ''c'': char | 418 | 74..77 ''c'': char |
419 | [83; 87) 'b'b'': u8 | 419 | 83..87 'b'b'': u8 |
420 | [93; 97) '3.14': f64 | 420 | 93..97 '3.14': f64 |
421 | [103; 107) '5000': i32 | 421 | 103..107 '5000': i32 |
422 | [113; 118) 'false': bool | 422 | 113..118 'false': bool |
423 | [124; 128) 'true': bool | 423 | 124..128 'true': bool |
424 | [134; 202) 'r#" ... "#': &str | 424 | 134..202 'r#" ... "#': &str |
425 | [208; 218) 'br#"yolo"#': &[u8] | 425 | 208..218 'br#"yolo"#': &[u8] |
426 | "### | 426 | "### |
427 | ); | 427 | ); |
428 | } | 428 | } |
@@ -452,47 +452,47 @@ fn test(x: SomeType) { | |||
452 | } | 452 | } |
453 | "#), | 453 | "#), |
454 | @r###" | 454 | @r###" |
455 | [27; 28) 'x': SomeType | 455 | 27..28 'x': SomeType |
456 | [40; 272) '{ ...lo"; }': () | 456 | 40..272 '{ ...lo"; }': () |
457 | [50; 51) 'b': bool | 457 | 50..51 'b': bool |
458 | [54; 59) 'false': bool | 458 | 54..59 'false': bool |
459 | [69; 70) 'c': bool | 459 | 69..70 'c': bool |
460 | [73; 75) '!b': bool | 460 | 73..75 '!b': bool |
461 | [74; 75) 'b': bool | 461 | 74..75 'b': bool |
462 | [85; 86) 'a': i128 | 462 | 85..86 'a': i128 |
463 | [89; 92) '100': i128 | 463 | 89..92 '100': i128 |
464 | [102; 103) 'd': i128 | 464 | 102..103 'd': i128 |
465 | [112; 114) '-a': i128 | 465 | 112..114 '-a': i128 |
466 | [113; 114) 'a': i128 | 466 | 113..114 'a': i128 |
467 | [124; 125) 'e': i32 | 467 | 124..125 'e': i32 |
468 | [128; 132) '-100': i32 | 468 | 128..132 '-100': i32 |
469 | [129; 132) '100': i32 | 469 | 129..132 '100': i32 |
470 | [142; 143) 'f': bool | 470 | 142..143 'f': bool |
471 | [146; 153) '!!!true': bool | 471 | 146..153 '!!!true': bool |
472 | [147; 153) '!!true': bool | 472 | 147..153 '!!true': bool |
473 | [148; 153) '!true': bool | 473 | 148..153 '!true': bool |
474 | [149; 153) 'true': bool | 474 | 149..153 'true': bool |
475 | [163; 164) 'g': i32 | 475 | 163..164 'g': i32 |
476 | [167; 170) '!42': i32 | 476 | 167..170 '!42': i32 |
477 | [168; 170) '42': i32 | 477 | 168..170 '42': i32 |
478 | [180; 181) 'h': u32 | 478 | 180..181 'h': u32 |
479 | [184; 190) '!10u32': u32 | 479 | 184..190 '!10u32': u32 |
480 | [185; 190) '10u32': u32 | 480 | 185..190 '10u32': u32 |
481 | [200; 201) 'j': i128 | 481 | 200..201 'j': i128 |
482 | [204; 206) '!a': i128 | 482 | 204..206 '!a': i128 |
483 | [205; 206) 'a': i128 | 483 | 205..206 'a': i128 |
484 | [212; 217) '-3.14': f64 | 484 | 212..217 '-3.14': f64 |
485 | [213; 217) '3.14': f64 | 485 | 213..217 '3.14': f64 |
486 | [223; 225) '!3': i32 | 486 | 223..225 '!3': i32 |
487 | [224; 225) '3': i32 | 487 | 224..225 '3': i32 |
488 | [231; 233) '-x': {unknown} | 488 | 231..233 '-x': {unknown} |
489 | [232; 233) 'x': SomeType | 489 | 232..233 'x': SomeType |
490 | [239; 241) '!x': {unknown} | 490 | 239..241 '!x': {unknown} |
491 | [240; 241) 'x': SomeType | 491 | 240..241 'x': SomeType |
492 | [247; 255) '-"hello"': {unknown} | 492 | 247..255 '-"hello"': {unknown} |
493 | [248; 255) '"hello"': &str | 493 | 248..255 '"hello"': &str |
494 | [261; 269) '!"hello"': {unknown} | 494 | 261..269 '!"hello"': {unknown} |
495 | [262; 269) '"hello"': &str | 495 | 262..269 '"hello"': &str |
496 | "### | 496 | "### |
497 | ); | 497 | ); |
498 | } | 498 | } |
@@ -515,26 +515,26 @@ fn test() -> &mut &f64 { | |||
515 | } | 515 | } |
516 | "#), | 516 | "#), |
517 | @r###" | 517 | @r###" |
518 | [14; 15) 'x': u32 | 518 | 14..15 'x': u32 |
519 | [22; 24) '{}': () | 519 | 22..24 '{}': () |
520 | [78; 231) '{ ...t &c }': &mut &f64 | 520 | 78..231 '{ ...t &c }': &mut &f64 |
521 | [88; 89) 'a': u32 | 521 | 88..89 'a': u32 |
522 | [92; 108) 'unknow...nction': {unknown} | 522 | 92..108 'unknow...nction': {unknown} |
523 | [92; 110) 'unknow...tion()': u32 | 523 | 92..110 'unknow...tion()': u32 |
524 | [116; 125) 'takes_u32': fn takes_u32(u32) | 524 | 116..125 'takes_u32': fn takes_u32(u32) |
525 | [116; 128) 'takes_u32(a)': () | 525 | 116..128 'takes_u32(a)': () |
526 | [126; 127) 'a': u32 | 526 | 126..127 'a': u32 |
527 | [138; 139) 'b': i32 | 527 | 138..139 'b': i32 |
528 | [142; 158) 'unknow...nction': {unknown} | 528 | 142..158 'unknow...nction': {unknown} |
529 | [142; 160) 'unknow...tion()': i32 | 529 | 142..160 'unknow...tion()': i32 |
530 | [166; 184) 'S { i3...d: b }': S | 530 | 166..184 'S { i3...d: b }': S |
531 | [181; 182) 'b': i32 | 531 | 181..182 'b': i32 |
532 | [194; 195) 'c': f64 | 532 | 194..195 'c': f64 |
533 | [198; 214) 'unknow...nction': {unknown} | 533 | 198..214 'unknow...nction': {unknown} |
534 | [198; 216) 'unknow...tion()': f64 | 534 | 198..216 'unknow...tion()': f64 |
535 | [222; 229) '&mut &c': &mut &f64 | 535 | 222..229 '&mut &c': &mut &f64 |
536 | [227; 229) '&c': &f64 | 536 | 227..229 '&c': &f64 |
537 | [228; 229) 'c': f64 | 537 | 228..229 'c': f64 |
538 | "### | 538 | "### |
539 | ); | 539 | ); |
540 | } | 540 | } |
@@ -561,16 +561,16 @@ impl S { | |||
561 | } | 561 | } |
562 | "#), | 562 | "#), |
563 | @r###" | 563 | @r###" |
564 | [34; 38) 'self': &S | 564 | 34..38 'self': &S |
565 | [40; 61) '{ ... }': () | 565 | 40..61 '{ ... }': () |
566 | [50; 54) 'self': &S | 566 | 50..54 'self': &S |
567 | [75; 79) 'self': &S | 567 | 75..79 'self': &S |
568 | [88; 109) '{ ... }': () | 568 | 88..109 '{ ... }': () |
569 | [98; 102) 'self': &S | 569 | 98..102 'self': &S |
570 | [133; 153) '{ ... }': S | 570 | 133..153 '{ ... }': S |
571 | [143; 147) 'S {}': S | 571 | 143..147 'S {}': S |
572 | [177; 200) '{ ... }': S | 572 | 177..200 '{ ... }': S |
573 | [187; 194) 'Self {}': S | 573 | 187..194 'Self {}': S |
574 | "### | 574 | "### |
575 | ); | 575 | ); |
576 | } | 576 | } |
@@ -600,56 +600,56 @@ fn test() -> bool { | |||
600 | } | 600 | } |
601 | "#), | 601 | "#), |
602 | @r###" | 602 | @r###" |
603 | [6; 7) 'x': bool | 603 | 6..7 'x': bool |
604 | [22; 34) '{ 0i32 }': i32 | 604 | 22..34 '{ 0i32 }': i32 |
605 | [28; 32) '0i32': i32 | 605 | 28..32 '0i32': i32 |
606 | [54; 370) '{ ... < 3 }': bool | 606 | 54..370 '{ ... < 3 }': bool |
607 | [64; 65) 'x': bool | 607 | 64..65 'x': bool |
608 | [68; 69) 'a': bool | 608 | 68..69 'a': bool |
609 | [68; 74) 'a && b': bool | 609 | 68..74 'a && b': bool |
610 | [73; 74) 'b': bool | 610 | 73..74 'b': bool |
611 | [84; 85) 'y': bool | 611 | 84..85 'y': bool |
612 | [88; 92) 'true': bool | 612 | 88..92 'true': bool |
613 | [88; 101) 'true || false': bool | 613 | 88..101 'true || false': bool |
614 | [96; 101) 'false': bool | 614 | 96..101 'false': bool |
615 | [111; 112) 'z': bool | 615 | 111..112 'z': bool |
616 | [115; 116) 'x': bool | 616 | 115..116 'x': bool |
617 | [115; 121) 'x == y': bool | 617 | 115..121 'x == y': bool |
618 | [120; 121) 'y': bool | 618 | 120..121 'y': bool |
619 | [131; 132) 't': bool | 619 | 131..132 't': bool |
620 | [135; 136) 'x': bool | 620 | 135..136 'x': bool |
621 | [135; 141) 'x != y': bool | 621 | 135..141 'x != y': bool |
622 | [140; 141) 'y': bool | 622 | 140..141 'y': bool |
623 | [151; 162) 'minus_forty': isize | 623 | 151..162 'minus_forty': isize |
624 | [172; 180) '-40isize': isize | 624 | 172..180 '-40isize': isize |
625 | [173; 180) '40isize': isize | 625 | 173..180 '40isize': isize |
626 | [190; 191) 'h': bool | 626 | 190..191 'h': bool |
627 | [194; 205) 'minus_forty': isize | 627 | 194..205 'minus_forty': isize |
628 | [194; 216) 'minus_...ONST_2': bool | 628 | 194..216 'minus_...ONST_2': bool |
629 | [209; 216) 'CONST_2': isize | 629 | 209..216 'CONST_2': isize |
630 | [226; 227) 'c': i32 | 630 | 226..227 'c': i32 |
631 | [230; 231) 'f': fn f(bool) -> i32 | 631 | 230..231 'f': fn f(bool) -> i32 |
632 | [230; 239) 'f(z || y)': i32 | 632 | 230..239 'f(z || y)': i32 |
633 | [230; 243) 'f(z || y) + 5': i32 | 633 | 230..243 'f(z || y) + 5': i32 |
634 | [232; 233) 'z': bool | 634 | 232..233 'z': bool |
635 | [232; 238) 'z || y': bool | 635 | 232..238 'z || y': bool |
636 | [237; 238) 'y': bool | 636 | 237..238 'y': bool |
637 | [242; 243) '5': i32 | 637 | 242..243 '5': i32 |
638 | [253; 254) 'd': {unknown} | 638 | 253..254 'd': {unknown} |
639 | [257; 258) 'b': {unknown} | 639 | 257..258 'b': {unknown} |
640 | [268; 269) 'g': () | 640 | 268..269 'g': () |
641 | [272; 283) 'minus_forty': isize | 641 | 272..283 'minus_forty': isize |
642 | [272; 288) 'minus_...y ^= i': () | 642 | 272..288 'minus_...y ^= i': () |
643 | [287; 288) 'i': isize | 643 | 287..288 'i': isize |
644 | [298; 301) 'ten': usize | 644 | 298..301 'ten': usize |
645 | [311; 313) '10': usize | 645 | 311..313 '10': usize |
646 | [323; 336) 'ten_is_eleven': bool | 646 | 323..336 'ten_is_eleven': bool |
647 | [339; 342) 'ten': usize | 647 | 339..342 'ten': usize |
648 | [339; 354) 'ten == some_num': bool | 648 | 339..354 'ten == some_num': bool |
649 | [346; 354) 'some_num': usize | 649 | 346..354 'some_num': usize |
650 | [361; 364) 'ten': usize | 650 | 361..364 'ten': usize |
651 | [361; 368) 'ten < 3': bool | 651 | 361..368 'ten < 3': bool |
652 | [367; 368) '3': usize | 652 | 367..368 '3': usize |
653 | "### | 653 | "### |
654 | ); | 654 | ); |
655 | } | 655 | } |
@@ -664,13 +664,13 @@ fn test() { | |||
664 | } | 664 | } |
665 | "#), | 665 | "#), |
666 | @r###" | 666 | @r###" |
667 | [11; 48) '{ ...5u8; }': () | 667 | 11..48 '{ ...5u8; }': () |
668 | [17; 21) '1u32': u32 | 668 | 17..21 '1u32': u32 |
669 | [17; 28) '1u32 << 5u8': u32 | 669 | 17..28 '1u32 << 5u8': u32 |
670 | [25; 28) '5u8': u8 | 670 | 25..28 '5u8': u8 |
671 | [34; 38) '1u32': u32 | 671 | 34..38 '1u32': u32 |
672 | [34; 45) '1u32 >> 5u8': u32 | 672 | 34..45 '1u32 >> 5u8': u32 |
673 | [42; 45) '5u8': u8 | 673 | 42..45 '5u8': u8 |
674 | "### | 674 | "### |
675 | ); | 675 | ); |
676 | } | 676 | } |
@@ -703,49 +703,49 @@ fn test2(a1: *const A, a2: *mut A) { | |||
703 | } | 703 | } |
704 | "#), | 704 | "#), |
705 | @r###" | 705 | @r###" |
706 | [44; 45) 'a': A | 706 | 44..45 'a': A |
707 | [50; 213) '{ ...5.b; }': () | 707 | 50..213 '{ ...5.b; }': () |
708 | [60; 62) 'a1': A | 708 | 60..62 'a1': A |
709 | [65; 66) 'a': A | 709 | 65..66 'a': A |
710 | [72; 74) 'a1': A | 710 | 72..74 'a1': A |
711 | [72; 76) 'a1.b': B | 711 | 72..76 'a1.b': B |
712 | [86; 88) 'a2': &A | 712 | 86..88 'a2': &A |
713 | [91; 93) '&a': &A | 713 | 91..93 '&a': &A |
714 | [92; 93) 'a': A | 714 | 92..93 'a': A |
715 | [99; 101) 'a2': &A | 715 | 99..101 'a2': &A |
716 | [99; 103) 'a2.b': B | 716 | 99..103 'a2.b': B |
717 | [113; 115) 'a3': &mut A | 717 | 113..115 'a3': &mut A |
718 | [118; 124) '&mut a': &mut A | 718 | 118..124 '&mut a': &mut A |
719 | [123; 124) 'a': A | 719 | 123..124 'a': A |
720 | [130; 132) 'a3': &mut A | 720 | 130..132 'a3': &mut A |
721 | [130; 134) 'a3.b': B | 721 | 130..134 'a3.b': B |
722 | [144; 146) 'a4': &&&&&&&A | 722 | 144..146 'a4': &&&&&&&A |
723 | [149; 157) '&&&&&&&a': &&&&&&&A | 723 | 149..157 '&&&&&&&a': &&&&&&&A |
724 | [150; 157) '&&&&&&a': &&&&&&A | 724 | 150..157 '&&&&&&a': &&&&&&A |
725 | [151; 157) '&&&&&a': &&&&&A | 725 | 151..157 '&&&&&a': &&&&&A |
726 | [152; 157) '&&&&a': &&&&A | 726 | 152..157 '&&&&a': &&&&A |
727 | [153; 157) '&&&a': &&&A | 727 | 153..157 '&&&a': &&&A |
728 | [154; 157) '&&a': &&A | 728 | 154..157 '&&a': &&A |
729 | [155; 157) '&a': &A | 729 | 155..157 '&a': &A |
730 | [156; 157) 'a': A | 730 | 156..157 'a': A |
731 | [163; 165) 'a4': &&&&&&&A | 731 | 163..165 'a4': &&&&&&&A |
732 | [163; 167) 'a4.b': B | 732 | 163..167 'a4.b': B |
733 | [177; 179) 'a5': &mut &&mut &&mut A | 733 | 177..179 'a5': &mut &&mut &&mut A |
734 | [182; 200) '&mut &...&mut a': &mut &&mut &&mut A | 734 | 182..200 '&mut &...&mut a': &mut &&mut &&mut A |
735 | [187; 200) '&&mut &&mut a': &&mut &&mut A | 735 | 187..200 '&&mut &&mut a': &&mut &&mut A |
736 | [188; 200) '&mut &&mut a': &mut &&mut A | 736 | 188..200 '&mut &&mut a': &mut &&mut A |
737 | [193; 200) '&&mut a': &&mut A | 737 | 193..200 '&&mut a': &&mut A |
738 | [194; 200) '&mut a': &mut A | 738 | 194..200 '&mut a': &mut A |
739 | [199; 200) 'a': A | 739 | 199..200 'a': A |
740 | [206; 208) 'a5': &mut &&mut &&mut A | 740 | 206..208 'a5': &mut &&mut &&mut A |
741 | [206; 210) 'a5.b': B | 741 | 206..210 'a5.b': B |
742 | [224; 226) 'a1': *const A | 742 | 224..226 'a1': *const A |
743 | [238; 240) 'a2': *mut A | 743 | 238..240 'a2': *mut A |
744 | [250; 273) '{ ...2.b; }': () | 744 | 250..273 '{ ...2.b; }': () |
745 | [256; 258) 'a1': *const A | 745 | 256..258 'a1': *const A |
746 | [256; 260) 'a1.b': B | 746 | 256..260 'a1.b': B |
747 | [266; 268) 'a2': *mut A | 747 | 266..268 'a2': *mut A |
748 | [266; 270) 'a2.b': B | 748 | 266..270 'a2.b': B |
749 | "### | 749 | "### |
750 | ); | 750 | ); |
751 | } | 751 | } |
@@ -782,30 +782,30 @@ fn test() { | |||
782 | } | 782 | } |
783 | "#), | 783 | "#), |
784 | @r###" | 784 | @r###" |
785 | [68; 72) 'self': &Self | 785 | 68..72 'self': &Self |
786 | [139; 143) 'self': &A<T> | 786 | 139..143 'self': &A<T> |
787 | [151; 174) '{ ... }': &T | 787 | 151..174 '{ ... }': &T |
788 | [161; 168) '&self.0': &T | 788 | 161..168 '&self.0': &T |
789 | [162; 166) 'self': &A<T> | 789 | 162..166 'self': &A<T> |
790 | [162; 168) 'self.0': T | 790 | 162..168 'self.0': T |
791 | [255; 259) 'self': &B<T> | 791 | 255..259 'self': &B<T> |
792 | [278; 301) '{ ... }': &T | 792 | 278..301 '{ ... }': &T |
793 | [288; 295) '&self.0': &T | 793 | 288..295 '&self.0': &T |
794 | [289; 293) 'self': &B<T> | 794 | 289..293 'self': &B<T> |
795 | [289; 295) 'self.0': T | 795 | 289..295 'self.0': T |
796 | [315; 353) '{ ...))); }': () | 796 | 315..353 '{ ...))); }': () |
797 | [325; 326) 't': &i32 | 797 | 325..326 't': &i32 |
798 | [329; 335) 'A::foo': fn foo<i32>(&A<i32>) -> &i32 | 798 | 329..335 'A::foo': fn foo<i32>(&A<i32>) -> &i32 |
799 | [329; 350) 'A::foo...42))))': &i32 | 799 | 329..350 'A::foo...42))))': &i32 |
800 | [336; 349) '&&B(B(A(42)))': &&B<B<A<i32>>> | 800 | 336..349 '&&B(B(A(42)))': &&B<B<A<i32>>> |
801 | [337; 349) '&B(B(A(42)))': &B<B<A<i32>>> | 801 | 337..349 '&B(B(A(42)))': &B<B<A<i32>>> |
802 | [338; 339) 'B': B<B<A<i32>>>(B<A<i32>>) -> B<B<A<i32>>> | 802 | 338..339 'B': B<B<A<i32>>>(B<A<i32>>) -> B<B<A<i32>>> |
803 | [338; 349) 'B(B(A(42)))': B<B<A<i32>>> | 803 | 338..349 'B(B(A(42)))': B<B<A<i32>>> |
804 | [340; 341) 'B': B<A<i32>>(A<i32>) -> B<A<i32>> | 804 | 340..341 'B': B<A<i32>>(A<i32>) -> B<A<i32>> |
805 | [340; 348) 'B(A(42))': B<A<i32>> | 805 | 340..348 'B(A(42))': B<A<i32>> |
806 | [342; 343) 'A': A<i32>(i32) -> A<i32> | 806 | 342..343 'A': A<i32>(i32) -> A<i32> |
807 | [342; 347) 'A(42)': A<i32> | 807 | 342..347 'A(42)': A<i32> |
808 | [344; 346) '42': i32 | 808 | 344..346 '42': i32 |
809 | "### | 809 | "### |
810 | ); | 810 | ); |
811 | } | 811 | } |
@@ -842,34 +842,34 @@ fn test(a: A<i32>) { | |||
842 | } | 842 | } |
843 | "#), | 843 | "#), |
844 | @r###" | 844 | @r###" |
845 | [68; 72) 'self': &Self | 845 | 68..72 'self': &Self |
846 | [144; 148) 'self': &A<T> | 846 | 144..148 'self': &A<T> |
847 | [150; 151) 'x': &A<T> | 847 | 150..151 'x': &A<T> |
848 | [166; 187) '{ ... }': &T | 848 | 166..187 '{ ... }': &T |
849 | [176; 181) '&*x.0': &T | 849 | 176..181 '&*x.0': &T |
850 | [177; 181) '*x.0': T | 850 | 177..181 '*x.0': T |
851 | [178; 179) 'x': &A<T> | 851 | 178..179 'x': &A<T> |
852 | [178; 181) 'x.0': *mut T | 852 | 178..181 'x.0': *mut T |
853 | [268; 272) 'self': &B<T> | 853 | 268..272 'self': &B<T> |
854 | [291; 314) '{ ... }': &T | 854 | 291..314 '{ ... }': &T |
855 | [301; 308) '&self.0': &T | 855 | 301..308 '&self.0': &T |
856 | [302; 306) 'self': &B<T> | 856 | 302..306 'self': &B<T> |
857 | [302; 308) 'self.0': T | 857 | 302..308 'self.0': T |
858 | [326; 327) 'a': A<i32> | 858 | 326..327 'a': A<i32> |
859 | [337; 383) '{ ...))); }': () | 859 | 337..383 '{ ...))); }': () |
860 | [347; 348) 't': &i32 | 860 | 347..348 't': &i32 |
861 | [351; 352) 'A': A<i32>(*mut i32) -> A<i32> | 861 | 351..352 'A': A<i32>(*mut i32) -> A<i32> |
862 | [351; 365) 'A(0 as *mut _)': A<i32> | 862 | 351..365 'A(0 as *mut _)': A<i32> |
863 | [351; 380) 'A(0 as...B(a)))': &i32 | 863 | 351..380 'A(0 as...B(a)))': &i32 |
864 | [353; 354) '0': i32 | 864 | 353..354 '0': i32 |
865 | [353; 364) '0 as *mut _': *mut i32 | 865 | 353..364 '0 as *mut _': *mut i32 |
866 | [370; 379) '&&B(B(a))': &&B<B<A<i32>>> | 866 | 370..379 '&&B(B(a))': &&B<B<A<i32>>> |
867 | [371; 379) '&B(B(a))': &B<B<A<i32>>> | 867 | 371..379 '&B(B(a))': &B<B<A<i32>>> |
868 | [372; 373) 'B': B<B<A<i32>>>(B<A<i32>>) -> B<B<A<i32>>> | 868 | 372..373 'B': B<B<A<i32>>>(B<A<i32>>) -> B<B<A<i32>>> |
869 | [372; 379) 'B(B(a))': B<B<A<i32>>> | 869 | 372..379 'B(B(a))': B<B<A<i32>>> |
870 | [374; 375) 'B': B<A<i32>>(A<i32>) -> B<A<i32>> | 870 | 374..375 'B': B<A<i32>>(A<i32>) -> B<A<i32>> |
871 | [374; 378) 'B(a)': B<A<i32>> | 871 | 374..378 'B(a)': B<A<i32>> |
872 | [376; 377) 'a': A<i32> | 872 | 376..377 'a': A<i32> |
873 | "### | 873 | "### |
874 | ); | 874 | ); |
875 | } | 875 | } |
@@ -888,16 +888,16 @@ fn main(foo: Foo) { | |||
888 | } | 888 | } |
889 | "#), | 889 | "#), |
890 | @r###" | 890 | @r###" |
891 | [35; 38) 'foo': Foo | 891 | 35..38 'foo': Foo |
892 | [45; 109) '{ ... } }': () | 892 | 45..109 '{ ... } }': () |
893 | [51; 107) 'if tru... }': () | 893 | 51..107 'if tru... }': () |
894 | [54; 58) 'true': bool | 894 | 54..58 'true': bool |
895 | [59; 67) '{ }': () | 895 | 59..67 '{ }': () |
896 | [73; 107) 'if fal... }': () | 896 | 73..107 'if fal... }': () |
897 | [76; 81) 'false': bool | 897 | 76..81 'false': bool |
898 | [82; 107) '{ ... }': i32 | 898 | 82..107 '{ ... }': i32 |
899 | [92; 95) 'foo': Foo | 899 | 92..95 'foo': Foo |
900 | [92; 101) 'foo.field': i32 | 900 | 92..101 'foo.field': i32 |
901 | "### | 901 | "### |
902 | ) | 902 | ) |
903 | } | 903 | } |
@@ -929,38 +929,38 @@ fn foo() { | |||
929 | }; | 929 | }; |
930 | }"#), | 930 | }"#), |
931 | @r###" | 931 | @r###" |
932 | [10; 323) '{ ... }; }': () | 932 | 10..323 '{ ... }; }': () |
933 | [20; 23) '_x1': i32 | 933 | 20..23 '_x1': i32 |
934 | [26; 80) 'if tru... }': i32 | 934 | 26..80 'if tru... }': i32 |
935 | [29; 33) 'true': bool | 935 | 29..33 'true': bool |
936 | [34; 51) '{ ... }': i32 | 936 | 34..51 '{ ... }': i32 |
937 | [44; 45) '1': i32 | 937 | 44..45 '1': i32 |
938 | [57; 80) '{ ... }': ! | 938 | 57..80 '{ ... }': ! |
939 | [67; 73) 'return': ! | 939 | 67..73 'return': ! |
940 | [90; 93) '_x2': i32 | 940 | 90..93 '_x2': i32 |
941 | [96; 149) 'if tru... }': i32 | 941 | 96..149 'if tru... }': i32 |
942 | [99; 103) 'true': bool | 942 | 99..103 'true': bool |
943 | [104; 121) '{ ... }': i32 | 943 | 104..121 '{ ... }': i32 |
944 | [114; 115) '2': i32 | 944 | 114..115 '2': i32 |
945 | [127; 149) '{ ... }': ! | 945 | 127..149 '{ ... }': ! |
946 | [137; 143) 'return': ! | 946 | 137..143 'return': ! |
947 | [159; 162) '_x3': i32 | 947 | 159..162 '_x3': i32 |
948 | [165; 247) 'match ... }': i32 | 948 | 165..247 'match ... }': i32 |
949 | [171; 175) 'true': bool | 949 | 171..175 'true': bool |
950 | [186; 190) 'true': bool | 950 | 186..190 'true': bool |
951 | [186; 190) 'true': bool | 951 | 186..190 'true': bool |
952 | [194; 195) '3': i32 | 952 | 194..195 '3': i32 |
953 | [205; 206) '_': bool | 953 | 205..206 '_': bool |
954 | [210; 241) '{ ... }': ! | 954 | 210..241 '{ ... }': ! |
955 | [224; 230) 'return': ! | 955 | 224..230 'return': ! |
956 | [257; 260) '_x4': i32 | 956 | 257..260 '_x4': i32 |
957 | [263; 320) 'match ... }': i32 | 957 | 263..320 'match ... }': i32 |
958 | [269; 273) 'true': bool | 958 | 269..273 'true': bool |
959 | [284; 288) 'true': bool | 959 | 284..288 'true': bool |
960 | [284; 288) 'true': bool | 960 | 284..288 'true': bool |
961 | [292; 293) '4': i32 | 961 | 292..293 '4': i32 |
962 | [303; 304) '_': bool | 962 | 303..304 '_': bool |
963 | [308; 314) 'return': ! | 963 | 308..314 'return': ! |
964 | "### | 964 | "### |
965 | ) | 965 | ) |
966 | } | 966 | } |
@@ -988,24 +988,24 @@ fn test(a: A) { | |||
988 | } | 988 | } |
989 | "#), | 989 | "#), |
990 | @r###" | 990 | @r###" |
991 | [32; 36) 'self': A | 991 | 32..36 'self': A |
992 | [38; 39) 'x': u32 | 992 | 38..39 'x': u32 |
993 | [53; 55) '{}': () | 993 | 53..55 '{}': () |
994 | [103; 107) 'self': &A | 994 | 103..107 'self': &A |
995 | [109; 110) 'x': u64 | 995 | 109..110 'x': u64 |
996 | [124; 126) '{}': () | 996 | 124..126 '{}': () |
997 | [144; 145) 'a': A | 997 | 144..145 'a': A |
998 | [150; 198) '{ ...(1); }': () | 998 | 150..198 '{ ...(1); }': () |
999 | [156; 157) 'a': A | 999 | 156..157 'a': A |
1000 | [156; 164) 'a.foo(1)': i32 | 1000 | 156..164 'a.foo(1)': i32 |
1001 | [162; 163) '1': u32 | 1001 | 162..163 '1': u32 |
1002 | [170; 181) '(&a).bar(1)': i64 | 1002 | 170..181 '(&a).bar(1)': i64 |
1003 | [171; 173) '&a': &A | 1003 | 171..173 '&a': &A |
1004 | [172; 173) 'a': A | 1004 | 172..173 'a': A |
1005 | [179; 180) '1': u64 | 1005 | 179..180 '1': u64 |
1006 | [187; 188) 'a': A | 1006 | 187..188 'a': A |
1007 | [187; 195) 'a.bar(1)': i64 | 1007 | 187..195 'a.bar(1)': i64 |
1008 | [193; 194) '1': u64 | 1008 | 193..194 '1': u64 |
1009 | "### | 1009 | "### |
1010 | ); | 1010 | ); |
1011 | } | 1011 | } |
@@ -1024,11 +1024,11 @@ fn test() { | |||
1024 | } | 1024 | } |
1025 | "#), | 1025 | "#), |
1026 | @r###" | 1026 | @r###" |
1027 | [40; 44) 'self': &str | 1027 | 40..44 'self': &str |
1028 | [53; 55) '{}': () | 1028 | 53..55 '{}': () |
1029 | [69; 89) '{ ...o(); }': () | 1029 | 69..89 '{ ...o(); }': () |
1030 | [75; 80) '"foo"': &str | 1030 | 75..80 '"foo"': &str |
1031 | [75; 86) '"foo".foo()': i32 | 1031 | 75..86 '"foo".foo()': i32 |
1032 | "### | 1032 | "### |
1033 | ); | 1033 | ); |
1034 | } | 1034 | } |
@@ -1047,33 +1047,33 @@ fn test(x: &str, y: isize) { | |||
1047 | } | 1047 | } |
1048 | "#), | 1048 | "#), |
1049 | @r###" | 1049 | @r###" |
1050 | [9; 10) 'x': &str | 1050 | 9..10 'x': &str |
1051 | [18; 19) 'y': isize | 1051 | 18..19 'y': isize |
1052 | [28; 170) '{ ...d"); }': () | 1052 | 28..170 '{ ...d"); }': () |
1053 | [38; 39) 'a': (u32, &str) | 1053 | 38..39 'a': (u32, &str) |
1054 | [55; 63) '(1, "a")': (u32, &str) | 1054 | 55..63 '(1, "a")': (u32, &str) |
1055 | [56; 57) '1': u32 | 1055 | 56..57 '1': u32 |
1056 | [59; 62) '"a"': &str | 1056 | 59..62 '"a"': &str |
1057 | [73; 74) 'b': ((u32, &str), &str) | 1057 | 73..74 'b': ((u32, &str), &str) |
1058 | [77; 83) '(a, x)': ((u32, &str), &str) | 1058 | 77..83 '(a, x)': ((u32, &str), &str) |
1059 | [78; 79) 'a': (u32, &str) | 1059 | 78..79 'a': (u32, &str) |
1060 | [81; 82) 'x': &str | 1060 | 81..82 'x': &str |
1061 | [93; 94) 'c': (isize, &str) | 1061 | 93..94 'c': (isize, &str) |
1062 | [97; 103) '(y, x)': (isize, &str) | 1062 | 97..103 '(y, x)': (isize, &str) |
1063 | [98; 99) 'y': isize | 1063 | 98..99 'y': isize |
1064 | [101; 102) 'x': &str | 1064 | 101..102 'x': &str |
1065 | [113; 114) 'd': ((isize, &str), &str) | 1065 | 113..114 'd': ((isize, &str), &str) |
1066 | [117; 123) '(c, x)': ((isize, &str), &str) | 1066 | 117..123 '(c, x)': ((isize, &str), &str) |
1067 | [118; 119) 'c': (isize, &str) | 1067 | 118..119 'c': (isize, &str) |
1068 | [121; 122) 'x': &str | 1068 | 121..122 'x': &str |
1069 | [133; 134) 'e': (i32, &str) | 1069 | 133..134 'e': (i32, &str) |
1070 | [137; 145) '(1, "e")': (i32, &str) | 1070 | 137..145 '(1, "e")': (i32, &str) |
1071 | [138; 139) '1': i32 | 1071 | 138..139 '1': i32 |
1072 | [141; 144) '"e"': &str | 1072 | 141..144 '"e"': &str |
1073 | [155; 156) 'f': ((i32, &str), &str) | 1073 | 155..156 'f': ((i32, &str), &str) |
1074 | [159; 167) '(e, "d")': ((i32, &str), &str) | 1074 | 159..167 '(e, "d")': ((i32, &str), &str) |
1075 | [160; 161) 'e': (i32, &str) | 1075 | 160..161 'e': (i32, &str) |
1076 | [163; 166) '"d"': &str | 1076 | 163..166 '"d"': &str |
1077 | "### | 1077 | "### |
1078 | ); | 1078 | ); |
1079 | } | 1079 | } |
@@ -1101,58 +1101,58 @@ fn test(x: &str, y: isize) { | |||
1101 | } | 1101 | } |
1102 | "#), | 1102 | "#), |
1103 | @r###" | 1103 | @r###" |
1104 | [9; 10) 'x': &str | 1104 | 9..10 'x': &str |
1105 | [18; 19) 'y': isize | 1105 | 18..19 'y': isize |
1106 | [28; 293) '{ ... []; }': () | 1106 | 28..293 '{ ... []; }': () |
1107 | [38; 39) 'a': [&str; _] | 1107 | 38..39 'a': [&str; _] |
1108 | [42; 45) '[x]': [&str; _] | 1108 | 42..45 '[x]': [&str; _] |
1109 | [43; 44) 'x': &str | 1109 | 43..44 'x': &str |
1110 | [55; 56) 'b': [[&str; _]; _] | 1110 | 55..56 'b': [[&str; _]; _] |
1111 | [59; 65) '[a, a]': [[&str; _]; _] | 1111 | 59..65 '[a, a]': [[&str; _]; _] |
1112 | [60; 61) 'a': [&str; _] | 1112 | 60..61 'a': [&str; _] |
1113 | [63; 64) 'a': [&str; _] | 1113 | 63..64 'a': [&str; _] |
1114 | [75; 76) 'c': [[[&str; _]; _]; _] | 1114 | 75..76 'c': [[[&str; _]; _]; _] |
1115 | [79; 85) '[b, b]': [[[&str; _]; _]; _] | 1115 | 79..85 '[b, b]': [[[&str; _]; _]; _] |
1116 | [80; 81) 'b': [[&str; _]; _] | 1116 | 80..81 'b': [[&str; _]; _] |
1117 | [83; 84) 'b': [[&str; _]; _] | 1117 | 83..84 'b': [[&str; _]; _] |
1118 | [96; 97) 'd': [isize; _] | 1118 | 96..97 'd': [isize; _] |
1119 | [100; 112) '[y, 1, 2, 3]': [isize; _] | 1119 | 100..112 '[y, 1, 2, 3]': [isize; _] |
1120 | [101; 102) 'y': isize | 1120 | 101..102 'y': isize |
1121 | [104; 105) '1': isize | 1121 | 104..105 '1': isize |
1122 | [107; 108) '2': isize | 1122 | 107..108 '2': isize |
1123 | [110; 111) '3': isize | 1123 | 110..111 '3': isize |
1124 | [122; 123) 'd': [isize; _] | 1124 | 122..123 'd': [isize; _] |
1125 | [126; 138) '[1, y, 2, 3]': [isize; _] | 1125 | 126..138 '[1, y, 2, 3]': [isize; _] |
1126 | [127; 128) '1': isize | 1126 | 127..128 '1': isize |
1127 | [130; 131) 'y': isize | 1127 | 130..131 'y': isize |
1128 | [133; 134) '2': isize | 1128 | 133..134 '2': isize |
1129 | [136; 137) '3': isize | 1129 | 136..137 '3': isize |
1130 | [148; 149) 'e': [isize; _] | 1130 | 148..149 'e': [isize; _] |
1131 | [152; 155) '[y]': [isize; _] | 1131 | 152..155 '[y]': [isize; _] |
1132 | [153; 154) 'y': isize | 1132 | 153..154 'y': isize |
1133 | [165; 166) 'f': [[isize; _]; _] | 1133 | 165..166 'f': [[isize; _]; _] |
1134 | [169; 175) '[d, d]': [[isize; _]; _] | 1134 | 169..175 '[d, d]': [[isize; _]; _] |
1135 | [170; 171) 'd': [isize; _] | 1135 | 170..171 'd': [isize; _] |
1136 | [173; 174) 'd': [isize; _] | 1136 | 173..174 'd': [isize; _] |
1137 | [185; 186) 'g': [[isize; _]; _] | 1137 | 185..186 'g': [[isize; _]; _] |
1138 | [189; 195) '[e, e]': [[isize; _]; _] | 1138 | 189..195 '[e, e]': [[isize; _]; _] |
1139 | [190; 191) 'e': [isize; _] | 1139 | 190..191 'e': [isize; _] |
1140 | [193; 194) 'e': [isize; _] | 1140 | 193..194 'e': [isize; _] |
1141 | [206; 207) 'h': [i32; _] | 1141 | 206..207 'h': [i32; _] |
1142 | [210; 216) '[1, 2]': [i32; _] | 1142 | 210..216 '[1, 2]': [i32; _] |
1143 | [211; 212) '1': i32 | 1143 | 211..212 '1': i32 |
1144 | [214; 215) '2': i32 | 1144 | 214..215 '2': i32 |
1145 | [226; 227) 'i': [&str; _] | 1145 | 226..227 'i': [&str; _] |
1146 | [230; 240) '["a", "b"]': [&str; _] | 1146 | 230..240 '["a", "b"]': [&str; _] |
1147 | [231; 234) '"a"': &str | 1147 | 231..234 '"a"': &str |
1148 | [236; 239) '"b"': &str | 1148 | 236..239 '"b"': &str |
1149 | [251; 252) 'b': [[&str; _]; _] | 1149 | 251..252 'b': [[&str; _]; _] |
1150 | [255; 265) '[a, ["b"]]': [[&str; _]; _] | 1150 | 255..265 '[a, ["b"]]': [[&str; _]; _] |
1151 | [256; 257) 'a': [&str; _] | 1151 | 256..257 'a': [&str; _] |
1152 | [259; 264) '["b"]': [&str; _] | 1152 | 259..264 '["b"]': [&str; _] |
1153 | [260; 263) '"b"': &str | 1153 | 260..263 '"b"': &str |
1154 | [275; 276) 'x': [u8; _] | 1154 | 275..276 'x': [u8; _] |
1155 | [288; 290) '[]': [u8; _] | 1155 | 288..290 '[]': [u8; _] |
1156 | "### | 1156 | "### |
1157 | ); | 1157 | ); |
1158 | } | 1158 | } |
@@ -1174,21 +1174,21 @@ fn test(a1: A<u32>, i: i32) { | |||
1174 | } | 1174 | } |
1175 | "#), | 1175 | "#), |
1176 | @r###" | 1176 | @r###" |
1177 | [36; 38) 'a1': A<u32> | 1177 | 36..38 'a1': A<u32> |
1178 | [48; 49) 'i': i32 | 1178 | 48..49 'i': i32 |
1179 | [56; 147) '{ ...3.x; }': () | 1179 | 56..147 '{ ...3.x; }': () |
1180 | [62; 64) 'a1': A<u32> | 1180 | 62..64 'a1': A<u32> |
1181 | [62; 66) 'a1.x': u32 | 1181 | 62..66 'a1.x': u32 |
1182 | [76; 78) 'a2': A<i32> | 1182 | 76..78 'a2': A<i32> |
1183 | [81; 91) 'A { x: i }': A<i32> | 1183 | 81..91 'A { x: i }': A<i32> |
1184 | [88; 89) 'i': i32 | 1184 | 88..89 'i': i32 |
1185 | [97; 99) 'a2': A<i32> | 1185 | 97..99 'a2': A<i32> |
1186 | [97; 101) 'a2.x': i32 | 1186 | 97..101 'a2.x': i32 |
1187 | [111; 113) 'a3': A<i128> | 1187 | 111..113 'a3': A<i128> |
1188 | [116; 134) 'A::<i1...x: 1 }': A<i128> | 1188 | 116..134 'A::<i1...x: 1 }': A<i128> |
1189 | [131; 132) '1': i128 | 1189 | 131..132 '1': i128 |
1190 | [140; 142) 'a3': A<i128> | 1190 | 140..142 'a3': A<i128> |
1191 | [140; 144) 'a3.x': i128 | 1191 | 140..144 'a3.x': i128 |
1192 | "### | 1192 | "### |
1193 | ); | 1193 | ); |
1194 | } | 1194 | } |
@@ -1211,22 +1211,22 @@ fn test() { | |||
1211 | } | 1211 | } |
1212 | "#), | 1212 | "#), |
1213 | @r###" | 1213 | @r###" |
1214 | [76; 184) '{ ...one; }': () | 1214 | 76..184 '{ ...one; }': () |
1215 | [82; 83) 'A': A<i32>(i32) -> A<i32> | 1215 | 82..83 'A': A<i32>(i32) -> A<i32> |
1216 | [82; 87) 'A(42)': A<i32> | 1216 | 82..87 'A(42)': A<i32> |
1217 | [84; 86) '42': i32 | 1217 | 84..86 '42': i32 |
1218 | [93; 94) 'A': A<u128>(u128) -> A<u128> | 1218 | 93..94 'A': A<u128>(u128) -> A<u128> |
1219 | [93; 102) 'A(42u128)': A<u128> | 1219 | 93..102 'A(42u128)': A<u128> |
1220 | [95; 101) '42u128': u128 | 1220 | 95..101 '42u128': u128 |
1221 | [108; 112) 'Some': Some<&str>(&str) -> Option<&str> | 1221 | 108..112 'Some': Some<&str>(&str) -> Option<&str> |
1222 | [108; 117) 'Some("x")': Option<&str> | 1222 | 108..117 'Some("x")': Option<&str> |
1223 | [113; 116) '"x"': &str | 1223 | 113..116 '"x"': &str |
1224 | [123; 135) 'Option::Some': Some<&str>(&str) -> Option<&str> | 1224 | 123..135 'Option::Some': Some<&str>(&str) -> Option<&str> |
1225 | [123; 140) 'Option...e("x")': Option<&str> | 1225 | 123..140 'Option...e("x")': Option<&str> |
1226 | [136; 139) '"x"': &str | 1226 | 136..139 '"x"': &str |
1227 | [146; 150) 'None': Option<{unknown}> | 1227 | 146..150 'None': Option<{unknown}> |
1228 | [160; 161) 'x': Option<i64> | 1228 | 160..161 'x': Option<i64> |
1229 | [177; 181) 'None': Option<i64> | 1229 | 177..181 'None': Option<i64> |
1230 | "### | 1230 | "### |
1231 | ); | 1231 | ); |
1232 | } | 1232 | } |
@@ -1244,20 +1244,20 @@ fn test() { | |||
1244 | } | 1244 | } |
1245 | "#), | 1245 | "#), |
1246 | @r###" | 1246 | @r###" |
1247 | [10; 11) 't': T | 1247 | 10..11 't': T |
1248 | [21; 26) '{ t }': T | 1248 | 21..26 '{ t }': T |
1249 | [23; 24) 't': T | 1249 | 23..24 't': T |
1250 | [38; 98) '{ ...(1); }': () | 1250 | 38..98 '{ ...(1); }': () |
1251 | [44; 46) 'id': fn id<u32>(u32) -> u32 | 1251 | 44..46 'id': fn id<u32>(u32) -> u32 |
1252 | [44; 52) 'id(1u32)': u32 | 1252 | 44..52 'id(1u32)': u32 |
1253 | [47; 51) '1u32': u32 | 1253 | 47..51 '1u32': u32 |
1254 | [58; 68) 'id::<i128>': fn id<i128>(i128) -> i128 | 1254 | 58..68 'id::<i128>': fn id<i128>(i128) -> i128 |
1255 | [58; 71) 'id::<i128>(1)': i128 | 1255 | 58..71 'id::<i128>(1)': i128 |
1256 | [69; 70) '1': i128 | 1256 | 69..70 '1': i128 |
1257 | [81; 82) 'x': u64 | 1257 | 81..82 'x': u64 |
1258 | [90; 92) 'id': fn id<u64>(u64) -> u64 | 1258 | 90..92 'id': fn id<u64>(u64) -> u64 |
1259 | [90; 95) 'id(1)': u64 | 1259 | 90..95 'id(1)': u64 |
1260 | [93; 94) '1': u64 | 1260 | 93..94 '1': u64 |
1261 | "### | 1261 | "### |
1262 | ); | 1262 | ); |
1263 | } | 1263 | } |
@@ -1291,38 +1291,38 @@ fn test() -> i128 { | |||
1291 | } | 1291 | } |
1292 | "#), | 1292 | "#), |
1293 | @r###" | 1293 | @r###" |
1294 | [74; 78) 'self': A<X, Y> | 1294 | 74..78 'self': A<X, Y> |
1295 | [85; 107) '{ ... }': X | 1295 | 85..107 '{ ... }': X |
1296 | [95; 99) 'self': A<X, Y> | 1296 | 95..99 'self': A<X, Y> |
1297 | [95; 101) 'self.x': X | 1297 | 95..101 'self.x': X |
1298 | [117; 121) 'self': A<X, Y> | 1298 | 117..121 'self': A<X, Y> |
1299 | [128; 150) '{ ... }': Y | 1299 | 128..150 '{ ... }': Y |
1300 | [138; 142) 'self': A<X, Y> | 1300 | 138..142 'self': A<X, Y> |
1301 | [138; 144) 'self.y': Y | 1301 | 138..144 'self.y': Y |
1302 | [163; 167) 'self': A<X, Y> | 1302 | 163..167 'self': A<X, Y> |
1303 | [169; 170) 't': T | 1303 | 169..170 't': T |
1304 | [188; 223) '{ ... }': (X, Y, T) | 1304 | 188..223 '{ ... }': (X, Y, T) |
1305 | [198; 217) '(self.....y, t)': (X, Y, T) | 1305 | 198..217 '(self.....y, t)': (X, Y, T) |
1306 | [199; 203) 'self': A<X, Y> | 1306 | 199..203 'self': A<X, Y> |
1307 | [199; 205) 'self.x': X | 1307 | 199..205 'self.x': X |
1308 | [207; 211) 'self': A<X, Y> | 1308 | 207..211 'self': A<X, Y> |
1309 | [207; 213) 'self.y': Y | 1309 | 207..213 'self.y': Y |
1310 | [215; 216) 't': T | 1310 | 215..216 't': T |
1311 | [245; 342) '{ ...(1); }': () | 1311 | 245..342 '{ ...(1); }': () |
1312 | [255; 256) 'a': A<u64, i64> | 1312 | 255..256 'a': A<u64, i64> |
1313 | [259; 281) 'A { x:...1i64 }': A<u64, i64> | 1313 | 259..281 'A { x:...1i64 }': A<u64, i64> |
1314 | [266; 270) '1u64': u64 | 1314 | 266..270 '1u64': u64 |
1315 | [275; 279) '1i64': i64 | 1315 | 275..279 '1i64': i64 |
1316 | [287; 288) 'a': A<u64, i64> | 1316 | 287..288 'a': A<u64, i64> |
1317 | [287; 292) 'a.x()': u64 | 1317 | 287..292 'a.x()': u64 |
1318 | [298; 299) 'a': A<u64, i64> | 1318 | 298..299 'a': A<u64, i64> |
1319 | [298; 303) 'a.y()': i64 | 1319 | 298..303 'a.y()': i64 |
1320 | [309; 310) 'a': A<u64, i64> | 1320 | 309..310 'a': A<u64, i64> |
1321 | [309; 319) 'a.z(1i128)': (u64, i64, i128) | 1321 | 309..319 'a.z(1i128)': (u64, i64, i128) |
1322 | [313; 318) '1i128': i128 | 1322 | 313..318 '1i128': i128 |
1323 | [325; 326) 'a': A<u64, i64> | 1323 | 325..326 'a': A<u64, i64> |
1324 | [325; 339) 'a.z::<u128>(1)': (u64, i64, u128) | 1324 | 325..339 'a.z::<u128>(1)': (u64, i64, u128) |
1325 | [337; 338) '1': u128 | 1325 | 337..338 '1': u128 |
1326 | "### | 1326 | "### |
1327 | ); | 1327 | ); |
1328 | } | 1328 | } |
@@ -1344,15 +1344,15 @@ fn test(o: Option<u32>) { | |||
1344 | } | 1344 | } |
1345 | "#), | 1345 | "#), |
1346 | @r###" | 1346 | @r###" |
1347 | [78; 82) 'self': &Option<T> | 1347 | 78..82 'self': &Option<T> |
1348 | [98; 100) '{}': () | 1348 | 98..100 '{}': () |
1349 | [111; 112) 'o': Option<u32> | 1349 | 111..112 'o': Option<u32> |
1350 | [127; 165) '{ ...f(); }': () | 1350 | 127..165 '{ ...f(); }': () |
1351 | [133; 146) '(&o).as_ref()': Option<&u32> | 1351 | 133..146 '(&o).as_ref()': Option<&u32> |
1352 | [134; 136) '&o': &Option<u32> | 1352 | 134..136 '&o': &Option<u32> |
1353 | [135; 136) 'o': Option<u32> | 1353 | 135..136 'o': Option<u32> |
1354 | [152; 153) 'o': Option<u32> | 1354 | 152..153 'o': Option<u32> |
1355 | [152; 162) 'o.as_ref()': Option<&u32> | 1355 | 152..162 'o.as_ref()': Option<&u32> |
1356 | "### | 1356 | "### |
1357 | ); | 1357 | ); |
1358 | } | 1358 | } |
@@ -1381,35 +1381,35 @@ fn test() -> i128 { | |||
1381 | } | 1381 | } |
1382 | "#), | 1382 | "#), |
1383 | @r###" | 1383 | @r###" |
1384 | [53; 57) 'self': A<T2> | 1384 | 53..57 'self': A<T2> |
1385 | [65; 87) '{ ... }': T2 | 1385 | 65..87 '{ ... }': T2 |
1386 | [75; 79) 'self': A<T2> | 1386 | 75..79 'self': A<T2> |
1387 | [75; 81) 'self.x': T2 | 1387 | 75..81 'self.x': T2 |
1388 | [99; 100) 't': T | 1388 | 99..100 't': T |
1389 | [110; 115) '{ t }': T | 1389 | 110..115 '{ t }': T |
1390 | [112; 113) 't': T | 1390 | 112..113 't': T |
1391 | [135; 261) '{ ....x() }': i128 | 1391 | 135..261 '{ ....x() }': i128 |
1392 | [146; 147) 'x': i128 | 1392 | 146..147 'x': i128 |
1393 | [150; 151) '1': i128 | 1393 | 150..151 '1': i128 |
1394 | [162; 163) 'y': i128 | 1394 | 162..163 'y': i128 |
1395 | [166; 168) 'id': fn id<i128>(i128) -> i128 | 1395 | 166..168 'id': fn id<i128>(i128) -> i128 |
1396 | [166; 171) 'id(x)': i128 | 1396 | 166..171 'id(x)': i128 |
1397 | [169; 170) 'x': i128 | 1397 | 169..170 'x': i128 |
1398 | [182; 183) 'a': A<i128> | 1398 | 182..183 'a': A<i128> |
1399 | [186; 200) 'A { x: id(y) }': A<i128> | 1399 | 186..200 'A { x: id(y) }': A<i128> |
1400 | [193; 195) 'id': fn id<i128>(i128) -> i128 | 1400 | 193..195 'id': fn id<i128>(i128) -> i128 |
1401 | [193; 198) 'id(y)': i128 | 1401 | 193..198 'id(y)': i128 |
1402 | [196; 197) 'y': i128 | 1402 | 196..197 'y': i128 |
1403 | [211; 212) 'z': i128 | 1403 | 211..212 'z': i128 |
1404 | [215; 217) 'id': fn id<i128>(i128) -> i128 | 1404 | 215..217 'id': fn id<i128>(i128) -> i128 |
1405 | [215; 222) 'id(a.x)': i128 | 1405 | 215..222 'id(a.x)': i128 |
1406 | [218; 219) 'a': A<i128> | 1406 | 218..219 'a': A<i128> |
1407 | [218; 221) 'a.x': i128 | 1407 | 218..221 'a.x': i128 |
1408 | [233; 234) 'b': A<i128> | 1408 | 233..234 'b': A<i128> |
1409 | [237; 247) 'A { x: z }': A<i128> | 1409 | 237..247 'A { x: z }': A<i128> |
1410 | [244; 245) 'z': i128 | 1410 | 244..245 'z': i128 |
1411 | [254; 255) 'b': A<i128> | 1411 | 254..255 'b': A<i128> |
1412 | [254; 259) 'b.x()': i128 | 1412 | 254..259 'b.x()': i128 |
1413 | "### | 1413 | "### |
1414 | ); | 1414 | ); |
1415 | } | 1415 | } |
@@ -1447,16 +1447,16 @@ fn test() { | |||
1447 | } | 1447 | } |
1448 | "#), | 1448 | "#), |
1449 | @r###" | 1449 | @r###" |
1450 | [52; 53) '1': u32 | 1450 | 52..53 '1': u32 |
1451 | [105; 106) '2': u32 | 1451 | 105..106 '2': u32 |
1452 | [213; 214) '5': u32 | 1452 | 213..214 '5': u32 |
1453 | [229; 307) '{ ...:ID; }': () | 1453 | 229..307 '{ ...:ID; }': () |
1454 | [239; 240) 'x': u32 | 1454 | 239..240 'x': u32 |
1455 | [243; 254) 'Struct::FOO': u32 | 1455 | 243..254 'Struct::FOO': u32 |
1456 | [264; 265) 'y': u32 | 1456 | 264..265 'y': u32 |
1457 | [268; 277) 'Enum::BAR': u32 | 1457 | 268..277 'Enum::BAR': u32 |
1458 | [287; 288) 'z': u32 | 1458 | 287..288 'z': u32 |
1459 | [291; 304) 'TraitTest::ID': u32 | 1459 | 291..304 'TraitTest::ID': u32 |
1460 | "### | 1460 | "### |
1461 | ); | 1461 | ); |
1462 | } | 1462 | } |
@@ -1479,22 +1479,22 @@ fn test(x: Foo, y: Bar<&str>, z: Baz<i8, u8>) { | |||
1479 | } | 1479 | } |
1480 | "#), | 1480 | "#), |
1481 | @r###" | 1481 | @r###" |
1482 | [116; 117) 'x': A<u32, i128> | 1482 | 116..117 'x': A<u32, i128> |
1483 | [124; 125) 'y': A<&str, u128> | 1483 | 124..125 'y': A<&str, u128> |
1484 | [138; 139) 'z': A<u8, i8> | 1484 | 138..139 'z': A<u8, i8> |
1485 | [154; 211) '{ ...z.y; }': () | 1485 | 154..211 '{ ...z.y; }': () |
1486 | [160; 161) 'x': A<u32, i128> | 1486 | 160..161 'x': A<u32, i128> |
1487 | [160; 163) 'x.x': u32 | 1487 | 160..163 'x.x': u32 |
1488 | [169; 170) 'x': A<u32, i128> | 1488 | 169..170 'x': A<u32, i128> |
1489 | [169; 172) 'x.y': i128 | 1489 | 169..172 'x.y': i128 |
1490 | [178; 179) 'y': A<&str, u128> | 1490 | 178..179 'y': A<&str, u128> |
1491 | [178; 181) 'y.x': &str | 1491 | 178..181 'y.x': &str |
1492 | [187; 188) 'y': A<&str, u128> | 1492 | 187..188 'y': A<&str, u128> |
1493 | [187; 190) 'y.y': u128 | 1493 | 187..190 'y.y': u128 |
1494 | [196; 197) 'z': A<u8, i8> | 1494 | 196..197 'z': A<u8, i8> |
1495 | [196; 199) 'z.x': u8 | 1495 | 196..199 'z.x': u8 |
1496 | [205; 206) 'z': A<u8, i8> | 1496 | 205..206 'z': A<u8, i8> |
1497 | [205; 208) 'z.y': i8 | 1497 | 205..208 'z.y': i8 |
1498 | "### | 1498 | "### |
1499 | ) | 1499 | ) |
1500 | } | 1500 | } |
@@ -1509,8 +1509,8 @@ type Bar = A<Bar>; | |||
1509 | fn test(x: Foo) {} | 1509 | fn test(x: Foo) {} |
1510 | "#), | 1510 | "#), |
1511 | @r###" | 1511 | @r###" |
1512 | [59; 60) 'x': {unknown} | 1512 | 59..60 'x': {unknown} |
1513 | [67; 69) '{}': () | 1513 | 67..69 '{}': () |
1514 | "### | 1514 | "### |
1515 | ) | 1515 | ) |
1516 | } | 1516 | } |
@@ -1535,26 +1535,26 @@ fn test() { | |||
1535 | } | 1535 | } |
1536 | "#), | 1536 | "#), |
1537 | @r###" | 1537 | @r###" |
1538 | [10; 11) 'x': T | 1538 | 10..11 'x': T |
1539 | [21; 30) '{ x }': T | 1539 | 21..30 '{ x }': T |
1540 | [27; 28) 'x': T | 1540 | 27..28 'x': T |
1541 | [44; 45) 'x': &T | 1541 | 44..45 'x': &T |
1542 | [56; 66) '{ *x }': T | 1542 | 56..66 '{ *x }': T |
1543 | [62; 64) '*x': T | 1543 | 62..64 '*x': T |
1544 | [63; 64) 'x': &T | 1544 | 63..64 'x': &T |
1545 | [78; 158) '{ ...(1); }': () | 1545 | 78..158 '{ ...(1); }': () |
1546 | [88; 89) 'y': u32 | 1546 | 88..89 'y': u32 |
1547 | [92; 97) '10u32': u32 | 1547 | 92..97 '10u32': u32 |
1548 | [103; 105) 'id': fn id<u32>(u32) -> u32 | 1548 | 103..105 'id': fn id<u32>(u32) -> u32 |
1549 | [103; 108) 'id(y)': u32 | 1549 | 103..108 'id(y)': u32 |
1550 | [106; 107) 'y': u32 | 1550 | 106..107 'y': u32 |
1551 | [118; 119) 'x': bool | 1551 | 118..119 'x': bool |
1552 | [128; 133) 'clone': fn clone<bool>(&bool) -> bool | 1552 | 128..133 'clone': fn clone<bool>(&bool) -> bool |
1553 | [128; 136) 'clone(z)': bool | 1553 | 128..136 'clone(z)': bool |
1554 | [134; 135) 'z': &bool | 1554 | 134..135 'z': &bool |
1555 | [142; 152) 'id::<i128>': fn id<i128>(i128) -> i128 | 1555 | 142..152 'id::<i128>': fn id<i128>(i128) -> i128 |
1556 | [142; 155) 'id::<i128>(1)': i128 | 1556 | 142..155 'id::<i128>(1)': i128 |
1557 | [153; 154) '1': i128 | 1557 | 153..154 '1': i128 |
1558 | "### | 1558 | "### |
1559 | ); | 1559 | ); |
1560 | } | 1560 | } |
@@ -1574,16 +1574,16 @@ fn test() { | |||
1574 | } | 1574 | } |
1575 | "#), | 1575 | "#), |
1576 | @r###" | 1576 | @r###" |
1577 | [49; 50) '0': u32 | 1577 | 49..50 '0': u32 |
1578 | [80; 83) '101': u32 | 1578 | 80..83 '101': u32 |
1579 | [95; 213) '{ ...NST; }': () | 1579 | 95..213 '{ ...NST; }': () |
1580 | [138; 139) 'x': u32 | 1580 | 138..139 'x': u32 |
1581 | [142; 153) 'LOCAL_CONST': u32 | 1581 | 142..153 'LOCAL_CONST': u32 |
1582 | [163; 164) 'z': u32 | 1582 | 163..164 'z': u32 |
1583 | [167; 179) 'GLOBAL_CONST': u32 | 1583 | 167..179 'GLOBAL_CONST': u32 |
1584 | [189; 191) 'id': u32 | 1584 | 189..191 'id': u32 |
1585 | [194; 210) 'Foo::A..._CONST': u32 | 1585 | 194..210 'Foo::A..._CONST': u32 |
1586 | [126; 128) '99': u32 | 1586 | 126..128 '99': u32 |
1587 | "### | 1587 | "### |
1588 | ); | 1588 | ); |
1589 | } | 1589 | } |
@@ -1604,19 +1604,19 @@ fn test() { | |||
1604 | } | 1604 | } |
1605 | "#), | 1605 | "#), |
1606 | @r###" | 1606 | @r###" |
1607 | [29; 32) '101': u32 | 1607 | 29..32 '101': u32 |
1608 | [70; 73) '101': u32 | 1608 | 70..73 '101': u32 |
1609 | [85; 280) '{ ...MUT; }': () | 1609 | 85..280 '{ ...MUT; }': () |
1610 | [173; 174) 'x': u32 | 1610 | 173..174 'x': u32 |
1611 | [177; 189) 'LOCAL_STATIC': u32 | 1611 | 177..189 'LOCAL_STATIC': u32 |
1612 | [199; 200) 'y': u32 | 1612 | 199..200 'y': u32 |
1613 | [203; 219) 'LOCAL_...IC_MUT': u32 | 1613 | 203..219 'LOCAL_...IC_MUT': u32 |
1614 | [229; 230) 'z': u32 | 1614 | 229..230 'z': u32 |
1615 | [233; 246) 'GLOBAL_STATIC': u32 | 1615 | 233..246 'GLOBAL_STATIC': u32 |
1616 | [256; 257) 'w': u32 | 1616 | 256..257 'w': u32 |
1617 | [260; 277) 'GLOBAL...IC_MUT': u32 | 1617 | 260..277 'GLOBAL...IC_MUT': u32 |
1618 | [118; 120) '99': u32 | 1618 | 118..120 '99': u32 |
1619 | [161; 163) '99': u32 | 1619 | 161..163 '99': u32 |
1620 | "### | 1620 | "### |
1621 | ); | 1621 | ); |
1622 | } | 1622 | } |
@@ -1684,12 +1684,12 @@ fn foo() -> u32 { | |||
1684 | } | 1684 | } |
1685 | "#), | 1685 | "#), |
1686 | @r###" | 1686 | @r###" |
1687 | [17; 59) '{ ...; }; }': () | 1687 | 17..59 '{ ...; }; }': () |
1688 | [27; 28) 'x': || -> usize | 1688 | 27..28 'x': || -> usize |
1689 | [31; 56) '|| -> ...n 1; }': || -> usize | 1689 | 31..56 '|| -> ...n 1; }': || -> usize |
1690 | [43; 56) '{ return 1; }': ! | 1690 | 43..56 '{ return 1; }': ! |
1691 | [45; 53) 'return 1': ! | 1691 | 45..53 'return 1': ! |
1692 | [52; 53) '1': usize | 1692 | 52..53 '1': usize |
1693 | "### | 1693 | "### |
1694 | ); | 1694 | ); |
1695 | } | 1695 | } |
@@ -1703,11 +1703,11 @@ fn foo() -> u32 { | |||
1703 | } | 1703 | } |
1704 | "#), | 1704 | "#), |
1705 | @r###" | 1705 | @r###" |
1706 | [17; 48) '{ ...; }; }': () | 1706 | 17..48 '{ ...; }; }': () |
1707 | [27; 28) 'x': || -> () | 1707 | 27..28 'x': || -> () |
1708 | [31; 45) '|| { return; }': || -> () | 1708 | 31..45 '|| { return; }': || -> () |
1709 | [34; 45) '{ return; }': ! | 1709 | 34..45 '{ return; }': ! |
1710 | [36; 42) 'return': ! | 1710 | 36..42 'return': ! |
1711 | "### | 1711 | "### |
1712 | ); | 1712 | ); |
1713 | } | 1713 | } |
@@ -1721,11 +1721,11 @@ fn foo() -> u32 { | |||
1721 | } | 1721 | } |
1722 | "#), | 1722 | "#), |
1723 | @r###" | 1723 | @r###" |
1724 | [17; 47) '{ ..." }; }': () | 1724 | 17..47 '{ ..." }; }': () |
1725 | [27; 28) 'x': || -> &str | 1725 | 27..28 'x': || -> &str |
1726 | [31; 44) '|| { "test" }': || -> &str | 1726 | 31..44 '|| { "test" }': || -> &str |
1727 | [34; 44) '{ "test" }': &str | 1727 | 34..44 '{ "test" }': &str |
1728 | [36; 42) '"test"': &str | 1728 | 36..42 '"test"': &str |
1729 | "### | 1729 | "### |
1730 | ); | 1730 | ); |
1731 | } | 1731 | } |
@@ -1744,14 +1744,14 @@ fn main() { | |||
1744 | } | 1744 | } |
1745 | "#), | 1745 | "#), |
1746 | @r###" | 1746 | @r###" |
1747 | [48; 121) '{ ...hod; }': () | 1747 | 48..121 '{ ...hod; }': () |
1748 | [58; 64) 'vtable': Vtable | 1748 | 58..64 'vtable': Vtable |
1749 | [67; 91) 'Vtable...| {} }': Vtable | 1749 | 67..91 'Vtable...| {} }': Vtable |
1750 | [84; 89) '|| {}': || -> () | 1750 | 84..89 '|| {}': || -> () |
1751 | [87; 89) '{}': () | 1751 | 87..89 '{}': () |
1752 | [101; 102) 'm': fn() | 1752 | 101..102 'm': fn() |
1753 | [105; 111) 'vtable': Vtable | 1753 | 105..111 'vtable': Vtable |
1754 | [105; 118) 'vtable.method': fn() | 1754 | 105..118 'vtable.method': fn() |
1755 | "### | 1755 | "### |
1756 | ); | 1756 | ); |
1757 | } | 1757 | } |
diff --git a/crates/ra_hir_ty/src/tests/traits.rs b/crates/ra_hir_ty/src/tests/traits.rs index a46f03b7f..f51cdd496 100644 --- a/crates/ra_hir_ty/src/tests/traits.rs +++ b/crates/ra_hir_ty/src/tests/traits.rs | |||
@@ -256,16 +256,16 @@ fn test() { | |||
256 | } | 256 | } |
257 | "#), | 257 | "#), |
258 | @r###" | 258 | @r###" |
259 | [86; 87) 't': T | 259 | 86..87 't': T |
260 | [92; 94) '{}': () | 260 | 92..94 '{}': () |
261 | [105; 144) '{ ...(s); }': () | 261 | 105..144 '{ ...(s); }': () |
262 | [115; 116) 's': S<u32> | 262 | 115..116 's': S<u32> |
263 | [119; 120) 'S': S<u32>(u32) -> S<u32> | 263 | 119..120 'S': S<u32>(u32) -> S<u32> |
264 | [119; 129) 'S(unknown)': S<u32> | 264 | 119..129 'S(unknown)': S<u32> |
265 | [121; 128) 'unknown': u32 | 265 | 121..128 'unknown': u32 |
266 | [135; 138) 'foo': fn foo<S<u32>>(S<u32>) | 266 | 135..138 'foo': fn foo<S<u32>>(S<u32>) |
267 | [135; 141) 'foo(s)': () | 267 | 135..141 'foo(s)': () |
268 | [139; 140) 's': S<u32> | 268 | 139..140 's': S<u32> |
269 | "### | 269 | "### |
270 | ); | 270 | ); |
271 | } | 271 | } |
@@ -284,17 +284,17 @@ fn test() { | |||
284 | } | 284 | } |
285 | "#), | 285 | "#), |
286 | @r###" | 286 | @r###" |
287 | [87; 88) 't': T | 287 | 87..88 't': T |
288 | [98; 100) '{}': () | 288 | 98..100 '{}': () |
289 | [111; 163) '{ ...(s); }': () | 289 | 111..163 '{ ...(s); }': () |
290 | [121; 122) 's': S<u32> | 290 | 121..122 's': S<u32> |
291 | [125; 126) 'S': S<u32>(u32) -> S<u32> | 291 | 125..126 'S': S<u32>(u32) -> S<u32> |
292 | [125; 135) 'S(unknown)': S<u32> | 292 | 125..135 'S(unknown)': S<u32> |
293 | [127; 134) 'unknown': u32 | 293 | 127..134 'unknown': u32 |
294 | [145; 146) 'x': u32 | 294 | 145..146 'x': u32 |
295 | [154; 157) 'foo': fn foo<u32, S<u32>>(S<u32>) -> u32 | 295 | 154..157 'foo': fn foo<u32, S<u32>>(S<u32>) -> u32 |
296 | [154; 160) 'foo(s)': u32 | 296 | 154..160 'foo(s)': u32 |
297 | [158; 159) 's': S<u32> | 297 | 158..159 's': S<u32> |
298 | "### | 298 | "### |
299 | ); | 299 | ); |
300 | } | 300 | } |
@@ -312,12 +312,12 @@ trait Trait { | |||
312 | } | 312 | } |
313 | "#), | 313 | "#), |
314 | @r###" | 314 | @r###" |
315 | [27; 31) 'self': &Self | 315 | 27..31 'self': &Self |
316 | [53; 57) 'self': &Self | 316 | 53..57 'self': &Self |
317 | [62; 97) '{ ... }': () | 317 | 62..97 '{ ... }': () |
318 | [76; 77) 'x': i64 | 318 | 76..77 'x': i64 |
319 | [80; 84) 'self': &Self | 319 | 80..84 'self': &Self |
320 | [80; 90) 'self.foo()': i64 | 320 | 80..90 'self.foo()': i64 |
321 | "### | 321 | "### |
322 | ); | 322 | ); |
323 | } | 323 | } |
@@ -337,12 +337,12 @@ trait Trait: SuperTrait { | |||
337 | } | 337 | } |
338 | "#), | 338 | "#), |
339 | @r###" | 339 | @r###" |
340 | [32; 36) 'self': &Self | 340 | 32..36 'self': &Self |
341 | [86; 90) 'self': &Self | 341 | 86..90 'self': &Self |
342 | [95; 130) '{ ... }': () | 342 | 95..130 '{ ... }': () |
343 | [109; 110) 'x': i64 | 343 | 109..110 'x': i64 |
344 | [113; 117) 'self': &Self | 344 | 113..117 'self': &Self |
345 | [113; 123) 'self.foo()': i64 | 345 | 113..123 'self.foo()': i64 |
346 | "### | 346 | "### |
347 | ); | 347 | ); |
348 | } | 348 | } |
@@ -364,15 +364,15 @@ fn test<T: Iterable>() { | |||
364 | } | 364 | } |
365 | "#), | 365 | "#), |
366 | @r###" | 366 | @r###" |
367 | [108; 261) '{ ...ter; }': () | 367 | 108..261 '{ ...ter; }': () |
368 | [118; 119) 'x': u32 | 368 | 118..119 'x': u32 |
369 | [145; 146) '1': u32 | 369 | 145..146 '1': u32 |
370 | [156; 157) 'y': Iterable::Item<T> | 370 | 156..157 'y': Iterable::Item<T> |
371 | [183; 192) 'no_matter': Iterable::Item<T> | 371 | 183..192 'no_matter': Iterable::Item<T> |
372 | [202; 203) 'z': Iterable::Item<T> | 372 | 202..203 'z': Iterable::Item<T> |
373 | [215; 224) 'no_matter': Iterable::Item<T> | 373 | 215..224 'no_matter': Iterable::Item<T> |
374 | [234; 235) 'a': Iterable::Item<T> | 374 | 234..235 'a': Iterable::Item<T> |
375 | [249; 258) 'no_matter': Iterable::Item<T> | 375 | 249..258 'no_matter': Iterable::Item<T> |
376 | "### | 376 | "### |
377 | ); | 377 | ); |
378 | } | 378 | } |
@@ -396,25 +396,25 @@ fn test() { | |||
396 | } | 396 | } |
397 | "#), | 397 | "#), |
398 | @r###" | 398 | @r###" |
399 | [106; 107) 't': T | 399 | 106..107 't': T |
400 | [123; 125) '{}': () | 400 | 123..125 '{}': () |
401 | [147; 148) 't': T | 401 | 147..148 't': T |
402 | [178; 180) '{}': () | 402 | 178..180 '{}': () |
403 | [202; 203) 't': T | 403 | 202..203 't': T |
404 | [221; 223) '{}': () | 404 | 221..223 '{}': () |
405 | [234; 300) '{ ...(S); }': () | 405 | 234..300 '{ ...(S); }': () |
406 | [244; 245) 'x': u32 | 406 | 244..245 'x': u32 |
407 | [248; 252) 'foo1': fn foo1<S>(S) -> <S as Iterable>::Item | 407 | 248..252 'foo1': fn foo1<S>(S) -> <S as Iterable>::Item |
408 | [248; 255) 'foo1(S)': u32 | 408 | 248..255 'foo1(S)': u32 |
409 | [253; 254) 'S': S | 409 | 253..254 'S': S |
410 | [265; 266) 'y': u32 | 410 | 265..266 'y': u32 |
411 | [269; 273) 'foo2': fn foo2<S>(S) -> <S as Iterable>::Item | 411 | 269..273 'foo2': fn foo2<S>(S) -> <S as Iterable>::Item |
412 | [269; 276) 'foo2(S)': u32 | 412 | 269..276 'foo2(S)': u32 |
413 | [274; 275) 'S': S | 413 | 274..275 'S': S |
414 | [286; 287) 'z': u32 | 414 | 286..287 'z': u32 |
415 | [290; 294) 'foo3': fn foo3<S>(S) -> <S as Iterable>::Item | 415 | 290..294 'foo3': fn foo3<S>(S) -> <S as Iterable>::Item |
416 | [290; 297) 'foo3(S)': u32 | 416 | 290..297 'foo3(S)': u32 |
417 | [295; 296) 'S': S | 417 | 295..296 'S': S |
418 | "### | 418 | "### |
419 | ); | 419 | ); |
420 | } | 420 | } |
@@ -431,9 +431,9 @@ fn test<T: Iterable<Item=u32>>() { | |||
431 | } | 431 | } |
432 | "#), | 432 | "#), |
433 | @r###" | 433 | @r###" |
434 | [67; 100) '{ ...own; }': () | 434 | 67..100 '{ ...own; }': () |
435 | [77; 78) 'y': u32 | 435 | 77..78 'y': u32 |
436 | [90; 97) 'unknown': u32 | 436 | 90..97 'unknown': u32 |
437 | "### | 437 | "### |
438 | ); | 438 | ); |
439 | } | 439 | } |
@@ -446,13 +446,13 @@ const A: u32 = 1 + 1; | |||
446 | static B: u64 = { let x = 1; x }; | 446 | static B: u64 = { let x = 1; x }; |
447 | "#), | 447 | "#), |
448 | @r###" | 448 | @r###" |
449 | [16; 17) '1': u32 | 449 | 16..17 '1': u32 |
450 | [16; 21) '1 + 1': u32 | 450 | 16..21 '1 + 1': u32 |
451 | [20; 21) '1': u32 | 451 | 20..21 '1': u32 |
452 | [39; 55) '{ let ...1; x }': u64 | 452 | 39..55 '{ let ...1; x }': u64 |
453 | [45; 46) 'x': u64 | 453 | 45..46 'x': u64 |
454 | [49; 50) '1': u64 | 454 | 49..50 '1': u64 |
455 | [52; 53) 'x': u64 | 455 | 52..53 'x': u64 |
456 | "### | 456 | "### |
457 | ); | 457 | ); |
458 | } | 458 | } |
@@ -469,17 +469,17 @@ fn test() -> u64 { | |||
469 | } | 469 | } |
470 | "#), | 470 | "#), |
471 | @r###" | 471 | @r###" |
472 | [38; 87) '{ ... a.1 }': u64 | 472 | 38..87 '{ ... a.1 }': u64 |
473 | [48; 49) 'a': S | 473 | 48..49 'a': S |
474 | [52; 53) 'S': S(i32, u64) -> S | 474 | 52..53 'S': S(i32, u64) -> S |
475 | [52; 59) 'S(4, 6)': S | 475 | 52..59 'S(4, 6)': S |
476 | [54; 55) '4': i32 | 476 | 54..55 '4': i32 |
477 | [57; 58) '6': u64 | 477 | 57..58 '6': u64 |
478 | [69; 70) 'b': i32 | 478 | 69..70 'b': i32 |
479 | [73; 74) 'a': S | 479 | 73..74 'a': S |
480 | [73; 76) 'a.0': i32 | 480 | 73..76 'a.0': i32 |
481 | [82; 83) 'a': S | 481 | 82..83 'a': S |
482 | [82; 85) 'a.1': u64 | 482 | 82..85 'a.1': u64 |
483 | "### | 483 | "### |
484 | ); | 484 | ); |
485 | } | 485 | } |
@@ -496,24 +496,24 @@ fn test() -> u64 { | |||
496 | } | 496 | } |
497 | "#), | 497 | "#), |
498 | @r###" | 498 | @r###" |
499 | [44; 102) '{ ...0(2) }': u64 | 499 | 44..102 '{ ...0(2) }': u64 |
500 | [54; 55) 'a': S | 500 | 54..55 'a': S |
501 | [58; 59) 'S': S(fn(u32) -> u64) -> S | 501 | 58..59 'S': S(fn(u32) -> u64) -> S |
502 | [58; 68) 'S(|i| 2*i)': S | 502 | 58..68 'S(|i| 2*i)': S |
503 | [60; 67) '|i| 2*i': |u32| -> u64 | 503 | 60..67 '|i| 2*i': |u32| -> u64 |
504 | [61; 62) 'i': u32 | 504 | 61..62 'i': u32 |
505 | [64; 65) '2': u32 | 505 | 64..65 '2': u32 |
506 | [64; 67) '2*i': u32 | 506 | 64..67 '2*i': u32 |
507 | [66; 67) 'i': u32 | 507 | 66..67 'i': u32 |
508 | [78; 79) 'b': u64 | 508 | 78..79 'b': u64 |
509 | [82; 83) 'a': S | 509 | 82..83 'a': S |
510 | [82; 85) 'a.0': fn(u32) -> u64 | 510 | 82..85 'a.0': fn(u32) -> u64 |
511 | [82; 88) 'a.0(4)': u64 | 511 | 82..88 'a.0(4)': u64 |
512 | [86; 87) '4': u32 | 512 | 86..87 '4': u32 |
513 | [94; 95) 'a': S | 513 | 94..95 'a': S |
514 | [94; 97) 'a.0': fn(u32) -> u64 | 514 | 94..97 'a.0': fn(u32) -> u64 |
515 | [94; 100) 'a.0(2)': u64 | 515 | 94..100 'a.0(2)': u64 |
516 | [98; 99) '2': u32 | 516 | 98..99 '2': u32 |
517 | "### | 517 | "### |
518 | ); | 518 | ); |
519 | } | 519 | } |
@@ -523,12 +523,12 @@ fn indexing_arrays() { | |||
523 | assert_snapshot!( | 523 | assert_snapshot!( |
524 | infer("fn main() { &mut [9][2]; }"), | 524 | infer("fn main() { &mut [9][2]; }"), |
525 | @r###" | 525 | @r###" |
526 | [10; 26) '{ &mut...[2]; }': () | 526 | 10..26 '{ &mut...[2]; }': () |
527 | [12; 23) '&mut [9][2]': &mut {unknown} | 527 | 12..23 '&mut [9][2]': &mut {unknown} |
528 | [17; 20) '[9]': [i32; _] | 528 | 17..20 '[9]': [i32; _] |
529 | [17; 23) '[9][2]': {unknown} | 529 | 17..23 '[9][2]': {unknown} |
530 | [18; 19) '9': i32 | 530 | 18..19 '9': i32 |
531 | [21; 22) '2': i32 | 531 | 21..22 '2': i32 |
532 | "### | 532 | "### |
533 | ) | 533 | ) |
534 | } | 534 | } |
@@ -944,34 +944,34 @@ fn test(x: impl Trait<u64>, y: &impl Trait<u32>) { | |||
944 | } | 944 | } |
945 | "#, true), | 945 | "#, true), |
946 | @r###" | 946 | @r###" |
947 | [30; 34) 'self': &Self | 947 | 30..34 'self': &Self |
948 | [55; 59) 'self': &Self | 948 | 55..59 'self': &Self |
949 | [78; 79) 'x': impl Trait<u16> | 949 | 78..79 'x': impl Trait<u16> |
950 | [98; 100) '{}': () | 950 | 98..100 '{}': () |
951 | [155; 156) 'x': impl Trait<u64> | 951 | 155..156 'x': impl Trait<u64> |
952 | [175; 176) 'y': &impl Trait<u32> | 952 | 175..176 'y': &impl Trait<u32> |
953 | [196; 324) '{ ...2(); }': () | 953 | 196..324 '{ ...2(); }': () |
954 | [202; 203) 'x': impl Trait<u64> | 954 | 202..203 'x': impl Trait<u64> |
955 | [209; 210) 'y': &impl Trait<u32> | 955 | 209..210 'y': &impl Trait<u32> |
956 | [220; 221) 'z': S<u16> | 956 | 220..221 'z': S<u16> |
957 | [224; 225) 'S': S<u16>(u16) -> S<u16> | 957 | 224..225 'S': S<u16>(u16) -> S<u16> |
958 | [224; 228) 'S(1)': S<u16> | 958 | 224..228 'S(1)': S<u16> |
959 | [226; 227) '1': u16 | 959 | 226..227 '1': u16 |
960 | [234; 237) 'bar': fn bar(S<u16>) | 960 | 234..237 'bar': fn bar(S<u16>) |
961 | [234; 240) 'bar(z)': () | 961 | 234..240 'bar(z)': () |
962 | [238; 239) 'z': S<u16> | 962 | 238..239 'z': S<u16> |
963 | [246; 247) 'x': impl Trait<u64> | 963 | 246..247 'x': impl Trait<u64> |
964 | [246; 253) 'x.foo()': u64 | 964 | 246..253 'x.foo()': u64 |
965 | [259; 260) 'y': &impl Trait<u32> | 965 | 259..260 'y': &impl Trait<u32> |
966 | [259; 266) 'y.foo()': u32 | 966 | 259..266 'y.foo()': u32 |
967 | [272; 273) 'z': S<u16> | 967 | 272..273 'z': S<u16> |
968 | [272; 279) 'z.foo()': u16 | 968 | 272..279 'z.foo()': u16 |
969 | [285; 286) 'x': impl Trait<u64> | 969 | 285..286 'x': impl Trait<u64> |
970 | [285; 293) 'x.foo2()': i64 | 970 | 285..293 'x.foo2()': i64 |
971 | [299; 300) 'y': &impl Trait<u32> | 971 | 299..300 'y': &impl Trait<u32> |
972 | [299; 307) 'y.foo2()': i64 | 972 | 299..307 'y.foo2()': i64 |
973 | [313; 314) 'z': S<u16> | 973 | 313..314 'z': S<u16> |
974 | [313; 321) 'z.foo2()': i64 | 974 | 313..321 'z.foo2()': i64 |
975 | "### | 975 | "### |
976 | ); | 976 | ); |
977 | } | 977 | } |
@@ -1005,39 +1005,39 @@ fn test() { | |||
1005 | } | 1005 | } |
1006 | "#, true), | 1006 | "#, true), |
1007 | @r###" | 1007 | @r###" |
1008 | [156; 157) 'x': impl Trait | 1008 | 156..157 'x': impl Trait |
1009 | [176; 187) '{ loop {} }': T | 1009 | 176..187 '{ loop {} }': T |
1010 | [178; 185) 'loop {}': ! | 1010 | 178..185 'loop {}': ! |
1011 | [183; 185) '{}': () | 1011 | 183..185 '{}': () |
1012 | [200; 201) 'x': impl Trait | 1012 | 200..201 'x': impl Trait |
1013 | [220; 231) '{ loop {} }': T | 1013 | 220..231 '{ loop {} }': T |
1014 | [222; 229) 'loop {}': ! | 1014 | 222..229 'loop {}': ! |
1015 | [227; 229) '{}': () | 1015 | 227..229 '{}': () |
1016 | [301; 510) '{ ... i32 }': () | 1016 | 301..510 '{ ... i32 }': () |
1017 | [307; 315) 'Foo::bar': fn bar<{unknown}, {unknown}>(S) -> {unknown} | 1017 | 307..315 'Foo::bar': fn bar<{unknown}, {unknown}>(S) -> {unknown} |
1018 | [307; 318) 'Foo::bar(S)': {unknown} | 1018 | 307..318 'Foo::bar(S)': {unknown} |
1019 | [316; 317) 'S': S | 1019 | 316..317 'S': S |
1020 | [324; 339) '<F as Foo>::bar': fn bar<F, {unknown}>(S) -> {unknown} | 1020 | 324..339 '<F as Foo>::bar': fn bar<F, {unknown}>(S) -> {unknown} |
1021 | [324; 342) '<F as ...bar(S)': {unknown} | 1021 | 324..342 '<F as ...bar(S)': {unknown} |
1022 | [340; 341) 'S': S | 1022 | 340..341 'S': S |
1023 | [348; 354) 'F::bar': fn bar<F, {unknown}>(S) -> {unknown} | 1023 | 348..354 'F::bar': fn bar<F, {unknown}>(S) -> {unknown} |
1024 | [348; 357) 'F::bar(S)': {unknown} | 1024 | 348..357 'F::bar(S)': {unknown} |
1025 | [355; 356) 'S': S | 1025 | 355..356 'S': S |
1026 | [363; 378) 'Foo::bar::<u32>': fn bar<{unknown}, u32>(S) -> u32 | 1026 | 363..378 'Foo::bar::<u32>': fn bar<{unknown}, u32>(S) -> u32 |
1027 | [363; 381) 'Foo::b...32>(S)': u32 | 1027 | 363..381 'Foo::b...32>(S)': u32 |
1028 | [379; 380) 'S': S | 1028 | 379..380 'S': S |
1029 | [387; 409) '<F as ...:<u32>': fn bar<F, u32>(S) -> u32 | 1029 | 387..409 '<F as ...:<u32>': fn bar<F, u32>(S) -> u32 |
1030 | [387; 412) '<F as ...32>(S)': u32 | 1030 | 387..412 '<F as ...32>(S)': u32 |
1031 | [410; 411) 'S': S | 1031 | 410..411 'S': S |
1032 | [419; 422) 'foo': fn foo<{unknown}>(S) -> {unknown} | 1032 | 419..422 'foo': fn foo<{unknown}>(S) -> {unknown} |
1033 | [419; 425) 'foo(S)': {unknown} | 1033 | 419..425 'foo(S)': {unknown} |
1034 | [423; 424) 'S': S | 1034 | 423..424 'S': S |
1035 | [431; 441) 'foo::<u32>': fn foo<u32>(S) -> u32 | 1035 | 431..441 'foo::<u32>': fn foo<u32>(S) -> u32 |
1036 | [431; 444) 'foo::<u32>(S)': u32 | 1036 | 431..444 'foo::<u32>(S)': u32 |
1037 | [442; 443) 'S': S | 1037 | 442..443 'S': S |
1038 | [450; 465) 'foo::<u32, i32>': fn foo<u32>(S) -> u32 | 1038 | 450..465 'foo::<u32, i32>': fn foo<u32>(S) -> u32 |
1039 | [450; 468) 'foo::<...32>(S)': u32 | 1039 | 450..468 'foo::<...32>(S)': u32 |
1040 | [466; 467) 'S': S | 1040 | 466..467 'S': S |
1041 | "### | 1041 | "### |
1042 | ); | 1042 | ); |
1043 | } | 1043 | } |
@@ -1062,24 +1062,24 @@ fn test() { | |||
1062 | } | 1062 | } |
1063 | "#, true), | 1063 | "#, true), |
1064 | @r###" | 1064 | @r###" |
1065 | [88; 92) 'self': F<T> | 1065 | 88..92 'self': F<T> |
1066 | [94; 95) 'x': impl Trait | 1066 | 94..95 'x': impl Trait |
1067 | [119; 130) '{ loop {} }': (T, U) | 1067 | 119..130 '{ loop {} }': (T, U) |
1068 | [121; 128) 'loop {}': ! | 1068 | 121..128 'loop {}': ! |
1069 | [126; 128) '{}': () | 1069 | 126..128 '{}': () |
1070 | [144; 284) '{ ...ored }': () | 1070 | 144..284 '{ ...ored }': () |
1071 | [150; 151) 'F': F<{unknown}> | 1071 | 150..151 'F': F<{unknown}> |
1072 | [150; 158) 'F.foo(S)': ({unknown}, {unknown}) | 1072 | 150..158 'F.foo(S)': ({unknown}, {unknown}) |
1073 | [156; 157) 'S': S | 1073 | 156..157 'S': S |
1074 | [164; 172) 'F::<u32>': F<u32> | 1074 | 164..172 'F::<u32>': F<u32> |
1075 | [164; 179) 'F::<u32>.foo(S)': (u32, {unknown}) | 1075 | 164..179 'F::<u32>.foo(S)': (u32, {unknown}) |
1076 | [177; 178) 'S': S | 1076 | 177..178 'S': S |
1077 | [185; 193) 'F::<u32>': F<u32> | 1077 | 185..193 'F::<u32>': F<u32> |
1078 | [185; 207) 'F::<u3...32>(S)': (u32, i32) | 1078 | 185..207 'F::<u3...32>(S)': (u32, i32) |
1079 | [205; 206) 'S': S | 1079 | 205..206 'S': S |
1080 | [213; 221) 'F::<u32>': F<u32> | 1080 | 213..221 'F::<u32>': F<u32> |
1081 | [213; 240) 'F::<u3...32>(S)': (u32, i32) | 1081 | 213..240 'F::<u3...32>(S)': (u32, i32) |
1082 | [238; 239) 'S': S | 1082 | 238..239 'S': S |
1083 | "### | 1083 | "### |
1084 | ); | 1084 | ); |
1085 | } | 1085 | } |
@@ -1098,13 +1098,13 @@ fn test() { | |||
1098 | } | 1098 | } |
1099 | "#, true), | 1099 | "#, true), |
1100 | @r###" | 1100 | @r###" |
1101 | [23; 24) 'x': impl Trait | 1101 | 23..24 'x': impl Trait |
1102 | [38; 49) '{ loop {} }': () | 1102 | 38..49 '{ loop {} }': () |
1103 | [40; 47) 'loop {}': ! | 1103 | 40..47 'loop {}': ! |
1104 | [45; 47) '{}': () | 1104 | 45..47 '{}': () |
1105 | [91; 124) '{ ...foo; }': () | 1105 | 91..124 '{ ...foo; }': () |
1106 | [101; 102) 'f': fn(S) | 1106 | 101..102 'f': fn(S) |
1107 | [118; 121) 'foo': fn foo(S) | 1107 | 118..121 'foo': fn foo(S) |
1108 | "### | 1108 | "### |
1109 | ); | 1109 | ); |
1110 | } | 1110 | } |
@@ -1133,29 +1133,29 @@ fn test(x: impl Trait<u64>, y: &impl Trait<u64>) { | |||
1133 | } | 1133 | } |
1134 | "#), | 1134 | "#), |
1135 | @r###" | 1135 | @r###" |
1136 | [30; 34) 'self': &Self | 1136 | 30..34 'self': &Self |
1137 | [55; 59) 'self': &Self | 1137 | 55..59 'self': &Self |
1138 | [99; 101) '{}': () | 1138 | 99..101 '{}': () |
1139 | [111; 112) 'x': impl Trait<u64> | 1139 | 111..112 'x': impl Trait<u64> |
1140 | [131; 132) 'y': &impl Trait<u64> | 1140 | 131..132 'y': &impl Trait<u64> |
1141 | [152; 269) '{ ...2(); }': () | 1141 | 152..269 '{ ...2(); }': () |
1142 | [158; 159) 'x': impl Trait<u64> | 1142 | 158..159 'x': impl Trait<u64> |
1143 | [165; 166) 'y': &impl Trait<u64> | 1143 | 165..166 'y': &impl Trait<u64> |
1144 | [176; 177) 'z': impl Trait<u64> | 1144 | 176..177 'z': impl Trait<u64> |
1145 | [180; 183) 'bar': fn bar() -> impl Trait<u64> | 1145 | 180..183 'bar': fn bar() -> impl Trait<u64> |
1146 | [180; 185) 'bar()': impl Trait<u64> | 1146 | 180..185 'bar()': impl Trait<u64> |
1147 | [191; 192) 'x': impl Trait<u64> | 1147 | 191..192 'x': impl Trait<u64> |
1148 | [191; 198) 'x.foo()': u64 | 1148 | 191..198 'x.foo()': u64 |
1149 | [204; 205) 'y': &impl Trait<u64> | 1149 | 204..205 'y': &impl Trait<u64> |
1150 | [204; 211) 'y.foo()': u64 | 1150 | 204..211 'y.foo()': u64 |
1151 | [217; 218) 'z': impl Trait<u64> | 1151 | 217..218 'z': impl Trait<u64> |
1152 | [217; 224) 'z.foo()': u64 | 1152 | 217..224 'z.foo()': u64 |
1153 | [230; 231) 'x': impl Trait<u64> | 1153 | 230..231 'x': impl Trait<u64> |
1154 | [230; 238) 'x.foo2()': i64 | 1154 | 230..238 'x.foo2()': i64 |
1155 | [244; 245) 'y': &impl Trait<u64> | 1155 | 244..245 'y': &impl Trait<u64> |
1156 | [244; 252) 'y.foo2()': i64 | 1156 | 244..252 'y.foo2()': i64 |
1157 | [258; 259) 'z': impl Trait<u64> | 1157 | 258..259 'z': impl Trait<u64> |
1158 | [258; 266) 'z.foo2()': i64 | 1158 | 258..266 'z.foo2()': i64 |
1159 | "### | 1159 | "### |
1160 | ); | 1160 | ); |
1161 | } | 1161 | } |
@@ -1183,29 +1183,29 @@ fn test(x: dyn Trait<u64>, y: &dyn Trait<u64>) { | |||
1183 | } | 1183 | } |
1184 | "#), | 1184 | "#), |
1185 | @r###" | 1185 | @r###" |
1186 | [30; 34) 'self': &Self | 1186 | 30..34 'self': &Self |
1187 | [55; 59) 'self': &Self | 1187 | 55..59 'self': &Self |
1188 | [98; 100) '{}': () | 1188 | 98..100 '{}': () |
1189 | [110; 111) 'x': dyn Trait<u64> | 1189 | 110..111 'x': dyn Trait<u64> |
1190 | [129; 130) 'y': &dyn Trait<u64> | 1190 | 129..130 'y': &dyn Trait<u64> |
1191 | [149; 266) '{ ...2(); }': () | 1191 | 149..266 '{ ...2(); }': () |
1192 | [155; 156) 'x': dyn Trait<u64> | 1192 | 155..156 'x': dyn Trait<u64> |
1193 | [162; 163) 'y': &dyn Trait<u64> | 1193 | 162..163 'y': &dyn Trait<u64> |
1194 | [173; 174) 'z': dyn Trait<u64> | 1194 | 173..174 'z': dyn Trait<u64> |
1195 | [177; 180) 'bar': fn bar() -> dyn Trait<u64> | 1195 | 177..180 'bar': fn bar() -> dyn Trait<u64> |
1196 | [177; 182) 'bar()': dyn Trait<u64> | 1196 | 177..182 'bar()': dyn Trait<u64> |
1197 | [188; 189) 'x': dyn Trait<u64> | 1197 | 188..189 'x': dyn Trait<u64> |
1198 | [188; 195) 'x.foo()': u64 | 1198 | 188..195 'x.foo()': u64 |
1199 | [201; 202) 'y': &dyn Trait<u64> | 1199 | 201..202 'y': &dyn Trait<u64> |
1200 | [201; 208) 'y.foo()': u64 | 1200 | 201..208 'y.foo()': u64 |
1201 | [214; 215) 'z': dyn Trait<u64> | 1201 | 214..215 'z': dyn Trait<u64> |
1202 | [214; 221) 'z.foo()': u64 | 1202 | 214..221 'z.foo()': u64 |
1203 | [227; 228) 'x': dyn Trait<u64> | 1203 | 227..228 'x': dyn Trait<u64> |
1204 | [227; 235) 'x.foo2()': i64 | 1204 | 227..235 'x.foo2()': i64 |
1205 | [241; 242) 'y': &dyn Trait<u64> | 1205 | 241..242 'y': &dyn Trait<u64> |
1206 | [241; 249) 'y.foo2()': i64 | 1206 | 241..249 'y.foo2()': i64 |
1207 | [255; 256) 'z': dyn Trait<u64> | 1207 | 255..256 'z': dyn Trait<u64> |
1208 | [255; 263) 'z.foo2()': i64 | 1208 | 255..263 'z.foo2()': i64 |
1209 | "### | 1209 | "### |
1210 | ); | 1210 | ); |
1211 | } | 1211 | } |
@@ -1231,17 +1231,17 @@ fn test(s: S<u32, i32>) { | |||
1231 | } | 1231 | } |
1232 | "#), | 1232 | "#), |
1233 | @r###" | 1233 | @r###" |
1234 | [33; 37) 'self': &Self | 1234 | 33..37 'self': &Self |
1235 | [103; 107) 'self': &S<T, U> | 1235 | 103..107 'self': &S<T, U> |
1236 | [129; 140) '{ loop {} }': &dyn Trait<T, U> | 1236 | 129..140 '{ loop {} }': &dyn Trait<T, U> |
1237 | [131; 138) 'loop {}': ! | 1237 | 131..138 'loop {}': ! |
1238 | [136; 138) '{}': () | 1238 | 136..138 '{}': () |
1239 | [176; 180) 'self': &Self | 1239 | 176..180 'self': &Self |
1240 | [252; 253) 's': S<u32, i32> | 1240 | 252..253 's': S<u32, i32> |
1241 | [268; 290) '{ ...z(); }': () | 1241 | 268..290 '{ ...z(); }': () |
1242 | [274; 275) 's': S<u32, i32> | 1242 | 274..275 's': S<u32, i32> |
1243 | [274; 281) 's.bar()': &dyn Trait<u32, i32> | 1243 | 274..281 's.bar()': &dyn Trait<u32, i32> |
1244 | [274; 287) 's.bar().baz()': (u32, i32) | 1244 | 274..287 's.bar().baz()': (u32, i32) |
1245 | "### | 1245 | "### |
1246 | ); | 1246 | ); |
1247 | } | 1247 | } |
@@ -1265,22 +1265,22 @@ fn test(x: Trait, y: &Trait) -> u64 { | |||
1265 | } | 1265 | } |
1266 | "#), | 1266 | "#), |
1267 | @r###" | 1267 | @r###" |
1268 | [27; 31) 'self': &Self | 1268 | 27..31 'self': &Self |
1269 | [61; 63) '{}': () | 1269 | 61..63 '{}': () |
1270 | [73; 74) 'x': dyn Trait | 1270 | 73..74 'x': dyn Trait |
1271 | [83; 84) 'y': &dyn Trait | 1271 | 83..84 'y': &dyn Trait |
1272 | [101; 176) '{ ...o(); }': () | 1272 | 101..176 '{ ...o(); }': () |
1273 | [107; 108) 'x': dyn Trait | 1273 | 107..108 'x': dyn Trait |
1274 | [114; 115) 'y': &dyn Trait | 1274 | 114..115 'y': &dyn Trait |
1275 | [125; 126) 'z': dyn Trait | 1275 | 125..126 'z': dyn Trait |
1276 | [129; 132) 'bar': fn bar() -> dyn Trait | 1276 | 129..132 'bar': fn bar() -> dyn Trait |
1277 | [129; 134) 'bar()': dyn Trait | 1277 | 129..134 'bar()': dyn Trait |
1278 | [140; 141) 'x': dyn Trait | 1278 | 140..141 'x': dyn Trait |
1279 | [140; 147) 'x.foo()': u64 | 1279 | 140..147 'x.foo()': u64 |
1280 | [153; 154) 'y': &dyn Trait | 1280 | 153..154 'y': &dyn Trait |
1281 | [153; 160) 'y.foo()': u64 | 1281 | 153..160 'y.foo()': u64 |
1282 | [166; 167) 'z': dyn Trait | 1282 | 166..167 'z': dyn Trait |
1283 | [166; 173) 'z.foo()': u64 | 1283 | 166..173 'z.foo()': u64 |
1284 | "### | 1284 | "### |
1285 | ); | 1285 | ); |
1286 | } | 1286 | } |
@@ -1294,13 +1294,13 @@ fn test(a: impl Trait + 'lifetime, b: impl 'lifetime, c: impl (Trait), d: impl ( | |||
1294 | } | 1294 | } |
1295 | "#), | 1295 | "#), |
1296 | @r###" | 1296 | @r###" |
1297 | [24; 25) 'a': impl Trait + {error} | 1297 | 24..25 'a': impl Trait + {error} |
1298 | [51; 52) 'b': impl {error} | 1298 | 51..52 'b': impl {error} |
1299 | [70; 71) 'c': impl Trait | 1299 | 70..71 'c': impl Trait |
1300 | [87; 88) 'd': impl {error} | 1300 | 87..88 'd': impl {error} |
1301 | [108; 109) 'e': impl {error} | 1301 | 108..109 'e': impl {error} |
1302 | [124; 125) 'f': impl Trait + {error} | 1302 | 124..125 'f': impl Trait + {error} |
1303 | [148; 151) '{ }': () | 1303 | 148..151 '{ }': () |
1304 | "### | 1304 | "### |
1305 | ); | 1305 | ); |
1306 | } | 1306 | } |
@@ -1349,41 +1349,41 @@ fn test<T: Trait<Type = u32>>(x: T, y: impl Trait<Type = i64>) { | |||
1349 | } | 1349 | } |
1350 | "#), | 1350 | "#), |
1351 | @r###" | 1351 | @r###" |
1352 | [50; 51) 't': T | 1352 | 50..51 't': T |
1353 | [78; 80) '{}': () | 1353 | 78..80 '{}': () |
1354 | [112; 113) 't': T | 1354 | 112..113 't': T |
1355 | [123; 125) '{}': () | 1355 | 123..125 '{}': () |
1356 | [155; 156) 't': T | 1356 | 155..156 't': T |
1357 | [166; 169) '{t}': T | 1357 | 166..169 '{t}': T |
1358 | [167; 168) 't': T | 1358 | 167..168 't': T |
1359 | [257; 258) 'x': T | 1359 | 257..258 'x': T |
1360 | [263; 264) 'y': impl Trait<Type = i64> | 1360 | 263..264 'y': impl Trait<Type = i64> |
1361 | [290; 398) '{ ...r>); }': () | 1361 | 290..398 '{ ...r>); }': () |
1362 | [296; 299) 'get': fn get<T>(T) -> <T as Trait>::Type | 1362 | 296..299 'get': fn get<T>(T) -> <T as Trait>::Type |
1363 | [296; 302) 'get(x)': u32 | 1363 | 296..302 'get(x)': u32 |
1364 | [300; 301) 'x': T | 1364 | 300..301 'x': T |
1365 | [308; 312) 'get2': fn get2<u32, T>(T) -> u32 | 1365 | 308..312 'get2': fn get2<u32, T>(T) -> u32 |
1366 | [308; 315) 'get2(x)': u32 | 1366 | 308..315 'get2(x)': u32 |
1367 | [313; 314) 'x': T | 1367 | 313..314 'x': T |
1368 | [321; 324) 'get': fn get<impl Trait<Type = i64>>(impl Trait<Type = i64>) -> <impl Trait<Type = i64> as Trait>::Type | 1368 | 321..324 'get': fn get<impl Trait<Type = i64>>(impl Trait<Type = i64>) -> <impl Trait<Type = i64> as Trait>::Type |
1369 | [321; 327) 'get(y)': i64 | 1369 | 321..327 'get(y)': i64 |
1370 | [325; 326) 'y': impl Trait<Type = i64> | 1370 | 325..326 'y': impl Trait<Type = i64> |
1371 | [333; 337) 'get2': fn get2<i64, impl Trait<Type = i64>>(impl Trait<Type = i64>) -> i64 | 1371 | 333..337 'get2': fn get2<i64, impl Trait<Type = i64>>(impl Trait<Type = i64>) -> i64 |
1372 | [333; 340) 'get2(y)': i64 | 1372 | 333..340 'get2(y)': i64 |
1373 | [338; 339) 'y': impl Trait<Type = i64> | 1373 | 338..339 'y': impl Trait<Type = i64> |
1374 | [346; 349) 'get': fn get<S<u64>>(S<u64>) -> <S<u64> as Trait>::Type | 1374 | 346..349 'get': fn get<S<u64>>(S<u64>) -> <S<u64> as Trait>::Type |
1375 | [346; 357) 'get(set(S))': u64 | 1375 | 346..357 'get(set(S))': u64 |
1376 | [350; 353) 'set': fn set<S<u64>>(S<u64>) -> S<u64> | 1376 | 350..353 'set': fn set<S<u64>>(S<u64>) -> S<u64> |
1377 | [350; 356) 'set(S)': S<u64> | 1377 | 350..356 'set(S)': S<u64> |
1378 | [354; 355) 'S': S<u64> | 1378 | 354..355 'S': S<u64> |
1379 | [363; 367) 'get2': fn get2<u64, S<u64>>(S<u64>) -> u64 | 1379 | 363..367 'get2': fn get2<u64, S<u64>>(S<u64>) -> u64 |
1380 | [363; 375) 'get2(set(S))': u64 | 1380 | 363..375 'get2(set(S))': u64 |
1381 | [368; 371) 'set': fn set<S<u64>>(S<u64>) -> S<u64> | 1381 | 368..371 'set': fn set<S<u64>>(S<u64>) -> S<u64> |
1382 | [368; 374) 'set(S)': S<u64> | 1382 | 368..374 'set(S)': S<u64> |
1383 | [372; 373) 'S': S<u64> | 1383 | 372..373 'S': S<u64> |
1384 | [381; 385) 'get2': fn get2<str, S<str>>(S<str>) -> str | 1384 | 381..385 'get2': fn get2<str, S<str>>(S<str>) -> str |
1385 | [381; 395) 'get2(S::<str>)': str | 1385 | 381..395 'get2(S::<str>)': str |
1386 | [386; 394) 'S::<str>': S<str> | 1386 | 386..394 'S::<str>': S<str> |
1387 | "### | 1387 | "### |
1388 | ); | 1388 | ); |
1389 | } | 1389 | } |
@@ -1448,11 +1448,11 @@ fn test<T: Trait1<Type = u32>>(x: T) { | |||
1448 | } | 1448 | } |
1449 | "#), | 1449 | "#), |
1450 | @r###" | 1450 | @r###" |
1451 | [62; 66) 'self': Self | 1451 | 62..66 'self': Self |
1452 | [164; 165) 'x': T | 1452 | 164..165 'x': T |
1453 | [170; 186) '{ ...o(); }': () | 1453 | 170..186 '{ ...o(); }': () |
1454 | [176; 177) 'x': T | 1454 | 176..177 'x': T |
1455 | [176; 183) 'x.foo()': u32 | 1455 | 176..183 'x.foo()': u32 |
1456 | "### | 1456 | "### |
1457 | ); | 1457 | ); |
1458 | } | 1458 | } |
@@ -1494,15 +1494,15 @@ fn test<T: Trait1, U: Trait2>(x: T, y: U) { | |||
1494 | } | 1494 | } |
1495 | "#), | 1495 | "#), |
1496 | @r###" | 1496 | @r###" |
1497 | [50; 54) 'self': &Self | 1497 | 50..54 'self': &Self |
1498 | [63; 65) '{}': () | 1498 | 63..65 '{}': () |
1499 | [182; 183) 'x': T | 1499 | 182..183 'x': T |
1500 | [188; 189) 'y': U | 1500 | 188..189 'y': U |
1501 | [194; 223) '{ ...o(); }': () | 1501 | 194..223 '{ ...o(); }': () |
1502 | [200; 201) 'x': T | 1502 | 200..201 'x': T |
1503 | [200; 207) 'x.foo()': u32 | 1503 | 200..207 'x.foo()': u32 |
1504 | [213; 214) 'y': U | 1504 | 213..214 'y': U |
1505 | [213; 220) 'y.foo()': u32 | 1505 | 213..220 'y.foo()': u32 |
1506 | "### | 1506 | "### |
1507 | ); | 1507 | ); |
1508 | } | 1508 | } |
@@ -1523,12 +1523,12 @@ fn test(x: &impl Trait1) { | |||
1523 | } | 1523 | } |
1524 | "#), | 1524 | "#), |
1525 | @r###" | 1525 | @r###" |
1526 | [50; 54) 'self': &Self | 1526 | 50..54 'self': &Self |
1527 | [63; 65) '{}': () | 1527 | 63..65 '{}': () |
1528 | [116; 117) 'x': &impl Trait1 | 1528 | 116..117 'x': &impl Trait1 |
1529 | [133; 149) '{ ...o(); }': () | 1529 | 133..149 '{ ...o(); }': () |
1530 | [139; 140) 'x': &impl Trait1 | 1530 | 139..140 'x': &impl Trait1 |
1531 | [139; 146) 'x.foo()': u32 | 1531 | 139..146 'x.foo()': u32 |
1532 | "### | 1532 | "### |
1533 | ); | 1533 | ); |
1534 | } | 1534 | } |
@@ -1546,10 +1546,10 @@ fn test<T: A>(x: T) { | |||
1546 | } | 1546 | } |
1547 | "#), | 1547 | "#), |
1548 | @r###" | 1548 | @r###" |
1549 | [44; 45) 'x': T | 1549 | 44..45 'x': T |
1550 | [50; 66) '{ ...o(); }': () | 1550 | 50..66 '{ ...o(); }': () |
1551 | [56; 57) 'x': T | 1551 | 56..57 'x': T |
1552 | [56; 63) 'x.foo()': {unknown} | 1552 | 56..63 'x.foo()': {unknown} |
1553 | "### | 1553 | "### |
1554 | ); | 1554 | ); |
1555 | } | 1555 | } |
@@ -1573,17 +1573,17 @@ fn test() { | |||
1573 | } | 1573 | } |
1574 | "#), | 1574 | "#), |
1575 | @r###" | 1575 | @r###" |
1576 | [103; 104) 't': T | 1576 | 103..104 't': T |
1577 | [114; 116) '{}': () | 1577 | 114..116 '{}': () |
1578 | [146; 147) 't': T | 1578 | 146..147 't': T |
1579 | [157; 160) '{t}': T | 1579 | 157..160 '{t}': T |
1580 | [158; 159) 't': T | 1580 | 158..159 't': T |
1581 | [259; 280) '{ ...S)); }': () | 1581 | 259..280 '{ ...S)); }': () |
1582 | [265; 269) 'get2': fn get2<u64, S<u64>>(S<u64>) -> u64 | 1582 | 265..269 'get2': fn get2<u64, S<u64>>(S<u64>) -> u64 |
1583 | [265; 277) 'get2(set(S))': u64 | 1583 | 265..277 'get2(set(S))': u64 |
1584 | [270; 273) 'set': fn set<S<u64>>(S<u64>) -> S<u64> | 1584 | 270..273 'set': fn set<S<u64>>(S<u64>) -> S<u64> |
1585 | [270; 276) 'set(S)': S<u64> | 1585 | 270..276 'set(S)': S<u64> |
1586 | [274; 275) 'S': S<u64> | 1586 | 274..275 'S': S<u64> |
1587 | "### | 1587 | "### |
1588 | ); | 1588 | ); |
1589 | } | 1589 | } |
@@ -1603,15 +1603,15 @@ fn test<F: FnOnce(u32, u64) -> u128>(f: F) { | |||
1603 | } | 1603 | } |
1604 | "#), | 1604 | "#), |
1605 | @r###" | 1605 | @r###" |
1606 | [57; 61) 'self': Self | 1606 | 57..61 'self': Self |
1607 | [63; 67) 'args': Args | 1607 | 63..67 'args': Args |
1608 | [150; 151) 'f': F | 1608 | 150..151 'f': F |
1609 | [156; 184) '{ ...2)); }': () | 1609 | 156..184 '{ ...2)); }': () |
1610 | [162; 163) 'f': F | 1610 | 162..163 'f': F |
1611 | [162; 181) 'f.call...1, 2))': u128 | 1611 | 162..181 'f.call...1, 2))': u128 |
1612 | [174; 180) '(1, 2)': (u32, u64) | 1612 | 174..180 '(1, 2)': (u32, u64) |
1613 | [175; 176) '1': u32 | 1613 | 175..176 '1': u32 |
1614 | [178; 179) '2': u64 | 1614 | 178..179 '2': u64 |
1615 | "### | 1615 | "### |
1616 | ); | 1616 | ); |
1617 | } | 1617 | } |
@@ -1638,32 +1638,32 @@ fn test() { | |||
1638 | } | 1638 | } |
1639 | "#), | 1639 | "#), |
1640 | @r###" | 1640 | @r###" |
1641 | [148; 152) 'self': Option<T> | 1641 | 148..152 'self': Option<T> |
1642 | [154; 155) 'f': F | 1642 | 154..155 'f': F |
1643 | [173; 175) '{}': () | 1643 | 173..175 '{}': () |
1644 | [189; 308) '{ ... 1); }': () | 1644 | 189..308 '{ ... 1); }': () |
1645 | [199; 200) 'x': Option<u32> | 1645 | 199..200 'x': Option<u32> |
1646 | [203; 215) 'Option::Some': Some<u32>(u32) -> Option<u32> | 1646 | 203..215 'Option::Some': Some<u32>(u32) -> Option<u32> |
1647 | [203; 221) 'Option...(1u32)': Option<u32> | 1647 | 203..221 'Option...(1u32)': Option<u32> |
1648 | [216; 220) '1u32': u32 | 1648 | 216..220 '1u32': u32 |
1649 | [227; 228) 'x': Option<u32> | 1649 | 227..228 'x': Option<u32> |
1650 | [227; 243) 'x.map(...v + 1)': Option<u32> | 1650 | 227..243 'x.map(...v + 1)': Option<u32> |
1651 | [233; 242) '|v| v + 1': |u32| -> u32 | 1651 | 233..242 '|v| v + 1': |u32| -> u32 |
1652 | [234; 235) 'v': u32 | 1652 | 234..235 'v': u32 |
1653 | [237; 238) 'v': u32 | 1653 | 237..238 'v': u32 |
1654 | [237; 242) 'v + 1': u32 | 1654 | 237..242 'v + 1': u32 |
1655 | [241; 242) '1': u32 | 1655 | 241..242 '1': u32 |
1656 | [249; 250) 'x': Option<u32> | 1656 | 249..250 'x': Option<u32> |
1657 | [249; 265) 'x.map(... 1u64)': Option<u64> | 1657 | 249..265 'x.map(... 1u64)': Option<u64> |
1658 | [255; 264) '|_v| 1u64': |u32| -> u64 | 1658 | 255..264 '|_v| 1u64': |u32| -> u64 |
1659 | [256; 258) '_v': u32 | 1659 | 256..258 '_v': u32 |
1660 | [260; 264) '1u64': u64 | 1660 | 260..264 '1u64': u64 |
1661 | [275; 276) 'y': Option<i64> | 1661 | 275..276 'y': Option<i64> |
1662 | [292; 293) 'x': Option<u32> | 1662 | 292..293 'x': Option<u32> |
1663 | [292; 305) 'x.map(|_v| 1)': Option<i64> | 1663 | 292..305 'x.map(|_v| 1)': Option<i64> |
1664 | [298; 304) '|_v| 1': |u32| -> i64 | 1664 | 298..304 '|_v| 1': |u32| -> i64 |
1665 | [299; 301) '_v': u32 | 1665 | 299..301 '_v': u32 |
1666 | [303; 304) '1': i64 | 1666 | 303..304 '1': i64 |
1667 | "### | 1667 | "### |
1668 | ); | 1668 | ); |
1669 | } | 1669 | } |
@@ -1684,26 +1684,26 @@ fn test<F: FnOnce(u32) -> u64>(f: F) { | |||
1684 | } | 1684 | } |
1685 | "#), | 1685 | "#), |
1686 | @r###" | 1686 | @r###" |
1687 | [73; 74) 'f': F | 1687 | 73..74 'f': F |
1688 | [79; 155) '{ ...+ v; }': () | 1688 | 79..155 '{ ...+ v; }': () |
1689 | [85; 86) 'f': F | 1689 | 85..86 'f': F |
1690 | [85; 89) 'f(1)': {unknown} | 1690 | 85..89 'f(1)': {unknown} |
1691 | [87; 88) '1': i32 | 1691 | 87..88 '1': i32 |
1692 | [99; 100) 'g': |u64| -> i32 | 1692 | 99..100 'g': |u64| -> i32 |
1693 | [103; 112) '|v| v + 1': |u64| -> i32 | 1693 | 103..112 '|v| v + 1': |u64| -> i32 |
1694 | [104; 105) 'v': u64 | 1694 | 104..105 'v': u64 |
1695 | [107; 108) 'v': u64 | 1695 | 107..108 'v': u64 |
1696 | [107; 112) 'v + 1': i32 | 1696 | 107..112 'v + 1': i32 |
1697 | [111; 112) '1': i32 | 1697 | 111..112 '1': i32 |
1698 | [118; 119) 'g': |u64| -> i32 | 1698 | 118..119 'g': |u64| -> i32 |
1699 | [118; 125) 'g(1u64)': i32 | 1699 | 118..125 'g(1u64)': i32 |
1700 | [120; 124) '1u64': u64 | 1700 | 120..124 '1u64': u64 |
1701 | [135; 136) 'h': |u128| -> u128 | 1701 | 135..136 'h': |u128| -> u128 |
1702 | [139; 152) '|v| 1u128 + v': |u128| -> u128 | 1702 | 139..152 '|v| 1u128 + v': |u128| -> u128 |
1703 | [140; 141) 'v': u128 | 1703 | 140..141 'v': u128 |
1704 | [143; 148) '1u128': u128 | 1704 | 143..148 '1u128': u128 |
1705 | [143; 152) '1u128 + v': u128 | 1705 | 143..152 '1u128 + v': u128 |
1706 | [151; 152) 'v': u128 | 1706 | 151..152 'v': u128 |
1707 | "### | 1707 | "### |
1708 | ); | 1708 | ); |
1709 | } | 1709 | } |
@@ -1736,54 +1736,54 @@ fn test() { | |||
1736 | } | 1736 | } |
1737 | "#), | 1737 | "#), |
1738 | @r###" | 1738 | @r###" |
1739 | [95; 96) 'x': T | 1739 | 95..96 'x': T |
1740 | [101; 102) 'f': F | 1740 | 101..102 'f': F |
1741 | [112; 114) '{}': () | 1741 | 112..114 '{}': () |
1742 | [148; 149) 'f': F | 1742 | 148..149 'f': F |
1743 | [154; 155) 'x': T | 1743 | 154..155 'x': T |
1744 | [165; 167) '{}': () | 1744 | 165..167 '{}': () |
1745 | [202; 206) 'self': S | 1745 | 202..206 'self': S |
1746 | [254; 258) 'self': S | 1746 | 254..258 'self': S |
1747 | [260; 261) 'x': T | 1747 | 260..261 'x': T |
1748 | [266; 267) 'f': F | 1748 | 266..267 'f': F |
1749 | [277; 279) '{}': () | 1749 | 277..279 '{}': () |
1750 | [317; 321) 'self': S | 1750 | 317..321 'self': S |
1751 | [323; 324) 'f': F | 1751 | 323..324 'f': F |
1752 | [329; 330) 'x': T | 1752 | 329..330 'x': T |
1753 | [340; 342) '{}': () | 1753 | 340..342 '{}': () |
1754 | [356; 515) '{ ... S); }': () | 1754 | 356..515 '{ ... S); }': () |
1755 | [366; 368) 'x1': u64 | 1755 | 366..368 'x1': u64 |
1756 | [371; 375) 'foo1': fn foo1<S, u64, |S| -> u64>(S, |S| -> u64) -> u64 | 1756 | 371..375 'foo1': fn foo1<S, u64, |S| -> u64>(S, |S| -> u64) -> u64 |
1757 | [371; 394) 'foo1(S...hod())': u64 | 1757 | 371..394 'foo1(S...hod())': u64 |
1758 | [376; 377) 'S': S | 1758 | 376..377 'S': S |
1759 | [379; 393) '|s| s.method()': |S| -> u64 | 1759 | 379..393 '|s| s.method()': |S| -> u64 |
1760 | [380; 381) 's': S | 1760 | 380..381 's': S |
1761 | [383; 384) 's': S | 1761 | 383..384 's': S |
1762 | [383; 393) 's.method()': u64 | 1762 | 383..393 's.method()': u64 |
1763 | [404; 406) 'x2': u64 | 1763 | 404..406 'x2': u64 |
1764 | [409; 413) 'foo2': fn foo2<S, u64, |S| -> u64>(|S| -> u64, S) -> u64 | 1764 | 409..413 'foo2': fn foo2<S, u64, |S| -> u64>(|S| -> u64, S) -> u64 |
1765 | [409; 432) 'foo2(|...(), S)': u64 | 1765 | 409..432 'foo2(|...(), S)': u64 |
1766 | [414; 428) '|s| s.method()': |S| -> u64 | 1766 | 414..428 '|s| s.method()': |S| -> u64 |
1767 | [415; 416) 's': S | 1767 | 415..416 's': S |
1768 | [418; 419) 's': S | 1768 | 418..419 's': S |
1769 | [418; 428) 's.method()': u64 | 1769 | 418..428 's.method()': u64 |
1770 | [430; 431) 'S': S | 1770 | 430..431 'S': S |
1771 | [442; 444) 'x3': u64 | 1771 | 442..444 'x3': u64 |
1772 | [447; 448) 'S': S | 1772 | 447..448 'S': S |
1773 | [447; 472) 'S.foo1...hod())': u64 | 1773 | 447..472 'S.foo1...hod())': u64 |
1774 | [454; 455) 'S': S | 1774 | 454..455 'S': S |
1775 | [457; 471) '|s| s.method()': |S| -> u64 | 1775 | 457..471 '|s| s.method()': |S| -> u64 |
1776 | [458; 459) 's': S | 1776 | 458..459 's': S |
1777 | [461; 462) 's': S | 1777 | 461..462 's': S |
1778 | [461; 471) 's.method()': u64 | 1778 | 461..471 's.method()': u64 |
1779 | [482; 484) 'x4': u64 | 1779 | 482..484 'x4': u64 |
1780 | [487; 488) 'S': S | 1780 | 487..488 'S': S |
1781 | [487; 512) 'S.foo2...(), S)': u64 | 1781 | 487..512 'S.foo2...(), S)': u64 |
1782 | [494; 508) '|s| s.method()': |S| -> u64 | 1782 | 494..508 '|s| s.method()': |S| -> u64 |
1783 | [495; 496) 's': S | 1783 | 495..496 's': S |
1784 | [498; 499) 's': S | 1784 | 498..499 's': S |
1785 | [498; 508) 's.method()': u64 | 1785 | 498..508 's.method()': u64 |
1786 | [510; 511) 'S': S | 1786 | 510..511 'S': S |
1787 | "### | 1787 | "### |
1788 | ); | 1788 | ); |
1789 | } | 1789 | } |
@@ -1858,18 +1858,18 @@ impl Trait for S2 { | |||
1858 | } | 1858 | } |
1859 | "#, | 1859 | "#, |
1860 | ), @r###" | 1860 | ), @r###" |
1861 | [54; 58) 'self': &Self | 1861 | 54..58 'self': &Self |
1862 | [60; 61) 'x': Trait::Item<Self> | 1862 | 60..61 'x': Trait::Item<Self> |
1863 | [140; 144) 'self': &S | 1863 | 140..144 'self': &S |
1864 | [146; 147) 'x': u32 | 1864 | 146..147 'x': u32 |
1865 | [161; 175) '{ let y = x; }': () | 1865 | 161..175 '{ let y = x; }': () |
1866 | [167; 168) 'y': u32 | 1866 | 167..168 'y': u32 |
1867 | [171; 172) 'x': u32 | 1867 | 171..172 'x': u32 |
1868 | [242; 246) 'self': &S2 | 1868 | 242..246 'self': &S2 |
1869 | [248; 249) 'x': i32 | 1869 | 248..249 'x': i32 |
1870 | [265; 279) '{ let y = x; }': () | 1870 | 265..279 '{ let y = x; }': () |
1871 | [271; 272) 'y': i32 | 1871 | 271..272 'y': i32 |
1872 | [275; 276) 'x': i32 | 1872 | 275..276 'x': i32 |
1873 | "###); | 1873 | "###); |
1874 | } | 1874 | } |
1875 | 1875 | ||
@@ -2077,15 +2077,15 @@ impl TokenStream for Rustc { | |||
2077 | } | 2077 | } |
2078 | "#, true), | 2078 | "#, true), |
2079 | @r###" | 2079 | @r###" |
2080 | [1115; 1126) '{ loop {} }': T | 2080 | 1115..1126 '{ loop {} }': T |
2081 | [1117; 1124) 'loop {}': ! | 2081 | 1117..1124 'loop {}': ! |
2082 | [1122; 1124) '{}': () | 2082 | 1122..1124 '{}': () |
2083 | [1190; 1253) '{ ... }': {unknown} | 2083 | 1190..1253 '{ ... }': {unknown} |
2084 | [1204; 1209) 'group': {unknown} | 2084 | 1204..1209 'group': {unknown} |
2085 | [1225; 1229) 'make': fn make<{unknown}>() -> {unknown} | 2085 | 1225..1229 'make': fn make<{unknown}>() -> {unknown} |
2086 | [1225; 1231) 'make()': {unknown} | 2086 | 1225..1231 'make()': {unknown} |
2087 | [1241; 1245) 'make': fn make<{unknown}>() -> {unknown} | 2087 | 1241..1245 'make': fn make<{unknown}>() -> {unknown} |
2088 | [1241; 1247) 'make()': {unknown} | 2088 | 1241..1247 'make()': {unknown} |
2089 | "### | 2089 | "### |
2090 | ); | 2090 | ); |
2091 | } | 2091 | } |
@@ -2112,37 +2112,37 @@ fn test() -> impl Trait<i32> { | |||
2112 | } | 2112 | } |
2113 | "#, true), | 2113 | "#, true), |
2114 | @r###" | 2114 | @r###" |
2115 | [27; 28) 'x': impl Trait<u32> | 2115 | 27..28 'x': impl Trait<u32> |
2116 | [47; 58) '{ loop {} }': () | 2116 | 47..58 '{ loop {} }': () |
2117 | [49; 56) 'loop {}': ! | 2117 | 49..56 'loop {}': ! |
2118 | [54; 56) '{}': () | 2118 | 54..56 '{}': () |
2119 | [69; 70) 'x': impl Trait<T> | 2119 | 69..70 'x': impl Trait<T> |
2120 | [92; 103) '{ loop {} }': T | 2120 | 92..103 '{ loop {} }': T |
2121 | [94; 101) 'loop {}': ! | 2121 | 94..101 'loop {}': ! |
2122 | [99; 101) '{}': () | 2122 | 99..101 '{}': () |
2123 | [172; 183) '{ loop {} }': T | 2123 | 172..183 '{ loop {} }': T |
2124 | [174; 181) 'loop {}': ! | 2124 | 174..181 'loop {}': ! |
2125 | [179; 181) '{}': () | 2125 | 179..181 '{}': () |
2126 | [214; 310) '{ ...t()) }': S<{unknown}> | 2126 | 214..310 '{ ...t()) }': S<{unknown}> |
2127 | [224; 226) 's1': S<u32> | 2127 | 224..226 's1': S<u32> |
2128 | [229; 230) 'S': S<u32>(u32) -> S<u32> | 2128 | 229..230 'S': S<u32>(u32) -> S<u32> |
2129 | [229; 241) 'S(default())': S<u32> | 2129 | 229..241 'S(default())': S<u32> |
2130 | [231; 238) 'default': fn default<u32>() -> u32 | 2130 | 231..238 'default': fn default<u32>() -> u32 |
2131 | [231; 240) 'default()': u32 | 2131 | 231..240 'default()': u32 |
2132 | [247; 250) 'foo': fn foo(S<u32>) | 2132 | 247..250 'foo': fn foo(S<u32>) |
2133 | [247; 254) 'foo(s1)': () | 2133 | 247..254 'foo(s1)': () |
2134 | [251; 253) 's1': S<u32> | 2134 | 251..253 's1': S<u32> |
2135 | [264; 265) 'x': i32 | 2135 | 264..265 'x': i32 |
2136 | [273; 276) 'bar': fn bar<i32>(S<i32>) -> i32 | 2136 | 273..276 'bar': fn bar<i32>(S<i32>) -> i32 |
2137 | [273; 290) 'bar(S(...lt()))': i32 | 2137 | 273..290 'bar(S(...lt()))': i32 |
2138 | [277; 278) 'S': S<i32>(i32) -> S<i32> | 2138 | 277..278 'S': S<i32>(i32) -> S<i32> |
2139 | [277; 289) 'S(default())': S<i32> | 2139 | 277..289 'S(default())': S<i32> |
2140 | [279; 286) 'default': fn default<i32>() -> i32 | 2140 | 279..286 'default': fn default<i32>() -> i32 |
2141 | [279; 288) 'default()': i32 | 2141 | 279..288 'default()': i32 |
2142 | [296; 297) 'S': S<{unknown}>({unknown}) -> S<{unknown}> | 2142 | 296..297 'S': S<{unknown}>({unknown}) -> S<{unknown}> |
2143 | [296; 308) 'S(default())': S<{unknown}> | 2143 | 296..308 'S(default())': S<{unknown}> |
2144 | [298; 305) 'default': fn default<{unknown}>() -> {unknown} | 2144 | 298..305 'default': fn default<{unknown}>() -> {unknown} |
2145 | [298; 307) 'default()': {unknown} | 2145 | 298..307 'default()': {unknown} |
2146 | "### | 2146 | "### |
2147 | ); | 2147 | ); |
2148 | } | 2148 | } |
@@ -2176,15 +2176,15 @@ fn main() { | |||
2176 | } | 2176 | } |
2177 | "#), | 2177 | "#), |
2178 | @r###" | 2178 | @r###" |
2179 | [147; 149) '_v': F | 2179 | 147..149 '_v': F |
2180 | [192; 195) '{ }': () | 2180 | 192..195 '{ }': () |
2181 | [207; 238) '{ ... }); }': () | 2181 | 207..238 '{ ... }); }': () |
2182 | [213; 223) 'f::<(), _>': fn f<(), |&()| -> ()>(|&()| -> ()) | 2182 | 213..223 'f::<(), _>': fn f<(), |&()| -> ()>(|&()| -> ()) |
2183 | [213; 235) 'f::<()... z; })': () | 2183 | 213..235 'f::<()... z; })': () |
2184 | [224; 234) '|z| { z; }': |&()| -> () | 2184 | 224..234 '|z| { z; }': |&()| -> () |
2185 | [225; 226) 'z': &() | 2185 | 225..226 'z': &() |
2186 | [228; 234) '{ z; }': () | 2186 | 228..234 '{ z; }': () |
2187 | [230; 231) 'z': &() | 2187 | 230..231 'z': &() |
2188 | "### | 2188 | "### |
2189 | ); | 2189 | ); |
2190 | } | 2190 | } |
@@ -2337,46 +2337,46 @@ fn main() { | |||
2337 | } | 2337 | } |
2338 | "#), | 2338 | "#), |
2339 | @r###" | 2339 | @r###" |
2340 | [240; 244) 'self': Self | 2340 | 240..244 'self': Self |
2341 | [246; 247) 'f': F | 2341 | 246..247 'f': F |
2342 | [331; 342) '{ loop {} }': FilterMap<Self, F> | 2342 | 331..342 '{ loop {} }': FilterMap<Self, F> |
2343 | [333; 340) 'loop {}': ! | 2343 | 333..340 'loop {}': ! |
2344 | [338; 340) '{}': () | 2344 | 338..340 '{}': () |
2345 | [363; 367) 'self': Self | 2345 | 363..367 'self': Self |
2346 | [369; 370) 'f': F | 2346 | 369..370 'f': F |
2347 | [419; 430) '{ loop {} }': () | 2347 | 419..430 '{ loop {} }': () |
2348 | [421; 428) 'loop {}': ! | 2348 | 421..428 'loop {}': ! |
2349 | [426; 428) '{}': () | 2349 | 426..428 '{}': () |
2350 | [539; 543) 'self': Self | 2350 | 539..543 'self': Self |
2351 | [868; 872) 'self': I | 2351 | 868..872 'self': I |
2352 | [879; 899) '{ ... }': I | 2352 | 879..899 '{ ... }': I |
2353 | [889; 893) 'self': I | 2353 | 889..893 'self': I |
2354 | [958; 969) '{ loop {} }': Vec<T> | 2354 | 958..969 '{ loop {} }': Vec<T> |
2355 | [960; 967) 'loop {}': ! | 2355 | 960..967 'loop {}': ! |
2356 | [965; 967) '{}': () | 2356 | 965..967 '{}': () |
2357 | [1156; 1287) '{ ... }); }': () | 2357 | 1156..1287 '{ ... }); }': () |
2358 | [1162; 1177) 'Vec::<i32>::new': fn new<i32>() -> Vec<i32> | 2358 | 1162..1177 'Vec::<i32>::new': fn new<i32>() -> Vec<i32> |
2359 | [1162; 1179) 'Vec::<...:new()': Vec<i32> | 2359 | 1162..1179 'Vec::<...:new()': Vec<i32> |
2360 | [1162; 1191) 'Vec::<...iter()': IntoIter<i32> | 2360 | 1162..1191 'Vec::<...iter()': IntoIter<i32> |
2361 | [1162; 1256) 'Vec::<...one })': FilterMap<IntoIter<i32>, |i32| -> Option<u32>> | 2361 | 1162..1256 'Vec::<...one })': FilterMap<IntoIter<i32>, |i32| -> Option<u32>> |
2362 | [1162; 1284) 'Vec::<... y; })': () | 2362 | 1162..1284 'Vec::<... y; })': () |
2363 | [1210; 1255) '|x| if...None }': |i32| -> Option<u32> | 2363 | 1210..1255 '|x| if...None }': |i32| -> Option<u32> |
2364 | [1211; 1212) 'x': i32 | 2364 | 1211..1212 'x': i32 |
2365 | [1214; 1255) 'if x >...None }': Option<u32> | 2365 | 1214..1255 'if x >...None }': Option<u32> |
2366 | [1217; 1218) 'x': i32 | 2366 | 1217..1218 'x': i32 |
2367 | [1217; 1222) 'x > 0': bool | 2367 | 1217..1222 'x > 0': bool |
2368 | [1221; 1222) '0': i32 | 2368 | 1221..1222 '0': i32 |
2369 | [1223; 1241) '{ Some...u32) }': Option<u32> | 2369 | 1223..1241 '{ Some...u32) }': Option<u32> |
2370 | [1225; 1229) 'Some': Some<u32>(u32) -> Option<u32> | 2370 | 1225..1229 'Some': Some<u32>(u32) -> Option<u32> |
2371 | [1225; 1239) 'Some(x as u32)': Option<u32> | 2371 | 1225..1239 'Some(x as u32)': Option<u32> |
2372 | [1230; 1231) 'x': i32 | 2372 | 1230..1231 'x': i32 |
2373 | [1230; 1238) 'x as u32': u32 | 2373 | 1230..1238 'x as u32': u32 |
2374 | [1247; 1255) '{ None }': Option<u32> | 2374 | 1247..1255 '{ None }': Option<u32> |
2375 | [1249; 1253) 'None': Option<u32> | 2375 | 1249..1253 'None': Option<u32> |
2376 | [1273; 1283) '|y| { y; }': |u32| -> () | 2376 | 1273..1283 '|y| { y; }': |u32| -> () |
2377 | [1274; 1275) 'y': u32 | 2377 | 1274..1275 'y': u32 |
2378 | [1277; 1283) '{ y; }': () | 2378 | 1277..1283 '{ y; }': () |
2379 | [1279; 1280) 'y': u32 | 2379 | 1279..1280 'y': u32 |
2380 | "### | 2380 | "### |
2381 | ); | 2381 | ); |
2382 | } | 2382 | } |
@@ -2428,13 +2428,13 @@ fn test(x: &dyn Foo) { | |||
2428 | } | 2428 | } |
2429 | "#, true), | 2429 | "#, true), |
2430 | @r###" | 2430 | @r###" |
2431 | [22; 23) 'x': &dyn Foo | 2431 | 22..23 'x': &dyn Foo |
2432 | [35; 37) '{}': () | 2432 | 35..37 '{}': () |
2433 | [47; 48) 'x': &dyn Foo | 2433 | 47..48 'x': &dyn Foo |
2434 | [60; 75) '{ foo(x); }': () | 2434 | 60..75 '{ foo(x); }': () |
2435 | [66; 69) 'foo': fn foo(&dyn Foo) | 2435 | 66..69 'foo': fn foo(&dyn Foo) |
2436 | [66; 72) 'foo(x)': () | 2436 | 66..72 'foo(x)': () |
2437 | [70; 71) 'x': &dyn Foo | 2437 | 70..71 'x': &dyn Foo |
2438 | "### | 2438 | "### |
2439 | ); | 2439 | ); |
2440 | } | 2440 | } |