File tree 3 files changed +27
-4
lines changed
3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ function run_tests {
23
23
fi
24
24
25
25
./miri test --locked
26
- if ! [ -n " ${MIRI_TEST_TARGET+exists} " ]; then
26
+ # if ! [ -n "${MIRI_TEST_TARGET+exists}" ]; then
27
27
# 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
30
31
# "miri test" has built the sysroot for us, now this should pass without
31
32
# any interactive questions.
32
33
${PYTHON:- python3} test-cargo-miri/run-test.py
Original file line number Diff line number Diff line change 1
- 033013cab3a861224fd55f494c8be1cb0349eb49
1
+ 1a4e2b6f9c75a0e21722c88a0e3b610d6ffc3ae3
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments