Skip to content

Instantly share code, notes, and snippets.

332 bitflags-c766txpyiwjn
332 cfg_if-3969hwbtn4ulv
480 panic_abort-ocbnjb7wi1m6
536 unreachable-zcnp0b6auwh
676 unicode_width-2vf1uozhcma2n
752 void-1dabsef7p4oi4
872 rustc_asan-l9gamkeoum4l
872 rustc_lsan-1z4jkbznqq0zx
872 rustc_msan-2ha07tpwprln5
872 rustc_tsan-1zyxehq9lly67
commit 6d492a522f9eb4e6ceb5ba61ad05b09645ffe6d1
Author: Niko Matsakis <[email protected]>
Date: Thu Nov 16 17:11:36 2017 -0500
fix revisions
diff --git a/src/test/compile-fail/issue-36082.rs b/src/test/compile-fail/issue-36082.rs
index eacd0760d2..a9319ae6a9 100644
--- a/src/test/compile-fail/issue-36082.rs
+++ b/src/test/compile-fail/issue-36082.rs
stage0-incremental/alloc-15h2tauxnhf53:
total 4
drwxrwxr-x 2 nmatsakis nmatsakis 4096 Nov 14 11:59 s-evho90s1jp-8ysmzt-3gw9r0lcp1mcs
-rwx------ 1 nmatsakis nmatsakis 0 Nov 14 11:59 s-evho90s1jp-8ysmzt.lock
stage0-incremental/alloc-b193p64bwmbk:
total 4
drwxrwxr-x 2 nmatsakis nmatsakis 4096 Nov 2 10:04 s-ev4b4sfkd5-169mudu-3dct3cjfk67ns
-rwx------ 1 nmatsakis nmatsakis 0 Nov 2 10:04 s-ev4b4sfkd5-169mudu.lock
24 stage0-incremental/rustc_cratesio_shim-1tka4fn2166sx
28 stage0-incremental/bitflags-107vd6larl013
28 stage0-incremental/bitflags-1086ntqmj0bdj
28 stage0-incremental/collections-1u3wyscxlc3qs
28 stage0-incremental/debug_unreachable-1baa8bd8syv0x
28 stage0-incremental/fnv-2hecd0g68hyji
28 stage0-incremental/lazy_static-2efc6uq4zys0l
28 stage0-incremental/mac-1h4akbmy5mz9y
28 stage0-incremental/matches-3jm8lqvf6hk39
28 stage0-incremental/miniz_sys-11y7jcnt3xcsw
11844 stage0-incremental/alloc-15h2tauxnhf53
3580 stage0-incremental/alloc-b193p64bwmbk
352 stage0-incremental/alloc_system-1qykoy4er4g1c
1696 stage0-incremental/alloc_system-r3b3jpp2rbms
2884 stage0-incremental/ar-14q5s5n83cxeo
288 stage0-incremental/ar-1ke7bk10kpsua
160 stage0-incremental/arena-2a2qhc0t0lsrr
2340 stage0-incremental/arena-7devrtm4vsnc
28 stage0-incremental/bitflags-107vd6larl013
28 stage0-incremental/bitflags-1086ntqmj0bdj
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index 18607578c0..4e07c9f81f 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -1588,13 +1588,13 @@ impl<'tcx, T> FlowInProgress<T> where T: HasMoveData<'tcx> + BitDenotation<Idx =
let mut initialized = vec![];
let mut push_siblings = false; // don't look at siblings of original `mpi`.
while let Some(mpi) = todo.pop() {
- if self.curr_state.contains(&mpi) {
- initialized.push(mpi);

Regression report e312c8a8c3ecd7fead1e8a6cc591360dc73c9e79 vs. 0f6bd17a734771a17a9ef5943c8b0e8b041419a8

  • From: e312c8a8c3ecd7fead1e8a6cc591360dc73c9e79
  • To: 0f6bd17a734771a17a9ef5943c8b0e8b041419a8

Coverage

  • 11195 crates tested: 8493 working / 2151 broken / 10 regressed / 4 fixed / 537 unknown.

Regressions

How to update a borrowck test for MIR borrowck

When we fix a bug in MIR borrowck, we often want to update an existing test and show that it does the same thing for MIR and AST borrowck. This gist describes the steps to do it.

compile-fail tests

An example of a test that has been updated to test both MIR and AST borrowck is borrowck-match-already-borrowed.

// Can this lvalue be written or borrowed mutably?
fn is_mutable(lvalue) -> Result<(), &Lvalue> {
match lvalue {
// Shared borrowed data is never mutable.
deref of &T => Err(lvalue),
// Mutably borrowed data is mutable, but only if we have a unique path to the `&mut`.
deref of &mut T => can_host_mutable_ref(base),
// `*const` raw pointers are not mutable.
let mut current_predicates = map();
for each struct/enum S {
current_predicates[S] = explicit_predicates(S);
}
let mut changed = true;
while changed {
changed = false;
for each struct/enum S {