rust/src
bors 467aaab50e Auto merge of #41325 - eddyb:isolate-snapshots-for-good, r=arielb1
Ban registering obligations during InferCtxt snapshots.

Back in #33852, a flag was added to `InferCtxt` to prevent rolling back a snapshot if obligations were added to some `FulfillmentContext` during the snapshot, to prevent leaking fresh inference variables (created during that snapshot, so their indices would get reused) in obligations, which could ICE or worse.

But that isn't enough in the long run, as type-checking ends up relying on success implying that eager side-effects are fine, and while stray obligations *do* get caught nowadays, those errors prevent, e.g. the speculative coercions from #37658, which *have to* be rolled back *even* if they succeed.

We can't just allow those obligations to stay around though, because we end up, again, in ICEs or worse.
Instead, this PR modifies `lookup_method_in_trait_adjusted` to return `InferOk` containing the obligations that `Autoderef::finalize_as_infer_ok` can propagate to deref coercions.

As there shouldn't be *anything* left that registers obligations during snapshots, it's completely banned.

r? @nikomatsakis @arielb1
2017-04-19 08:40:27 +00:00
..
bootstrap Auto merge of #41170 - Nashenas88:master, r=alexcrichton 2017-04-19 05:54:23 +00:00
build_helper
ci Auto merge of #41157 - aidanhs:aphs-debug-appveyor-cache, r=TimNN 2017-04-16 22:24:36 +00:00
compiler-rt@d30da544a8
doc Rollup merge of #40290 - 3Hren:master, r=aturon 2017-04-18 14:05:42 -04:00
driver
etc Remove non-breaking spaces 2017-04-17 17:49:35 +01:00
grammar
jemalloc@11bfb0dcf8
liballoc Specialize Vec::from_elem<u8> to use calloc or memset 2017-04-15 09:01:56 -07:00
liballoc_jemalloc Specialize Vec::from_elem<u8> to use calloc or memset 2017-04-15 09:01:56 -07:00
liballoc_system Specialize Vec::from_elem<u8> to use calloc or memset 2017-04-15 09:01:56 -07:00
libarena
libbacktrace
libcollections Rollup merge of #40290 - 3Hren:master, r=aturon 2017-04-18 14:05:42 -04:00
libcompiler_builtins
libcore Rollup merge of #41262 - jonhoo:compiler-barrier-rename, r=alexcrichton 2017-04-17 23:21:17 -04:00
libflate
libfmt_macros
libgetopts
libgraphviz
liblibc@05a2d19735
libpanic_abort
libpanic_unwind
libproc_macro
libproc_macro_plugin
librand Avoid to use floating point match 2017-04-14 03:39:03 +02:00
librustc Auto merge of #41325 - eddyb:isolate-snapshots-for-good, r=arielb1 2017-04-19 08:40:27 +00:00
librustc_asan
librustc_back Compile WASM as WASM instead of asm.js 2017-04-14 19:17:03 +02:00
librustc_bitflags
librustc_borrowck Auto merge of #41153 - petrochenkov:umove, r=pnkfelix 2017-04-14 16:28:14 +00:00
librustc_const_eval convert calls to visit_all_item_likes_in_krate 2017-04-18 07:08:40 -04:00
librustc_const_math
librustc_data_structures
librustc_driver kill a bunch of one off tasks 2017-04-18 08:20:12 -04:00
librustc_errors
librustc_incremental rustc: use monomorphic const_eval for cross-crate enum discriminants. 2017-04-16 01:31:37 +03:00
librustc_lint Compress ReprOptions a little bit 2017-04-16 16:17:13 +03:00
librustc_llvm
librustc_lsan
librustc_metadata rustc: use monomorphic const_eval for cross-crate enum discriminants. 2017-04-16 01:31:37 +03:00
librustc_mir Rollup merge of #41361 - arielb1:move-mir-init, r=pnkfelix 2017-04-18 14:05:45 -04:00
librustc_msan
librustc_passes convert calls to visit_all_item_likes_in_krate 2017-04-18 07:08:40 -04:00
librustc_platform_intrinsics
librustc_plugin kill a bunch of one off tasks 2017-04-18 08:20:12 -04:00
librustc_privacy
librustc_resolve feature gate :vis matcher 2017-04-15 19:06:58 +00:00
librustc_save_analysis
librustc_trans Rollup merge of #41361 - arielb1:move-mir-init, r=pnkfelix 2017-04-18 14:05:45 -04:00
librustc_tsan
librustc_typeck Auto merge of #41325 - eddyb:isolate-snapshots-for-good, r=arielb1 2017-04-19 08:40:27 +00:00
librustdoc Rollup merge of #41310 - eddyb:demand-const-eval, r=nikomatsakis 2017-04-17 23:21:18 -04:00
libserialize
libstd Rollup merge of #41364 - alexcrichton:less-backtrace-prune, r=petrochenkov 2017-04-18 14:05:46 -04:00
libstd_unicode
libsyntax Auto merge of #41282 - arielb1:missing-impl-item, r=petrochenkov 2017-04-17 22:22:56 +00:00
libsyntax_ext
libsyntax_pos
libterm
libtest
libunwind
llvm@2e951c3ae3
rt Hoedown big comeback! 2017-04-17 18:10:03 +02:00
rtstartup
rust-installer@4f99485080
rustc
rustllvm
test Auto merge of #41325 - eddyb:isolate-snapshots-for-good, r=arielb1 2017-04-19 08:40:27 +00:00
tools Rollup merge of #41290 - GuillaumeGomez:put-back-hoedown, r=steveklabnik 2017-04-17 13:26:21 -04:00
Cargo.lock rustc: expose monomorphic const_eval through on-demand. 2017-04-16 01:31:06 +03:00
Cargo.toml
stage0.txt