Skip to content

Commit 2f52386

Browse files
committed
Auto merge of #40164 - steveklabnik:rollup, r=steveklabnik
Rollup of 5 pull requests - Successful merges: #40130, #40142, #40150, #40151, #40153 - Failed merges:
2 parents be76056 + 4fd2aed commit 2f52386

File tree

7 files changed

+168
-83
lines changed

7 files changed

+168
-83
lines changed

src/Cargo.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ci/docker/linux-tested-targets/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ ENV RUST_CONFIGURE_ARGS \
3939
# way to produce "super compatible" binaries.
4040
#
4141
# See: https://github.com/rust-lang/rust/issues/34978
42-
ENV CFLAGS_i686_unknown_linux_gnu=-Wa,-mrelax-relocations=no \
43-
CFLAGS_x86_64_unknown_linux_gnu=-Wa,-mrelax-relocations=no
42+
ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no \
43+
CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no
4444

4545
ENV SCRIPT \
4646
python2.7 ../x.py test \

src/doc/book/src/structs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn main() {
8888
}
8989
```
9090

91-
Your structure can still contain `&mut` pointers, which will let
91+
Your structure can still contain `&mut` references, which will let
9292
you do some kinds of mutation:
9393

9494
```rust

src/doc/unstable-book/src/SUMMARY.md

+75-75
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
11
[The Unstable Book](the-unstable-book.md)
22

