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 6 pull requests #64369

Merged
merged 17 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,9 @@ pub mod vec;
mod std {
pub use core::ops; // RangeFull
}

#[doc(hidden)]
#[unstable(feature = "liballoc_internals", issue = "0", reason = "implementation detail")]
pub mod __export {
pub use core::format_args;
}
2 changes: 1 addition & 1 deletion src/liballoc/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ macro_rules! vec {
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
macro_rules! format {
($($arg:tt)*) => ($crate::fmt::format(::core::format_args!($($arg)*)))
($($arg:tt)*) => ($crate::fmt::format($crate::__export::format_args!($($arg)*)))
}
6 changes: 2 additions & 4 deletions src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,9 +979,8 @@ impl<T> AtomicPtr<T> {
/// let some_ptr = AtomicPtr::new(ptr);
///
/// let other_ptr = &mut 10;
/// let another_ptr = &mut 10;
///
/// let value = some_ptr.compare_and_swap(other_ptr, another_ptr, Ordering::Relaxed);
/// let value = some_ptr.compare_and_swap(ptr, other_ptr, Ordering::Relaxed);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1021,9 +1020,8 @@ impl<T> AtomicPtr<T> {
/// let some_ptr = AtomicPtr::new(ptr);
///
/// let other_ptr = &mut 10;
/// let another_ptr = &mut 10;
///
/// let value = some_ptr.compare_exchange(other_ptr, another_ptr,
/// let value = some_ptr.compare_exchange(ptr, other_ptr,
/// Ordering::SeqCst, Ordering::Relaxed);
/// ```
#[inline]
Expand Down
4 changes: 4 additions & 0 deletions src/librustc_target/spec/wasm32_wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ pub fn target() -> Result<Target, String> {
options.crt_static_default = true;
options.crt_static_respected = true;

// Allow `+crt-static` to create a "cdylib" output which is just a wasm file
// without a main function.
options.crt_static_allows_dylibs = true;

Ok(Target {
llvm_target: "wasm32-wasi".to_string(),
target_endian: "little".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn render(
edition: Edition
) -> i32 {
let mut output = options.output;
output.push(input.file_stem().unwrap());
output.push(input.file_name().unwrap());
output.set_extension("html");

let mut css = String::new();
Expand Down
6 changes: 4 additions & 2 deletions src/libstd/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,10 @@ impl CStr {
/// Wraps a raw C string with a safe C string wrapper.
///
/// This function will wrap the provided `ptr` with a `CStr` wrapper, which
/// allows inspection and interoperation of non-owned C strings. This method
/// is unsafe for a number of reasons:
/// allows inspection and interoperation of non-owned C strings. The total
/// size of the raw C string must be smaller than `isize::MAX` **bytes**
/// in memory due to calling the `slice::from_raw_parts` function.
/// This method is unsafe for a number of reasons:
///
/// * There is no guarantee to the validity of `ptr`.
/// * The returned lifetime is not guaranteed to be the actual lifetime of
Expand Down
2 changes: 0 additions & 2 deletions src/libstd/sys/vxworks/fast_thread_local.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2019 Wind River Systems, Inc.

#![cfg(target_thread_local)]
#![unstable(feature = "thread_local_internals", issue = "0")]

Expand Down
4 changes: 2 additions & 2 deletions src/libstd/sys/vxworks/process/process_vxworks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::sys;
use crate::sys::cvt;
use crate::sys::process::rtp;
use crate::sys::process::process_common::*;
use crate::sys_common::thread;

////////////////////////////////////////////////////////////////////////////////
// Command
Expand Down Expand Up @@ -57,8 +58,7 @@ impl Command {
self.get_argv().as_ptr() as *const _, // argv
*sys::os::environ() as *const *const c_char,
100 as c_int, // initial priority
0x16000, // initial stack size. 0 defaults
// to 0x4000 in 32 bit and 0x8000 in 64 bit
thread::min_stack(), // initial stack size.
0, // options
0 // task options
);
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/vxworks/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::time::Duration;

use crate::sys_common::thread::*;

pub const DEFAULT_MIN_STACK_SIZE: usize = 2 * 1024 * 1024;
pub const DEFAULT_MIN_STACK_SIZE: usize = 0x40000; // 256K

pub struct Thread {
id: libc::pthread_t,
Expand Down