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 5 pull requests #40164

Merged
merged 10 commits into from
Mar 1, 2017
6 changes: 3 additions & 3 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/ci/docker/linux-tested-targets/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/src/structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
150 changes: 75 additions & 75 deletions src/doc/unstable-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,94 @@
[The Unstable Book](the-unstable-book.md)

- [asm](asm.md)
- [alloc_system](alloc-system.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)
- [alloc_jemalloc](alloc-jemalloc.md)
- [test](test.md)
- [alloc_system](alloc-system.md)
- [allocator](allocator.md)
- [allow_internal_unstable](allow-internal-unstable.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)
- [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)
- [conservative_impl_trait](conservative-impl-trait.md)
- [const_fn](const-fn.md)
- [const_indexing](const-indexing.md)
- [custom_attribute](custom-attribute.md)
- [custom_derive](custom-derive.md)
- [default_type_parameter_fallback](default-type-parameter-fallback.md)
- [drop_types_in_const](drop-types-in-const.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)
- [fundamental](fundamental.md)
- [generic_param_attrs](generic-param-attrs.md)
- [i128_type](i128-type.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)
- [quote](quote.md)
- [simd](simd.md)
- [rustc_diagnostic_macros](rustc-diagnostic-macros.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)
- [allocator](allocator.md)
- [fundamental](fundamental.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)
- [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)
- [never_type](never-type.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)
- [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)
- [pub_restricted](pub-restricted.md)
- [quote](quote.md)
- [relaxed_adts](relaxed-adts.md)
- [repr_simd](repr-simd.md)
- [rustc_attrs](rustc-attrs.md)
- [allow_internal_unstable](allow-internal-unstable.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)
- [associated_consts](associated-consts.md)
- [const_fn](const-fn.md)
- [const_indexing](const-indexing.md)
- [prelude_import](prelude-import.md)
- [specialization](specialization.md)
- [staged_api](staged-api.md)
- [start](start.md)
- [static_nobundle](static-nobundle.md)
- [static_recursion](static-recursion.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)
- [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)
- [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)
- [unboxed_closures](unboxed-closures.md)
- [untagged_unions](untagged-unions.md)
- [compiler_builtins](compiler-builtins.md)
- [generic_param_attrs](generic-param-attrs.md)
- [field_init_shorthand](field-init-shorthand.md)
- [windows_subsystem](windows-subsystem.md)
- [link_cfg](link-cfg.md)
- [unwind_attributes](unwind-attributes.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)
- [i128_type](i128-type.md)
- [abi_unadjusted](abi-unadjusted.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)
- [sanitizer_runtime](sanitizer-runtime.md)
- [windows_subsystem](windows-subsystem.md)
86 changes: 86 additions & 0 deletions src/test/compile-fail/feature-gate-cfg-target-has-atomic.rs
Original file line number Diff line number Diff line change
@@ -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)
}
2 changes: 1 addition & 1 deletion src/tools/rustbook/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion src/tools/tidy/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
];
Expand Down