Skip to content

Commit 3444456

Browse files
committed
Auto merge of #1455 - RalfJung:rustup, r=RalfJung
Rustup also stop testing with mir opts as they are currently broken
2 parents 31ad5f6 + 4788f77 commit 3444456

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

ci.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ function run_tests {
2323
fi
2424

2525
./miri test --locked
26-
if ! [ -n "${MIRI_TEST_TARGET+exists}" ]; then
26+
#if ! [ -n "${MIRI_TEST_TARGET+exists}" ]; then
2727
# Only for host architecture: tests with MIR optimizations
28-
MIRI_TEST_FLAGS="-Z mir-opt-level=3" ./miri test --locked
29-
fi
28+
# FIXME: disabled because of <https://github.com/rust-lang/rust/issues/73609>.
29+
#MIRI_TEST_FLAGS="-Z mir-opt-level=3" ./miri test --locked
30+
#fi
3031
# "miri test" has built the sysroot for us, now this should pass without
3132
# any interactive questions.
3233
${PYTHON:-python3} test-cargo-miri/run-test.py

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
033013cab3a861224fd55f494c8be1cb0349eb49
1+
1a4e2b6f9c75a0e21722c88a0e3b610d6ffc3ae3

tests/run-pass/issue-73223.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
fn main() {
2+
let mut state = State { prev: None, next: Some(8) };
3+
let path = "/nested/some/more";
4+
assert_eq!(state.rest(path), "some/more");
5+
}
6+
7+
struct State {
8+
prev: Option<usize>,
9+
next: Option<usize>,
10+
}
11+
12+
impl State {
13+
fn rest<'r>(&mut self, path: &'r str) -> &'r str {
14+
let start = match self.next.take() {
15+
Some(v) => v,
16+
None => return "",
17+
};
18+
19+
self.prev = Some(start);
20+
&path[start..]
21+
}
22+
}

0 commit comments

Comments
 (0)