rust/src
Felix S. Klock II dcada26f5b MIR-borrowck: Big fix to fn check_if_path_is_moved.
Fix #44833 (a very specific instance of a very broad bug).

In `check_if_path_is_moved(L)`, check nearest prefix of L with
MovePath, and suffixes of L with MovePaths.

Over the course of review, ariel pointed out a number of issues that
led to this version of the commit:

1. Looking solely at supporting prefixes does not suffice: it
   overlooks checking if the path was ever actually initialized in the
   first place. So you need to be willing to consider non-supporting
   prefixes.  Once you are looking at all prefixes, you *could* just
   look at the local that forms the base of the projection, but to
   handle partial initialization (which still needs to be formally
   specified), this code instead looks at the nearest prefix of L that
   has an associated MovePath (which, in the limit, will end up being
   a local).

2. You also need to consider the suffixes of the given Lvalue, due to
   how dataflow is representing partial moves of individual fields out
   of struct values.

3. (There was originally a third search, but ariel pointed out that
   the first and third could be folded into one.)

Also includes some drive-by refactorings to simplify some method
signatures and prefer `for _ in _` over `loop { }` (at least when it
comes semi-naturally).
2017-10-11 22:35:02 +02:00
..
bootstrap Auto merge of #45141 - kennytm:rollup, r=kennytm 2017-10-10 08:30:10 +00:00
build_helper Add a file to trivially disable tool building or testing 2017-09-17 21:41:45 +02:00
ci Add libsocket and libresolv to Solaris builder 2017-10-05 19:05:19 +02:00
doc implement pattern-binding-modes RFC 2017-10-06 16:30:23 -04:00
etc debuginfo-test: Fix #45086. 2017-10-08 01:39:34 +08:00
grammar Update grammar to parse current rust syntax 2017-10-08 18:46:42 -07:00
jemalloc@1f5a28755e Update jemalloc to 4.5.0 2017-08-16 22:06:05 +02:00
liballoc Rollup merge of #45052 - steveklabnik:gh44105, r=dtolnay 2017-10-08 13:38:59 +08:00
liballoc_jemalloc Update to the cc crate 2017-09-28 07:45:50 -07:00
liballoc_system Autodetect the type of allocator crate used 2017-09-10 19:59:42 +02:00
libarena stabilized needs_drop (fixes #41890) 2017-09-16 23:41:04 +02:00
libbacktrace Fix missing line numbers on i686. 2017-09-05 08:41:43 +08:00
libcollections *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
libcompiler_builtins@0b9844764e Update the libcompiler_builtins submodule 2017-09-30 01:45:21 +02:00
libcore Rollup merge of #45081 - tamird:fmt-cleanup, r=alexcrichton 2017-10-08 13:39:03 +08:00
libfmt_macros *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
libgetopts address some FIXMEs whose associated issues were marked as closed 2017-09-30 11:33:47 +03:00
libgraphviz *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
liblibc@44e4018e1a bump liblibc to 0.2.31 2017-09-24 13:53:11 -07:00
libpanic_abort *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
libpanic_unwind Add missing dependency for Windows 2017-08-27 19:02:24 +09:00
libproc_macro proc_macro::Span API improvements 2017-10-05 17:00:55 -07:00
libprofiler_builtins Update to the cc crate 2017-09-28 07:45:50 -07:00
librand address some FIXMEs whose associated issues were marked as closed 2017-09-30 11:33:47 +03:00
librustc Auto merge of #45075 - alexcrichton:inline-less, r=michaelwoerister 2017-10-09 14:00:12 +00:00
librustc_allocator Make fields of Span private 2017-08-30 01:38:54 +03:00
librustc_apfloat Remove rustc_bitflags; use the bitflags crate 2017-09-17 14:19:24 -04:00
librustc_asan
librustc_back Auto merge of #45041 - est31:master, r=alexcrichton 2017-10-09 04:59:02 +00:00
librustc_borrowck Auto merge of #45016 - pnkfelix:mir-borrowck-gather-and-signal-move-errors, r=nikomatsakis 2017-10-08 18:12:26 +00:00
librustc_const_eval implement pattern-binding-modes RFC 2017-10-06 16:30:23 -04:00
librustc_const_math change #![feature(const_fn)] to specific gates 2017-09-16 15:53:02 +00:00
librustc_cratesio_shim Remove rustc_bitflags; use the bitflags crate 2017-09-17 14:19:24 -04:00
librustc_data_structures Generate ScopeId using newtype_index macro 2017-10-04 23:51:43 -03:00
librustc_driver Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundi 2017-10-10 02:54:14 +00:00
librustc_errors fix comment typo, CodeSuggestion path in doc comment 2017-09-29 23:42:24 -07:00
librustc_incremental Auto merge of #44983 - vitiral:dirty_clean_groups, r=michaelwoerister 2017-10-08 03:02:35 +00:00
librustc_lint Auto merge of #44966 - zackmdavis:no_mangle_no_snake, r=aturon 2017-10-03 02:26:27 +00:00
librustc_llvm Auto merge of #45041 - est31:master, r=alexcrichton 2017-10-09 04:59:02 +00:00
librustc_lsan
librustc_metadata incr.comp.: Remove support for loading metadata fingerprints. 2017-09-23 19:47:37 +02:00
librustc_mir MIR-borrowck: Big fix to fn check_if_path_is_moved. 2017-10-11 22:35:02 +02:00
librustc_msan
librustc_passes Implement underscore lifetimes 2017-09-20 23:45:05 -07:00
librustc_platform_intrinsics Auto merge of #44885 - lu-zero:master, r=alexcrichton 2017-10-02 17:18:20 +00:00
librustc_plugin *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
librustc_privacy Use recorded types in rustc_privacy 2017-09-23 00:50:46 +03:00
librustc_resolve Auto merge of #44215 - oli-obk:import_sugg, r=nrc 2017-09-21 20:12:22 +00:00
librustc_save_analysis Use NodeId/HirId instead of DefId for local variables. 2017-09-08 22:00:59 +03:00
librustc_trans Auto merge of #45111 - aidanhs:aphs-bubble-worker-failures, r=alexcrichton 2017-10-09 16:31:15 +00:00
librustc_trans_utils Fix error 2017-09-25 08:17:37 +02:00
librustc_tsan Move unused-extern-crate to late pass 2017-08-27 19:02:24 +09:00
librustc_typeck implement pattern-binding-modes RFC 2017-10-06 16:30:23 -04:00
librustdoc Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundi 2017-10-10 02:54:14 +00:00
libserialize *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
libstd Auto merge of #45141 - kennytm:rollup, r=kennytm 2017-10-10 08:30:10 +00:00
libstd_unicode [libstd_unicode] Expose UnicodeVersion type 2017-09-18 20:39:17 -07:00
libsyntax Rollup merge of #45060 - topecongiro:semi-in-local-span, r=petrochenkov 2017-10-08 13:39:02 +08:00
libsyntax_ext only set non-ADT derive error once per attribute, not per trait 2017-09-21 21:20:23 -07:00
libsyntax_pos Rename FileMap::path and change to an Option 2017-10-03 19:47:33 +10:00
libterm *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
libtest Remove nacl from libtest 2017-10-05 05:04:40 +02:00
libunwind *: remove crate_{name,type} attributes 2017-08-25 16:18:21 -04:00
llvm@c7a16bd57c Faster compile times for release builds with llvm fix 2017-10-05 18:56:23 +00:00
rt
rtstartup Normalize spaces in lang attributes. 2017-09-28 01:30:25 -07:00
rustc Trim and document compiler-builtins shim 2017-10-06 20:35:57 -04:00
rustllvm rustc: Implement ThinLTO 2017-10-07 08:17:52 -07:00
test Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundi 2017-10-10 02:54:14 +00:00
tools Auto merge of #45141 - kennytm:rollup, r=kennytm 2017-10-10 08:30:10 +00:00
Cargo.lock Generate Idx in nll using newtype_index! 2017-10-04 23:50:53 -03:00
Cargo.toml Update to the cc crate 2017-09-28 07:45:50 -07:00
stage0.txt Bump to 1.22.0 2017-08-31 06:58:58 -07:00