Created
June 8, 2016 06:10
-
-
Save imjacobclark/ff16da7b0cf4868773d38b940b843bf0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jacobclark:~/Desktop/rust]$ make check-stage1-cfail TESTNAME=issue-25579 -j4 (ice-test-case-25579✱) | |
cfg: version 1.11.0-dev (81be48f3b 2016-06-08) | |
cfg: build triple x86_64-apple-darwin | |
cfg: host triples x86_64-apple-darwin | |
cfg: target triples x86_64-apple-darwin | |
cfg: host for x86_64-apple-darwin is x86_64 | |
cfg: os for x86_64-apple-darwin is apple-darwin | |
cfg: have good valgrind for x86_64-apple-darwin | |
cfg: using CC=clang (CFG_CC) | |
cfg: using CXX=clang++ (CFG_CXX) | |
cfg: disabling valgrind run-pass tests | |
cfg: including test rules | |
cfg: lexer tooling not available, skipping lexer test... | |
run cfail [x86_64-apple-darwin]: x86_64-apple-darwin/stage1/bin/compiletest | |
running 1 test | |
test [compile-fail] compile-fail/issue-25579.rs ... FAILED | |
failures: | |
---- [compile-fail] compile-fail/issue-25579.rs stdout ---- | |
error: /Users/jacobclark/Desktop/rust/src/test/compile-fail/issue-25579.rs:19: unexpected "error": '19:32: 19:44: cannot borrow `l.0` as mutable more than once at a time [E0499]' | |
error: 1 unexpected errors found, 0 expected errors not found | |
status: exit code: 101 | |
command: x86_64-apple-darwin/stage1/bin/rustc /Users/jacobclark/Desktop/rust/src/test/compile-fail/issue-25579.rs -L x86_64-apple-darwin/test/compile-fail/ --target=x86_64-apple-darwin --error-format json -Z unstable-options -L x86_64-apple-darwin/test/compile-fail/issue-25579.stage1-x86_64-apple-darwin.compile-fail.libaux -C prefer-dynamic -o x86_64-apple-darwin/test/compile-fail/issue-25579.stage1-x86_64-apple-darwin --cfg rtopt -C rpath -O -L x86_64-apple-darwin/rt | |
actual errors (from JSON output): [ | |
Error { | |
line_num: 19, | |
kind: Some( | |
Error | |
), | |
msg: "19:32: 19:44: cannot borrow `l.0` as mutable more than once at a time [E0499]" | |
}, | |
Error { | |
line_num: 19, | |
kind: Some( | |
Error | |
), | |
msg: "19:32: 19:44: cannot borrow `l.0` as mutable more than once at a time [E0499]" | |
}, | |
Error { | |
line_num: 19, | |
kind: Some( | |
Note | |
), | |
msg: "first mutable borrow occurs here" | |
}, | |
Error { | |
line_num: 19, | |
kind: Some( | |
Note | |
), | |
msg: "second mutable borrow occurs here" | |
}, | |
Error { | |
line_num: 23, | |
kind: Some( | |
Note | |
), | |
msg: "first borrow ends here" | |
}, | |
Error { | |
line_num: 20, | |
kind: Some( | |
Error | |
), | |
msg: "20:13: 20:28: cannot assign to `l` because it is borrowed [E0506]" | |
}, | |
Error { | |
line_num: 19, | |
kind: Some( | |
Note | |
), | |
msg: "borrow of `l` occurs here" | |
}, | |
Error { | |
line_num: 20, | |
kind: Some( | |
Note | |
), | |
msg: "assignment to borrowed `l` occurs here" | |
} | |
] | |
expected errors (from test file): [ | |
Error { | |
line_num: 19, | |
kind: Some( | |
Error | |
), | |
msg: "cannot borrow `l.0` as mutable more than once at a time [E0499]" | |
}, | |
Error { | |
line_num: 20, | |
kind: Some( | |
Error | |
), | |
msg: "cannot assign to `l` because it is borrowed [E0506]" | |
} | |
] | |
thread '[compile-fail] compile-fail/issue-25579.rs' panicked at 'explicit panic', /Users/jacobclark/Desktop/rust/src/tools/compiletest/src/runtest.rs:1077 | |
note: Run with `RUST_BACKTRACE=1` for a backtrace. | |
failures: | |
[compile-fail] compile-fail/issue-25579.rs | |
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured | |
thread 'main' panicked at 'Some tests failed', /Users/jacobclark/Desktop/rust/src/tools/compiletest/src/main.rs:282 | |
make: *** [tmp/check-stage1-T-x86_64-apple-darwin-H-x86_64-apple-darwin-cfail.ok] Error 101 | |
[jacobclark:~/Desktop/rust]$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT | |
// file at the top-level directory of this distribution and at | |
// http://rust-lang.org/COPYRIGHT. | |
// | |
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
// option. This file may not be copied, modified, or distributed | |
// except according to those terms. | |
enum Sexpression { | |
Num(()), | |
Cons(&'static mut Sexpression) | |
} | |
fn causes_ice(mut l: &mut Sexpression) { | |
loop { match l { | |
&mut Sexpression::Num(ref mut n) => {}, | |
&mut Sexpression::Cons(ref mut expr) => { //~ ERROR cannot borrow `l.0` as mutable more than once at a time [E0499] | |
l = &mut **expr; //~ ERROR cannot assign to `l` because it is borrowed [E0506] | |
} | |
}} | |
} | |
fn main() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment