1,905 matches across 25 files for TODO lang:Rust lang:Rust
snippet_mode: grep · sorted by relevance
348 #[suggestion(
349 "add a body after the pattern",
350▶ code = " => todo!(),",
351 applicability = "has-placeholders"
352 )]
989 #[primary_span]
990 pub span: Span,
991▶ // We include the braces around `todo!()` so that a comma is optional, and we don't have to have
992 // any logic looking at the arm being replaced if there was a comma already or not for the
993 // resulting code to be correct.
· · ·
994 #[suggestion(
995 "add a body after the pattern",
996▶ code = " => {{ todo!() }}",
997 applicability = "has-placeholders",
998 style = "verbose"
917
918 // FIXME: We make sure that this is a normal top-level binding,
919▶ // but we could suggest `todo!()` for all uninitialized bindings in the pattern
920 if let hir::StmtKind::Let(hir::LetStmt { span, ty, init: None, pat, .. }) =
921 &ex.kind
521
522 (ProjectionElem::UnwrapUnsafeBinder(_), _) => {
523▶ todo!()
524 }
525 }
399 }
400 DefiningTy::CoroutineClosure(..) => {
401▶ todo!()
402 }
403 DefiningTy::Coroutine(def_id, args) => {
566 .map(|arg| match arg.pat.kind {
567 PatKind::Ident(_, ident, _) => ecx.expr_path(ecx.path_ident(span, ident)),
568▶ _ => todo!(),
569 })
570 .collect::<ThinVec<_>>()
18mod shared_utils;
19mod tests;
20▶mod todo;
21mod utils;
22
· · ·
40 AbiCafe,
41 Bench,
42▶ CheckTodo,
43}
44
· · ·
69 Some("abi-cafe") => Command::AbiCafe,
70 Some("bench") => Command::Bench,
71▶ Some("check-todo") => Command::CheckTodo,
72 Some(flag) if flag.starts_with('-') => arg_error!("Expected command found flag {}", flag),
73 Some(command) => arg_error!("Unknown command {}", command),
· · ·
143 }
144
145▶ if command == Command::CheckTodo {
146 todo::run();
147 }
· · ·
146▶ todo::run();
147 }
148
+ 1 more matches in this file
38 let mut error_count = 0;
39 // Avoid embedding the task marker in source so greps only find real occurrences.
40▶ let todo_marker = "todo".to_ascii_uppercase();
41
42 for file in files {
· · ·
50 for (i, line) in contents.split('\n').enumerate() {
51 let trimmed = line.trim();
52▶ if trimmed.contains(&todo_marker) {
53 eprintln!(
54 "{}:{}: {} is used for tasks that should be done before merging a PR; if you want to leave a message in the codebase use FIXME",
· · ·
55 file.display(),
56 i + 1,
57▶ todo_marker
58 );
59 error_count += 1;
· · ·
66 }
67
68▶ eprintln!("found {} {}(s)", error_count, todo_marker);
69 process::exit(1);
70}
154 impl<T: ?Sized> Foo<T> {
155 pub fn new() -> Box<Foo<T>> {
156▶ todo!()
157 }
158 }
15
16pub(crate) struct ConstantCx {
17▶ todo: Vec<TodoItem>,
18 anon_allocs: FxHashMap<AllocId, DataId>,
19}
· · ·
20
21#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
22▶enum TodoItem {
23 Alloc(AllocId),
24 Static(DefId),
· · ·
27impl ConstantCx {
28 pub(crate) fn new() -> Self {
29▶ ConstantCx { todo: vec![], anon_allocs: FxHashMap::default() }
30 }
31
· · ·
37pub(crate) fn codegen_static(tcx: TyCtxt<'_>, module: &mut dyn Module, def_id: DefId) -> DataId {
38 let mut constants_cx = ConstantCx::new();
39▶ constants_cx.todo.push(TodoItem::Static(def_id));
40 constants_cx.finalize(tcx, module);
41
· · ·
247 mutability: rustc_hir::Mutability,
248) -> DataId {
249▶ cx.todo.push(TodoItem::Alloc(alloc_id));
250 *cx.anon_allocs
251 .entry(alloc_id)
+ 7 more matches in this file
60 )
61 } else {
62▶ todo!()
63 }
64 } else {
496
497 let disable_incr_cache = disable_incr_cache();
498▶ let (todo_cgus, done_cgus) =
499 cgus.iter().enumerate().partition::<Vec<_>, _>(|&(i, _)| match cgu_reuse[i] {
500 _ if disable_incr_cache => true,
· · ·
503 });
504
505▶ let concurrency_limiter = IntoDynSyncSend(ConcurrencyLimiter::new(todo_cgus.len()));
506
507 let modules: Vec<_> =
· · ·
508 tcx.sess.time("codegen mono items", || {
509▶ let modules: Vec<_> = par_map(todo_cgus, |(_, cgu)| {
510 let dep_node = cgu.codegen_dep_node(tcx);
511 let (module, _) = tcx.dep_graph.with_task(
226 _CMP_NGE_US | _CMP_NGE_UQ => FloatCC::UnorderedOrLessThan,
227 _CMP_NGT_US | _CMP_NGT_UQ => FloatCC::UnorderedOrLessThanOrEqual,
228▶ _CMP_FALSE_OQ | _CMP_FALSE_OS => todo!(),
229 _CMP_NEQ_OQ | _CMP_NEQ_OS => FloatCC::OrderedNotEqual,
230 _CMP_GE_OS | _CMP_GE_OQ => FloatCC::GreaterThanOrEqual,
· · ·
231 _CMP_GT_OS | _CMP_GT_OQ => FloatCC::GreaterThan,
232▶ _CMP_TRUE_UQ | _CMP_TRUE_US => todo!(),
233
234 kind => unreachable!("kind {:?}", kind),
86 }
87 BackendRepr::Memory { .. } => {}
88▶ BackendRepr::SimdScalableVector { .. } => todo!(),
89 }
90
· · ·
182 BackendRepr::Scalar(_) | BackendRepr::SimdVector { .. } => true,
183 // FIXME(rustc_scalable_vector): Not yet implemented in rustc_codegen_gcc.
184▶ BackendRepr::SimdScalableVector { .. } => todo!(),
185 BackendRepr::ScalarPair(..) | BackendRepr::Memory { .. } => false,
186 }
1593
1594 fn export_symbols(&mut self, _: &Path, _: CrateType, _: &[(String, SymbolExportKind)]) {
1595▶ // ToDo, not implemented, copy from GCC
1596 self.sess.dcx().emit_warn(errors::L4BenderExportingSymbolsUnimplemented);
1597 }
240 };
241
242▶ // Intern the base allocation, and initialize todo list for recursive interning.
243 let base_alloc_id = ret.ptr().provenance.unwrap().alloc_id();
244 trace!(?base_alloc_id, ?base_mutability);
· · ·
246 // This gives us the initial set of nested allocations, which will then all be processed
247 // recursively in the loop below.
248▶ let mut todo: Vec<_> = if is_static {
249 assert!(disambiguator.is_some());
250 // Do not steal the root allocation, we need it later to create the return value of `eval_static_initializer`.
· · ·
272 // interning has better coverage since it "sees" *all* pointers, including raw pointers and
273 // references stored in unions.
274▶ while let Some(prov) = todo.pop() {
275 trace!(?prov);
276 let alloc_id = prov.alloc_id();
· · ·
338 just_interned.insert(alloc_id);
339 let next = intern_shallow(ecx, alloc_id, inner_mutability, disambiguator.as_deref_mut())?;
340▶ todo.extend(next);
341 }
342 if found_bad_mutable_ptr {
1100 ) -> InterpResult<'tcx> {
1101 let mut done = FxHashSet::default();
1102▶ let mut todo = start;
1103 while let Some(id) = todo.pop() {
1104 if !done.insert(id) {
· · ·
1103▶ while let Some(id) = todo.pop() {
1104 if !done.insert(id) {
1105 // We already saw this allocation before, don't process it again.
· · ·
1115 for prov in alloc.provenance().provenances() {
1116 if let Some(id) = prov.get_alloc_id() {
1117▶ todo.push(id);
1118 }
1119 }
· · ·
1171 let mut reachable = FxHashSet::default();
1172 let global_kind = M::GLOBAL_KIND.map(MemoryKind::Machine);
1173▶ let mut todo: Vec<_> =
1174 self.memory.alloc_map.filter_map_collect(move |&id, &(kind, _)| {
1175 if Some(kind) == global_kind { Some(id) } else { None }
· · ·
1176 });
1177▶ todo.extend(static_roots(self));
1178 while let Some(id) = todo.pop() {
1179 if reachable.insert(id) {
+ 3 more matches in this file
290pub struct RefTracking<T, PATH = ()> {
291 seen: FxHashSet<T>,
292▶ todo: Vec<(T, PATH)>,
293}
294
· · ·
295impl<T: Clone + Eq + Hash + std::fmt::Debug, PATH> RefTracking<T, PATH> {
296 pub fn empty() -> Self {
297▶ RefTracking { seen: FxHashSet::default(), todo: vec![] }
298 }
299 pub fn next(&mut self) -> Option<(T, PATH)> {
· · ·
300▶ self.todo.pop()
301 }
302
· · ·
306 let path = path();
307 // Remember to come back to this later.
308▶ self.todo.push((val, path));
309 }
310 }
· · ·
314 pub fn new(val: T, ty: Ty<'tcx>) -> Self {
315 let mut ref_tracking_for_consts =
316▶ RefTracking { seen: FxHashSet::default(), todo: vec![(val.clone(), Path::new(ty))] };
317 ref_tracking_for_consts.seen.insert(val);
318 ref_tracking_for_consts
+ 2 more matches in this file
95/// const BITS: u32 = 2;
96///
97▶/// fn into_usize(self) -> usize { todo!() }
98/// unsafe fn from_usize(tag: usize) -> Self { todo!() }
99/// }
· · ·
98▶/// unsafe fn from_usize(tag: usize) -> Self { todo!() }
99/// }
100///
1937 }
1938 fn as_target(&self) -> Target {
1939▶ todo!();
1940 }
1941}
557 /// let _: Self; // SelfTyAlias
558 ///
559▶ /// todo!()
560 /// }
561 /// }
517 // fill in a significant portion of the missing code, and other subsequent
518 // suggestions can help the user fix the code.
519▶ format!("{safety}{asyncness}fn {ident}{generics}({args}){output}{where_clauses} {{ todo!() }}")
520}
521
120 },
121
122▶ ty::UnsafeBinder(_) => todo!("FIXME(unsafe_binder)"),
123
124 // Pointers to foreign types are thin, despite being unsized
196 }
197 hir::CoroutineDesugaring::AsyncGen => {
198▶ todo!("`async gen` closures not supported yet")
199 }
200 };
1312 // x => dbg!(x),
1313 // }
1314▶ // todo!()
1315 // }
1316 // -------------^^^^^^^-
Search syntax
auth login | both terms (AND is implicit) |
auth OR login | either term |
NOT path:vendor | exclude matches |
"exact phrase" | quoted exact match |
/func\s+Test/ | regex |
handler~1 | fuzzy (Levenshtein 1) |
file:*_test.go | filename glob |
path:pkg/auth/** | full path glob |
lang:go | language filter |
Search any public repo from your terminal
This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.