Auto merge of #40164 - steveklabnik:rollup, r=steveklabnik

Rollup of 5 pull requests

- Successful merges: #40130, #40142, #40150, #40151, #40153
- Failed merges:
This commit is contained in:
bors 2017-03-01 00:58:13 +00:00
commit 2f52386f10
7 changed files with 173 additions and 88 deletions

6
src/Cargo.lock generated
View File

@ -270,7 +270,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "mdbook"
version = "0.0.16"
version = "0.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"clap 2.20.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -401,7 +401,7 @@ name = "rustbook"
version = "0.1.0"
dependencies = [
"clap 2.20.5 (registry+https://github.com/rust-lang/crates.io-index)",
"mdbook 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"mdbook 0.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -976,7 +976,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6abe0ee2e758cd6bc8a2cd56726359007748fbf4128da998b65d0b70f881e19b"
"checksum libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "684f330624d8c3784fb9558ca46c4ce488073a8d22450415c5eb4f4cfb0d11b5"
"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054"
"checksum mdbook 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "14e8a6aca534ac51bad1c1886b10f6d6948a14fa70b1b20a1e41c9e5c0fe3019"
"checksum mdbook 0.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "dbba458ca886cb082d026afd704eeeeb0531f7e4ffd6c619f72dc309c1c18fe4"
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
"checksum num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a16a42856a256b39c6d3484f097f6713e14feacd9bfb02290917904fae46c81c"
"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3"

View File

@ -39,8 +39,8 @@ ENV RUST_CONFIGURE_ARGS \
# way to produce "super compatible" binaries.
#
# See: https://github.com/rust-lang/rust/issues/34978
ENV CFLAGS_i686_unknown_linux_gnu=-Wa,-mrelax-relocations=no \
CFLAGS_x86_64_unknown_linux_gnu=-Wa,-mrelax-relocations=no
ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no \
CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no
ENV SCRIPT \
python2.7 ../x.py test \

View File

@ -88,7 +88,7 @@ fn main() {
}
```
Your structure can still contain `&mut` pointers, which will let
Your structure can still contain `&mut` references, which will let
you do some kinds of mutation:
```rust

View File

@ -1,94 +1,94 @@
[The Unstable Book](the-unstable-book.md)
- [asm](asm.md)
- [alloc_system](alloc-system.md)
- [alloc_jemalloc](alloc-jemalloc.md)
- [test](test.md)
- [concat_idents](concat-idents.md)
- [link_args](link-args.md)
- [log_syntax](log-syntax.md)
- [non_ascii_idents](non-ascii-idents.md)
- [plugin_registrar](plugin-registrar.md)
- [thread_local](thread-local.md)
- [trace_macros](trace-macros.md)
- [intrinsics](intrinsics.md)
- [lang_items](lang-items.md)
- [link_llvm_intrinsics](link-llvm-intrinsics.md)
- [linkage](linkage.md)
- [quote](quote.md)
- [simd](simd.md)
- [rustc_diagnostic_macros](rustc-diagnostic-macros.md)
- [abi_msp430_interrupt](abi-msp430-interrupt.md)
- [abi_ptx](abi-ptx.md)
- [abi_sysv64](abi-sysv64.md)
- [abi_unadjusted](abi-unadjusted.md)
- [abi_vectorcall](abi-vectorcall.md)
- [advanced_slice_patterns](advanced-slice-patterns.md)
- [box_syntax](box-syntax.md)
- [placement_in_syntax](placement-in-syntax.md)
- [unboxed_closures](unboxed-closures.md)
- [alloc_jemalloc](alloc-jemalloc.md)
- [alloc_system](alloc-system.md)
- [allocator](allocator.md)
- [fundamental](fundamental.md)
- [main](main.md)
- [needs_allocator](needs-allocator.md)
- [on_unimplemented](on-unimplemented.md)
- [plugin](plugin.md)
- [simd_ffi](simd-ffi.md)
- [start](start.md)
- [structural_match](structural-match.md)
- [panic_runtime](panic-runtime.md)
- [needs_panic_runtime](needs-panic-runtime.md)
- [optin_builtin_traits](optin-builtin-traits.md)
- [macro_reexport](macro-reexport.md)
- [staged_api](staged-api.md)
- [no_core](no-core.md)
- [box_patterns](box-patterns.md)
- [dropck_parametricity](dropck-parametricity.md)
- [dropck_eyepatch](dropck-eyepatch.md)
- [custom_attribute](custom-attribute.md)
- [custom_derive](custom-derive.md)
- [rustc_attrs](rustc-attrs.md)
- [allow_internal_unstable](allow-internal-unstable.md)
- [slice_patterns](slice-patterns.md)
- [asm](asm.md)
- [associated_consts](associated-consts.md)
- [associated_type_defaults](associated-type-defaults.md)
- [attr_literals](attr-literals.md)
- [box_patterns](box-patterns.md)
- [box_syntax](box-syntax.md)
- [cfg_target_feature](cfg-target-feature.md)
- [cfg_target_has_atomic](cfg-target-has-atomic.md)
- [cfg_target_thread_local](cfg-target-thread-local.md)
- [cfg_target_vendor](cfg-target-vendor.md)
- [compiler_builtins](compiler-builtins.md)
- [concat_idents](concat-idents.md)
- [conservative_impl_trait](conservative-impl-trait.md)
- [const_fn](const-fn.md)
- [const_indexing](const-indexing.md)
- [prelude_import](prelude-import.md)
- [static_recursion](static-recursion.md)
- [custom_attribute](custom-attribute.md)
- [custom_derive](custom-derive.md)
- [default_type_parameter_fallback](default-type-parameter-fallback.md)
- [associated_type_defaults](associated-type-defaults.md)
- [repr_simd](repr-simd.md)
- [cfg_target_feature](cfg-target-feature.md)
- [platform_intrinsics](platform-intrinsics.md)
- [unwind_attributes](unwind-attributes.md)
- [naked_functions](naked-functions.md)
- [no_debug](no-debug.md)
- [omit_gdb_pretty_printer_section](omit-gdb-pretty-printer-section.md)
- [cfg_target_vendor](cfg-target-vendor.md)
- [stmt_expr_attributes](stmt-expr-attributes.md)
- [type_ascription](type-ascription.md)
- [cfg_target_thread_local](cfg-target-thread-local.md)
- [abi_vectorcall](abi-vectorcall.md)
- [inclusive_range_syntax](inclusive-range-syntax.md)
- [exclusive_range_pattern](exclusive-range-pattern.md)
- [specialization](specialization.md)
- [pub_restricted](pub-restricted.md)
- [drop_types_in_const](drop-types-in-const.md)
- [cfg_target_has_atomic](cfg-target-has-atomic.md)
- [conservative_impl_trait](conservative-impl-trait.md)
- [relaxed_adts](relaxed-adts.md)
- [never_type](never-type.md)
- [attr_literals](attr-literals.md)
- [abi_sysv64](abi-sysv64.md)
- [untagged_unions](untagged-unions.md)
- [compiler_builtins](compiler-builtins.md)
- [generic_param_attrs](generic-param-attrs.md)
- [dropck_eyepatch](dropck-eyepatch.md)
- [dropck_parametricity](dropck-parametricity.md)
- [exclusive_range_pattern](exclusive-range-pattern.md)
- [field_init_shorthand](field-init-shorthand.md)
- [windows_subsystem](windows-subsystem.md)
- [link_cfg](link-cfg.md)
- [use_extern_macros](use-extern-macros.md)
- [loop_break_value](loop-break-value.md)
- [target_feature](target-feature.md)
- [abi_ptx](abi-ptx.md)
- [fundamental](fundamental.md)
- [generic_param_attrs](generic-param-attrs.md)
- [i128_type](i128-type.md)
- [abi_unadjusted](abi-unadjusted.md)
- [inclusive_range_syntax](inclusive-range-syntax.md)
- [intrinsics](intrinsics.md)
- [lang_items](lang-items.md)
- [link_args](link-args.md)
- [link_cfg](link-cfg.md)
- [link_llvm_intrinsics](link-llvm-intrinsics.md)
- [linkage](linkage.md)
- [log_syntax](log-syntax.md)
- [loop_break_value](loop-break-value.md)
- [macro_reexport](macro-reexport.md)
- [main](main.md)
- [naked_functions](naked-functions.md)
- [needs_allocator](needs-allocator.md)
- [needs_panic_runtime](needs-panic-runtime.md)
- [never_type](never-type.md)
- [no_core](no-core.md)
- [no_debug](no-debug.md)
- [non_ascii_idents](non-ascii-idents.md)
- [omit_gdb_pretty_printer_section](omit-gdb-pretty-printer-section.md)
- [on_unimplemented](on-unimplemented.md)
- [optin_builtin_traits](optin-builtin-traits.md)
- [panic_runtime](panic-runtime.md)
- [placement_in_syntax](placement-in-syntax.md)
- [platform_intrinsics](platform-intrinsics.md)
- [plugin](plugin.md)
- [plugin_registrar](plugin-registrar.md)
- [prelude_import](prelude-import.md)
- [proc_macro](proc-macro.md)
- [struct_field_attributes](struct-field-attributes.md)
- [static_nobundle](static-nobundle.md)
- [abi_msp430_interrupt](abi-msp430-interrupt.md)
- [pub_restricted](pub-restricted.md)
- [quote](quote.md)
- [relaxed_adts](relaxed-adts.md)
- [repr_simd](repr-simd.md)
- [rustc_attrs](rustc-attrs.md)
- [rustc_diagnostic_macros](rustc-diagnostic-macros.md)
- [sanitizer_runtime](sanitizer-runtime.md)
- [simd](simd.md)
- [simd_ffi](simd-ffi.md)
- [slice_patterns](slice-patterns.md)
- [specialization](specialization.md)
- [staged_api](staged-api.md)
- [start](start.md)
- [static_nobundle](static-nobundle.md)
- [static_recursion](static-recursion.md)
- [stmt_expr_attributes](stmt-expr-attributes.md)
- [struct_field_attributes](struct-field-attributes.md)
- [structural_match](structural-match.md)
- [target_feature](target-feature.md)
- [test](test.md)
- [thread_local](thread-local.md)
- [trace_macros](trace-macros.md)
- [type_ascription](type-ascription.md)
- [unboxed_closures](unboxed-closures.md)
- [untagged_unions](untagged-unions.md)
- [unwind_attributes](unwind-attributes.md)
- [use_extern_macros](use-extern-macros.md)
- [windows_subsystem](windows-subsystem.md)

View File

@ -0,0 +1,86 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![crate_type="rlib"]
#![no_core]
extern "rust-intrinsic" {
fn atomic_xadd<T>(dst: *mut T, src: T) -> T;
}
#[lang = "sized"]
trait Sized {}
#[lang = "copy"]
trait Copy {}
#[cfg(target_has_atomic = "8")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_u8(x: *mut u8) {
atomic_xadd(x, 1);
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "8")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_i8(x: *mut i8) {
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "16")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_u16(x: *mut u16) {
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "16")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_i16(x: *mut i16) {
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "32")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_u32(x: *mut u32) {
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "32")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_i32(x: *mut i32) {
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "64")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_u64(x: *mut u64) {
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "64")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_i64(x: *mut i64) {
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "ptr")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_usize(x: *mut usize) {
atomic_xadd(x, 1);
}
#[cfg(target_has_atomic = "ptr")]
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
pub unsafe fn atomic_isize(x: *mut isize) {
atomic_xadd(x, 1);
}
fn main() {
cfg!(target_has_atomic = "8");
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
cfg!(target_has_atomic = "16");
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
cfg!(target_has_atomic = "32");
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
cfg!(target_has_atomic = "64");
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
cfg!(target_has_atomic = "ptr");
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
}

View File

@ -8,5 +8,5 @@ license = "MIT/Apache-2.0"
clap = "2.19.3"
[dependencies.mdbook]
version = "0.0.16"
version = "0.0.17"
default-features = false

View File

@ -168,7 +168,6 @@ pub fn check(path: &Path, bad: &mut bool) {
// FIXME get this whitelist empty.
let whitelist = vec![
"abi_ptx", "simd",
"cfg_target_has_atomic",
"stmt_expr_attributes",
"cfg_target_thread_local", "unwind_attributes",
];