Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 15b663e

Browse files
committedNov 23, 2024
Auto merge of rust-lang#133379 - jieyouxu:rollup-00jxo71, r=jieyouxu
Rollup of 4 pull requests Successful merges: - rust-lang#133217 ([AIX] Add option -X32_64 to the "strip" command) - rust-lang#133237 (Minimally constify `Add`) - rust-lang#133355 (Add language tests for aggregate types) - rust-lang#133374 (show abi_unsupported_vector_types lint in future breakage reports) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 386a7c7 + f5cfb90 commit 15b663e

23 files changed

+922
-90
lines changed
 

‎compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,14 +1117,14 @@ fn link_natively(
11171117
let stripcmd = "rust-objcopy";
11181118
match (strip, crate_type) {
11191119
(Strip::Debuginfo, _) => {
1120-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-S"))
1120+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &["-S"])
11211121
}
11221122
// Per the manpage, `-x` is the maximum safe strip level for dynamic libraries. (#93988)
11231123
(Strip::Symbols, CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro) => {
1124-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-x"))
1124+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &["-x"])
11251125
}
11261126
(Strip::Symbols, _) => {
1127-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, None)
1127+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &[])
11281128
}
11291129
(Strip::None, _) => {}
11301130
}
@@ -1141,7 +1141,7 @@ fn link_natively(
11411141
match strip {
11421142
// Always preserve the symbol table (-x).
11431143
Strip::Debuginfo => {
1144-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-x"))
1144+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &["-x"])
11451145
}
11461146
// Strip::Symbols is handled via the --strip-all linker option.
11471147
Strip::Symbols => {}
@@ -1158,11 +1158,15 @@ fn link_natively(
11581158
match strip {
11591159
Strip::Debuginfo => {
11601160
// FIXME: AIX's strip utility only offers option to strip line number information.
1161-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-l"))
1161+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &[
1162+
"-X32_64", "-l",
1163+
])
11621164
}
11631165
Strip::Symbols => {
11641166
// Must be noted this option might remove symbol __aix_rust_metadata and thus removes .info section which contains metadata.
1165-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-r"))
1167+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, &[
1168+
"-X32_64", "-r",
1169+
])
11661170
}
11671171
Strip::None => {}
11681172
}
@@ -1181,12 +1185,10 @@ fn strip_symbols_with_external_utility(
11811185
sess: &Session,
11821186
util: &str,
11831187
out_filename: &Path,
1184-
option: Option<&str>,
1188+
options: &[&str],
11851189
) {
11861190
let mut cmd = Command::new(util);
1187-
if let Some(option) = option {
1188-
cmd.arg(option);
1189-
}
1191+
cmd.args(options);
11901192

11911193
let mut new_path = sess.get_tools_search_paths(false);
11921194
if let Some(path) = env::var_os("PATH") {

‎compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5173,7 +5173,7 @@ declare_lint! {
51735173
Warn,
51745174
"this function call or definition uses a vector type which is not enabled",
51755175
@future_incompatible = FutureIncompatibleInfo {
5176-
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
5176+
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
51775177
reference: "issue #116558 <https://github.com/rust-lang/rust/issues/116558>",
51785178
};
51795179
}

‎compiler/rustc_passes/src/stability.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -590,16 +590,7 @@ impl<'tcx> MissingStabilityAnnotations<'tcx> {
590590
}
591591

592592
fn check_missing_const_stability(&self, def_id: LocalDefId, span: Span) {
593-
// if the const impl is derived using the `derive_const` attribute,
594-
// then it would be "stable" at least for the impl.
595-
// We gate usages of it using `feature(const_trait_impl)` anyways
596-
// so there is no unstable leakage
597-
if self.tcx.is_automatically_derived(def_id.to_def_id()) {
598-
return;
599-
}
600-
601-
let is_const = self.tcx.is_const_fn(def_id.to_def_id())
602-
|| self.tcx.is_const_trait_impl(def_id.to_def_id());
593+
let is_const = self.tcx.is_const_fn(def_id.to_def_id());
603594

604595
// Reachable const fn must have a stability attribute.
605596
if is_const

‎library/core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
#![feature(const_is_char_boundary)]
175175
#![feature(const_precise_live_drops)]
176176
#![feature(const_str_split_at)]
177+
#![feature(const_trait_impl)]
177178
#![feature(decl_macro)]
178179
#![feature(deprecated_suggestion)]
179180
#![feature(doc_cfg)]

‎library/core/src/ops/arith.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
append_const_msg
7474
)]
7575
#[doc(alias = "+")]
76+
#[cfg_attr(not(bootstrap), const_trait)]
7677
pub trait Add<Rhs = Self> {
7778
/// The resulting type after applying the `+` operator.
7879
#[stable(feature = "rust1", since = "1.0.0")]
@@ -94,6 +95,7 @@ pub trait Add<Rhs = Self> {
9495
macro_rules! add_impl {
9596
($($t:ty)*) => ($(
9697
#[stable(feature = "rust1", since = "1.0.0")]
98+
#[cfg(bootstrap)]
9799
impl Add for $t {
98100
type Output = $t;
99101

@@ -103,6 +105,17 @@ macro_rules! add_impl {
103105
fn add(self, other: $t) -> $t { self + other }
104106
}
105107

108+
#[stable(feature = "rust1", since = "1.0.0")]
109+
#[cfg(not(bootstrap))]
110+
impl const Add for $t {
111+
type Output = $t;
112+
113+
#[inline]
114+
#[track_caller]
115+
#[rustc_inherit_overflow_checks]
116+
fn add(self, other: $t) -> $t { self + other }
117+
}
118+
106119
forward_ref_binop! { impl Add, add for $t, $t }
107120
)*)
108121
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//@ run-pass
2+
//@ reference: layout.aggregate.struct-size-align
3+
//@ edition: 2018
4+
5+
#[repr(align(64))]
6+
#[derive(Copy, Clone)]
7+
#[allow(dead_code)]
8+
pub struct Overaligned(u8);
9+
10+
#[allow(dead_code)]
11+
struct ReprRustStruct {
12+
x: i32,
13+
y: [u32; 4],
14+
z: f32,
15+
a: u128,
16+
b: Overaligned,
17+
}
18+
19+
fn test_alignment_contains_all_fields() {
20+
assert!(core::mem::align_of::<ReprRustStruct>() >= core::mem::align_of::<i32>());
21+
assert!(core::mem::align_of::<ReprRustStruct>() >= core::mem::align_of::<[u32; 4]>());
22+
assert!(core::mem::align_of::<ReprRustStruct>() >= core::mem::align_of::<f32>());
23+
assert!(core::mem::align_of::<ReprRustStruct>() >= core::mem::align_of::<u128>());
24+
assert!(core::mem::align_of::<ReprRustStruct>() >= core::mem::align_of::<Overaligned>());
25+
}
26+
27+
fn main() {
28+
test_alignment_contains_all_fields();
29+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
//@ run-pass
2+
//@ reference: layout.aggregate.struct-offsets
3+
//@ edition: 2018
4+
5+
#[repr(align(64))]
6+
#[derive(Copy, Clone)]
7+
#[allow(dead_code)]
8+
pub struct Overaligned(u8);
9+
10+
#[allow(dead_code)]
11+
struct ReprRustStruct {
12+
x: i32,
13+
y: [u32; 4],
14+
z: f32,
15+
a: u128,
16+
b: Overaligned,
17+
}
18+
19+
macro_rules! span_of {
20+
($ty:ty , $field:tt) => {{
21+
let __field = unsafe { ::core::mem::zeroed::<$ty>() };
22+
23+
(
24+
core::mem::offset_of!($ty, $field),
25+
core::mem::offset_of!($ty, $field) + core::mem::size_of_val(&__field.$field),
26+
)
27+
}};
28+
}
29+
30+
fn test_fields_make_sense(a: &(usize, usize)) {
31+
assert!(a.0 <= a.1);
32+
}
33+
34+
// order is `begin, end`
35+
fn test_non_overlapping(a: &(usize, usize), b: &(usize, usize)) {
36+
assert!((a.1 <= b.0) || (b.1 <= a.0));
37+
}
38+
39+
fn test_fields_non_overlapping() {
40+
let fields = [
41+
span_of!(ReprRustStruct, x),
42+
span_of!(ReprRustStruct, y),
43+
span_of!(ReprRustStruct, z),
44+
span_of!(ReprRustStruct, a),
45+
span_of!(ReprRustStruct, b),
46+
];
47+
48+
test_fields_make_sense(&fields[0]);
49+
test_fields_make_sense(&fields[1]);
50+
test_fields_make_sense(&fields[2]);
51+
test_fields_make_sense(&fields[3]);
52+
test_fields_make_sense(&fields[4]);
53+
54+
test_non_overlapping(&fields[0], &fields[1]);
55+
test_non_overlapping(&fields[0], &fields[2]);
56+
test_non_overlapping(&fields[0], &fields[3]);
57+
test_non_overlapping(&fields[0], &fields[4]);
58+
test_non_overlapping(&fields[1], &fields[2]);
59+
test_non_overlapping(&fields[2], &fields[3]);
60+
test_non_overlapping(&fields[2], &fields[4]);
61+
test_non_overlapping(&fields[3], &fields[4]);
62+
}
63+
64+
fn test_fields_aligned() {
65+
assert_eq!((core::mem::offset_of!(ReprRustStruct, x) % (core::mem::align_of::<i32>())), 0);
66+
assert_eq!((core::mem::offset_of!(ReprRustStruct, y) % (core::mem::align_of::<[u32; 4]>())), 0);
67+
assert_eq!((core::mem::offset_of!(ReprRustStruct, z) % (core::mem::align_of::<f32>())), 0);
68+
assert_eq!((core::mem::offset_of!(ReprRustStruct, a) % (core::mem::align_of::<u128>())), 0);
69+
assert_eq!(
70+
(core::mem::offset_of!(ReprRustStruct, b) % (core::mem::align_of::<Overaligned>())),
71+
0
72+
);
73+
}
74+
75+
fn main() {
76+
test_fields_non_overlapping();
77+
test_fields_aligned();
78+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//@ run-pass
2+
//@ reference: layout.aggregate.struct-size-align
3+
//@ edition: 2018
4+
5+
#[allow(dead_code)]
6+
struct ReprRustStruct {
7+
x: i32,
8+
y: [u32; 4],
9+
z: f32,
10+
a: u128,
11+
}
12+
13+
fn test_size_contains_all_types() {
14+
assert!(
15+
core::mem::size_of::<ReprRustStruct>()
16+
>= (core::mem::size_of::<i32>()
17+
+ core::mem::size_of::<[u32; 4]>()
18+
+ core::mem::size_of::<f32>()
19+
+ core::mem::size_of::<u128>())
20+
);
21+
}
22+
23+
fn test_size_contains_all_fields() {
24+
assert!(
25+
(core::mem::offset_of!(ReprRustStruct, x) + core::mem::size_of::<i32>())
26+
<= core::mem::size_of::<ReprRustStruct>()
27+
);
28+
assert!(
29+
(core::mem::offset_of!(ReprRustStruct, y) + core::mem::size_of::<[u32; 4]>())
30+
<= core::mem::size_of::<ReprRustStruct>()
31+
);
32+
assert!(
33+
(core::mem::offset_of!(ReprRustStruct, z) + core::mem::size_of::<f32>())
34+
<= core::mem::size_of::<ReprRustStruct>()
35+
);
36+
assert!(
37+
(core::mem::offset_of!(ReprRustStruct, a) + core::mem::size_of::<u128>())
38+
<= core::mem::size_of::<ReprRustStruct>()
39+
);
40+
}
41+
42+
fn test_size_modulo_align() {
43+
assert_eq!(core::mem::size_of::<ReprRustStruct>() % core::mem::align_of::<ReprRustStruct>(), 0);
44+
}
45+
46+
fn main() {
47+
test_size_contains_all_fields();
48+
test_size_contains_all_types();
49+
test_size_modulo_align();
50+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//@ run-pass
2+
//@ reference: layout.aggregate.struct-size-align
3+
//@ edition: 2018
4+
5+
#[repr(align(64))]
6+
#[derive(Copy, Clone)]
7+
#[allow(dead_code)]
8+
pub struct Overaligned(u8);
9+
10+
#[allow(dead_code)]
11+
union ReprRustUnion {
12+
x: i32,
13+
y: [u32; 4],
14+
z: f32,
15+
a: u128,
16+
b: Overaligned,
17+
}
18+
19+
fn test_alignment_contains_all_fields() {
20+
assert!(core::mem::align_of::<ReprRustUnion>() >= core::mem::align_of::<i32>());
21+
assert!(core::mem::align_of::<ReprRustUnion>() >= core::mem::align_of::<[u32; 4]>());
22+
assert!(core::mem::align_of::<ReprRustUnion>() >= core::mem::align_of::<f32>());
23+
assert!(core::mem::align_of::<ReprRustUnion>() >= core::mem::align_of::<u128>());
24+
assert!(core::mem::align_of::<ReprRustUnion>() >= core::mem::align_of::<Overaligned>());
25+
}
26+
27+
fn main() {
28+
test_alignment_contains_all_fields();
29+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//@ run-pass
2+
//@ reference: layout.aggregate.struct-offsets
3+
//@ edition: 2018
4+
5+
#[repr(align(64))]
6+
#[derive(Copy, Clone)]
7+
#[allow(dead_code)]
8+
pub struct Overaligned(u8);
9+
10+
#[allow(dead_code)]
11+
union ReprRustUnion {
12+
x: i32,
13+
y: [u32; 4],
14+
z: f32,
15+
a: u128,
16+
b: Overaligned,
17+
}
18+
19+
fn test_fields_aligned() {
20+
assert_eq!((core::mem::offset_of!(ReprRustUnion, x) % (core::mem::align_of::<i32>())), 0);
21+
assert_eq!((core::mem::offset_of!(ReprRustUnion, y) % (core::mem::align_of::<[u32; 4]>())), 0);
22+
assert_eq!((core::mem::offset_of!(ReprRustUnion, z) % (core::mem::align_of::<f32>())), 0);
23+
assert_eq!((core::mem::offset_of!(ReprRustUnion, a) % (core::mem::align_of::<u128>())), 0);
24+
assert_eq!(
25+
(core::mem::offset_of!(ReprRustUnion, b) % (core::mem::align_of::<Overaligned>())),
26+
0
27+
);
28+
}
29+
30+
fn main() {
31+
test_fields_aligned();
32+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
//@ run-pass
2+
//@ reference: layout.aggregate.struct-size-align
3+
//@ edition: 2018
4+
5+
#[allow(dead_code)]
6+
union ReprRustUnion {
7+
x: i32,
8+
y: [u32; 4],
9+
z: f32,
10+
a: u128,
11+
}
12+
13+
fn test_size_contains_each_type() {
14+
assert!(core::mem::size_of::<i32>() <= core::mem::size_of::<ReprRustUnion>());
15+
assert!(core::mem::size_of::<[u32; 4]>() <= core::mem::size_of::<ReprRustUnion>());
16+
assert!(core::mem::size_of::<f32>() <= core::mem::size_of::<ReprRustUnion>());
17+
assert!(core::mem::size_of::<u128>() <= core::mem::size_of::<ReprRustUnion>());
18+
}
19+
20+
fn test_size_contains_all_fields() {
21+
assert!(
22+
(core::mem::offset_of!(ReprRustUnion, x) + core::mem::size_of::<i32>())
23+
<= core::mem::size_of::<ReprRustUnion>()
24+
);
25+
assert!(
26+
(core::mem::offset_of!(ReprRustUnion, y) + core::mem::size_of::<[u32; 4]>())
27+
<= core::mem::size_of::<ReprRustUnion>()
28+
);
29+
assert!(
30+
(core::mem::offset_of!(ReprRustUnion, z) + core::mem::size_of::<f32>())
31+
<= core::mem::size_of::<ReprRustUnion>()
32+
);
33+
assert!(
34+
(core::mem::offset_of!(ReprRustUnion, a) + core::mem::size_of::<u128>())
35+
<= core::mem::size_of::<ReprRustUnion>()
36+
);
37+
}
38+
39+
fn test_size_modulo_align() {
40+
assert_eq!(core::mem::size_of::<ReprRustUnion>() % core::mem::align_of::<ReprRustUnion>(), 0);
41+
}
42+
43+
fn main() {
44+
test_size_contains_each_type();
45+
test_size_contains_all_fields();
46+
test_size_modulo_align();
47+
}

‎tests/ui/simd-abi-checks-empty-list.stderr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,14 @@ LL | pub extern "C" fn pass_by_vec(_: SimdVec) {}
1010

1111
warning: 1 warning emitted
1212

13+
Future incompatibility report: Future breakage diagnostic:
14+
warning: this function definition uses a SIMD vector type that is not currently supported with the chosen ABI
15+
--> $DIR/simd-abi-checks-empty-list.rs:17:1
16+
|
17+
LL | pub extern "C" fn pass_by_vec(_: SimdVec) {}
18+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
19+
|
20+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
22+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
23+

‎tests/ui/simd-abi-checks-s390x.z10.stderr

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,167 @@ LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>)
109109

110110
error: aborting due to 10 previous errors
111111

112+
Future incompatibility report: Future breakage diagnostic:
113+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
114+
--> $DIR/simd-abi-checks-s390x.rs:46:1
115+
|
116+
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
117+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
118+
|
119+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
120+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
121+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
122+
note: the lint level is defined here
123+
--> $DIR/simd-abi-checks-s390x.rs:15:9
124+
|
125+
LL | #![deny(abi_unsupported_vector_types)]
126+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127+
128+
Future breakage diagnostic:
129+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
130+
--> $DIR/simd-abi-checks-s390x.rs:52:1
131+
|
132+
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
133+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
134+
|
135+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
136+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
137+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
138+
note: the lint level is defined here
139+
--> $DIR/simd-abi-checks-s390x.rs:15:9
140+
|
141+
LL | #![deny(abi_unsupported_vector_types)]
142+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143+
144+
Future breakage diagnostic:
145+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
146+
--> $DIR/simd-abi-checks-s390x.rs:99:1
147+
|
148+
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
149+
LL | | x: &TransparentWrapper<i8x8>,
150+
LL | | ) -> TransparentWrapper<i8x8> {
151+
| |_____________________________^ function defined here
152+
|
153+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
154+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
155+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
156+
note: the lint level is defined here
157+
--> $DIR/simd-abi-checks-s390x.rs:15:9
158+
|
159+
LL | #![deny(abi_unsupported_vector_types)]
160+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161+
162+
Future breakage diagnostic:
163+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
164+
--> $DIR/simd-abi-checks-s390x.rs:107:1
165+
|
166+
LL | / extern "C" fn vector_transparent_wrapper_ret(
167+
LL | | x: &TransparentWrapper<i8x16>,
168+
LL | | ) -> TransparentWrapper<i8x16> {
169+
| |______________________________^ function defined here
170+
|
171+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
172+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
173+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
174+
note: the lint level is defined here
175+
--> $DIR/simd-abi-checks-s390x.rs:15:9
176+
|
177+
LL | #![deny(abi_unsupported_vector_types)]
178+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179+
180+
Future breakage diagnostic:
181+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
182+
--> $DIR/simd-abi-checks-s390x.rs:123:1
183+
|
184+
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
185+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
186+
|
187+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
188+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
189+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
190+
note: the lint level is defined here
191+
--> $DIR/simd-abi-checks-s390x.rs:15:9
192+
|
193+
LL | #![deny(abi_unsupported_vector_types)]
194+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
195+
196+
Future breakage diagnostic:
197+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
198+
--> $DIR/simd-abi-checks-s390x.rs:129:1
199+
|
200+
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
201+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
202+
|
203+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
204+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
205+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
206+
note: the lint level is defined here
207+
--> $DIR/simd-abi-checks-s390x.rs:15:9
208+
|
209+
LL | #![deny(abi_unsupported_vector_types)]
210+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211+
212+
Future breakage diagnostic:
213+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
214+
--> $DIR/simd-abi-checks-s390x.rs:141:1
215+
|
216+
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
217+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
218+
|
219+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
220+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
221+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
222+
note: the lint level is defined here
223+
--> $DIR/simd-abi-checks-s390x.rs:15:9
224+
|
225+
LL | #![deny(abi_unsupported_vector_types)]
226+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
227+
228+
Future breakage diagnostic:
229+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
230+
--> $DIR/simd-abi-checks-s390x.rs:147:1
231+
|
232+
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
233+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
234+
|
235+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
236+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
237+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
238+
note: the lint level is defined here
239+
--> $DIR/simd-abi-checks-s390x.rs:15:9
240+
|
241+
LL | #![deny(abi_unsupported_vector_types)]
242+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
243+
244+
Future breakage diagnostic:
245+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
246+
--> $DIR/simd-abi-checks-s390x.rs:159:1
247+
|
248+
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
249+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
250+
|
251+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
252+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
253+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
254+
note: the lint level is defined here
255+
--> $DIR/simd-abi-checks-s390x.rs:15:9
256+
|
257+
LL | #![deny(abi_unsupported_vector_types)]
258+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
259+
260+
Future breakage diagnostic:
261+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
262+
--> $DIR/simd-abi-checks-s390x.rs:165:1
263+
|
264+
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
265+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
266+
|
267+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
268+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
269+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
270+
note: the lint level is defined here
271+
--> $DIR/simd-abi-checks-s390x.rs:15:9
272+
|
273+
LL | #![deny(abi_unsupported_vector_types)]
274+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
275+

‎tests/ui/simd-abi-checks-s390x.z13_no_vector.stderr

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,167 @@ LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>)
109109

110110
error: aborting due to 10 previous errors
111111

112+
Future incompatibility report: Future breakage diagnostic:
113+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
114+
--> $DIR/simd-abi-checks-s390x.rs:46:1
115+
|
116+
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
117+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
118+
|
119+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
120+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
121+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
122+
note: the lint level is defined here
123+
--> $DIR/simd-abi-checks-s390x.rs:15:9
124+
|
125+
LL | #![deny(abi_unsupported_vector_types)]
126+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127+
128+
Future breakage diagnostic:
129+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
130+
--> $DIR/simd-abi-checks-s390x.rs:52:1
131+
|
132+
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
133+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
134+
|
135+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
136+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
137+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
138+
note: the lint level is defined here
139+
--> $DIR/simd-abi-checks-s390x.rs:15:9
140+
|
141+
LL | #![deny(abi_unsupported_vector_types)]
142+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143+
144+
Future breakage diagnostic:
145+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
146+
--> $DIR/simd-abi-checks-s390x.rs:99:1
147+
|
148+
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
149+
LL | | x: &TransparentWrapper<i8x8>,
150+
LL | | ) -> TransparentWrapper<i8x8> {
151+
| |_____________________________^ function defined here
152+
|
153+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
154+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
155+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
156+
note: the lint level is defined here
157+
--> $DIR/simd-abi-checks-s390x.rs:15:9
158+
|
159+
LL | #![deny(abi_unsupported_vector_types)]
160+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161+
162+
Future breakage diagnostic:
163+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
164+
--> $DIR/simd-abi-checks-s390x.rs:107:1
165+
|
166+
LL | / extern "C" fn vector_transparent_wrapper_ret(
167+
LL | | x: &TransparentWrapper<i8x16>,
168+
LL | | ) -> TransparentWrapper<i8x16> {
169+
| |______________________________^ function defined here
170+
|
171+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
172+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
173+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
174+
note: the lint level is defined here
175+
--> $DIR/simd-abi-checks-s390x.rs:15:9
176+
|
177+
LL | #![deny(abi_unsupported_vector_types)]
178+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179+
180+
Future breakage diagnostic:
181+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
182+
--> $DIR/simd-abi-checks-s390x.rs:123:1
183+
|
184+
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
185+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
186+
|
187+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
188+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
189+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
190+
note: the lint level is defined here
191+
--> $DIR/simd-abi-checks-s390x.rs:15:9
192+
|
193+
LL | #![deny(abi_unsupported_vector_types)]
194+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
195+
196+
Future breakage diagnostic:
197+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
198+
--> $DIR/simd-abi-checks-s390x.rs:129:1
199+
|
200+
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
201+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
202+
|
203+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
204+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
205+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
206+
note: the lint level is defined here
207+
--> $DIR/simd-abi-checks-s390x.rs:15:9
208+
|
209+
LL | #![deny(abi_unsupported_vector_types)]
210+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211+
212+
Future breakage diagnostic:
213+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
214+
--> $DIR/simd-abi-checks-s390x.rs:141:1
215+
|
216+
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
217+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
218+
|
219+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
220+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
221+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
222+
note: the lint level is defined here
223+
--> $DIR/simd-abi-checks-s390x.rs:15:9
224+
|
225+
LL | #![deny(abi_unsupported_vector_types)]
226+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
227+
228+
Future breakage diagnostic:
229+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
230+
--> $DIR/simd-abi-checks-s390x.rs:147:1
231+
|
232+
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
233+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
234+
|
235+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
236+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
237+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
238+
note: the lint level is defined here
239+
--> $DIR/simd-abi-checks-s390x.rs:15:9
240+
|
241+
LL | #![deny(abi_unsupported_vector_types)]
242+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
243+
244+
Future breakage diagnostic:
245+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
246+
--> $DIR/simd-abi-checks-s390x.rs:159:1
247+
|
248+
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
249+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
250+
|
251+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
252+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
253+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
254+
note: the lint level is defined here
255+
--> $DIR/simd-abi-checks-s390x.rs:15:9
256+
|
257+
LL | #![deny(abi_unsupported_vector_types)]
258+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
259+
260+
Future breakage diagnostic:
261+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
262+
--> $DIR/simd-abi-checks-s390x.rs:165:1
263+
|
264+
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
265+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
266+
|
267+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
268+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
269+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
270+
note: the lint level is defined here
271+
--> $DIR/simd-abi-checks-s390x.rs:15:9
272+
|
273+
LL | #![deny(abi_unsupported_vector_types)]
274+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
275+

‎tests/ui/simd-abi-checks-s390x.z13_soft_float.stderr

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,167 @@ LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>)
109109

110110
error: aborting due to 10 previous errors
111111

112+
Future incompatibility report: Future breakage diagnostic:
113+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
114+
--> $DIR/simd-abi-checks-s390x.rs:46:1
115+
|
116+
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
117+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
118+
|
119+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
120+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
121+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
122+
note: the lint level is defined here
123+
--> $DIR/simd-abi-checks-s390x.rs:15:9
124+
|
125+
LL | #![deny(abi_unsupported_vector_types)]
126+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127+
128+
Future breakage diagnostic:
129+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
130+
--> $DIR/simd-abi-checks-s390x.rs:52:1
131+
|
132+
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
133+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
134+
|
135+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
136+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
137+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
138+
note: the lint level is defined here
139+
--> $DIR/simd-abi-checks-s390x.rs:15:9
140+
|
141+
LL | #![deny(abi_unsupported_vector_types)]
142+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143+
144+
Future breakage diagnostic:
145+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
146+
--> $DIR/simd-abi-checks-s390x.rs:99:1
147+
|
148+
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
149+
LL | | x: &TransparentWrapper<i8x8>,
150+
LL | | ) -> TransparentWrapper<i8x8> {
151+
| |_____________________________^ function defined here
152+
|
153+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
154+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
155+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
156+
note: the lint level is defined here
157+
--> $DIR/simd-abi-checks-s390x.rs:15:9
158+
|
159+
LL | #![deny(abi_unsupported_vector_types)]
160+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161+
162+
Future breakage diagnostic:
163+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
164+
--> $DIR/simd-abi-checks-s390x.rs:107:1
165+
|
166+
LL | / extern "C" fn vector_transparent_wrapper_ret(
167+
LL | | x: &TransparentWrapper<i8x16>,
168+
LL | | ) -> TransparentWrapper<i8x16> {
169+
| |______________________________^ function defined here
170+
|
171+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
172+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
173+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
174+
note: the lint level is defined here
175+
--> $DIR/simd-abi-checks-s390x.rs:15:9
176+
|
177+
LL | #![deny(abi_unsupported_vector_types)]
178+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179+
180+
Future breakage diagnostic:
181+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
182+
--> $DIR/simd-abi-checks-s390x.rs:123:1
183+
|
184+
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
185+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
186+
|
187+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
188+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
189+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
190+
note: the lint level is defined here
191+
--> $DIR/simd-abi-checks-s390x.rs:15:9
192+
|
193+
LL | #![deny(abi_unsupported_vector_types)]
194+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
195+
196+
Future breakage diagnostic:
197+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
198+
--> $DIR/simd-abi-checks-s390x.rs:129:1
199+
|
200+
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
201+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
202+
|
203+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
204+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
205+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
206+
note: the lint level is defined here
207+
--> $DIR/simd-abi-checks-s390x.rs:15:9
208+
|
209+
LL | #![deny(abi_unsupported_vector_types)]
210+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211+
212+
Future breakage diagnostic:
213+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
214+
--> $DIR/simd-abi-checks-s390x.rs:141:1
215+
|
216+
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
217+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
218+
|
219+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
220+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
221+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
222+
note: the lint level is defined here
223+
--> $DIR/simd-abi-checks-s390x.rs:15:9
224+
|
225+
LL | #![deny(abi_unsupported_vector_types)]
226+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
227+
228+
Future breakage diagnostic:
229+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
230+
--> $DIR/simd-abi-checks-s390x.rs:147:1
231+
|
232+
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
233+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
234+
|
235+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
236+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
237+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
238+
note: the lint level is defined here
239+
--> $DIR/simd-abi-checks-s390x.rs:15:9
240+
|
241+
LL | #![deny(abi_unsupported_vector_types)]
242+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
243+
244+
Future breakage diagnostic:
245+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
246+
--> $DIR/simd-abi-checks-s390x.rs:159:1
247+
|
248+
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
249+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
250+
|
251+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
252+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
253+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
254+
note: the lint level is defined here
255+
--> $DIR/simd-abi-checks-s390x.rs:15:9
256+
|
257+
LL | #![deny(abi_unsupported_vector_types)]
258+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
259+
260+
Future breakage diagnostic:
261+
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
262+
--> $DIR/simd-abi-checks-s390x.rs:165:1
263+
|
264+
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
265+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
266+
|
267+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
268+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
269+
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
270+
note: the lint level is defined here
271+
--> $DIR/simd-abi-checks-s390x.rs:15:9
272+
|
273+
LL | #![deny(abi_unsupported_vector_types)]
274+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
275+

‎tests/ui/simd-abi-checks.stderr

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,111 @@ LL | unsafe extern "C" fn w(_: Wrapper) {
9191

9292
warning: 9 warnings emitted
9393

94+
Future incompatibility report: Future breakage diagnostic:
95+
warning: this function call uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
96+
--> $DIR/simd-abi-checks.rs:55:11
97+
|
98+
LL | f(g());
99+
| ^^^ function called here
100+
|
101+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
102+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
103+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
104+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
105+
106+
Future breakage diagnostic:
107+
warning: this function call uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
108+
--> $DIR/simd-abi-checks.rs:55:9
109+
|
110+
LL | f(g());
111+
| ^^^^^^ function called here
112+
|
113+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
114+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
115+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
116+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
117+
118+
Future breakage diagnostic:
119+
warning: this function call uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
120+
--> $DIR/simd-abi-checks.rs:63:14
121+
|
122+
LL | gavx(favx());
123+
| ^^^^^^ function called here
124+
|
125+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
126+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
127+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
128+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
129+
130+
Future breakage diagnostic:
131+
warning: this function call uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
132+
--> $DIR/simd-abi-checks.rs:63:9
133+
|
134+
LL | gavx(favx());
135+
| ^^^^^^^^^^^^ function called here
136+
|
137+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
138+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
139+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
140+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
141+
142+
Future breakage diagnostic:
143+
warning: this function call uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
144+
--> $DIR/simd-abi-checks.rs:75:19
145+
|
146+
LL | w(Wrapper(g()));
147+
| ^^^ function called here
148+
|
149+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
150+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
151+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
152+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
153+
154+
Future breakage diagnostic:
155+
warning: this function call uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
156+
--> $DIR/simd-abi-checks.rs:75:9
157+
|
158+
LL | w(Wrapper(g()));
159+
| ^^^^^^^^^^^^^^^ function called here
160+
|
161+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
162+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
163+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
164+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
165+
166+
Future breakage diagnostic:
167+
warning: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled
168+
--> $DIR/simd-abi-checks.rs:26:1
169+
|
170+
LL | unsafe extern "C" fn g() -> __m256 {
171+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
172+
|
173+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
174+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
175+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
176+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
177+
178+
Future breakage diagnostic:
179+
warning: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled
180+
--> $DIR/simd-abi-checks.rs:20:1
181+
|
182+
LL | unsafe extern "C" fn f(_: __m256) {
183+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
184+
|
185+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
186+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
187+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
188+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
189+
190+
Future breakage diagnostic:
191+
warning: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled
192+
--> $DIR/simd-abi-checks.rs:14:1
193+
|
194+
LL | unsafe extern "C" fn w(_: Wrapper) {
195+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
196+
|
197+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
198+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
199+
= help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
200+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
201+

‎tests/ui/sse-abi-checks.stderr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,15 @@ LL | pub unsafe extern "C" fn f(_: SseVector) {
1111

1212
warning: 1 warning emitted
1313

14+
Future incompatibility report: Future breakage diagnostic:
15+
warning: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `sse` target feature, which is not enabled
16+
--> $DIR/sse-abi-checks.rs:21:1
17+
|
18+
LL | pub unsafe extern "C" fn f(_: SseVector) {
19+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
20+
|
21+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
23+
= help: consider enabling it globally (`-C target-feature=+sse`) or locally (`#[target_feature(enable="sse")]`)
24+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
25+

‎tests/ui/stability-attribute/missing-const-stability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub trait Bar {
2727
}
2828
#[stable(feature = "stable", since = "1.0.0")]
2929
impl const Bar for Foo {
30-
//~^ ERROR implementation has missing const stability attribute
30+
// ok because all users must enable `const_trait_impl`
3131
fn fun() {}
3232
}
3333

‎tests/ui/stability-attribute/missing-const-stability.stderr

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@ error: function has missing const stability attribute
44
LL | pub const fn foo() {}
55
| ^^^^^^^^^^^^^^^^^^^^^
66

7-
error: implementation has missing const stability attribute
8-
--> $DIR/missing-const-stability.rs:29:1
9-
|
10-
LL | / impl const Bar for Foo {
11-
LL | |
12-
LL | | fn fun() {}
13-
LL | | }
14-
| |_^
15-
167
error: function has missing const stability attribute
178
--> $DIR/missing-const-stability.rs:36:1
189
|
@@ -25,5 +16,5 @@ error: associated function has missing const stability attribute
2516
LL | pub const fn foo() {}
2617
| ^^^^^^^^^^^^^^^^^^^^^
2718

28-
error: aborting due to 4 previous errors
19+
error: aborting due to 3 previous errors
2920

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
2-
--> $DIR/call-const-trait-method-pass.rs:7:12
3-
|
4-
LL | impl const std::ops::Add for Int {
5-
| ^^^^^^^^^^^^^
6-
|
7-
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
8-
= note: adding a non-const method body in the future would be a breaking change
9-
101
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
112
--> $DIR/call-const-trait-method-pass.rs:15:12
123
|
@@ -16,14 +7,6 @@ LL | impl const PartialEq for Int {
167
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
178
= note: adding a non-const method body in the future would be a breaking change
189

19-
error[E0015]: cannot call non-const operator in constants
20-
--> $DIR/call-const-trait-method-pass.rs:39:22
21-
|
22-
LL | const ADD_INT: Int = Int(1i32) + Int(2i32);
23-
| ^^^^^^^^^^^^^^^^^^^^^
24-
|
25-
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
26-
2710
error[E0015]: cannot call non-const fn `<Int as PartialEq>::eq` in constant functions
2811
--> $DIR/call-const-trait-method-pass.rs:20:15
2912
|
@@ -32,6 +15,6 @@ LL | !self.eq(other)
3215
|
3316
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
3417

35-
error: aborting due to 4 previous errors
18+
error: aborting due to 2 previous errors
3619

3720
For more information about this error, try `rustc --explain E0015`.
Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
2-
--> $DIR/const-and-non-const-impl.rs:7:12
3-
|
4-
LL | impl const std::ops::Add for i32 {
5-
| ^^^^^^^^^^^^^
6-
|
7-
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
8-
= note: adding a non-const method body in the future would be a breaking change
9-
10-
error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
11-
--> $DIR/const-and-non-const-impl.rs:23:12
12-
|
13-
LL | impl const std::ops::Add for Int {
14-
| ^^^^^^^^^^^^^
15-
|
16-
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
17-
= note: adding a non-const method body in the future would be a breaking change
18-
191
error[E0119]: conflicting implementations of trait `Add` for type `Int`
202
--> $DIR/const-and-non-const-impl.rs:23:1
213
|
@@ -38,7 +20,7 @@ LL | impl const std::ops::Add for i32 {
3820
= note: for more information see https://doc.rust-lang.org/reference/items/implementations.html#orphan-rules
3921
= note: define and implement a trait or new type instead
4022

41-
error: aborting due to 4 previous errors
23+
error: aborting due to 2 previous errors
4224

4325
Some errors have detailed explanations: E0117, E0119.
4426
For more information about an error, try `rustc --explain E0117`.

‎tests/ui/traits/const-traits/generic-bound.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ known-bug: #110395
1+
//@ check-pass
22

33
#![feature(const_trait_impl)]
44

@@ -26,5 +26,6 @@ const fn twice<T: std::ops::Add>(arg: S<T>) -> S<T> {
2626
}
2727

2828
fn main() {
29+
const _: S<i32> = twice(S(PhantomData));
2930
let _ = twice(S(PhantomData::<i32>));
3031
}

‎tests/ui/traits/const-traits/generic-bound.stderr

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.