aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-03-23 07:53:48 +0000
committerAleksey Kladov <[email protected]>2019-03-23 08:07:09 +0000
commit4fd8cfd6adc554752a63aed9ed71d44b372ec4dc (patch)
treeb96c4a3c4f1165fd394ce3a854dbe9e02d370a92
parent2394a2ee35b40b1cb87369079860edf06d3b5a53 (diff)
replace todo with fixme
-rw-r--r--crates/ra_db/src/input.rs2
-rw-r--r--crates/ra_hir/src/code_model_api.rs10
-rw-r--r--crates/ra_hir/src/expr.rs14
-rw-r--r--crates/ra_hir/src/expr/scope.rs4
-rw-r--r--crates/ra_hir/src/generics.rs2
-rw-r--r--crates/ra_hir/src/impl_block.rs2
-rw-r--r--crates/ra_hir/src/nameres.rs2
-rw-r--r--crates/ra_hir/src/path.rs6
-rw-r--r--crates/ra_hir/src/resolve.rs4
-rw-r--r--crates/ra_hir/src/source_binder.rs6
-rw-r--r--crates/ra_hir/src/ty/autoderef.rs2
-rw-r--r--crates/ra_hir/src/ty/infer.rs46
-rw-r--r--crates/ra_hir/src/ty/lower.rs6
-rw-r--r--crates/ra_hir/src/ty/method_resolution.rs2
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs2
-rw-r--r--crates/ra_ide_api/src/completion/complete_pattern.rs2
-rw-r--r--crates/ra_ide_api/src/completion/complete_struct_literal.rs2
-rw-r--r--crates/ra_ide_api/src/goto_definition.rs2
-rw-r--r--crates/ra_ide_api/src/hover.rs2
-rw-r--r--crates/ra_ide_api/src/line_index.rs2
-rw-r--r--crates/ra_ide_api/src/symbol_index.rs2
-rw-r--r--crates/ra_parser/src/grammar/items/consts.rs2
-rw-r--r--crates/ra_parser/src/grammar/items/nominal.rs2
-rw-r--r--crates/ra_parser/src/grammar/items/traits.rs2
-rw-r--r--crates/ra_parser/src/grammar/items/use_item.rs4
-rw-r--r--crates/ra_parser/src/parser.rs4
-rw-r--r--crates/ra_project_model/src/lib.rs2
-rw-r--r--crates/ra_syntax/src/validation/char.rs2
-rw-r--r--crates/ra_syntax/tests/test.rs2
29 files changed, 71 insertions, 71 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index 2b1001d48..a5f4e489f 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -136,7 +136,7 @@ impl CrateGraph {
136 self.arena[&crate_id].edition 136 self.arena[&crate_id].edition
137 } 137 }
138 138
139 // TODO: this only finds one crate with the given root; we could have multiple 139 // FIXME: this only finds one crate with the given root; we could have multiple
140 pub fn crate_id_for_crate_root(&self, file_id: FileId) -> Option<CrateId> { 140 pub fn crate_id_for_crate_root(&self, file_id: FileId) -> Option<CrateId> {
141 let (&crate_id, _) = self.arena.iter().find(|(_crate_id, data)| data.file_id == file_id)?; 141 let (&crate_id, _) = self.arena.iter().find(|(_crate_id, data)| data.file_id == file_id)?;
142 Some(crate_id) 142 Some(crate_id)
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs
index b00481cd5..62301e4ab 100644
--- a/crates/ra_hir/src/code_model_api.rs
+++ b/crates/ra_hir/src/code_model_api.rs
@@ -51,7 +51,7 @@ impl Crate {
51 crate_graph.edition(self.crate_id) 51 crate_graph.edition(self.crate_id)
52 } 52 }
53 53
54 // TODO: should this be in source_binder? 54 // FIXME: should this be in source_binder?
55 pub fn source_root_crates( 55 pub fn source_root_crates(
56 db: &impl PersistentHirDatabase, 56 db: &impl PersistentHirDatabase,
57 source_root: SourceRootId, 57 source_root: SourceRootId,
@@ -301,7 +301,7 @@ impl Struct {
301 db.type_for_def((*self).into(), Namespace::Values) 301 db.type_for_def((*self).into(), Namespace::Values)
302 } 302 }
303 303
304 // TODO move to a more general type 304 // FIXME move to a more general type
305 /// Builds a resolver for type references inside this struct. 305 /// Builds a resolver for type references inside this struct.
306 pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { 306 pub fn resolver(&self, db: &impl HirDatabase) -> Resolver {
307 // take the outer scope... 307 // take the outer scope...
@@ -361,7 +361,7 @@ impl Enum {
361 db.type_for_def((*self).into(), Namespace::Types) 361 db.type_for_def((*self).into(), Namespace::Types)
362 } 362 }
363 363
364 // TODO: move to a more general type 364 // FIXME: move to a more general type
365 /// Builds a resolver for type references inside this struct. 365 /// Builds a resolver for type references inside this struct.
366 pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { 366 pub fn resolver(&self, db: &impl HirDatabase) -> Resolver {
367 // take the outer scope... 367 // take the outer scope...
@@ -513,7 +513,7 @@ impl Function {
513 ImplBlock::containing(module_impls, (*self).into()) 513 ImplBlock::containing(module_impls, (*self).into())
514 } 514 }
515 515
516 // TODO: move to a more general type for 'body-having' items 516 // FIXME: move to a more general type for 'body-having' items
517 /// Builds a resolver for code inside this item. 517 /// Builds a resolver for code inside this item.
518 pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { 518 pub fn resolver(&self, db: &impl HirDatabase) -> Resolver {
519 // take the outer scope... 519 // take the outer scope...
@@ -558,7 +558,7 @@ impl Const {
558 ImplBlock::containing(module_impls, (*self).into()) 558 ImplBlock::containing(module_impls, (*self).into())
559 } 559 }
560 560
561 // TODO: move to a more general type for 'body-having' items 561 // FIXME: move to a more general type for 'body-having' items
562 /// Builds a resolver for code inside this item. 562 /// Builds a resolver for code inside this item.
563 pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { 563 pub fn resolver(&self, db: &impl HirDatabase) -> Resolver {
564 // take the outer scope... 564 // take the outer scope...
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 0fadab560..703d99d9b 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -27,7 +27,7 @@ impl_arena_id!(ExprId);
27/// The body of an item (function, const etc.). 27/// The body of an item (function, const etc.).
28#[derive(Debug, Eq, PartialEq)] 28#[derive(Debug, Eq, PartialEq)]
29pub struct Body { 29pub struct Body {
30 // TODO: this should be more general, consts & statics also have bodies 30 // FIXME: this should be more general, consts & statics also have bodies
31 /// The Function of the item this body belongs to 31 /// The Function of the item this body belongs to
32 owner: Function, 32 owner: Function,
33 exprs: Arena<ExprId, Expr>, 33 exprs: Arena<ExprId, Expr>,
@@ -406,7 +406,7 @@ pub enum Pat {
406 Struct { 406 Struct {
407 path: Option<Path>, 407 path: Option<Path>,
408 args: Vec<FieldPat>, 408 args: Vec<FieldPat>,
409 // TODO: 'ellipsis' option 409 // FIXME: 'ellipsis' option
410 }, 410 },
411 Range { 411 Range {
412 start: ExprId, 412 start: ExprId,
@@ -547,7 +547,7 @@ impl ExprCollector {
547 if condition.pat().is_none() { 547 if condition.pat().is_none() {
548 self.collect_expr_opt(condition.expr()) 548 self.collect_expr_opt(condition.expr())
549 } else { 549 } else {
550 // TODO handle while let 550 // FIXME handle while let
551 return self.alloc_expr(Expr::Missing, syntax_ptr); 551 return self.alloc_expr(Expr::Missing, syntax_ptr);
552 } 552 }
553 } else { 553 } else {
@@ -610,7 +610,7 @@ impl ExprCollector {
610 self.alloc_expr(path, syntax_ptr) 610 self.alloc_expr(path, syntax_ptr)
611 } 611 }
612 ast::ExprKind::ContinueExpr(_e) => { 612 ast::ExprKind::ContinueExpr(_e) => {
613 // TODO: labels 613 // FIXME: labels
614 self.alloc_expr(Expr::Continue, syntax_ptr) 614 self.alloc_expr(Expr::Continue, syntax_ptr)
615 } 615 }
616 ast::ExprKind::BreakExpr(e) => { 616 ast::ExprKind::BreakExpr(e) => {
@@ -751,7 +751,7 @@ impl ExprCollector {
751 self.alloc_expr(Expr::Literal(lit), syntax_ptr) 751 self.alloc_expr(Expr::Literal(lit), syntax_ptr)
752 } 752 }
753 753
754 // TODO implement HIR for these: 754 // FIXME implement HIR for these:
755 ast::ExprKind::Label(_e) => self.alloc_expr(Expr::Missing, syntax_ptr), 755 ast::ExprKind::Label(_e) => self.alloc_expr(Expr::Missing, syntax_ptr),
756 ast::ExprKind::IndexExpr(_e) => self.alloc_expr(Expr::Missing, syntax_ptr), 756 ast::ExprKind::IndexExpr(_e) => self.alloc_expr(Expr::Missing, syntax_ptr),
757 ast::ExprKind::RangeExpr(_e) => self.alloc_expr(Expr::Missing, syntax_ptr), 757 ast::ExprKind::RangeExpr(_e) => self.alloc_expr(Expr::Missing, syntax_ptr),
@@ -844,7 +844,7 @@ impl ExprCollector {
844 Pat::Struct { path, args: fields } 844 Pat::Struct { path, args: fields }
845 } 845 }
846 846
847 // TODO: implement 847 // FIXME: implement
848 ast::PatKind::LiteralPat(_) => Pat::Missing, 848 ast::PatKind::LiteralPat(_) => Pat::Missing,
849 ast::PatKind::SlicePat(_) | ast::PatKind::RangePat(_) => Pat::Missing, 849 ast::PatKind::SlicePat(_) | ast::PatKind::RangePat(_) => Pat::Missing,
850 }; 850 };
@@ -910,7 +910,7 @@ pub(crate) fn body_with_source_map_query(
910) -> (Arc<Body>, Arc<BodySourceMap>) { 910) -> (Arc<Body>, Arc<BodySourceMap>) {
911 let mut collector = ExprCollector::new(func); 911 let mut collector = ExprCollector::new(func);
912 912
913 // TODO: consts, etc. 913 // FIXME: consts, etc.
914 collector.collect_fn_body(&func.source(db).1); 914 collector.collect_fn_body(&func.source(db).1);
915 915
916 let (body, source_map) = collector.finish(); 916 let (body, source_map) = collector.finish();
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs
index 81fbc509e..ed005c9f7 100644
--- a/crates/ra_hir/src/expr/scope.rs
+++ b/crates/ra_hir/src/expr/scope.rs
@@ -39,7 +39,7 @@ pub struct ScopeData {
39} 39}
40 40
41impl ExprScopes { 41impl ExprScopes {
42 // TODO: This should take something more general than Function 42 // FIXME: This should take something more general than Function
43 pub(crate) fn expr_scopes_query(db: &impl HirDatabase, function: Function) -> Arc<ExprScopes> { 43 pub(crate) fn expr_scopes_query(db: &impl HirDatabase, function: Function) -> Arc<ExprScopes> {
44 let body = db.body_hir(function); 44 let body = db.body_hir(function);
45 let res = ExprScopes::new(body); 45 let res = ExprScopes::new(body);
@@ -148,7 +148,7 @@ impl ScopesWithSourceMap {
148 148
149 // XXX: during completion, cursor might be outside of any particular 149 // XXX: during completion, cursor might be outside of any particular
150 // expression. Try to figure out the correct scope... 150 // expression. Try to figure out the correct scope...
151 // TODO: move this to source binder? 151 // FIXME: move this to source binder?
152 fn adjust(&self, ptr: SyntaxNodePtr, original_scope: ScopeId, offset: TextUnit) -> ScopeId { 152 fn adjust(&self, ptr: SyntaxNodePtr, original_scope: ScopeId, offset: TextUnit) -> ScopeId {
153 let r = ptr.range(); 153 let r = ptr.range();
154 let child_scopes = self 154 let child_scopes = self
diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs
index 0f759a235..498ed04f2 100644
--- a/crates/ra_hir/src/generics.rs
+++ b/crates/ra_hir/src/generics.rs
@@ -15,7 +15,7 @@ use crate::{
15/// Data about a generic parameter (to a function, struct, impl, ...). 15/// Data about a generic parameter (to a function, struct, impl, ...).
16#[derive(Clone, PartialEq, Eq, Debug)] 16#[derive(Clone, PartialEq, Eq, Debug)]
17pub struct GenericParam { 17pub struct GenericParam {
18 // TODO: give generic params proper IDs 18 // FIXME: give generic params proper IDs
19 pub(crate) idx: u32, 19 pub(crate) idx: u32,
20 pub(crate) name: Name, 20 pub(crate) name: Name,
21} 21}
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs
index 8807a4b56..0d3861a28 100644
--- a/crates/ra_hir/src/impl_block.rs
+++ b/crates/ra_hir/src/impl_block.rs
@@ -161,7 +161,7 @@ impl ImplData {
161} 161}
162 162
163#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 163#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
164//TODO: rename to ImplDef? 164//FIXME: rename to ImplDef?
165pub enum ImplItem { 165pub enum ImplItem {
166 Method(Function), 166 Method(Function),
167 Const(Const), 167 Const(Const),
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs
index edd2f25f7..e9235bc59 100644
--- a/crates/ra_hir/src/nameres.rs
+++ b/crates/ra_hir/src/nameres.rs
@@ -296,7 +296,7 @@ impl CrateDefMap {
296 // plain import or absolute path in 2015: crate-relative with 296 // plain import or absolute path in 2015: crate-relative with
297 // fallback to extern prelude (with the simplification in 297 // fallback to extern prelude (with the simplification in
298 // rust-lang/rust#57745) 298 // rust-lang/rust#57745)
299 // TODO there must be a nicer way to write this condition 299 // FIXME there must be a nicer way to write this condition
300 PathKind::Plain | PathKind::Abs 300 PathKind::Plain | PathKind::Abs
301 if self.edition == Edition::Edition2015 301 if self.edition == Edition::Edition2015
302 && (path.kind == PathKind::Abs || mode == ResolveMode::Import) => 302 && (path.kind == PathKind::Abs || mode == ResolveMode::Import) =>
diff --git a/crates/ra_hir/src/path.rs b/crates/ra_hir/src/path.rs
index 6ca373e34..6cc8104f4 100644
--- a/crates/ra_hir/src/path.rs
+++ b/crates/ra_hir/src/path.rs
@@ -96,7 +96,7 @@ impl Path {
96 if let Some(q) = path.qualifier() { 96 if let Some(q) = path.qualifier() {
97 return Some(q); 97 return Some(q);
98 } 98 }
99 // TODO: this bottom up traversal is not too precise. 99 // FIXME: this bottom up traversal is not too precise.
100 // Should we handle do a top-down analysis, recording results? 100 // Should we handle do a top-down analysis, recording results?
101 let use_tree_list = path.syntax().ancestors().find_map(ast::UseTreeList::cast)?; 101 let use_tree_list = path.syntax().ancestors().find_map(ast::UseTreeList::cast)?;
102 let use_tree = use_tree_list.parent_use_tree(); 102 let use_tree = use_tree_list.parent_use_tree();
@@ -166,7 +166,7 @@ fn expand_use_tree<'a>(
166 // or `use something::{path::{inner::{innerer}}}` (prefix is `something::path`, path is `inner`) 166 // or `use something::{path::{inner::{innerer}}}` (prefix is `something::path`, path is `inner`)
167 Some(path) => match convert_path(prefix, path) { 167 Some(path) => match convert_path(prefix, path) {
168 Some(it) => Some(it), 168 Some(it) => Some(it),
169 None => return, // TODO: report errors somewhere 169 None => return, // FIXME: report errors somewhere
170 }, 170 },
171 }; 171 };
172 for child_tree in use_tree_list.use_trees() { 172 for child_tree in use_tree_list.use_trees() {
@@ -194,7 +194,7 @@ fn expand_use_tree<'a>(
194 cb(path, Some(segment), alias) 194 cb(path, Some(segment), alias)
195 }; 195 };
196 } 196 }
197 // TODO: report errors somewhere 197 // FIXME: report errors somewhere
198 // We get here if we do 198 // We get here if we do
199 } 199 }
200 } 200 }
diff --git a/crates/ra_hir/src/resolve.rs b/crates/ra_hir/src/resolve.rs
index 59af4ec60..f28154517 100644
--- a/crates/ra_hir/src/resolve.rs
+++ b/crates/ra_hir/src/resolve.rs
@@ -19,7 +19,7 @@ pub struct Resolver {
19 scopes: Vec<Scope>, 19 scopes: Vec<Scope>,
20} 20}
21 21
22// TODO how to store these best 22// FIXME how to store these best
23#[derive(Debug, Clone)] 23#[derive(Debug, Clone)]
24pub(crate) struct ModuleItemMap { 24pub(crate) struct ModuleItemMap {
25 crate_def_map: Arc<CrateDefMap>, 25 crate_def_map: Arc<CrateDefMap>,
@@ -260,7 +260,7 @@ impl Scope {
260 fn collect_names(&self, db: &impl HirDatabase, f: &mut dyn FnMut(Name, PerNs<Resolution>)) { 260 fn collect_names(&self, db: &impl HirDatabase, f: &mut dyn FnMut(Name, PerNs<Resolution>)) {
261 match self { 261 match self {
262 Scope::ModuleScope(m) => { 262 Scope::ModuleScope(m) => {
263 // TODO: should we provide `self` here? 263 // FIXME: should we provide `self` here?
264 // f( 264 // f(
265 // Name::self_param(), 265 // Name::self_param(),
266 // PerNs::types(Resolution::Def { 266 // PerNs::types(Resolution::Def {
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 902110913..3645b73b4 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -164,7 +164,7 @@ pub fn resolver_for_position(db: &impl HirDatabase, position: FilePosition) -> R
164 let scope = scopes.scope_for_offset(position.offset); 164 let scope = scopes.scope_for_offset(position.offset);
165 Some(expr::resolver_for_scope(func.body(db), db, scope)) 165 Some(expr::resolver_for_scope(func.body(db), db, scope))
166 } else { 166 } else {
167 // TODO const/static/array length 167 // FIXME const/static/array length
168 None 168 None
169 } 169 }
170 } else { 170 } else {
@@ -184,7 +184,7 @@ pub fn resolver_for_node(db: &impl HirDatabase, file_id: FileId, node: &SyntaxNo
184 let scope = scopes.scope_for(&node); 184 let scope = scopes.scope_for(&node);
185 Some(expr::resolver_for_scope(func.body(db), db, scope)) 185 Some(expr::resolver_for_scope(func.body(db), db, scope))
186 } else { 186 } else {
187 // TODO const/static/array length 187 // FIXME const/static/array length
188 None 188 None
189 } 189 }
190 } else { 190 } else {
@@ -212,7 +212,7 @@ fn try_get_resolver_for_node(
212 } else if let Some(f) = ast::FnDef::cast(node) { 212 } else if let Some(f) = ast::FnDef::cast(node) {
213 function_from_source(db, file_id, f).map(|f| f.resolver(db)) 213 function_from_source(db, file_id, f).map(|f| f.resolver(db))
214 } else { 214 } else {
215 // TODO add missing cases 215 // FIXME add missing cases
216 None 216 None
217 } 217 }
218} 218}
diff --git a/crates/ra_hir/src/ty/autoderef.rs b/crates/ra_hir/src/ty/autoderef.rs
index d95879e46..ab5f008ef 100644
--- a/crates/ra_hir/src/ty/autoderef.rs
+++ b/crates/ra_hir/src/ty/autoderef.rs
@@ -15,7 +15,7 @@ impl Ty {
15 } 15 }
16 16
17 fn autoderef_step(&self, _db: &impl HirDatabase) -> Option<Ty> { 17 fn autoderef_step(&self, _db: &impl HirDatabase) -> Option<Ty> {
18 // TODO Deref::deref 18 // FIXME Deref::deref
19 self.builtin_deref() 19 self.builtin_deref()
20 } 20 }
21} 21}
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs
index 7cf465266..132ee0ca2 100644
--- a/crates/ra_hir/src/ty/infer.rs
+++ b/crates/ra_hir/src/ty/infer.rs
@@ -207,7 +207,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
207 fn make_ty(&mut self, type_ref: &TypeRef) -> Ty { 207 fn make_ty(&mut self, type_ref: &TypeRef) -> Ty {
208 let ty = Ty::from_hir( 208 let ty = Ty::from_hir(
209 self.db, 209 self.db,
210 // TODO use right resolver for block 210 // FIXME use right resolver for block
211 &self.resolver, 211 &self.resolver,
212 type_ref, 212 type_ref,
213 ); 213 );
@@ -414,11 +414,11 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
414 return None; 414 return None;
415 } 415 }
416 Resolution::GenericParam(..) => { 416 Resolution::GenericParam(..) => {
417 // TODO associated item of generic param 417 // FIXME associated item of generic param
418 return None; 418 return None;
419 } 419 }
420 Resolution::SelfType(_) => { 420 Resolution::SelfType(_) => {
421 // TODO associated item of self type 421 // FIXME associated item of self type
422 return None; 422 return None;
423 } 423 }
424 }; 424 };
@@ -446,7 +446,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
446 } 446 }
447 } 447 }
448 448
449 // TODO: Resolve associated types 449 // FIXME: Resolve associated types
450 crate::ImplItem::TypeAlias(_) => None, 450 crate::ImplItem::TypeAlias(_) => None,
451 }; 451 };
452 match matching_def { 452 match matching_def {
@@ -504,7 +504,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
504 return (Ty::Unknown, None); 504 return (Ty::Unknown, None);
505 } 505 }
506 Some(Resolution::SelfType(..)) => { 506 Some(Resolution::SelfType(..)) => {
507 // TODO this is allowed in an impl for a struct, handle this 507 // FIXME this is allowed in an impl for a struct, handle this
508 return (Ty::Unknown, None); 508 return (Ty::Unknown, None);
509 } 509 }
510 None => return (Ty::Unknown, None), 510 None => return (Ty::Unknown, None),
@@ -513,7 +513,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
513 None => return (Ty::Unknown, None), 513 None => return (Ty::Unknown, None),
514 Some(it) => it, 514 Some(it) => it,
515 }; 515 };
516 // TODO remove the duplication between here and `Ty::from_path`? 516 // FIXME remove the duplication between here and `Ty::from_path`?
517 let substs = Ty::substs_from_path(self.db, resolver, path, def); 517 let substs = Ty::substs_from_path(self.db, resolver, path, def);
518 match def { 518 match def {
519 TypableDef::Struct(s) => { 519 TypableDef::Struct(s) => {
@@ -590,7 +590,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
590 | Pat::Struct { .. } 590 | Pat::Struct { .. }
591 | Pat::Range { .. } 591 | Pat::Range { .. }
592 | Pat::Slice { .. } => true, 592 | Pat::Slice { .. } => true,
593 // TODO: Path/Lit might actually evaluate to ref, but inference is unimplemented. 593 // FIXME: Path/Lit might actually evaluate to ref, but inference is unimplemented.
594 Pat::Path(..) | Pat::Lit(..) => true, 594 Pat::Path(..) | Pat::Lit(..) => true,
595 Pat::Wild | Pat::Bind { .. } | Pat::Ref { .. } | Pat::Missing => false, 595 Pat::Wild | Pat::Bind { .. } | Pat::Ref { .. } | Pat::Missing => false,
596 }; 596 };
@@ -635,7 +635,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
635 let expectation = match expected.as_reference() { 635 let expectation = match expected.as_reference() {
636 Some((inner_ty, exp_mut)) => { 636 Some((inner_ty, exp_mut)) => {
637 if *mutability != exp_mut { 637 if *mutability != exp_mut {
638 // TODO: emit type error? 638 // FIXME: emit type error?
639 } 639 }
640 inner_ty 640 inner_ty
641 } 641 }
@@ -651,7 +651,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
651 self.infer_struct_pat(p.as_ref(), fields, expected, default_bm) 651 self.infer_struct_pat(p.as_ref(), fields, expected, default_bm)
652 } 652 }
653 Pat::Path(path) => { 653 Pat::Path(path) => {
654 // TODO use correct resolver for the surrounding expression 654 // FIXME use correct resolver for the surrounding expression
655 let resolver = self.resolver.clone(); 655 let resolver = self.resolver.clone();
656 self.infer_path_expr(&resolver, &path, pat.into()).unwrap_or(Ty::Unknown) 656 self.infer_path_expr(&resolver, &path, pat.into()).unwrap_or(Ty::Unknown)
657 } 657 }
@@ -741,7 +741,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
741 Expr::Block { statements, tail } => self.infer_block(statements, *tail, expected), 741 Expr::Block { statements, tail } => self.infer_block(statements, *tail, expected),
742 Expr::Loop { body } => { 742 Expr::Loop { body } => {
743 self.infer_expr(*body, &Expectation::has_type(Ty::unit())); 743 self.infer_expr(*body, &Expectation::has_type(Ty::unit()));
744 // TODO handle break with value 744 // FIXME handle break with value
745 Ty::simple(TypeCtor::Never) 745 Ty::simple(TypeCtor::Never)
746 } 746 }
747 Expr::While { condition, body } => { 747 Expr::While { condition, body } => {
@@ -769,7 +769,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
769 self.infer_pat(*arg_pat, &expected, BindingMode::default()); 769 self.infer_pat(*arg_pat, &expected, BindingMode::default());
770 } 770 }
771 771
772 // TODO: infer lambda type etc. 772 // FIXME: infer lambda type etc.
773 let _body_ty = self.infer_expr(*body, &Expectation::none()); 773 let _body_ty = self.infer_expr(*body, &Expectation::none());
774 Ty::Unknown 774 Ty::Unknown
775 } 775 }
@@ -795,7 +795,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
795 }, 795 },
796 _ => { 796 _ => {
797 // not callable 797 // not callable
798 // TODO report an error? 798 // FIXME report an error?
799 (Vec::new(), Ty::Unknown) 799 (Vec::new(), Ty::Unknown)
800 } 800 }
801 }; 801 };
@@ -894,14 +894,14 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
894 expected.ty 894 expected.ty
895 } 895 }
896 Expr::Path(p) => { 896 Expr::Path(p) => {
897 // TODO this could be more efficient... 897 // FIXME this could be more efficient...
898 let resolver = expr::resolver_for_expr(self.body.clone(), self.db, tgt_expr); 898 let resolver = expr::resolver_for_expr(self.body.clone(), self.db, tgt_expr);
899 self.infer_path_expr(&resolver, p, tgt_expr.into()).unwrap_or(Ty::Unknown) 899 self.infer_path_expr(&resolver, p, tgt_expr.into()).unwrap_or(Ty::Unknown)
900 } 900 }
901 Expr::Continue => Ty::simple(TypeCtor::Never), 901 Expr::Continue => Ty::simple(TypeCtor::Never),
902 Expr::Break { expr } => { 902 Expr::Break { expr } => {
903 if let Some(expr) = expr { 903 if let Some(expr) = expr {
904 // TODO handle break with value 904 // FIXME handle break with value
905 self.infer_expr(*expr, &Expectation::none()); 905 self.infer_expr(*expr, &Expectation::none());
906 } 906 }
907 Ty::simple(TypeCtor::Never) 907 Ty::simple(TypeCtor::Never)
@@ -957,21 +957,21 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
957 Expr::Cast { expr, type_ref } => { 957 Expr::Cast { expr, type_ref } => {
958 let _inner_ty = self.infer_expr(*expr, &Expectation::none()); 958 let _inner_ty = self.infer_expr(*expr, &Expectation::none());
959 let cast_ty = self.make_ty(type_ref); 959 let cast_ty = self.make_ty(type_ref);
960 // TODO check the cast... 960 // FIXME check the cast...
961 cast_ty 961 cast_ty
962 } 962 }
963 Expr::Ref { expr, mutability } => { 963 Expr::Ref { expr, mutability } => {
964 let expectation = 964 let expectation =
965 if let Some((exp_inner, exp_mutability)) = &expected.ty.as_reference() { 965 if let Some((exp_inner, exp_mutability)) = &expected.ty.as_reference() {
966 if *exp_mutability == Mutability::Mut && *mutability == Mutability::Shared { 966 if *exp_mutability == Mutability::Mut && *mutability == Mutability::Shared {
967 // TODO: throw type error - expected mut reference but found shared ref, 967 // FIXME: throw type error - expected mut reference but found shared ref,
968 // which cannot be coerced 968 // which cannot be coerced
969 } 969 }
970 Expectation::has_type(Ty::clone(exp_inner)) 970 Expectation::has_type(Ty::clone(exp_inner))
971 } else { 971 } else {
972 Expectation::none() 972 Expectation::none()
973 }; 973 };
974 // TODO reference coercions etc. 974 // FIXME reference coercions etc.
975 let inner_ty = self.infer_expr(*expr, &expectation); 975 let inner_ty = self.infer_expr(*expr, &expectation);
976 Ty::apply_one(TypeCtor::Ref(*mutability), inner_ty) 976 Ty::apply_one(TypeCtor::Ref(*mutability), inner_ty)
977 } 977 }
@@ -982,7 +982,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
982 if let Some(derefed_ty) = inner_ty.builtin_deref() { 982 if let Some(derefed_ty) = inner_ty.builtin_deref() {
983 derefed_ty 983 derefed_ty
984 } else { 984 } else {
985 // TODO Deref::deref 985 // FIXME Deref::deref
986 Ty::Unknown 986 Ty::Unknown
987 } 987 }
988 } 988 }
@@ -1002,7 +1002,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1002 Ty::Infer(InferTy::IntVar(..)) | Ty::Infer(InferTy::FloatVar(..)) => { 1002 Ty::Infer(InferTy::IntVar(..)) | Ty::Infer(InferTy::FloatVar(..)) => {
1003 inner_ty 1003 inner_ty
1004 } 1004 }
1005 // TODO: resolve ops::Neg trait 1005 // FIXME: resolve ops::Neg trait
1006 _ => Ty::Unknown, 1006 _ => Ty::Unknown,
1007 } 1007 }
1008 } 1008 }
@@ -1013,7 +1013,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1013 _ => Ty::Unknown, 1013 _ => Ty::Unknown,
1014 }, 1014 },
1015 Ty::Infer(InferTy::IntVar(..)) => inner_ty, 1015 Ty::Infer(InferTy::IntVar(..)) => inner_ty,
1016 // TODO: resolve ops::Not trait for inner_ty 1016 // FIXME: resolve ops::Not trait for inner_ty
1017 _ => Ty::Unknown, 1017 _ => Ty::Unknown,
1018 } 1018 }
1019 } 1019 }
@@ -1028,12 +1028,12 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1028 _ => Expectation::none(), 1028 _ => Expectation::none(),
1029 }; 1029 };
1030 let lhs_ty = self.infer_expr(*lhs, &lhs_expectation); 1030 let lhs_ty = self.infer_expr(*lhs, &lhs_expectation);
1031 // TODO: find implementation of trait corresponding to operation 1031 // FIXME: find implementation of trait corresponding to operation
1032 // symbol and resolve associated `Output` type 1032 // symbol and resolve associated `Output` type
1033 let rhs_expectation = op::binary_op_rhs_expectation(*op, lhs_ty); 1033 let rhs_expectation = op::binary_op_rhs_expectation(*op, lhs_ty);
1034 let rhs_ty = self.infer_expr(*rhs, &Expectation::has_type(rhs_expectation)); 1034 let rhs_ty = self.infer_expr(*rhs, &Expectation::has_type(rhs_expectation));
1035 1035
1036 // TODO: similar as above, return ty is often associated trait type 1036 // FIXME: similar as above, return ty is often associated trait type
1037 op::binary_op_return_ty(*op, rhs_ty) 1037 op::binary_op_return_ty(*op, rhs_ty)
1038 } 1038 }
1039 _ => Ty::Unknown, 1039 _ => Ty::Unknown,
@@ -1227,7 +1227,7 @@ impl InferTy {
1227#[derive(Clone, PartialEq, Eq, Debug)] 1227#[derive(Clone, PartialEq, Eq, Debug)]
1228struct Expectation { 1228struct Expectation {
1229 ty: Ty, 1229 ty: Ty,
1230 // TODO: In some cases, we need to be aware whether the expectation is that 1230 // FIXME: In some cases, we need to be aware whether the expectation is that
1231 // the type match exactly what we passed, or whether it just needs to be 1231 // the type match exactly what we passed, or whether it just needs to be
1232 // coercible to the expected type. See Expectation::rvalue_hint in rustc. 1232 // coercible to the expected type. See Expectation::rvalue_hint in rustc.
1233} 1233}
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index 7f9af307b..003a89f0d 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -60,7 +60,7 @@ impl Ty {
60 60
61 pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self { 61 pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self {
62 if let Some(name) = path.as_ident() { 62 if let Some(name) = path.as_ident() {
63 // TODO handle primitive type names in resolver as well? 63 // FIXME handle primitive type names in resolver as well?
64 if let Some(int_ty) = primitive::IntTy::from_type_name(name) { 64 if let Some(int_ty) = primitive::IntTy::from_type_name(name) {
65 return Ty::simple(TypeCtor::Int(primitive::UncertainIntTy::Known(int_ty))); 65 return Ty::simple(TypeCtor::Int(primitive::UncertainIntTy::Known(int_ty)));
66 } else if let Some(float_ty) = primitive::FloatTy::from_type_name(name) { 66 } else if let Some(float_ty) = primitive::FloatTy::from_type_name(name) {
@@ -87,7 +87,7 @@ impl Ty {
87 Some(Resolution::GenericParam(idx)) => { 87 Some(Resolution::GenericParam(idx)) => {
88 return Ty::Param { 88 return Ty::Param {
89 idx, 89 idx,
90 // TODO: maybe return name in resolution? 90 // FIXME: maybe return name in resolution?
91 name: path 91 name: path
92 .as_ident() 92 .as_ident()
93 .expect("generic param should be single-segment path") 93 .expect("generic param should be single-segment path")
@@ -139,7 +139,7 @@ impl Ty {
139 } 139 }
140 } 140 }
141 // add placeholders for args that were not provided 141 // add placeholders for args that were not provided
142 // TODO: handle defaults 142 // FIXME: handle defaults
143 let supplied_params = substs.len(); 143 let supplied_params = substs.len();
144 for _ in supplied_params..def_generics.count_params_including_parent() { 144 for _ in supplied_params..def_generics.count_params_including_parent() {
145 substs.push(Ty::Unknown); 145 substs.push(Ty::Unknown);
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs
index ed75bfaee..b1684acf9 100644
--- a/crates/ra_hir/src/ty/method_resolution.rs
+++ b/crates/ra_hir/src/ty/method_resolution.rs
@@ -120,7 +120,7 @@ fn def_crate(db: &impl HirDatabase, ty: &Ty) -> Option<Crate> {
120} 120}
121 121
122impl Ty { 122impl Ty {
123 // TODO: cache this as a query? 123 // FIXME: cache this as a query?
124 // - if so, what signature? (TyFingerprint, Name)? 124 // - if so, what signature? (TyFingerprint, Name)?
125 // - or maybe cache all names and def_ids of methods per fingerprint? 125 // - or maybe cache all names and def_ids of methods per fingerprint?
126 /// Look up the method with the given name, returning the actual autoderefed 126 /// Look up the method with the given name, returning the actual autoderefed
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs
index 31d5374ba..f54a02d1d 100644
--- a/crates/ra_ide_api/src/completion/complete_dot.rs
+++ b/crates/ra_ide_api/src/completion/complete_dot.rs
@@ -30,7 +30,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
30 acc.add_field(ctx, field, &a_ty.parameters); 30 acc.add_field(ctx, field, &a_ty.parameters);
31 } 31 }
32 } 32 }
33 // TODO unions 33 // FIXME unions
34 TypeCtor::Tuple => { 34 TypeCtor::Tuple => {
35 for (i, ty) in a_ty.parameters.iter().enumerate() { 35 for (i, ty) in a_ty.parameters.iter().enumerate() {
36 acc.add_pos_field(ctx, i, ty); 36 acc.add_pos_field(ctx, i, ty);
diff --git a/crates/ra_ide_api/src/completion/complete_pattern.rs b/crates/ra_ide_api/src/completion/complete_pattern.rs
index 3cf79c080..7abcd019b 100644
--- a/crates/ra_ide_api/src/completion/complete_pattern.rs
+++ b/crates/ra_ide_api/src/completion/complete_pattern.rs
@@ -5,7 +5,7 @@ pub(super) fn complete_pattern(acc: &mut Completions, ctx: &CompletionContext) {
5 if !ctx.is_pat_binding { 5 if !ctx.is_pat_binding {
6 return; 6 return;
7 } 7 }
8 // TODO: ideally, we should look at the type we are matching against and 8 // FIXME: ideally, we should look at the type we are matching against and
9 // suggest variants + auto-imports 9 // suggest variants + auto-imports
10 let names = ctx.resolver.all_names(ctx.db); 10 let names = ctx.resolver.all_names(ctx.db);
11 for (name, res) in names.into_iter() { 11 for (name, res) in names.into_iter() {
diff --git a/crates/ra_ide_api/src/completion/complete_struct_literal.rs b/crates/ra_ide_api/src/completion/complete_struct_literal.rs
index b75526282..f58bcd03e 100644
--- a/crates/ra_ide_api/src/completion/complete_struct_literal.rs
+++ b/crates/ra_ide_api/src/completion/complete_struct_literal.rs
@@ -26,7 +26,7 @@ pub(super) fn complete_struct_literal(acc: &mut Completions, ctx: &CompletionCon
26 } 26 }
27 } 27 }
28 28
29 // TODO unions 29 // FIXME unions
30 AdtDef::Enum(_) => (), 30 AdtDef::Enum(_) => (),
31 }; 31 };
32} 32}
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs
index f94487d94..660b43cfa 100644
--- a/crates/ra_ide_api/src/goto_definition.rs
+++ b/crates/ra_ide_api/src/goto_definition.rs
@@ -117,7 +117,7 @@ pub(crate) fn reference_definition(
117 return Exact(nav); 117 return Exact(nav);
118 } 118 }
119 Some(Resolution::GenericParam(..)) => { 119 Some(Resolution::GenericParam(..)) => {
120 // TODO: go to the generic param def 120 // FIXME: go to the generic param def
121 } 121 }
122 Some(Resolution::SelfType(impl_block)) => { 122 Some(Resolution::SelfType(impl_block)) => {
123 let ty = impl_block.target_ty(db); 123 let ty = impl_block.target_ty(db);
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs
index f6443580d..3206e68b9 100644
--- a/crates/ra_ide_api/src/hover.rs
+++ b/crates/ra_ide_api/src/hover.rs
@@ -204,7 +204,7 @@ impl NavigationTarget {
204 /// 204 ///
205 /// e.g. `struct Name`, `enum Name`, `fn Name` 205 /// e.g. `struct Name`, `enum Name`, `fn Name`
206 fn description(&self, db: &RootDatabase) -> Option<String> { 206 fn description(&self, db: &RootDatabase) -> Option<String> {
207 // TODO: After type inference is done, add type information to improve the output 207 // FIXME: After type inference is done, add type information to improve the output
208 let node = self.node(db)?; 208 let node = self.node(db)?;
209 209
210 fn visit_ascribed_node<T>(node: &T, prefix: &str) -> Option<String> 210 fn visit_ascribed_node<T>(node: &T, prefix: &str) -> Option<String>
diff --git a/crates/ra_ide_api/src/line_index.rs b/crates/ra_ide_api/src/line_index.rs
index bf004c33a..fd33d6767 100644
--- a/crates/ra_ide_api/src/line_index.rs
+++ b/crates/ra_ide_api/src/line_index.rs
@@ -77,7 +77,7 @@ impl LineIndex {
77 } 77 }
78 78
79 pub fn offset(&self, line_col: LineCol) -> TextUnit { 79 pub fn offset(&self, line_col: LineCol) -> TextUnit {
80 //TODO: return Result 80 //FIXME: return Result
81 let col = self.utf16_to_utf8_col(line_col.line, line_col.col_utf16); 81 let col = self.utf16_to_utf8_col(line_col.line, line_col.col_utf16);
82 self.newlines[line_col.line as usize] + col 82 self.newlines[line_col.line as usize] + col
83 } 83 }
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs
index 23c743bef..0978d164a 100644
--- a/crates/ra_ide_api/src/symbol_index.rs
+++ b/crates/ra_ide_api/src/symbol_index.rs
@@ -68,7 +68,7 @@ fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Arc<SymbolIndex>
68 68
69 let symbols = source_file_to_file_symbols(&source_file, file_id); 69 let symbols = source_file_to_file_symbols(&source_file, file_id);
70 70
71 // TODO: add macros here 71 // FIXME: add macros here
72 72
73 Arc::new(SymbolIndex::new(symbols)) 73 Arc::new(SymbolIndex::new(symbols))
74} 74}
diff --git a/crates/ra_parser/src/grammar/items/consts.rs b/crates/ra_parser/src/grammar/items/consts.rs
index e6e6011c6..1f802246f 100644
--- a/crates/ra_parser/src/grammar/items/consts.rs
+++ b/crates/ra_parser/src/grammar/items/consts.rs
@@ -11,7 +11,7 @@ pub(super) fn const_def(p: &mut Parser, m: Marker) {
11fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { 11fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) {
12 assert!(p.at(kw)); 12 assert!(p.at(kw));
13 p.bump(); 13 p.bump();
14 p.eat(MUT_KW); // TODO: validator to forbid const mut 14 p.eat(MUT_KW); // FIXME: validator to forbid const mut
15 name(p); 15 name(p);
16 types::ascription(p); 16 types::ascription(p);
17 if p.eat(EQ) { 17 if p.eat(EQ) {
diff --git a/crates/ra_parser/src/grammar/items/nominal.rs b/crates/ra_parser/src/grammar/items/nominal.rs
index a3579eebd..e93bd76b8 100644
--- a/crates/ra_parser/src/grammar/items/nominal.rs
+++ b/crates/ra_parser/src/grammar/items/nominal.rs
@@ -15,7 +15,7 @@ pub(super) fn struct_def(p: &mut Parser, m: Marker, kind: SyntaxKind) {
15 } 15 }
16 L_CURLY => named_field_def_list(p), 16 L_CURLY => named_field_def_list(p),
17 _ => { 17 _ => {
18 //TODO: special case `(` error message 18 //FIXME: special case `(` error message
19 p.error("expected `;` or `{`"); 19 p.error("expected `;` or `{`");
20 } 20 }
21 } 21 }
diff --git a/crates/ra_parser/src/grammar/items/traits.rs b/crates/ra_parser/src/grammar/items/traits.rs
index d5a8ccd98..f49615f6b 100644
--- a/crates/ra_parser/src/grammar/items/traits.rs
+++ b/crates/ra_parser/src/grammar/items/traits.rs
@@ -49,7 +49,7 @@ pub(super) fn impl_block(p: &mut Parser) {
49 type_params::opt_type_param_list(p); 49 type_params::opt_type_param_list(p);
50 } 50 }
51 51
52 // TODO: never type 52 // FIXME: never type
53 // impl ! {} 53 // impl ! {}
54 54
55 // test impl_block_neg 55 // test impl_block_neg
diff --git a/crates/ra_parser/src/grammar/items/use_item.rs b/crates/ra_parser/src/grammar/items/use_item.rs
index ea2f94604..908493789 100644
--- a/crates/ra_parser/src/grammar/items/use_item.rs
+++ b/crates/ra_parser/src/grammar/items/use_item.rs
@@ -21,7 +21,7 @@ fn use_tree(p: &mut Parser) {
21 // This does not handle cases such as `use some::path::*` 21 // This does not handle cases such as `use some::path::*`
22 // N.B. in Rust 2015 `use *;` imports all from crate root 22 // N.B. in Rust 2015 `use *;` imports all from crate root
23 // however in Rust 2018 `use *;` errors: ('cannot glob-import all possible crates') 23 // however in Rust 2018 `use *;` errors: ('cannot glob-import all possible crates')
24 // TODO: Add this error (if not out of scope) 24 // FIXME: Add this error (if not out of scope)
25 25
26 // test use_star 26 // test use_star
27 // use *; 27 // use *;
@@ -33,7 +33,7 @@ fn use_tree(p: &mut Parser) {
33 // Parse `use ::*;`, which imports all from the crate root in Rust 2015 33 // Parse `use ::*;`, which imports all from the crate root in Rust 2015
34 // This is invalid inside a use_tree_list, (e.g. `use some::path::{::*}`) 34 // This is invalid inside a use_tree_list, (e.g. `use some::path::{::*}`)
35 // but still parses and errors later: ('crate root in paths can only be used in start position') 35 // but still parses and errors later: ('crate root in paths can only be used in start position')
36 // TODO: Add this error (if not out of scope) 36 // FIXME: Add this error (if not out of scope)
37 // In Rust 2018, it is always invalid (see above) 37 // In Rust 2018, it is always invalid (see above)
38 p.bump(); 38 p.bump();
39 p.bump(); 39 p.bump();
diff --git a/crates/ra_parser/src/parser.rs b/crates/ra_parser/src/parser.rs
index 3c326452b..56f8b7126 100644
--- a/crates/ra_parser/src/parser.rs
+++ b/crates/ra_parser/src/parser.rs
@@ -121,7 +121,7 @@ impl<'t> Parser<'t> {
121 /// final tree. 121 /// final tree.
122 pub(crate) fn bump_remap(&mut self, kind: SyntaxKind) { 122 pub(crate) fn bump_remap(&mut self, kind: SyntaxKind) {
123 if self.nth(0) == EOF { 123 if self.nth(0) == EOF {
124 // TODO: panic!? 124 // FIXME: panic!?
125 return; 125 return;
126 } 126 }
127 self.do_bump(kind, 1); 127 self.do_bump(kind, 1);
@@ -135,7 +135,7 @@ impl<'t> Parser<'t> {
135 } 135 }
136 136
137 /// Emit error with the `message` 137 /// Emit error with the `message`
138 /// TODO: this should be much more fancy and support 138 /// FIXME: this should be much more fancy and support
139 /// structured errors with spans and notes, like rustc 139 /// structured errors with spans and notes, like rustc
140 /// does. 140 /// does.
141 pub(crate) fn error<T: Into<String>>(&mut self, message: T) { 141 pub(crate) fn error<T: Into<String>>(&mut self, message: T) {
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs
index 6f46a2d43..3bad4f8d3 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/ra_project_model/src/lib.rs
@@ -23,7 +23,7 @@ pub use crate::{
23 sysroot::Sysroot, 23 sysroot::Sysroot,
24}; 24};
25 25
26// TODO use proper error enum 26// FIXME use proper error enum
27pub type Result<T> = ::std::result::Result<T, ::failure::Error>; 27pub type Result<T> = ::std::result::Result<T, ::failure::Error>;
28 28
29#[derive(Debug, Clone)] 29#[derive(Debug, Clone)]
diff --git a/crates/ra_syntax/src/validation/char.rs b/crates/ra_syntax/src/validation/char.rs
index 3169ed590..c874e5d08 100644
--- a/crates/ra_syntax/src/validation/char.rs
+++ b/crates/ra_syntax/src/validation/char.rs
@@ -85,7 +85,7 @@ pub(super) fn is_ascii_escape(code: char) -> bool {
85fn validate_ascii_code_escape(text: &str, range: TextRange, errors: &mut Vec<SyntaxError>) { 85fn validate_ascii_code_escape(text: &str, range: TextRange, errors: &mut Vec<SyntaxError>) {
86 // An AsciiCodeEscape has 4 chars, example: `\xDD` 86 // An AsciiCodeEscape has 4 chars, example: `\xDD`
87 if !text.is_ascii() { 87 if !text.is_ascii() {
88 // TODO: Give a more precise error message (say what the invalid character was) 88 // FIXME: Give a more precise error message (say what the invalid character was)
89 errors.push(SyntaxError::new(AsciiCodeEscapeOutOfRange, range)); 89 errors.push(SyntaxError::new(AsciiCodeEscapeOutOfRange, range));
90 } else if text.chars().count() < 4 { 90 } else if text.chars().count() < 4 {
91 errors.push(SyntaxError::new(TooShortAsciiCodeEscape, range)); 91 errors.push(SyntaxError::new(TooShortAsciiCodeEscape, range));
diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs
index 537b01368..276756c85 100644
--- a/crates/ra_syntax/tests/test.rs
+++ b/crates/ra_syntax/tests/test.rs
@@ -61,7 +61,7 @@ fn reparse_fuzz_tests() {
61} 61}
62 62
63/// Test that Rust-analyzer can parse and validate the rust-analyser 63/// Test that Rust-analyzer can parse and validate the rust-analyser
64/// TODO: Use this as a benchmark 64/// FIXME: Use this as a benchmark
65#[test] 65#[test]
66fn self_hosting_parsing() { 66fn self_hosting_parsing() {
67 use std::ffi::OsStr; 67 use std::ffi::OsStr;