Skip to content

Rust 1.19 regression, split_by 0.2.0 #42465

@brson

Description

@brson
Contributor

https://github.com/jsen-/split_by

commit 7e4ffa79e477491849b58b329a2854d7d0932850
Author: jsen- <max.enhanced@gmail.com>
Date:   Tue Aug 30 19:17:27 2016 +0200

    bump version to 0.2

brian@ip-10-145-43-250:~/dev/slate/split_by⟫ cargo +nightly test
   Compiling libc v0.2.23
   Compiling memchr v0.1.11
   Compiling aho-corasick v0.5.3
   Compiling split_by v0.2.0 (file:///mnt2/dev/slate/split_by)
    Finished dev [unoptimized + debuginfo] target(s) in 3.86 secs
     Running target/debug/deps/split_by-20b8b051e8ea2b97

running 7 tests
test tests::empty ... ok
test tests::both ... ok
test tests::consecutive ... ok
test tests::leading ... ok
test tests::not_present ... ok
test tests::plain ... ok
test tests::trailing ... ok

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests split_by

running 1 test
test src/lib.rs - SplitBy (line 94) ... FAILED

failures:

---- src/lib.rs - SplitBy (line 94) stdout ----
        thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'assertion failed: splits.next().unwrap().unwrap().as_slice() == b"\nlast"', <anon>:18
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', /checkout/src/librustdoc/test.rs:318
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    src/lib.rs - SplitBy (line 94)

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--doc'

cc @jsen-

Activity

Mark-Simulacrum

Mark-Simulacrum commented on Jun 6, 2017

@Mark-Simulacrum
Member

This is caused by #41785. I think this should be considered acceptable breakage and fixed unless we see to many other cases, but I'd be okay with a revert decision as well. The diff below fixes this specific case for me.

diff --git a/src/lib.rs b/src/lib.rs
index 132b5c8..3a3d321 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -103,7 +103,7 @@ impl<'a, R: Read, A: Automaton<&'a [u8]> > Iterator for SplitByIter<'a, R, A> {
 /// second
 /// ********########
 /// third
-/// ################
+/// #################
 /// last"#.split_by(&ac);
 ///
 /// assert!(splits.next().unwrap().unwrap().as_slice() == b"first\n");
jsen-

jsen- commented on Jun 6, 2017

@jsen-
Contributor

Hey guys, just to let you know... I'm a bit busy now, but will take care in couple of days.
And no worries, I'm perfectly fine with this ;)

added a commit that references this issue on Jun 11, 2017
jsen-

jsen- commented on Jun 11, 2017

@jsen-
Contributor

I just pushed version 0.2.1 to crates.io.

added and removed on Jun 12, 2017
brson

brson commented on Jun 15, 2017

@brson
ContributorAuthor

Thanks @jsen- . Closing as acceptable breakage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @brson@jsen-@Mark-Simulacrum

        Issue actions

          Rust 1.19 regression, split_by 0.2.0 · Issue #42465 · rust-lang/rust