3-
- [asm](asm.md)
4-
- [alloc_system](alloc-system.md)
3+
- [abi_msp430_interrupt](abi-msp430-interrupt.md)
4+
- [abi_ptx](abi-ptx.md)
5+
- [abi_sysv64](abi-sysv64.md)
6+
- [abi_unadjusted](abi-unadjusted.md)
7+
- [abi_vectorcall](abi-vectorcall.md)
8+
- [advanced_slice_patterns](advanced-slice-patterns.md)
59
- [alloc_jemalloc](alloc-jemalloc.md)
6-
- [test](test.md)
10+
- [alloc_system](alloc-system.md)
11+
- [allocator](allocator.md)
12+
- [allow_internal_unstable](allow-internal-unstable.md)
13+
- [asm](asm.md)
14+
- [associated_consts](associated-consts.md)
15+
- [associated_type_defaults](associated-type-defaults.md)
16+
- [attr_literals](attr-literals.md)
17+
- [box_patterns](box-patterns.md)
18+
- [box_syntax](box-syntax.md)
19+
- [cfg_target_feature](cfg-target-feature.md)
20+
- [cfg_target_has_atomic](cfg-target-has-atomic.md)
21+
- [cfg_target_thread_local](cfg-target-thread-local.md)
22+
- [cfg_target_vendor](cfg-target-vendor.md)
23+
- [compiler_builtins](compiler-builtins.md)
724
- [concat_idents](concat-idents.md)
8-
- [link_args](link-args.md)
9-
- [log_syntax](log-syntax.md)
10-
- [non_ascii_idents](non-ascii-idents.md)
11-
- [plugin_registrar](plugin-registrar.md)
12-
- [thread_local](thread-local.md)
13-
- [trace_macros](trace-macros.md)
25+
- [conservative_impl_trait](conservative-impl-trait.md)
26+
- [const_fn](const-fn.md)
27+
- [const_indexing](const-indexing.md)
28+
- [custom_attribute](custom-attribute.md)
29+
- [custom_derive](custom-derive.md)
30+
- [default_type_parameter_fallback](default-type-parameter-fallback.md)
31+
- [drop_types_in_const](drop-types-in-const.md)
32+
- [dropck_eyepatch](dropck-eyepatch.md)
33+
- [dropck_parametricity](dropck-parametricity.md)
34+
- [exclusive_range_pattern](exclusive-range-pattern.md)
35+
- [field_init_shorthand](field-init-shorthand.md)
36+
- [fundamental](fundamental.md)
37+
- [generic_param_attrs](generic-param-attrs.md)
38+
- [i128_type](i128-type.md)
39+
- [inclusive_range_syntax](inclusive-range-syntax.md)
1440
- [intrinsics](intrinsics.md)
1541
- [lang_items](lang-items.md)
42+
- [link_args](link-args.md)
43+
- [link_cfg](link-cfg.md)
1644
- [link_llvm_intrinsics](link-llvm-intrinsics.md)
1745
- [linkage](linkage.md)
18-
- [quote](quote.md)
19-
- [simd](simd.md)
20-
- [rustc_diagnostic_macros](rustc-diagnostic-macros.md)
21-
- [advanced_slice_patterns](advanced-slice-patterns.md)
22-
- [box_syntax](box-syntax.md)
23-
- [placement_in_syntax](placement-in-syntax.md)
24-
- [unboxed_closures](unboxed-closures.md)
25-
- [allocator](allocator.md)
26-
- [fundamental](fundamental.md)
46+
- [log_syntax](log-syntax.md)
47+
- [loop_break_value](loop-break-value.md)
48+
- [macro_reexport](macro-reexport.md)
2749
- [main](main.md)
50+
- [naked_functions](naked-functions.md)
2851
- [needs_allocator](needs-allocator.md)
29-
- [on_unimplemented](on-unimplemented.md)
30-
- [plugin](plugin.md)
31-
- [simd_ffi](simd-ffi.md)
32-
- [start](start.md)
33-
- [structural_match](structural-match.md)
34-
- [panic_runtime](panic-runtime.md)
3552
- [needs_panic_runtime](needs-panic-runtime.md)
36-
- [optin_builtin_traits](optin-builtin-traits.md)
37-
- [macro_reexport](macro-reexport.md)
38-
- [staged_api](staged-api.md)
53+
- [never_type](never-type.md)
3954
- [no_core](no-core.md)
40-
- [box_patterns](box-patterns.md)
41-
- [dropck_parametricity](dropck-parametricity.md)
42-
- [dropck_eyepatch](dropck-eyepatch.md)
43-
- [custom_attribute](custom-attribute.md)
44-
- [custom_derive](custom-derive.md)
55+
- [no_debug](no-debug.md)
56+
- [non_ascii_idents](non-ascii-idents.md)
57+
- [omit_gdb_pretty_printer_section](omit-gdb-pretty-printer-section.md)
58+
- [on_unimplemented](on-unimplemented.md)
59+
- [optin_builtin_traits](optin-builtin-traits.md)
60+
- [panic_runtime](panic-runtime.md)
61+
- [placement_in_syntax](placement-in-syntax.md)
62+
- [platform_intrinsics](platform-intrinsics.md)
63+
- [plugin](plugin.md)
64+
- [plugin_registrar](plugin-registrar.md)
65+
- [prelude_import](prelude-import.md)
66+
- [proc_macro](proc-macro.md)
67+
- [pub_restricted](pub-restricted.md)
68+
- [quote](quote.md)
69+
- [relaxed_adts](relaxed-adts.md)
70+
- [repr_simd](repr-simd.md)
4571
- [rustc_attrs](rustc-attrs.md)
46-
- [allow_internal_unstable](allow-internal-unstable.md)
72+
- [rustc_diagnostic_macros](rustc-diagnostic-macros.md)
73+
- [sanitizer_runtime](sanitizer-runtime.md)
74+
- [simd](simd.md)
75+
- [simd_ffi](simd-ffi.md)
4776
- [slice_patterns](slice-patterns.md)
48-
- [associated_consts](associated-consts.md)
49-
- [const_fn](const-fn.md)
50-
- [const_indexing](const-indexing.md)
51-
- [prelude_import](prelude-import.md)
77+
- [specialization](specialization.md)
78+
- [staged_api](staged-api.md)
79+
- [start](start.md)
80+
- [static_nobundle](static-nobundle.md)
5281
- [static_recursion](static-recursion.md)
53-
- [default_type_parameter_fallback](default-type-parameter-fallback.md)
54-
- [associated_type_defaults](associated-type-defaults.md)
55-
- [repr_simd](repr-simd.md)
56-
- [cfg_target_feature](cfg-target-feature.md)
57-
- [platform_intrinsics](platform-intrinsics.md)
58-
- [unwind_attributes](unwind-attributes.md)
59-
- [naked_functions](naked-functions.md)
60-
- [no_debug](no-debug.md)
61-
- [omit_gdb_pretty_printer_section](omit-gdb-pretty-printer-section.md)
62-
- [cfg_target_vendor](cfg-target-vendor.md)
6382
- [stmt_expr_attributes](stmt-expr-attributes.md)
83+
- [struct_field_attributes](struct-field-attributes.md)
84+
- [structural_match](structural-match.md)
85+
- [target_feature](target-feature.md)
86+
- [test](test.md)
87+
- [thread_local](thread-local.md)
88+
- [trace_macros](trace-macros.md)
6489
- [type_ascription](type-ascription.md)
65-
- [cfg_target_thread_local](cfg-target-thread-local.md)
66-
- [abi_vectorcall](abi-vectorcall.md)
67-
- [inclusive_range_syntax](inclusive-range-syntax.md)
68-
- [exclusive_range_pattern](exclusive-range-pattern.md)
69-
- [specialization](specialization.md)
70-
- [pub_restricted](pub-restricted.md)
71-
- [drop_types_in_const](drop-types-in-const.md)
72-
- [cfg_target_has_atomic](cfg-target-has-atomic.md)
73-
- [conservative_impl_trait](conservative-impl-trait.md)
74-
- [relaxed_adts](relaxed-adts.md)
75-
- [never_type](never-type.md)
76-
- [attr_literals](attr-literals.md)
77-
- [abi_sysv64](abi-sysv64.md)
90+
- [unboxed_closures](unboxed-closures.md)
7891
- [untagged_unions](untagged-unions.md)
79-
- [compiler_builtins](compiler-builtins.md)
80-
- [generic_param_attrs](generic-param-attrs.md)
81-
- [field_init_shorthand](field-init-shorthand.md)
82-
- [windows_subsystem](windows-subsystem.md)
83-
- [link_cfg](link-cfg.md)
92+
- [unwind_attributes](unwind-attributes.md)
8493
- [use_extern_macros](use-extern-macros.md)
85-
- [loop_break_value](loop-break-value.md)
86-
- [target_feature](target-feature.md)
87-
- [abi_ptx](abi-ptx.md)
88-
- [i128_type](i128-type.md)
89-
- [abi_unadjusted](abi-unadjusted.md)
90-
- [proc_macro](proc-macro.md)
91-
- [struct_field_attributes](struct-field-attributes.md)
92-
- [static_nobundle](static-nobundle.md)
93-
- [abi_msp430_interrupt](abi-msp430-interrupt.md)
94-
- [sanitizer_runtime](sanitizer-runtime.md)
94+
- [windows_subsystem](windows-subsystem.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![crate_type="rlib"]
12+
#![no_core]
13+
14+
extern "rust-intrinsic" {
15+
fn atomic_xadd<T>(dst: *mut T, src: T) -> T;
16+
}
17+
18+
#[lang = "sized"]
19+
trait Sized {}
20+
#[lang = "copy"]
21+
trait Copy {}
22+
23+
#[cfg(target_has_atomic = "8")]
24+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
25+
pub unsafe fn atomic_u8(x: *mut u8) {
26+
atomic_xadd(x, 1);
27+
atomic_xadd(x, 1);
28+
}
29+
#[cfg(target_has_atomic = "8")]
30+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
31+
pub unsafe fn atomic_i8(x: *mut i8) {
32+
atomic_xadd(x, 1);
33+
}
34+
#[cfg(target_has_atomic = "16")]
35+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
36+
pub unsafe fn atomic_u16(x: *mut u16) {
37+
atomic_xadd(x, 1);
38+
}
39+
#[cfg(target_has_atomic = "16")]
40+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
41+
pub unsafe fn atomic_i16(x: *mut i16) {
42+
atomic_xadd(x, 1);
43+
}
44+
#[cfg(target_has_atomic = "32")]
45+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
46+
pub unsafe fn atomic_u32(x: *mut u32) {
47+
atomic_xadd(x, 1);
48+
}
49+
#[cfg(target_has_atomic = "32")]
50+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
51+
pub unsafe fn atomic_i32(x: *mut i32) {
52+
atomic_xadd(x, 1);
53+
}
54+
#[cfg(target_has_atomic = "64")]
55+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
56+
pub unsafe fn atomic_u64(x: *mut u64) {
57+
atomic_xadd(x, 1);
58+
}
59+
#[cfg(target_has_atomic = "64")]
60+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
61+
pub unsafe fn atomic_i64(x: *mut i64) {
62+
atomic_xadd(x, 1);
63+
}
64+
#[cfg(target_has_atomic = "ptr")]
65+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
66+
pub unsafe fn atomic_usize(x: *mut usize) {
67+
atomic_xadd(x, 1);
68+
}
69+
#[cfg(target_has_atomic = "ptr")]
70+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
71+
pub unsafe fn atomic_isize(x: *mut isize) {
72+
atomic_xadd(x, 1);
73+
}
74+
75+
fn main() {
76+
cfg!(target_has_atomic = "8");
77+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
78+
cfg!(target_has_atomic = "16");
79+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
80+
cfg!(target_has_atomic = "32");
81+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
82+
cfg!(target_has_atomic = "64");
83+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
84+
cfg!(target_has_atomic = "ptr");
85+
//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
86+
}

src/tools/rustbook/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ license = "MIT/Apache-2.0"
88
clap = "2.19.3"
99

1010
[dependencies.mdbook]
11-
version = "0.0.16"
11+
version = "0.0.17"
1212
default-features = false

src/tools/tidy/src/features.rs

-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ pub fn check(path: &Path, bad: &mut bool) {
168168
// FIXME get this whitelist empty.
169169
let whitelist = vec![
170170
"abi_ptx", "simd",
171-
"cfg_target_has_atomic",
172171
"stmt_expr_attributes",
173172
"cfg_target_thread_local", "unwind_attributes",
174173
];

0 commit comments

Comments
 (0)