Skip to content

Commit dae2af1

Browse files
borsgitbot
authored and
gitbot
committed
Auto merge of rust-lang#136203 - matthiaskrgr:rollup-1k0f44l, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - rust-lang#135869 (Make docs for AtomicUsize::from_mut platform-independent) - rust-lang#135892 (-Znext-solver: "normalize" signature before checking it mentions self in `deduce_closure_signature`) - rust-lang#136055 (Implement MIR const trait stability checks) - rust-lang#136066 (Pass spans to `perform_locally_in_new_solver`) - rust-lang#136071 ([Clippy] Add vec_reserve & vecdeque_reserve diagnostic items) - rust-lang#136124 (Arbitrary self types v2: explain test.) - rust-lang#136149 (Flip the `rustc-rayon`/`indexmap` dependency order) - rust-lang#136173 (Update comments and sort target_arch in c_char_definition) - rust-lang#136178 (Update username in build helper example) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2cb7f8e + 53898c0 commit dae2af1

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

alloc/src/collections/vec_deque/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
823823
/// assert!(buf.capacity() >= 11);
824824
/// ```
825825
#[stable(feature = "rust1", since = "1.0.0")]
826+
#[cfg_attr(not(test), rustc_diagnostic_item = "vecdeque_reserve")]
826827
#[track_caller]
827828
pub fn reserve(&mut self, additional: usize) {
828829
let new_cap = self.len.checked_add(additional).expect("capacity overflow");

alloc/src/vec/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,7 @@ impl<T, A: Allocator> Vec<T, A> {
12671267
#[cfg(not(no_global_oom_handling))]
12681268
#[stable(feature = "rust1", since = "1.0.0")]
12691269
#[track_caller]
1270+
#[cfg_attr(not(test), rustc_diagnostic_item = "vec_reserve")]
12701271
pub fn reserve(&mut self, additional: usize) {
12711272
self.buf.reserve(self.len, additional);
12721273
}

core/src/ffi/mod.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ mod c_char_definition {
116116
// Section 2.1 "Basic Types" in MSP430 Embedded Application Binary
117117
// Interface says "The char type is unsigned by default".
118118
// https://www.ti.com/lit/an/slaa534a/slaa534a.pdf
119-
// Note: this doesn't seem to match Clang's default (https://github.com/rust-lang/rust/issues/129945).
120119
// powerpc/powerpc64:
121120
// - PPC32 SysV: "Table 3-1 Scalar Types" in System V Application Binary Interface PowerPC
122121
// Processor Supplement says ANSI C char is unsigned byte
@@ -139,8 +138,10 @@ mod c_char_definition {
139138
// https://github.com/IBM/s390x-abi/releases/tag/v1.6.1
140139
// - z/OS: XL C/C++ Language Reference says: "By default, char behaves like an unsigned char."
141140
// https://www.ibm.com/docs/en/zos/3.1.0?topic=specifiers-character-types
142-
// Xtensa:
143-
// - "The char type is unsigned by default for Xtensa processors."
141+
// xtensa:
142+
// Section 2.17.1 "Data Types and Alignment" of Xtensa LX Microprocessor Overview handbook
143+
// says "`char` type is unsigned by default".
144+
// https://loboris.eu/ESP32/Xtensa_lx%20Overview%20handbook.pdf
144145
//
145146
// On the following operating systems, c_char is signed by default, regardless of architecture.
146147
// Darwin (macOS, iOS, etc.):
@@ -150,11 +151,12 @@ mod c_char_definition {
150151
// Windows MSVC C++ Language Reference says "Microsoft-specific: Variables of type char
151152
// are promoted to int as if from type signed char by default, unless the /J compilation
152153
// option is used."
153-
// https://learn.microsoft.com/en-us/cpp/cpp/fundamental-types-cpp?view=msvc-170#character-types)
154-
// L4RE:
154+
// https://learn.microsoft.com/en-us/cpp/cpp/fundamental-types-cpp?view=msvc-170#character-types
155+
// L4Re:
155156
// The kernel builds with -funsigned-char on all targets (but useserspace follows the
156157
// architecture defaults). As we only have a target for userspace apps so there are no
157-
// special cases for L4RE below.
158+
// special cases for L4Re below.
159+
// https://github.com/rust-lang/rust/pull/132975#issuecomment-2484645240
158160
if #[cfg(all(
159161
not(windows),
160162
not(target_vendor = "apple"),
@@ -166,8 +168,8 @@ mod c_char_definition {
166168
target_arch = "msp430",
167169
target_arch = "powerpc",
168170
target_arch = "powerpc64",
169-
target_arch = "riscv64",
170171
target_arch = "riscv32",
172+
target_arch = "riscv64",
171173
target_arch = "s390x",
172174
target_arch = "xtensa",
173175
)

core/src/sync/atomic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2547,7 +2547,7 @@ macro_rules! atomic_int {
25472547
$int_type,
25482548
no = [
25492549
"**Note:** This function is only available on targets where `",
2550-
stringify!($int_type), "` has an alignment of ", $align, " bytes."
2550+
stringify!($atomic_type), "` has the same alignment as `", stringify!($int_type), "`."
25512551
],
25522552
}]
25532553
///

0 commit comments

Comments
 (0)