Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #43246

Merged
merged 17 commits into from
Jul 15, 2017
Merged

Rollup of 8 pull requests #43246

merged 17 commits into from
Jul 15, 2017

Conversation

cuviper and others added 17 commits July 10, 2017 17:06
This is a workaround for rust-lang#42778, which was git-bisected to rust-lang#40454's
optimizations to `mem::swap`, later moved to `ptr` in rust-lang#42819.  Natively
compiled rustc couldn't even compile stage1 libcore on powerpc64 and
s390x, but they work fine without this `repr(simd)`.  Since powerpc64le
works OK, it seems probably related to being big-endian.

The underlying problem is not yet known, but this at least makes those
architectures functional again in the meantime.

cc @arielb1
These are overridden by slice::Iter
`position` could not be implemented because calling `rposition`
on the inner iterator would require more trait bounds.
Replace all `'C' as u8` with `b'C'`.
Forward more Iterator methods

This allows in more cases to take advantage of specific (possibly more optimized) impls of these methods, rather than the default one defined for all `Iterator`s.

I also wanted to do this for `&mut I` and `Box<I>`, but that didn’t compile for two reasons:

* To make the trait object-safe, generic methods (e.g. that take a closure parameter) have a `where Self: Sized` bound. But e.g. `Box<I>: Sized` does not imply `I: Sized`, and adding an additional bound in the impl is not allowed. Some for of specialization would be needed here.
* With e.g. a `F: FnMut(Self::Item) -> bool` bound and a `type Item = I::Item` associated types, I got errors like `F does not implement FnMut(I::Item) -> bool`. This looks like a limitation in the trait resolution system not recognizing that `Self::Item == I::Item` or "propagating" that fact to `FnMut` bounds.
…ng, r=Mark-Simulacrum

fail in case nothing to run was found

Fixes rust-lang#43121.

r? @Mark-Simulacrum
Disable big-endian simd in swap_nonoverlapping_bytes

This is a workaround for rust-lang#42778, which was git-bisected to rust-lang#40454's
optimizations to `mem::swap`, later moved to `ptr` in rust-lang#42819.  Natively
compiled rustc couldn't even compile stage1 libcore on powerpc64 and
s390x, but they work fine without this `repr(simd)`.  Since powerpc64le
works OK, it seems probably related to being big-endian.

The underlying problem is not yet known, but this at least makes those
architectures functional again in the meantime.

cc @arielb1
Fix sys::redox::net::tcp

A change to the upper level API needed to be filtered down
windows::fs::symlink_dir: fix example to actually use symlink_dir

I don't have a windows machine, so I couldn't test if this doctest still works -- but it looks trivial enough. (I know, famous last words.)
Fix backtrace on Redox

This fixes sys::backtrace on Redox
…ative-hahaha, r=steveklabnik

Fix minor typo in std::path documentation.

Fix minor typo in `std::path` documentation.

Replace all `'C' as u8` with `b'C'`.
…isdreavus

Update the books.

`python x.py test src\doc` passes on my machine.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@frewsxcv
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Jul 15, 2017

📌 Commit e3825ec has been approved by frewsxcv

@bors
Copy link
Contributor

bors commented Jul 15, 2017

⌛ Testing commit e3825ec with merge aadab827b13792f3156c8fe3b3481460acc5860c...

@bors
Copy link
Contributor

bors commented Jul 15, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Jul 15, 2017

dist-i586-gnu-i686-musl failed at slice::test_box_slice_clone_panics. Maybe spurious? Since threads and atomic are involved this may be a musl bug.

[01:21:56] test slice::test_capacity ... ok
[01:21:56] test slice::test_chunksator ... ok
[01:21:56] test slice::test_chunksator_0 ... ok
[01:21:56] thread '<unnamed>' panicked at 'explicit panic', /checkout/src/liballoc/../liballoc/tests/slice.rs:1194:16
[01:21:56] test slice::test_concat ... ok
[01:21:56] �(B�[m�[31m�[1merror:�(B�[m An unknown error occurred
[01:21:56] �(B�[m
[01:21:56] To learn more, run the command again with --verbose.
[01:21:56] 
[01:21:56] 
[01:21:56] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "-j" "4" "--target" "i686-unknown-linux-musl" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--features" "panic-unwind jemalloc backtrace" "-p" "std:0.0.0" "-p" "alloc:0.0.0" "-p" "compiler_builtins:0.0.0" "-p" "unwind:0.0.0" "-p" "core:0.0.0" "-p" "std_unicode:0.0.0" "-p" "libc:0.0.0" "-p" "alloc_system:0.0.0" "-p" "rustc_lsan:0.0.0" "-p" "rustc_asan:0.0.0" "-p" "panic_abort:0.0.0" "-p" "rustc_msan:0.0.0" "-p" "collections:0.0.0" "-p" "rustc_tsan:0.0.0" "-p" "rand:0.0.0" "--"
[01:21:56] expected success, got: exit code: 101
[01:21:56] 
[01:21:56] 
[01:21:56] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target i686-unknown-linux-musl --target i586-unknown-linux-gnu
[01:21:56] Build completed unsuccessfully in 1:20:21
[01:21:56] �(B�[m
Line 1194 of slice.rs:
#[test]
#[cfg_attr(target_os = "emscripten", ignore)]
fn test_box_slice_clone_panics() {
    use std::sync::Arc;
    use std::sync::atomic::{AtomicUsize, Ordering};
    use std::thread::spawn;

    struct Canary {
        count: Arc<AtomicUsize>,
        panics: bool,
    }

    impl Drop for Canary {
        fn drop(&mut self) {
            self.count.fetch_add(1, Ordering::SeqCst);
        }
    }

    impl Clone for Canary {
        fn clone(&self) -> Self {
            if self.panics {
                panic!()      // <---------------------------- line 1194
            }

            Canary {
                count: self.count.clone(),
                panics: self.panics,
            }
        }
    }

    let drop_count = Arc::new(AtomicUsize::new(0));
    let canary = Canary {
        count: drop_count.clone(),
        panics: false,
    };
    let panic = Canary {
        count: drop_count.clone(),
        panics: true,
    };

    spawn(move || {
            // When xs is dropped, +5.
            let xs = vec![canary.clone(), canary.clone(), canary.clone(), panic, canary]
                .into_boxed_slice();

            // When panic is cloned, +3.
            xs.clone();
        })
        .join()
        .unwrap_err();

    // Total = 8
    assert_eq!(drop_count.load(Ordering::SeqCst), 8);
}

@steveklabnik
Copy link
Member

@bors: retry

given that travis passed, yes, I'm guessing this is spurious

@bors
Copy link
Contributor

bors commented Jul 15, 2017

⌛ Testing commit e3825ec with merge a783fe2...

bors added a commit that referenced this pull request Jul 15, 2017
Rollup of 8 pull requests

- Successful merges: #43074, #43145, #43159, #43202, #43222, #43228, #43229, #43240
- Failed merges:
@bors
Copy link
Contributor

bors commented Jul 15, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: frewsxcv
Pushing a783fe2 to master...

@bors bors merged commit e3825ec into rust-lang:master Jul 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.