granite-rust/src
bors 0a58f58646 Auto merge of #63177 - MOZGIII:find-result, r=Amanieu
Add Iterator::try_find

I found a need for this fn, and created this PR.

Tracking issue: #63178

I did a fair amount of thinking about the function name, and settled on the current one.
I don't see other anything else that's non-trivial here, but I'm open for debate. I just want this functionality to be there.
It couples with the `collect` trick for collecting `Result<Vec<T>, E>` from `Iterator<Item = Result<T, E>>`.

UPD:

I've already looked at `fallible_iterator` crate, but I don't think it supports my use case.
The main problem is that I can't construct a failable iterator. I have a regular iterator, and I just need to apply a predicate that can fail via `find` method.

UPD: `fallible_iterator` would work, but it's not elegant cause I'd have to make a failable iterator by mapping iterator with `Result::Ok` first.
2020-01-02 10:20:09 +00:00
..
bootstrap tidy: Enforce formatting rather than just check it if --bless is specified 2019-12-29 14:31:54 +03:00
build_helper Format the world 2019-12-22 17:42:47 -05:00
ci Use the chocolatey CDN directly to avoid the flaky API 2019-12-24 00:59:37 +00:00
doc update rustc-guide 2020-01-01 11:05:59 -06:00
etc Auto merge of #67334 - estebank:ignore-triple, r=nikomatsakis 2019-12-28 23:02:09 +00:00
liballoc Auto merge of #67459 - ssomers:#67438, r=RalfJung 2019-12-28 16:04:40 +00:00
libarena Format the world 2019-12-22 17:42:47 -05:00
libcore Add Iterator::try_find 2020-01-02 00:59:26 +03:00
libfmt_macros Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
libgraphviz Format the world 2019-12-22 17:42:47 -05:00
libpanic_abort Format the world 2019-12-22 17:42:47 -05:00
libpanic_unwind Auto merge of #67779 - Amanieu:ehabi_fix, r=Mark-Simulacrum 2020-01-02 07:04:20 +00:00
libproc_macro Format the world 2019-12-22 17:42:47 -05:00
libprofiler_builtins Format the world 2019-12-22 17:42:47 -05:00
librustc Move stability queries to librustc_passes. 2020-01-01 14:15:02 +01:00
librustc_apfloat Format the world 2019-12-22 17:42:47 -05:00
librustc_asan Format the world 2019-12-22 17:42:47 -05:00
librustc_ast_lowering nix lower_label identity function. 2019-12-31 17:57:17 +01:00
librustc_builtin_macros Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_codegen_llvm Auto merge of #67729 - mati865:deps, r=nikomatsakis 2020-01-01 15:10:48 +00:00
librustc_codegen_ssa Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_codegen_utils Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_data_structures Revert parts of #66405. 2019-12-31 17:58:29 -05:00
librustc_driver Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_error_codes Gammer fix 2019-12-30 17:14:08 +08:00
librustc_errors Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_expand Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_feature Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_fs_util Format src/librustc_fs_util. 2019-12-21 20:23:39 -05:00
librustc_incremental Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_index Format the world 2019-12-22 17:42:47 -05:00
librustc_interface Move stability queries to librustc_passes. 2020-01-01 14:15:02 +01:00
librustc_lexer Format the world 2019-12-22 17:42:47 -05:00
librustc_lint Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_llvm Format the world 2019-12-22 17:42:47 -05:00
librustc_lsan Format the world 2019-12-22 17:42:47 -05:00
librustc_macros Format the world 2019-12-22 17:42:47 -05:00
librustc_metadata Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_mir Auto merge of #67676 - wesleywiser:lint_overflowing_int_casts, r=oli-obk 2020-01-01 21:27:11 +00:00
librustc_msan Format the world 2019-12-22 17:42:47 -05:00
librustc_parse Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_passes Move stability queries to librustc_passes. 2020-01-01 14:15:02 +01:00
librustc_plugin_impl Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_privacy Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_resolve Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_save_analysis Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_session Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_span Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_target Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_traits Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustc_tsan Format the world 2019-12-22 17:42:47 -05:00
librustc_typeck Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
librustdoc Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
libserialize Deprecate Error::description for real 2019-12-24 22:39:49 -08:00
libstd Rollup merge of #67622 - gilescope:async-keyword-doc, r=Centril 2019-12-30 14:07:49 +09:00
libsyntax Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
libterm Auto merge of #67605 - lzutao:msdn-links, r=Mark-Simulacrum 2019-12-28 09:19:26 +00:00
libtest Format the world 2019-12-22 17:42:47 -05:00
libunwind Update the barrier cache during ARM EHABI unwinding 2020-01-01 17:20:16 +01:00
llvm-project@2cb41005ed Update LLVM submodule 2019-11-30 01:34:31 +01:00
rtstartup Format the world 2019-12-22 17:42:47 -05:00
rustc Format the world 2019-12-22 17:42:47 -05:00
rustllvm Rollup merge of #67033 - cuviper:ValueName2, r=rkruppe 2019-12-07 00:10:02 +09:00
stdarch@e0ab2c165a
test Auto merge of #67676 - wesleywiser:lint_overflowing_int_casts, r=oli-obk 2020-01-01 21:27:11 +00:00
tools Auto merge of #67726 - JohnTitor:clippy-up, r=oli-obk 2019-12-31 22:51:24 +00:00
README.md
stage0.txt Implement rustfmt running manually using ignore crate 2019-12-21 20:23:55 -05:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc guide.