1
Fork 0

Auto merge of #137164 - matthiaskrgr:rollup-dj5826k, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #137095 (Replace some u64 hashes with Hash64)
 - #137100 (HIR analysis: Remove unnecessary abstraction over list of clauses)
 - #137105 (Restrict DerefPure for Cow<T> impl to T = impl Clone, [impl Clone], str.)
 - #137120 (Enable `relative-path-include-bytes-132203` rustdoc-ui test on Windows)
 - #137125 (Re-add missing empty lines in the releases notes)
 - #137145 (use add-core-stubs / minicore for a few more tests)
 - #137149 (Remove SSE ABI from i586-pc-windows-msvc)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2025-02-17 11:18:33 +00:00
commit 2162e9d4b1
85 changed files with 462 additions and 454 deletions

View file

@ -3317,6 +3317,7 @@ dependencies = [
"rand 0.8.5",
"rand_xoshiro",
"rustc_data_structures",
"rustc_hashes",
"rustc_index",
"rustc_macros",
"rustc_serialize",
@ -3544,6 +3545,7 @@ dependencies = [
"rustc_errors",
"rustc_fluent_macro",
"rustc_fs_util",
"rustc_hashes",
"rustc_hir",
"rustc_index",
"rustc_llvm",
@ -3586,6 +3588,7 @@ dependencies = [
"rustc_errors",
"rustc_fluent_macro",
"rustc_fs_util",
"rustc_hashes",
"rustc_hir",
"rustc_hir_pretty",
"rustc_incremental",
@ -3658,6 +3661,7 @@ dependencies = [
"rustc-stable-hash",
"rustc_arena",
"rustc_graphviz",
"rustc_hashes",
"rustc_index",
"rustc_macros",
"rustc_serialize",
@ -3768,6 +3772,7 @@ dependencies = [
"rustc_error_codes",
"rustc_error_messages",
"rustc_fluent_macro",
"rustc_hashes",
"rustc_hir",
"rustc_index",
"rustc_lexer",
@ -3840,6 +3845,13 @@ version = "0.0.0"
name = "rustc_graphviz"
version = "0.0.0"
[[package]]
name = "rustc_hashes"
version = "0.0.0"
dependencies = [
"rustc-stable-hash",
]
[[package]]
name = "rustc_hir"
version = "0.0.0"
@ -3849,6 +3861,7 @@ dependencies = [
"rustc_arena",
"rustc_ast",
"rustc_data_structures",
"rustc_hashes",
"rustc_index",
"rustc_macros",
"rustc_serialize",
@ -4169,6 +4182,7 @@ dependencies = [
"rustc_feature",
"rustc_fluent_macro",
"rustc_graphviz",
"rustc_hashes",
"rustc_hir",
"rustc_hir_pretty",
"rustc_index",
@ -4405,6 +4419,7 @@ dependencies = [
"measureme",
"rustc_data_structures",
"rustc_errors",
"rustc_hashes",
"rustc_hir",
"rustc_index",
"rustc_middle",
@ -4428,6 +4443,7 @@ dependencies = [
"rustc_errors",
"rustc_feature",
"rustc_fluent_macro",
"rustc_hashes",
"rustc_hir",
"rustc_index",
"rustc_macros",
@ -4488,6 +4504,7 @@ name = "rustc_serialize"
version = "0.0.0"
dependencies = [
"indexmap",
"rustc_hashes",
"rustc_macros",
"smallvec",
"tempfile",
@ -4508,6 +4525,7 @@ dependencies = [
"rustc_feature",
"rustc_fluent_macro",
"rustc_fs_util",
"rustc_hashes",
"rustc_hir",
"rustc_lint_defs",
"rustc_macros",
@ -4549,6 +4567,7 @@ dependencies = [
"md-5",
"rustc_arena",
"rustc_data_structures",
"rustc_hashes",
"rustc_index",
"rustc_macros",
"rustc_serialize",
@ -4568,6 +4587,7 @@ dependencies = [
"rustc_abi",
"rustc_data_structures",
"rustc_errors",
"rustc_hashes",
"rustc_hir",
"rustc_middle",
"rustc_session",
@ -4663,6 +4683,7 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_fluent_macro",
"rustc_hashes",
"rustc_hir",
"rustc_index",
"rustc_infer",

View file

@ -34,6 +34,7 @@ Libraries
---------
- [Panics in the standard library now have a leading `library/` in their path](https://github.com/rust-lang/rust/pull/132390)
- [`std::env::home_dir()` on Windows now ignores the non-standard `$HOME` environment variable](https://github.com/rust-lang/rust/pull/132515)
It will be un-deprecated in a subsequent release.
- [Add `AsyncFn*` to the prelude in all editions.](https://github.com/rust-lang/rust/pull/132611)
@ -98,15 +99,18 @@ Rustdoc
Compatibility Notes
-------------------
- [`rustc` no longer treats the `test` cfg as a well known check-cfg](https://github.com/rust-lang/rust/pull/131729), instead it is up to the build systems and users of `--check-cfg`[^check-cfg] to set it as a well known cfg using `--check-cfg=cfg(test)`.
This is done to enable build systems like Cargo to set it conditionally, as not all source files are suitable for unit tests.
[Cargo (for now) unconditionally sets the `test` cfg as a well known cfg](https://github.com/rust-lang/cargo/pull/14963).
[^check-cfg]: https://doc.rust-lang.org/nightly/rustc/check-cfg.html
[^check-cfg]: https://doc.rust-lang.org/nightly/rustc/check-cfg.html
- [Disable potentially incorrect type inference if there are trivial and non-trivial where-clauses](https://github.com/rust-lang/rust/pull/132325)
- `std::env::home_dir()` has been deprecated for years, because it can give surprising results in some Windows configurations if the `HOME` environment variable is set (which is not the normal configuration on Windows). We had previously avoided changing its behavior, out of concern for compatibility with code depending on this non-standard configuration. Given how long this function has been deprecated, we're now fixing its behavior as a bugfix. A subsequent release will remove the deprecation for this function.
- [Make `core::ffi::c_char` signedness more closely match that of the platform-default `char`](https://github.com/rust-lang/rust/pull/132975)
This changed `c_char` from an `i8` to `u8` or vice versa on many Tier 2 and 3
targets (mostly Arm and RISC-V embedded targets). The new definition may
result in compilation failures but fixes compatibility issues with C.
The `libc` crate matches this change as of its 0.2.169 release.
- [When compiling a nested `macro_rules` macro from an external crate, the content of the inner `macro_rules` is now built with the edition of the external crate, not the local crate.](https://github.com/rust-lang/rust/pull/133274)
- [Increase `sparcv9-sun-solaris` and `x86_64-pc-solaris` Solaris baseline to 11.4.](https://github.com/rust-lang/rust/pull/133293)

View file

@ -9,6 +9,7 @@ bitflags = "2.4.1"
rand = { version = "0.8.4", default-features = false, optional = true }
rand_xoshiro = { version = "0.6.0", optional = true }
rustc_data_structures = { path = "../rustc_data_structures", optional = true }
rustc_hashes = { path = "../rustc_hashes" }
rustc_index = { path = "../rustc_index", default-features = false }
rustc_macros = { path = "../rustc_macros", optional = true }
rustc_serialize = { path = "../rustc_serialize", optional = true }

View file

@ -2,6 +2,7 @@ use std::fmt::{self, Write};
use std::ops::{Bound, Deref};
use std::{cmp, iter};
use rustc_hashes::Hash64;
use rustc_index::Idx;
use tracing::debug;
@ -133,7 +134,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
size,
max_repr_align: None,
unadjusted_abi_align: align.abi,
randomization_seed: combined_seed,
randomization_seed: Hash64::new(combined_seed),
}
}
@ -226,7 +227,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
size: Size::ZERO,
max_repr_align: None,
unadjusted_abi_align: dl.i8_align.abi,
randomization_seed: 0,
randomization_seed: Hash64::ZERO,
}
}
@ -1058,7 +1059,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
// unsizable tail fields are excluded so that we use the same seed for the sized and unsized layouts.
let field_seed = fields_excluding_tail
.iter()
.fold(0u64, |acc, f| acc.wrapping_add(f.randomization_seed));
.fold(Hash64::ZERO, |acc, f| acc.wrapping_add(f.randomization_seed));
if optimize_field_order && fields.len() > 1 {
// If `-Z randomize-layout` was enabled for the type definition we can shuffle
@ -1072,7 +1073,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
// `ReprOptions.field_shuffle_seed` is a deterministic seed we can use to randomize field
// ordering.
let mut rng = rand_xoshiro::Xoshiro128StarStar::seed_from_u64(
field_seed.wrapping_add(repr.field_shuffle_seed),
field_seed.wrapping_add(repr.field_shuffle_seed).as_u64(),
);
// Shuffle the ordering of the fields.

View file

@ -50,6 +50,7 @@ use std::str::FromStr;
use bitflags::bitflags;
#[cfg(feature = "nightly")]
use rustc_data_structures::stable_hasher::StableOrd;
use rustc_hashes::Hash64;
use rustc_index::{Idx, IndexSlice, IndexVec};
#[cfg(feature = "nightly")]
use rustc_macros::{Decodable_Generic, Encodable_Generic, HashStable_Generic};
@ -140,7 +141,7 @@ pub struct ReprOptions {
/// hash without loss, but it does pay the price of being larger.
/// Everything's a tradeoff, a 64-bit seed should be sufficient for our
/// purposes (primarily `-Z randomize-layout`)
pub field_shuffle_seed: u64,
pub field_shuffle_seed: Hash64,
}
impl ReprOptions {
@ -1727,7 +1728,7 @@ pub struct LayoutData<FieldIdx: Idx, VariantIdx: Idx> {
/// transmuted to `Foo<U>` we aim to create probalistically distinct seeds so that Foo can choose
/// to reorder its fields based on that information. The current implementation is a conservative
/// approximation of this goal.
pub randomization_seed: u64,
pub randomization_seed: Hash64,
}
impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
@ -1781,7 +1782,7 @@ impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
align,
max_repr_align: None,
unadjusted_abi_align: align.abi,
randomization_seed,
randomization_seed: Hash64::new(randomization_seed),
}
}
}

View file

@ -25,6 +25,7 @@ rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_fs_util = { path = "../rustc_fs_util" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
rustc_llvm = { path = "../rustc_llvm" }

View file

@ -7,7 +7,8 @@ use rustc_abi::{AddressSpace, HasDataLayout};
use rustc_ast::Mutability;
use rustc_codegen_ssa::common::TypeKind;
use rustc_codegen_ssa::traits::*;
use rustc_data_structures::stable_hasher::{Hash128, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_hashes::Hash128;
use rustc_hir::def_id::DefId;
use rustc_middle::bug;
use rustc_middle::mir::interpret::{ConstAllocation, GlobalAlloc, Scalar};

View file

@ -25,6 +25,7 @@ rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_fs_util = { path = "../rustc_fs_util" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_hir_pretty = { path = "../rustc_hir_pretty" }
rustc_incremental = { path = "../rustc_incremental" }

View file

@ -15,7 +15,8 @@ use std::fmt::Write;
use rustc_abi::Integer;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_hashes::Hash64;
use rustc_hir::def_id::DefId;
use rustc_hir::definitions::{DefPathData, DefPathDataName, DisambiguatedDefPathData};
use rustc_hir::{CoroutineDesugaring, CoroutineKind, CoroutineSource, Mutability};

View file

@ -18,6 +18,7 @@ rustc-rayon = { version = "0.5.1", features = ["indexmap"] }
rustc-stable-hash = { version = "0.1.0", features = ["nightly"] }
rustc_arena = { path = "../rustc_arena" }
rustc_graphviz = { path = "../rustc_graphviz" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_index = { path = "../rustc_index", package = "rustc_index" }
rustc_macros = { path = "../rustc_macros" }
rustc_serialize = { path = "../rustc_serialize" }

View file

@ -1,10 +1,9 @@
use std::hash::{Hash, Hasher};
use rustc_hashes::Hash64;
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
use crate::stable_hasher::{
FromStableHash, Hash64, StableHasherHash, impl_stable_traits_for_trivial_type,
};
use crate::stable_hasher::{FromStableHash, StableHasherHash, impl_stable_traits_for_trivial_type};
#[cfg(test)]
mod tests;

View file

@ -84,7 +84,6 @@ pub mod vec_cache;
pub mod work_queue;
mod atomic_ref;
mod hashes;
/// This calls the passed function while ensuring it won't be inlined into the caller.
#[inline(never)]

View file

@ -10,12 +10,11 @@ use smallvec::SmallVec;
#[cfg(test)]
mod tests;
use rustc_hashes::{Hash64, Hash128};
pub use rustc_stable_hash::{
FromStableHash, SipHasher128Hash as StableHasherHash, StableSipHasher128 as StableHasher,
};
pub use crate::hashes::{Hash64, Hash128};
/// Something that implements `HashStable<CTX>` can be hashed in a way that is
/// stable across multiple compilation sessions.
///

View file

@ -1,7 +1,8 @@
use std::ptr;
use rustc_hashes::Hash128;
use super::*;
use crate::hashes::Hash128;
use crate::stable_hasher::{HashStable, StableHasher};
/// A tag type used in [`TaggedRef`] tests.

View file

@ -14,6 +14,7 @@ rustc_data_structures = { path = "../rustc_data_structures" }
rustc_error_codes = { path = "../rustc_error_codes" }
rustc_error_messages = { path = "../rustc_error_messages" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
rustc_lexer = { path = "../rustc_lexer" }

View file

@ -58,12 +58,13 @@ pub use emitter::ColorConfig;
use emitter::{DynEmitter, Emitter, is_case_difference, is_different};
use rustc_data_structures::AtomicRef;
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
use rustc_data_structures::stable_hasher::{Hash128, StableHasher};
use rustc_data_structures::stable_hasher::StableHasher;
use rustc_data_structures::sync::{DynSend, Lock};
pub use rustc_error_messages::{
DiagMessage, FluentBundle, LanguageIdentifier, LazyFallbackBundle, MultiSpan, SpanLabel,
SubdiagMessage, fallback_fluent_bundle, fluent_bundle,
};
use rustc_hashes::Hash128;
use rustc_lint_defs::LintExpectationId;
pub use rustc_lint_defs::{Applicability, listify, pluralize};
use rustc_macros::{Decodable, Encodable};

View file

@ -0,0 +1,9 @@
[package]
name = "rustc_hashes"
version = "0.0.0"
edition = "2021"
[dependencies]
# tidy-alphabetical-start
rustc-stable-hash = { version = "0.1.0" }
# tidy-alphabetical-end

View file

@ -1,6 +1,8 @@
//! rustc encodes a lot of hashes. If hashes are stored as `u64` or `u128`, a `derive(Encodable)`
//! will apply varint encoding to the hashes, which is less efficient than directly encoding the 8
//! or 16 bytes of the hash.
//! or 16 bytes of the hash. And if that hash depends on the `StableCrateHash` (which most in rustc
//! do), the varint encoding will make the number of bytes encoded fluctuate between compiler
//! versions.
//!
//! The types in this module represent 64-bit or 128-bit hashes produced by a `StableHasher`.
//! `Hash64` and `Hash128` expose some utility functions to encourage users to not extract the inner
@ -14,10 +16,9 @@
use std::fmt;
use std::ops::BitXorAssign;
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
use crate::stable_hasher::{FromStableHash, StableHasherHash};
use rustc_stable_hash::{FromStableHash, SipHasher128Hash as StableHasherHash};
/// A `u64` but encoded with a fixed size; for hashes this encoding is more compact than `u64`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Default)]
pub struct Hash64 {
inner: u64,
@ -35,6 +36,11 @@ impl Hash64 {
pub fn as_u64(self) -> u64 {
self.inner
}
#[inline]
pub fn wrapping_add(self, other: Self) -> Self {
Self { inner: self.inner.wrapping_add(other.inner) }
}
}
impl BitXorAssign<u64> for Hash64 {
@ -44,20 +50,6 @@ impl BitXorAssign<u64> for Hash64 {
}
}
impl<S: Encoder> Encodable<S> for Hash64 {
#[inline]
fn encode(&self, s: &mut S) {
s.emit_raw_bytes(&self.inner.to_le_bytes());
}
}
impl<D: Decoder> Decodable<D> for Hash64 {
#[inline]
fn decode(d: &mut D) -> Self {
Self { inner: u64::from_le_bytes(d.read_raw_bytes(8).try_into().unwrap()) }
}
}
impl FromStableHash for Hash64 {
type Hash = StableHasherHash;
@ -79,6 +71,7 @@ impl fmt::LowerHex for Hash64 {
}
}
/// A `u128` but encoded with a fixed size; for hashes this encoding is more compact than `u128`.
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)]
pub struct Hash128 {
inner: u128,
@ -95,6 +88,11 @@ impl std::hash::Hash for Hash128 {
}
impl Hash128 {
#[inline]
pub fn new(n: u128) -> Self {
Self { inner: n }
}
#[inline]
pub fn truncate(self) -> Hash64 {
Hash64 { inner: self.inner as u64 }
@ -111,20 +109,6 @@ impl Hash128 {
}
}
impl<S: Encoder> Encodable<S> for Hash128 {
#[inline]
fn encode(&self, s: &mut S) {
s.emit_raw_bytes(&self.inner.to_le_bytes());
}
}
impl<D: Decoder> Decodable<D> for Hash128 {
#[inline]
fn decode(d: &mut D) -> Self {
Self { inner: u128::from_le_bytes(d.read_raw_bytes(16).try_into().unwrap()) }
}
}
impl FromStableHash for Hash128 {
type Hash = StableHasherHash;

View file

@ -10,6 +10,7 @@ rustc_abi = { path = "../rustc_abi" }
rustc_arena = { path = "../rustc_arena" }
rustc_ast = { path = "../rustc_ast" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_index = { path = "../rustc_index" }
rustc_macros = { path = "../rustc_macros" }
rustc_serialize = { path = "../rustc_serialize" }

View file

@ -1,4 +1,4 @@
use rustc_data_structures::stable_hasher::Hash64;
use rustc_hashes::Hash64;
use rustc_span::def_id::DefIndex;
#[derive(Clone, Default)]

View file

@ -7,8 +7,9 @@
use std::fmt::{self, Write};
use std::hash::Hash;
use rustc_data_structures::stable_hasher::{Hash64, StableHasher};
use rustc_data_structures::stable_hasher::StableHasher;
use rustc_data_structures::unord::UnordMap;
use rustc_hashes::Hash64;
use rustc_index::IndexVec;
use rustc_macros::{Decodable, Encodable};
use rustc_span::{Symbol, kw, sym};

View file

@ -1,6 +1,6 @@
#![allow(rustc::symbol_intern_string_literal)]
use rustc_data_structures::stable_hasher::Hash64;
use rustc_hashes::Hash64;
use rustc_span::def_id::{DefPathHash, StableCrateId};
use rustc_span::edition::Edition;
use rustc_span::{Symbol, create_session_globals_then};

View file

@ -1,100 +0,0 @@
//! Bounds are restrictions applied to some types after they've been lowered from the HIR to the
//! [`rustc_middle::ty`] form.
use rustc_hir::LangItem;
use rustc_middle::ty::{self, Ty, TyCtxt, Upcast};
use rustc_span::Span;
/// Collects together a list of type bounds. These lists of bounds occur in many places
/// in Rust's syntax:
///
/// ```text
/// trait Foo: Bar + Baz { }
/// ^^^^^^^^^ supertrait list bounding the `Self` type parameter
///
/// fn foo<T: Bar + Baz>() { }
/// ^^^^^^^^^ bounding the type parameter `T`
///
/// impl dyn Bar + Baz
/// ^^^^^^^^^ bounding the type-erased dynamic type
/// ```
///
/// Our representation is a bit mixed here -- in some cases, we
/// include the self type (e.g., `trait_bounds`) but in others we do not
#[derive(Default, PartialEq, Eq, Clone, Debug)]
pub(crate) struct Bounds<'tcx> {
clauses: Vec<(ty::Clause<'tcx>, Span)>,
}
impl<'tcx> Bounds<'tcx> {
pub(crate) fn push_region_bound(
&mut self,
tcx: TyCtxt<'tcx>,
region: ty::PolyTypeOutlivesPredicate<'tcx>,
span: Span,
) {
self.clauses
.push((region.map_bound(|p| ty::ClauseKind::TypeOutlives(p)).upcast(tcx), span));
}
pub(crate) fn push_trait_bound(
&mut self,
tcx: TyCtxt<'tcx>,
bound_trait_ref: ty::PolyTraitRef<'tcx>,
span: Span,
polarity: ty::PredicatePolarity,
) {
let clause = (
bound_trait_ref
.map_bound(|trait_ref| {
ty::ClauseKind::Trait(ty::TraitPredicate { trait_ref, polarity })
})
.upcast(tcx),
span,
);
// FIXME(-Znext-solver): We can likely remove this hack once the new trait solver lands.
if tcx.is_lang_item(bound_trait_ref.def_id(), LangItem::Sized) {
self.clauses.insert(0, clause);
} else {
self.clauses.push(clause);
}
}
pub(crate) fn push_projection_bound(
&mut self,
tcx: TyCtxt<'tcx>,
projection: ty::PolyProjectionPredicate<'tcx>,
span: Span,
) {
self.clauses.push((
projection.map_bound(|proj| ty::ClauseKind::Projection(proj)).upcast(tcx),
span,
));
}
pub(crate) fn push_sized(&mut self, tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, span: Span) {
let sized_def_id = tcx.require_lang_item(LangItem::Sized, Some(span));
let trait_ref = ty::TraitRef::new(tcx, sized_def_id, [ty]);
// Preferable to put this obligation first, since we report better errors for sized ambiguity.
self.clauses.insert(0, (trait_ref.upcast(tcx), span));
}
/// Push a `const` or `~const` bound as a `HostEffect` predicate.
pub(crate) fn push_const_bound(
&mut self,
tcx: TyCtxt<'tcx>,
bound_trait_ref: ty::PolyTraitRef<'tcx>,
constness: ty::BoundConstness,
span: Span,
) {
if tcx.is_const_trait(bound_trait_ref.def_id()) {
self.clauses.push((bound_trait_ref.to_host_effect_clause(tcx, constness), span));
} else {
tcx.dcx().span_delayed_bug(span, "tried to lower {host:?} bound for non-const trait");
}
}
pub(crate) fn clauses(&self) -> impl Iterator<Item = (ty::Clause<'tcx>, Span)> + '_ {
self.clauses.iter().cloned()
}
}

View file

@ -13,7 +13,6 @@ use tracing::{debug, instrument};
use super::ItemCtxt;
use super::predicates_of::assert_only_contains_predicates_from;
use crate::bounds::Bounds;
use crate::hir_ty_lowering::{HirTyLowerer, PredicateFilter};
/// For associated types we include both bounds written on the type
@ -38,7 +37,7 @@ fn associated_type_bounds<'tcx>(
);
let icx = ItemCtxt::new(tcx, assoc_item_def_id);
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
icx.lowerer().lower_bounds(item_ty, hir_bounds, &mut bounds, ty::List::empty(), filter);
// Associated types are implicitly sized unless a `?Sized` bound is found
match filter {
@ -68,7 +67,7 @@ fn associated_type_bounds<'tcx>(
)
});
let all_bounds = tcx.arena.alloc_from_iter(bounds.clauses().chain(bounds_from_parent));
let all_bounds = tcx.arena.alloc_from_iter(bounds.into_iter().chain(bounds_from_parent));
debug!(
"associated_type_bounds({}) = {:?}",
tcx.def_path_str(assoc_item_def_id.to_def_id()),
@ -327,7 +326,7 @@ fn opaque_type_bounds<'tcx>(
) -> &'tcx [(ty::Clause<'tcx>, Span)] {
ty::print::with_reduced_queries!({
let icx = ItemCtxt::new(tcx, opaque_def_id);
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
icx.lowerer().lower_bounds(item_ty, hir_bounds, &mut bounds, ty::List::empty(), filter);
// Opaque types are implicitly sized unless a `?Sized` bound is found
match filter {
@ -343,7 +342,7 @@ fn opaque_type_bounds<'tcx>(
}
debug!(?bounds);
tcx.arena.alloc_from_iter(bounds.clauses())
tcx.arena.alloc_slice(&bounds)
})
}

View file

@ -13,7 +13,6 @@ use rustc_span::{DUMMY_SP, Ident, Span};
use tracing::{debug, instrument, trace};
use super::item_bounds::explicit_item_bounds_with_filter;
use crate::bounds::Bounds;
use crate::collect::ItemCtxt;
use crate::constrained_generic_params as cgp;
use crate::delegation::inherit_predicates_for_delegation_item;
@ -178,7 +177,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
// on a trait we must also consider the bounds that follow the trait's name,
// like `trait Foo: A + B + C`.
if let Some(self_bounds) = is_trait {
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
icx.lowerer().lower_bounds(
tcx.types.self_param,
self_bounds,
@ -186,7 +185,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
ty::List::empty(),
PredicateFilter::All,
);
predicates.extend(bounds.clauses());
predicates.extend(bounds);
}
// In default impls, we can assume that the self type implements
@ -209,7 +208,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
GenericParamKind::Lifetime { .. } => (),
GenericParamKind::Type { .. } => {
let param_ty = icx.lowerer().lower_ty_param(param.hir_id);
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
// Params are implicitly sized unless a `?Sized` bound is found
icx.lowerer().add_sized_bound(
&mut bounds,
@ -219,7 +218,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
param.span,
);
trace!(?bounds);
predicates.extend(bounds.clauses());
predicates.extend(bounds);
trace!(?predicates);
}
hir::GenericParamKind::Const { .. } => {
@ -264,7 +263,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
}
}
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
icx.lowerer().lower_bounds(
ty,
bound_pred.bounds,
@ -272,7 +271,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
bound_vars,
PredicateFilter::All,
);
predicates.extend(bounds.clauses());
predicates.extend(bounds);
}
hir::WherePredicateKind::RegionPredicate(region_pred) => {
@ -627,7 +626,7 @@ pub(super) fn implied_predicates_with_filter<'tcx>(
let icx = ItemCtxt::new(tcx, trait_def_id);
let self_param_ty = tcx.types.self_param;
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
icx.lowerer().lower_bounds(self_param_ty, superbounds, &mut bounds, ty::List::empty(), filter);
let where_bounds_that_match =
@ -635,7 +634,7 @@ pub(super) fn implied_predicates_with_filter<'tcx>(
// Combine the two lists to form the complete set of superbounds:
let implied_bounds =
&*tcx.arena.alloc_from_iter(bounds.clauses().chain(where_bounds_that_match));
&*tcx.arena.alloc_from_iter(bounds.into_iter().chain(where_bounds_that_match));
debug!(?implied_bounds);
// Now require that immediate supertraits are lowered, which will, in
@ -904,7 +903,7 @@ impl<'tcx> ItemCtxt<'tcx> {
param_def_id: LocalDefId,
filter: PredicateFilter,
) -> Vec<(ty::Clause<'tcx>, Span)> {
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
for predicate in hir_generics.predicates {
let hir_id = predicate.hir_id;
@ -938,7 +937,7 @@ impl<'tcx> ItemCtxt<'tcx> {
);
}
bounds.clauses().collect()
bounds
}
}
@ -1007,7 +1006,7 @@ pub(super) fn const_conditions<'tcx>(
};
let icx = ItemCtxt::new(tcx, def_id);
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
for pred in generics.predicates {
match pred.kind {
@ -1027,12 +1026,12 @@ pub(super) fn const_conditions<'tcx>(
}
if let Some((def_id, supertraits)) = trait_def_id_and_supertraits {
bounds.push_const_bound(
tcx,
ty::Binder::dummy(ty::TraitRef::identity(tcx, def_id.to_def_id())),
ty::BoundConstness::Maybe,
// We've checked above that the trait is conditionally const.
bounds.push((
ty::Binder::dummy(ty::TraitRef::identity(tcx, def_id.to_def_id()))
.to_host_effect_clause(tcx, ty::BoundConstness::Maybe),
DUMMY_SP,
);
));
icx.lowerer().lower_bounds(
tcx.types.self_param,
@ -1045,7 +1044,7 @@ pub(super) fn const_conditions<'tcx>(
ty::ConstConditions {
parent: has_parent.then(|| tcx.local_parent(def_id).to_def_id()),
predicates: tcx.arena.alloc_from_iter(bounds.clauses().map(|(clause, span)| {
predicates: tcx.arena.alloc_from_iter(bounds.into_iter().map(|(clause, span)| {
(
clause.kind().map_bound(|clause| match clause {
ty::ClauseKind::HostEffect(ty::HostEffectPredicate {

View file

@ -8,7 +8,7 @@ use rustc_hir::HirId;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_middle::bug;
use rustc_middle::ty::{self as ty, IsSuggestable, Ty, TyCtxt};
use rustc_middle::ty::{self as ty, IsSuggestable, Ty, TyCtxt, Upcast};
use rustc_span::{ErrorGuaranteed, Ident, Span, Symbol, kw, sym};
use rustc_trait_selection::traits;
use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor};
@ -16,7 +16,6 @@ use smallvec::SmallVec;
use tracing::{debug, instrument};
use super::errors::GenericsArgsErrExtend;
use crate::bounds::Bounds;
use crate::errors;
use crate::hir_ty_lowering::{
AssocItemQSelf, FeedConstTy, HirTyLowerer, PredicateFilter, RegionInferReason,
@ -28,7 +27,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
/// Doesn't add the bound if the HIR bounds contain any of `Sized`, `?Sized` or `!Sized`.
pub(crate) fn add_sized_bound(
&self,
bounds: &mut Bounds<'tcx>,
bounds: &mut Vec<(ty::Clause<'tcx>, Span)>,
self_ty: Ty<'tcx>,
hir_bounds: &'tcx [hir::GenericBound<'tcx>],
self_ty_where_predicates: Option<(LocalDefId, &'tcx [hir::WherePredicate<'tcx>])>,
@ -113,10 +112,12 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
if seen_sized_unbound || seen_negative_sized_bound || seen_positive_sized_bound {
// There was in fact a `?Sized`, `!Sized` or explicit `Sized` bound;
// we don't need to do anything.
} else if sized_def_id.is_some() {
} else if let Some(sized_def_id) = sized_def_id {
// There was no `?Sized`, `!Sized` or explicit `Sized` bound;
// add `Sized` if it's available.
bounds.push_sized(tcx, self_ty, span);
let trait_ref = ty::TraitRef::new(tcx, sized_def_id, [self_ty]);
// Preferable to put this obligation first, since we report better errors for sized ambiguity.
bounds.insert(0, (trait_ref.upcast(tcx), span));
}
}
@ -146,7 +147,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
&self,
param_ty: Ty<'tcx>,
hir_bounds: I,
bounds: &mut Bounds<'tcx>,
bounds: &mut Vec<(ty::Clause<'tcx>, Span)>,
bound_vars: &'tcx ty::List<ty::BoundVariableKind>,
predicate_filter: PredicateFilter,
) where
@ -189,14 +190,11 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
}
let region = self.lower_lifetime(lifetime, RegionInferReason::OutlivesBound);
bounds.push_region_bound(
self.tcx(),
ty::Binder::bind_with_vars(
ty::OutlivesPredicate(param_ty, region),
let bound = ty::Binder::bind_with_vars(
ty::ClauseKind::TypeOutlives(ty::OutlivesPredicate(param_ty, region)),
bound_vars,
),
lifetime.ident.span,
);
bounds.push((bound.upcast(self.tcx()), lifetime.ident.span));
}
hir::GenericBound::Use(..) => {
// We don't actually lower `use` into the type layer.
@ -219,7 +217,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
hir_ref_id: hir::HirId,
trait_ref: ty::PolyTraitRef<'tcx>,
constraint: &hir::AssocItemConstraint<'tcx>,
bounds: &mut Bounds<'tcx>,
bounds: &mut Vec<(ty::Clause<'tcx>, Span)>,
duplicates: &mut FxIndexMap<DefId, Span>,
path_span: Span,
predicate_filter: PredicateFilter,
@ -389,14 +387,13 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
PredicateFilter::All
| PredicateFilter::SelfOnly
| PredicateFilter::SelfAndAssociatedTypeBounds => {
bounds.push_projection_bound(
tcx,
projection_term.map_bound(|projection_term| ty::ProjectionPredicate {
let bound = projection_term.map_bound(|projection_term| {
ty::ClauseKind::Projection(ty::ProjectionPredicate {
projection_term,
term,
}),
constraint.span,
);
})
});
bounds.push((bound.upcast(tcx), constraint.span));
}
// SelfTraitThatDefines is only interested in trait predicates.
PredicateFilter::SelfTraitThatDefines(_) => {}

View file

@ -17,7 +17,6 @@ use smallvec::{SmallVec, smallvec};
use tracing::{debug, instrument};
use super::HirTyLowerer;
use crate::bounds::Bounds;
use crate::hir_ty_lowering::{
GenericArgCountMismatch, GenericArgCountResult, PredicateFilter, RegionInferReason,
};
@ -36,7 +35,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
let tcx = self.tcx();
let dummy_self = tcx.types.trait_object_dummy_self;
let mut user_written_bounds = Bounds::default();
let mut user_written_bounds = Vec::new();
let mut potential_assoc_types = Vec::new();
for trait_bound in hir_bounds.iter() {
if let hir::BoundPolarity::Maybe(_) = trait_bound.modifiers.polarity {
@ -60,15 +59,17 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
}
let (trait_bounds, mut projection_bounds) =
traits::expand_trait_aliases(tcx, user_written_bounds.clauses());
traits::expand_trait_aliases(tcx, user_written_bounds.iter().copied());
let (regular_traits, mut auto_traits): (Vec<_>, Vec<_>) = trait_bounds
.into_iter()
.partition(|(trait_ref, _)| !tcx.trait_is_auto(trait_ref.def_id()));
// We don't support empty trait objects.
if regular_traits.is_empty() && auto_traits.is_empty() {
let guar =
self.report_trait_object_with_no_traits_error(span, user_written_bounds.clauses());
let guar = self.report_trait_object_with_no_traits_error(
span,
user_written_bounds.iter().copied(),
);
return Ty::new_error(tcx, guar);
}
// We don't support >1 principal
@ -84,7 +85,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
// Check that there are no gross dyn-compatibility violations;
// most importantly, that the supertraits don't contain `Self`,
// to avoid ICEs.
for (clause, span) in user_written_bounds.clauses() {
for (clause, span) in user_written_bounds {
if let Some(trait_pred) = clause.as_trait_clause() {
let violations =
hir_ty_lowering_dyn_compatibility_violations(tcx, trait_pred.def_id());

View file

@ -49,9 +49,9 @@ use rustc_span::{DUMMY_SP, Ident, Span, Symbol, kw};
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::wf::object_region_bounds;
use rustc_trait_selection::traits::{self, ObligationCtxt};
use rustc_type_ir::Upcast;
use tracing::{debug, instrument};
use crate::bounds::Bounds;
use crate::check::check_abi_fn_ptr;
use crate::errors::{AmbiguousLifetimeBound, BadReturnTypeNotation, InvalidBaseType};
use crate::hir_ty_lowering::errors::{GenericsArgsErrExtend, prohibit_assoc_item_constraint};
@ -691,7 +691,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
constness: hir::BoundConstness,
polarity: hir::BoundPolarity,
self_ty: Ty<'tcx>,
bounds: &mut Bounds<'tcx>,
bounds: &mut Vec<(ty::Clause<'tcx>, Span)>,
predicate_filter: PredicateFilter,
) -> GenericArgCountResult {
let trait_def_id = trait_ref.trait_def_id().unwrap_or_else(|| FatalError.raise());
@ -720,6 +720,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
bound_vars,
);
debug!(?poly_trait_ref);
let polarity = match polarity {
rustc_ast::BoundPolarity::Positive => ty::PredicatePolarity::Positive,
rustc_ast::BoundPolarity::Negative(_) => ty::PredicatePolarity::Negative,
@ -741,6 +743,26 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
}
};
// We deal with const conditions later.
match predicate_filter {
PredicateFilter::All
| PredicateFilter::SelfOnly
| PredicateFilter::SelfTraitThatDefines(..)
| PredicateFilter::SelfAndAssociatedTypeBounds => {
let bound = poly_trait_ref.map_bound(|trait_ref| {
ty::ClauseKind::Trait(ty::TraitPredicate { trait_ref, polarity })
});
let bound = (bound.upcast(tcx), span);
// FIXME(-Znext-solver): We can likely remove this hack once the new trait solver lands.
if tcx.is_lang_item(trait_def_id, rustc_hir::LangItem::Sized) {
bounds.insert(0, bound);
} else {
bounds.push(bound);
}
}
PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => {}
}
if let hir::BoundConstness::Always(span) | hir::BoundConstness::Maybe(span) = constness
&& !self.tcx().is_const_trait(trait_def_id)
{
@ -765,28 +787,21 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
suggestion_pre,
suggestion,
});
}
} else {
match predicate_filter {
// This is only concerned with trait predicates.
PredicateFilter::SelfTraitThatDefines(..) => {
bounds.push_trait_bound(tcx, poly_trait_ref, span, polarity);
}
PredicateFilter::SelfTraitThatDefines(..) => {}
PredicateFilter::All
| PredicateFilter::SelfOnly
| PredicateFilter::SelfAndAssociatedTypeBounds => {
debug!(?poly_trait_ref);
bounds.push_trait_bound(tcx, poly_trait_ref, span, polarity);
match constness {
hir::BoundConstness::Always(span) => {
if polarity == ty::PredicatePolarity::Positive {
bounds.push_const_bound(
tcx,
poly_trait_ref,
ty::BoundConstness::Const,
bounds.push((
poly_trait_ref
.to_host_effect_clause(tcx, ty::BoundConstness::Const),
span,
);
));
}
}
hir::BoundConstness::Maybe(_) => {
@ -804,19 +819,21 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
// Note that like `PredicateFilter::SelfOnly`, we don't need to do any filtering
// here because we only call this on self bounds, and deal with the recursive case
// in `lower_assoc_item_constraint`.
PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => match constness {
PredicateFilter::ConstIfConst | PredicateFilter::SelfConstIfConst => {
match constness {
hir::BoundConstness::Maybe(span) => {
if polarity == ty::PredicatePolarity::Positive {
bounds.push_const_bound(
tcx,
poly_trait_ref,
ty::BoundConstness::Maybe,
bounds.push((
poly_trait_ref
.to_host_effect_clause(tcx, ty::BoundConstness::Maybe),
span,
);
));
}
}
hir::BoundConstness::Always(_) | hir::BoundConstness::Never => {}
},
}
}
}
}
let mut dup_constraints = FxIndexMap::default();
@ -2382,7 +2399,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
// Impl trait in bindings lower as an infer var with additional
// set of type bounds.
let self_ty = self.ty_infer(None, hir_ty.span);
let mut bounds = Bounds::default();
let mut bounds = Vec::new();
self.lower_bounds(
self_ty,
hir_bounds.iter(),
@ -2390,11 +2407,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
ty::List::empty(),
PredicateFilter::All,
);
self.register_trait_ascription_bounds(
bounds.clauses().collect(),
hir_ty.hir_id,
hir_ty.span,
);
self.register_trait_ascription_bounds(bounds, hir_ty.hir_id, hir_ty.span);
self_ty
}
// If we encounter a type relative path with RTN generics, then it must have

View file

@ -80,7 +80,6 @@ This API is completely unstable and subject to change.
pub mod check;
pub mod autoderef;
mod bounds;
mod check_unused;
mod coherence;
mod collect;

View file

@ -22,6 +22,7 @@ rustc_errors = { path = "../rustc_errors" }
rustc_feature = { path = "../rustc_feature" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_graphviz = { path = "../rustc_graphviz" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_hir_pretty = { path = "../rustc_hir_pretty" }
rustc_index = { path = "../rustc_index" }

View file

@ -6,8 +6,9 @@ use rustc_attr_parsing::InlineAttr;
use rustc_data_structures::base_n::{BaseNString, CASE_INSENSITIVE, ToBaseN};
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::stable_hasher::{Hash128, HashStable, StableHasher, ToStableHashKey};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
use rustc_data_structures::unord::UnordMap;
use rustc_hashes::Hash128;
use rustc_hir::ItemId;
use rustc_hir::def_id::{CrateNum, DefId, DefIdSet, LOCAL_CRATE};
use rustc_index::Idx;

View file

@ -495,7 +495,7 @@ impl<'tcx> GenericArgs<'tcx> {
self.iter().filter_map(|k| k.as_const())
}
/// Returns generic arguments that are not lifetimes or host effect params.
/// Returns generic arguments that are not lifetimes.
#[inline]
pub fn non_erasable_generics(
&'tcx self,

View file

@ -11,6 +11,7 @@ use rustc_error_messages::DiagMessage;
use rustc_errors::{
Diag, DiagArgValue, DiagCtxtHandle, Diagnostic, EmissionGuarantee, IntoDiagArg, Level,
};
use rustc_hashes::Hash64;
use rustc_hir::LangItem;
use rustc_hir::def_id::DefId;
use rustc_index::IndexVec;
@ -778,7 +779,7 @@ where
size: Size::ZERO,
max_repr_align: None,
unadjusted_abi_align: tcx.data_layout.i8_align.abi,
randomization_seed: 0,
randomization_seed: Hash64::ZERO,
})
}

View file

@ -1487,8 +1487,7 @@ impl<'tcx> TyCtxt<'tcx> {
// Generate a deterministically-derived seed from the item's path hash
// to allow for cross-crate compilation to actually work
let mut field_shuffle_seed =
self.def_path_hash(did.to_def_id()).0.to_smaller_hash().as_u64();
let mut field_shuffle_seed = self.def_path_hash(did.to_def_id()).0.to_smaller_hash();
// If the user defined a custom seed for layout randomization, xor the item's
// path hash with the user defined seed, this will allowing determinism while

View file

@ -5,9 +5,10 @@ use std::{fmt, iter};
use rustc_abi::{ExternAbi, Float, Integer, IntegerType, Size};
use rustc_apfloat::Float as _;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::stable_hasher::{Hash128, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_errors::ErrorGuaranteed;
use rustc_hashes::Hash128;
use rustc_hir as hir;
use rustc_hir::def::{CtorOf, DefKind, Res};
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId};

View file

@ -8,6 +8,7 @@ edition = "2021"
measureme = "11"
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
rustc_middle = { path = "../rustc_middle" }

View file

@ -4,10 +4,11 @@
use std::num::NonZero;
use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::sync::Lock;
use rustc_data_structures::unord::UnordMap;
use rustc_errors::DiagInner;
use rustc_hashes::Hash64;
use rustc_index::Idx;
use rustc_middle::bug;
use rustc_middle::dep_graph::{

View file

@ -13,6 +13,7 @@ rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_feature = { path = "../rustc_feature" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
rustc_macros = { path = "../rustc_macros" }

View file

@ -11,9 +11,9 @@ mod caches;
pub use self::caches::{DefIdCache, DefaultCache, QueryCache, SingleCache, VecCache};
mod config;
use rustc_data_structures::stable_hasher::Hash64;
use rustc_data_structures::sync::Lock;
use rustc_errors::DiagInner;
use rustc_hashes::Hash64;
use rustc_hir::def::DefKind;
use rustc_macros::{Decodable, Encodable};
use rustc_span::Span;

View file

@ -6,6 +6,7 @@ edition = "2021"
[dependencies]
# tidy-alphabetical-start
indexmap = "2.0.0"
rustc_hashes = { path = "../rustc_hashes" }
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
thin-vec = "0.2.12"
# tidy-alphabetical-end

View file

@ -10,6 +10,7 @@ use std::path;
use std::rc::Rc;
use std::sync::Arc;
use rustc_hashes::{Hash64, Hash128};
use smallvec::{Array, SmallVec};
use thin_vec::ThinVec;
@ -716,3 +717,31 @@ impl<D: Decoder, T: Decodable<D>> Decodable<D> for Arc<[T]> {
vec.into()
}
}
impl<S: Encoder> Encodable<S> for Hash64 {
#[inline]
fn encode(&self, s: &mut S) {
s.emit_raw_bytes(&self.as_u64().to_le_bytes());
}
}
impl<S: Encoder> Encodable<S> for Hash128 {
#[inline]
fn encode(&self, s: &mut S) {
s.emit_raw_bytes(&self.as_u128().to_le_bytes());
}
}
impl<D: Decoder> Decodable<D> for Hash64 {
#[inline]
fn decode(d: &mut D) -> Self {
Self::new(u64::from_le_bytes(d.read_raw_bytes(8).try_into().unwrap()))
}
}
impl<D: Decoder> Decodable<D> for Hash128 {
#[inline]
fn decode(d: &mut D) -> Self {
Self::new(u128::from_le_bytes(d.read_raw_bytes(16).try_into().unwrap()))
}
}

View file

@ -14,6 +14,7 @@ rustc_errors = { path = "../rustc_errors" }
rustc_feature = { path = "../rustc_feature" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_fs_util = { path = "../rustc_fs_util" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_lint_defs = { path = "../rustc_lint_defs" }
rustc_macros = { path = "../rustc_macros" }

View file

@ -2934,9 +2934,9 @@ pub(crate) mod dep_tracking {
use rustc_abi::Align;
use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::stable_hasher::Hash64;
use rustc_errors::LanguageIdentifier;
use rustc_feature::UnstableFeatures;
use rustc_hashes::Hash64;
use rustc_span::RealFileName;
use rustc_span::edition::Edition;
use rustc_target::spec::{

View file

@ -7,9 +7,9 @@ use std::str;
use rustc_abi::Align;
use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::profiling::TimePassesFormat;
use rustc_data_structures::stable_hasher::Hash64;
use rustc_errors::{ColorConfig, LanguageIdentifier, TerminalUrl};
use rustc_feature::UnstableFeatures;
use rustc_hashes::Hash64;
use rustc_macros::{Decodable, Encodable};
use rustc_span::edition::Edition;
use rustc_span::{RealFileName, SourceFileHashAlgorithm};

View file

@ -12,6 +12,7 @@ itoa = "1.0"
md5 = { package = "md-5", version = "0.10.0" }
rustc_arena = { path = "../rustc_arena" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_index = { path = "../rustc_index" }
rustc_macros = { path = "../rustc_macros" }
rustc_serialize = { path = "../rustc_serialize" }

View file

@ -3,10 +3,9 @@ use std::hash::{BuildHasherDefault, Hash, Hasher};
use rustc_data_structures::AtomicRef;
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::stable_hasher::{
Hash64, HashStable, StableHasher, StableOrd, ToStableHashKey,
};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, StableOrd, ToStableHashKey};
use rustc_data_structures::unhash::Unhasher;
use rustc_hashes::Hash64;
use rustc_index::Idx;
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
use rustc_serialize::{Decodable, Encodable};

View file

@ -33,9 +33,10 @@ use std::sync::Arc;
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::stable_hasher::{Hash64, HashStable, HashingControls, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, HashingControls, StableHasher};
use rustc_data_structures::sync::{Lock, WorkerLocal};
use rustc_data_structures::unhash::UnhashMap;
use rustc_hashes::Hash64;
use rustc_index::IndexVec;
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};

View file

@ -87,9 +87,10 @@ use std::sync::Arc;
use std::{fmt, iter};
use md5::{Digest, Md5};
use rustc_data_structures::stable_hasher::{Hash64, Hash128, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::sync::{FreezeLock, FreezeWriteGuard, Lock};
use rustc_data_structures::unord::UnordMap;
use rustc_hashes::{Hash64, Hash128};
use sha1::Sha1;
use sha2::Sha256;

View file

@ -11,6 +11,7 @@ rustc-demangle = "0.1.21"
rustc_abi = { path = "../rustc_abi" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_middle = { path = "../rustc_middle" }
rustc_session = { path = "../rustc_session" }

View file

@ -1,6 +1,7 @@
use std::fmt::Write;
use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_hashes::Hash64;
use rustc_hir::def_id::CrateNum;
use rustc_middle::ty::{Instance, TyCtxt};

View file

@ -1,7 +1,8 @@
use std::fmt::{self, Write};
use std::mem::{self, discriminant};
use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_hashes::Hash64;
use rustc_hir::def_id::{CrateNum, DefId};
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
use rustc_middle::bug;

View file

@ -2,6 +2,7 @@ use crate::spec::Target;
pub(crate) fn target() -> Target {
let mut base = super::i686_pc_windows_msvc::target();
base.rustc_abi = None; // overwrite the SSE2 ABI set by the base target
base.cpu = "pentium".into();
base.llvm_target = "i586-pc-windows-msvc".into();
base

View file

@ -11,6 +11,7 @@ rustc_ast_ir = { path = "../rustc_ast_ir" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_hashes = { path = "../rustc_hashes" }
rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
rustc_infer = { path = "../rustc_infer" }

View file

@ -9,6 +9,7 @@ use rustc_abi::{
HasDataLayout, Layout, LayoutCalculatorError, LayoutData, Niche, ReprOptions, Scalar, Size,
StructKind, TagEncoding, VariantIdx, Variants, WrappingRange,
};
use rustc_hashes::Hash64;
use rustc_index::bit_set::DenseBitSet;
use rustc_index::{IndexSlice, IndexVec};
use rustc_middle::bug;
@ -380,7 +381,7 @@ fn layout_of_uncached<'tcx>(
size,
max_repr_align: None,
unadjusted_abi_align: element.align.abi,
randomization_seed: element.randomization_seed.wrapping_add(count),
randomization_seed: element.randomization_seed.wrapping_add(Hash64::new(count)),
})
}
ty::Slice(element) => {
@ -395,7 +396,9 @@ fn layout_of_uncached<'tcx>(
max_repr_align: None,
unadjusted_abi_align: element.align.abi,
// adding a randomly chosen value to distinguish slices
randomization_seed: element.randomization_seed.wrapping_add(0x2dcba99c39784102),
randomization_seed: element
.randomization_seed
.wrapping_add(Hash64::new(0x2dcba99c39784102)),
})
}
ty::Str => tcx.mk_layout(LayoutData {
@ -408,7 +411,7 @@ fn layout_of_uncached<'tcx>(
max_repr_align: None,
unadjusted_abi_align: dl.i8_align.abi,
// another random value
randomization_seed: 0xc1325f37d127be22,
randomization_seed: Hash64::new(0xc1325f37d127be22),
}),
// Odd unit types.
@ -585,7 +588,7 @@ fn layout_of_uncached<'tcx>(
align,
max_repr_align: None,
unadjusted_abi_align: align.abi,
randomization_seed: e_ly.randomization_seed.wrapping_add(e_len),
randomization_seed: e_ly.randomization_seed.wrapping_add(Hash64::new(e_len)),
})
}
@ -1051,7 +1054,7 @@ fn coroutine_layout<'tcx>(
};
// this is similar to how ReprOptions populates its field_shuffle_seed
let def_hash = tcx.def_path_hash(def_id).0.to_smaller_hash().as_u64();
let def_hash = tcx.def_path_hash(def_id).0.to_smaller_hash();
let layout = tcx.mk_layout(LayoutData {
variants: Variants::Multiple {

View file

@ -14,6 +14,7 @@ use rustc_type_ir_macros::{Lift_Generic, TypeFoldable_Generic, TypeVisitable_Gen
use self::TyKind::*;
pub use self::closure::*;
use crate::inherent::*;
#[cfg(feature = "nightly")]
use crate::visit::TypeVisitable;
use crate::{self as ty, DebruijnIndex, Interner};

View file

@ -340,8 +340,18 @@ where
}
}
// `Cow<'_, T>` can only implement `DerefPure` if `<T::Owned as Borrow<T>>` (and `BorrowMut<T>`) is trusted.
// For now, we restrict `DerefPure for Cow<T>` to `T: Sized` (`T as Borrow<T>` is trusted),
// `str` (`String as Borrow<str>` is trusted) and `[T]` (`Vec<T> as Borrow<[T]>` is trusted).
// In the future, a `BorrowPure<T>` trait analogous to `DerefPure` might generalize this.
#[unstable(feature = "deref_pure_trait", issue = "87121")]
unsafe impl<B: ?Sized + ToOwned> DerefPure for Cow<'_, B> where B::Owned: Borrow<B> {}
unsafe impl<T: Clone> DerefPure for Cow<'_, T> {}
#[cfg(not(no_global_oom_handling))]
#[unstable(feature = "deref_pure_trait", issue = "87121")]
unsafe impl DerefPure for Cow<'_, str> {}
#[cfg(not(no_global_oom_handling))]
#[unstable(feature = "deref_pure_trait", issue = "87121")]
unsafe impl<T: Clone> DerefPure for Cow<'_, [T]> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<B: ?Sized> Eq for Cow<'_, B> where B: Eq + ToOwned {}

View file

@ -9,6 +9,7 @@ use hir_expand::name::Name;
use intern::sym;
use la_arena::Arena;
use rustc_abi::{Align, Integer, IntegerType, ReprFlags, ReprOptions};
use rustc_hashes::Hash64;
use triomphe::Arc;
use tt::iter::TtElement;
@ -172,7 +173,7 @@ fn parse_repr_tt(tt: &TopSubtree) -> Option<ReprOptions> {
}
}
Some(ReprOptions { int, align: max_align, pack: min_pack, flags, field_shuffle_seed: 0 })
Some(ReprOptions { int, align: max_align, pack: min_pack, flags, field_shuffle_seed: Hash64::ZERO })
}
impl StructData {

View file

@ -18,9 +18,15 @@ extern crate ra_ap_rustc_parse_format as rustc_parse_format;
#[cfg(feature = "in-rust-tree")]
extern crate rustc_abi;
#[cfg(feature = "in-rust-tree")]
extern crate rustc_hashes;
#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_abi as rustc_abi;
#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_hashes as rustc_hashes;
pub mod db;
pub mod attr;

View file

@ -15,6 +15,7 @@ use hir_def::{
use la_arena::{Idx, RawIdx};
use rustc_abi::AddressSpace;
use rustc_index::{IndexSlice, IndexVec};
use rustc_hashes::Hash64;
use triomphe::Arc;
@ -197,7 +198,7 @@ fn layout_of_simd_ty(
align,
max_repr_align: None,
unadjusted_abi_align: align.abi,
randomization_seed: 0,
randomization_seed: Hash64::ZERO,
}))
}
@ -314,7 +315,7 @@ pub fn layout_of_ty_query(
size,
max_repr_align: None,
unadjusted_abi_align: element.align.abi,
randomization_seed: 0,
randomization_seed: Hash64::ZERO,
}
}
TyKind::Slice(element) => {
@ -328,7 +329,7 @@ pub fn layout_of_ty_query(
size: Size::ZERO,
max_repr_align: None,
unadjusted_abi_align: element.align.abi,
randomization_seed: 0,
randomization_seed: Hash64::ZERO,
}
}
TyKind::Str => Layout {
@ -340,7 +341,7 @@ pub fn layout_of_ty_query(
size: Size::ZERO,
max_repr_align: None,
unadjusted_abi_align: dl.i8_align.abi,
randomization_seed: 0,
randomization_seed: Hash64::ZERO,
},
// Potentially-wide pointers.
TyKind::Ref(_, _, pointee) | TyKind::Raw(_, pointee) => {

View file

@ -12,6 +12,9 @@ extern crate ra_ap_rustc_index as rustc_index;
#[cfg(feature = "in-rust-tree")]
extern crate rustc_abi;
#[cfg(feature = "in-rust-tree")]
extern crate rustc_hashes;
#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_abi as rustc_abi;
@ -21,6 +24,9 @@ extern crate rustc_pattern_analysis;
#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_pattern_analysis as rustc_pattern_analysis;
#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_hashes as rustc_hashes;
mod builder;
mod chalk_db;
mod chalk_ext;

View file

@ -11,8 +11,6 @@
#![crate_type = "rlib"]
#![no_core]
#![allow(asm_sub_register, non_camel_case_types)]
// FIXME(f16_f128): Only needed for FIXME in check! and check_reg!
#![feature(auto_traits, lang_items)]
extern crate minicore;
use minicore::*;
@ -63,12 +61,6 @@ impl Copy for f16x8 {}
impl Copy for f32x4 {}
impl Copy for f64x2 {}
// FIXME(f16_f128): Only needed for FIXME in check! and check_reg!
#[lang = "freeze"]
unsafe auto trait Freeze {}
#[lang = "unpin"]
auto trait Unpin {}
extern "C" {
fn extern_func();
static extern_static: u8;

View file

@ -14,9 +14,20 @@
//! <https://github.com/rust-lang/rust/blob/c0b5cc9003f6464c11ae1c0662c6a7e06f6f5cab/compiler/rustc_codegen_cranelift/example/mini_core.rs>.
// ignore-tidy-linelength
#![feature(no_core, lang_items, rustc_attrs, decl_macro, naked_functions, f16, f128)]
#![feature(
no_core,
lang_items,
auto_traits,
freeze_impls,
negative_impls,
rustc_attrs,
decl_macro,
naked_functions,
f16,
f128,
asm_experimental_arch
)]
#![allow(unused, improper_ctypes_definitions, internal_features)]
#![feature(asm_experimental_arch)]
#![no_std]
#![no_core]
@ -42,6 +53,12 @@ pub trait Copy: Sized {}
#[lang = "bikeshed_guaranteed_no_drop"]
pub trait BikeshedGuaranteedNoDrop {}
#[lang = "freeze"]
pub unsafe auto trait Freeze {}
#[lang = "unpin"]
pub auto trait Unpin {}
impl_marker_trait!(
Copy => [
bool, char,
@ -83,6 +100,7 @@ impl<T: Copy + ?Sized> Copy for ManuallyDrop<T> {}
pub struct UnsafeCell<T: ?Sized> {
value: T,
}
impl<T: ?Sized> !Freeze for UnsafeCell<T> {}
#[rustc_builtin_macro]
pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {

View file

@ -1,4 +1,5 @@
//@ compile-flags: -Z merge-functions=disabled
//@ add-core-stubs
//@ revisions: windows-gnu
//@[windows-gnu] compile-flags: --target x86_64-pc-windows-gnu
@ -13,12 +14,12 @@
//@[linux] compile-flags: --target x86_64-unknown-linux-gnu
//@[linux] needs-llvm-components: x86
#![feature(no_core, lang_items, rustc_attrs, abi_vectorcall)]
#![feature(no_core, rustc_attrs, abi_vectorcall)]
#![no_core]
#![crate_type = "lib"]
#[lang = "sized"]
trait Sized {}
extern crate minicore;
use minicore::*;
// Make sure the argument is always passed when explicitly requesting a Windows ABI.
// Our goal here is to match clang: <https://clang.godbolt.org/z/Wr4jMWq3P>.

View file

@ -1,4 +1,5 @@
// ignore-tidy-linelength
//@ add-core-stubs
//@ revisions:i686-linux x86_64-linux
//@[i686-linux] compile-flags: --target i686-unknown-linux-gnu -C panic=abort
@ -16,18 +17,14 @@
// on i686-unknown-linux-gnu, since the alignment needs to be increased, and should codegen
// to a direct call on x86_64-unknown-linux-gnu, where byval alignment matches Rust alignment.
#![feature(no_core, lang_items)]
#![feature(no_core)]
#![crate_type = "lib"]
#![no_std]
#![no_core]
#![allow(non_camel_case_types)]
#[lang = "sized"]
trait Sized {}
#[lang = "freeze"]
trait Freeze {}
#[lang = "copy"]
trait Copy {}
extern crate minicore;
use minicore::*;
// This type has align 1 in Rust, but as a byval argument on i686-linux, it will have align 4.
#[repr(C)]

View file

@ -1,3 +1,4 @@
//@ add-core-stubs
//@ revisions:x86-linux x86-darwin
//@[x86-linux] compile-flags: --target i686-unknown-linux-gnu
@ -7,18 +8,14 @@
// Tests that aggregates containing vector types get their alignment increased to 16 on Darwin.
#![feature(no_core, lang_items, repr_simd, simd_ffi)]
#![feature(no_core, repr_simd, simd_ffi)]
#![crate_type = "lib"]
#![no_std]
#![no_core]
#![allow(non_camel_case_types)]
#[lang = "sized"]
trait Sized {}
#[lang = "freeze"]
trait Freeze {}
#[lang = "copy"]
trait Copy {}
extern crate minicore;
use minicore::*;
#[repr(simd)]
pub struct i32x4([i32; 4]);

View file

@ -1,4 +1,5 @@
// ignore-tidy-linelength
//@ add-core-stubs
//@ revisions:m68k x86_64-linux x86_64-windows i686-linux i686-windows
//@[m68k] compile-flags: --target m68k-unknown-linux-gnu
@ -16,20 +17,13 @@
// The only targets that use `byval` are m68k, x86-64, and x86.
// Note also that Windows mandates a by-ref ABI here, so it does not use byval.
#![feature(no_core, lang_items)]
#![feature(no_core)]
#![crate_type = "lib"]
#![no_std]
#![no_core]
#[lang = "sized"]
trait Sized {}
#[lang = "freeze"]
trait Freeze {}
#[lang = "copy"]
trait Copy {}
impl Copy for i32 {}
impl Copy for i64 {}
extern crate minicore;
use minicore::*;
// This struct can be represented as a pair, so it exercises the OperandValue::Pair
// codepath in `codegen_argument`.

View file

@ -35,6 +35,8 @@ fn main() {
"rustc_abi",
"-p",
"rustc_parse_format",
"-p",
"rustc_hashes",
])
.run();
}

View file

@ -5,7 +5,7 @@ test $DIR/relative-path-include-bytes-132203.rs - (line 18) ... FAILED
failures:
---- $DIR/relative-path-include-bytes-132203.rs - (line 18) stdout ----
error: couldn't read `$DIR/relative-dir-empty-file`: No such file or directory (os error 2)
error: couldn't read `$DIR/relative-dir-empty-file`: $FILE_NOT_FOUND_MSG (os error 2)
--> $DIR/relative-path-include-bytes-132203.rs:19:9
|
LL | let x = include_bytes!("relative-dir-empty-file");

View file

@ -1,4 +1,3 @@
//@ ignore-windows different error message
//@ revisions: edition2015 edition2024
//@[edition2015]edition:2015
//@[edition2015]check-fail
@ -7,8 +6,9 @@
//@[edition2024]edition:2024
//@[edition2024]check-pass
//@[edition2024]compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "tests.rustdoc-ui.doctest." -> "$$DIR/"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout: "`: .* \(os error 2\)" -> "`: $$FILE_NOT_FOUND_MSG (os error 2)"
// https://github.com/rust-lang/rust/issues/132203
// This version, because it's edition2024, passes thanks to the new

View file

@ -2,5 +2,13 @@ error: crate `rustc_serialize` required to be available in rlib format, but was
|
= help: try adding `extern crate rustc_driver;` at the top level of this crate
error: crate `rustc_hashes` required to be available in rlib format, but was not found in this form
|
= help: try adding `extern crate rustc_driver;` at the top level of this crate
error: crate `rustc_stable_hash` required to be available in rlib format, but was not found in this form
|
= help: try adding `extern crate rustc_driver;` at the top level of this crate
error: aborting due to NUMBER previous errors

View file

@ -60,7 +60,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
conv: C,
can_unwind: false,
}
--> $DIR/c-zst.rs:63:1
--> $DIR/c-zst.rs:64:1
|
LL | extern "C" fn pass_zst(_: ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -71,7 +71,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
conv: C,
can_unwind: false,
}
--> $DIR/c-zst.rs:63:1
--> $DIR/c-zst.rs:64:1
|
LL | extern "C" fn pass_zst(_: ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
//@ add-core-stubs
//@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
/*!
C doesn't have zero-sized types... except it does.
@ -52,12 +53,12 @@ extern "C" fn(i32, (), i32);
//@[x86_64-pc-windows-gnu] needs-llvm-components: x86
#![feature(lang_items, no_core, rustc_attrs)]
#![feature(no_core, rustc_attrs)]
#![no_core]
#![crate_type = "lib"]
#[lang = "sized"]
trait Sized {}
extern crate minicore;
use minicore::*;
#[rustc_abi(debug)]
extern "C" fn pass_zst(_: ()) {} //~ ERROR: fn_abi

View file

@ -71,7 +71,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
conv: C,
can_unwind: false,
}
--> $DIR/c-zst.rs:63:1
--> $DIR/c-zst.rs:64:1
|
LL | extern "C" fn pass_zst(_: ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -71,7 +71,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
conv: C,
can_unwind: false,
}
--> $DIR/c-zst.rs:63:1
--> $DIR/c-zst.rs:64:1
|
LL | extern "C" fn pass_zst(_: ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -60,7 +60,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
conv: C,
can_unwind: false,
}
--> $DIR/c-zst.rs:63:1
--> $DIR/c-zst.rs:64:1
|
LL | extern "C" fn pass_zst(_: ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -71,7 +71,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
conv: C,
can_unwind: false,
}
--> $DIR/c-zst.rs:63:1
--> $DIR/c-zst.rs:64:1
|
LL | extern "C" fn pass_zst(_: ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,15 +1,14 @@
//@ add-core-stubs
//@ needs-llvm-components: sparc
//@ compile-flags: --target=sparc-unknown-none-elf --crate-type=rlib
//@ build-pass
//@ ignore-pass (test emits codegen-time warnings)
#![no_core]
#![feature(no_core, lang_items, repr_simd)]
#![feature(no_core, repr_simd)]
#![allow(improper_ctypes_definitions)]
#[lang = "sized"]
trait Sized {}
#[lang = "copy"]
trait Copy {}
extern crate minicore;
use minicore::*;
#[repr(simd)]
pub struct SimdVec([i32; 4]);

View file

@ -1,5 +1,5 @@
warning: this function definition uses SIMD vector type `SimdVec` which is not currently supported with the chosen ABI
--> $DIR/simd-abi-checks-empty-list.rs:17:1
--> $DIR/simd-abi-checks-empty-list.rs:16:1
|
LL | pub extern "C" fn pass_by_vec(_: SimdVec) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -12,7 +12,7 @@ warning: 1 warning emitted
Future incompatibility report: Future breakage diagnostic:
warning: this function definition uses SIMD vector type `SimdVec` which is not currently supported with the chosen ABI
--> $DIR/simd-abi-checks-empty-list.rs:17:1
--> $DIR/simd-abi-checks-empty-list.rs:16:1
|
LL | pub extern "C" fn pass_by_vec(_: SimdVec) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here

View file

@ -1,3 +1,4 @@
//@ add-core-stubs
//@ revisions: z10 z13_no_vector z13_soft_float
//@ build-fail
//@[z10] compile-flags: --target s390x-unknown-linux-gnu
@ -8,20 +9,14 @@
//@[z13_soft_float] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13 -C target-feature=-vector,+soft-float
//@[z13_soft_float] needs-llvm-components: systemz
#![feature(no_core, lang_items, repr_simd, s390x_target_feature)]
#![feature(no_core, repr_simd, s390x_target_feature)]
#![no_core]
#![crate_type = "lib"]
#![allow(non_camel_case_types, improper_ctypes_definitions)]
#![deny(abi_unsupported_vector_types)]
#[lang = "sized"]
pub trait Sized {}
#[lang = "copy"]
pub trait Copy {}
#[lang = "freeze"]
pub trait Freeze {}
impl<T: Copy, const N: usize> Copy for [T; N] {}
extern crate minicore;
use minicore::*;
#[repr(simd)]
pub struct i8x8([i8; 8]);
@ -34,8 +29,6 @@ pub struct Wrapper<T>(T);
#[repr(transparent)]
pub struct TransparentWrapper<T>(T);
impl Copy for i8 {}
impl Copy for i64 {}
impl Copy for i8x8 {}
impl Copy for i8x16 {}
impl Copy for i8x32 {}

View file

@ -1,5 +1,5 @@
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:46:1
--> $DIR/simd-abi-checks-s390x.rs:39:1
|
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -8,13 +8,13 @@ LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:52:1
--> $DIR/simd-abi-checks-s390x.rs:45:1
|
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -24,7 +24,7 @@ LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:99:1
--> $DIR/simd-abi-checks-s390x.rs:92:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
LL | | x: &TransparentWrapper<i8x8>,
@ -36,7 +36,7 @@ LL | | ) -> TransparentWrapper<i8x8> {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:107:1
--> $DIR/simd-abi-checks-s390x.rs:100:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret(
LL | | x: &TransparentWrapper<i8x16>,
@ -48,7 +48,7 @@ LL | | ) -> TransparentWrapper<i8x16> {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:123:1
--> $DIR/simd-abi-checks-s390x.rs:116:1
|
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -58,7 +58,7 @@ LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:129:1
--> $DIR/simd-abi-checks-s390x.rs:122:1
|
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -68,7 +68,7 @@ LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `Wrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:141:1
--> $DIR/simd-abi-checks-s390x.rs:134:1
|
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -78,7 +78,7 @@ LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `Wrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:147:1
--> $DIR/simd-abi-checks-s390x.rs:140:1
|
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -88,7 +88,7 @@ LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:159:1
--> $DIR/simd-abi-checks-s390x.rs:152:1
|
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -98,7 +98,7 @@ LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:165:1
--> $DIR/simd-abi-checks-s390x.rs:158:1
|
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -111,7 +111,7 @@ error: aborting due to 10 previous errors
Future incompatibility report: Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:46:1
--> $DIR/simd-abi-checks-s390x.rs:39:1
|
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -120,14 +120,14 @@ LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:52:1
--> $DIR/simd-abi-checks-s390x.rs:45:1
|
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -136,14 +136,14 @@ LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:99:1
--> $DIR/simd-abi-checks-s390x.rs:92:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
LL | | x: &TransparentWrapper<i8x8>,
@ -154,14 +154,14 @@ LL | | ) -> TransparentWrapper<i8x8> {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:107:1
--> $DIR/simd-abi-checks-s390x.rs:100:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret(
LL | | x: &TransparentWrapper<i8x16>,
@ -172,14 +172,14 @@ LL | | ) -> TransparentWrapper<i8x16> {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:123:1
--> $DIR/simd-abi-checks-s390x.rs:116:1
|
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -188,14 +188,14 @@ LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:129:1
--> $DIR/simd-abi-checks-s390x.rs:122:1
|
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -204,14 +204,14 @@ LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `Wrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:141:1
--> $DIR/simd-abi-checks-s390x.rs:134:1
|
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -220,14 +220,14 @@ LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `Wrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:147:1
--> $DIR/simd-abi-checks-s390x.rs:140:1
|
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -236,14 +236,14 @@ LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:159:1
--> $DIR/simd-abi-checks-s390x.rs:152:1
|
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -252,14 +252,14 @@ LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:165:1
--> $DIR/simd-abi-checks-s390x.rs:158:1
|
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -268,7 +268,7 @@ LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>)
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:46:1
--> $DIR/simd-abi-checks-s390x.rs:39:1
|
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -8,13 +8,13 @@ LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:52:1
--> $DIR/simd-abi-checks-s390x.rs:45:1
|
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -24,7 +24,7 @@ LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:99:1
--> $DIR/simd-abi-checks-s390x.rs:92:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
LL | | x: &TransparentWrapper<i8x8>,
@ -36,7 +36,7 @@ LL | | ) -> TransparentWrapper<i8x8> {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:107:1
--> $DIR/simd-abi-checks-s390x.rs:100:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret(
LL | | x: &TransparentWrapper<i8x16>,
@ -48,7 +48,7 @@ LL | | ) -> TransparentWrapper<i8x16> {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:123:1
--> $DIR/simd-abi-checks-s390x.rs:116:1
|
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -58,7 +58,7 @@ LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:129:1
--> $DIR/simd-abi-checks-s390x.rs:122:1
|
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -68,7 +68,7 @@ LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `Wrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:141:1
--> $DIR/simd-abi-checks-s390x.rs:134:1
|
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -78,7 +78,7 @@ LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `Wrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:147:1
--> $DIR/simd-abi-checks-s390x.rs:140:1
|
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -88,7 +88,7 @@ LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:159:1
--> $DIR/simd-abi-checks-s390x.rs:152:1
|
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -98,7 +98,7 @@ LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:165:1
--> $DIR/simd-abi-checks-s390x.rs:158:1
|
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -111,7 +111,7 @@ error: aborting due to 10 previous errors
Future incompatibility report: Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:46:1
--> $DIR/simd-abi-checks-s390x.rs:39:1
|
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -120,14 +120,14 @@ LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:52:1
--> $DIR/simd-abi-checks-s390x.rs:45:1
|
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -136,14 +136,14 @@ LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:99:1
--> $DIR/simd-abi-checks-s390x.rs:92:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
LL | | x: &TransparentWrapper<i8x8>,
@ -154,14 +154,14 @@ LL | | ) -> TransparentWrapper<i8x8> {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:107:1
--> $DIR/simd-abi-checks-s390x.rs:100:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret(
LL | | x: &TransparentWrapper<i8x16>,
@ -172,14 +172,14 @@ LL | | ) -> TransparentWrapper<i8x16> {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:123:1
--> $DIR/simd-abi-checks-s390x.rs:116:1
|
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -188,14 +188,14 @@ LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:129:1
--> $DIR/simd-abi-checks-s390x.rs:122:1
|
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -204,14 +204,14 @@ LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `Wrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:141:1
--> $DIR/simd-abi-checks-s390x.rs:134:1
|
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -220,14 +220,14 @@ LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `Wrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:147:1
--> $DIR/simd-abi-checks-s390x.rs:140:1
|
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -236,14 +236,14 @@ LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:159:1
--> $DIR/simd-abi-checks-s390x.rs:152:1
|
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -252,14 +252,14 @@ LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:165:1
--> $DIR/simd-abi-checks-s390x.rs:158:1
|
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -268,7 +268,7 @@ LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>)
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:46:1
--> $DIR/simd-abi-checks-s390x.rs:39:1
|
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -8,13 +8,13 @@ LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:52:1
--> $DIR/simd-abi-checks-s390x.rs:45:1
|
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -24,7 +24,7 @@ LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:99:1
--> $DIR/simd-abi-checks-s390x.rs:92:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
LL | | x: &TransparentWrapper<i8x8>,
@ -36,7 +36,7 @@ LL | | ) -> TransparentWrapper<i8x8> {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:107:1
--> $DIR/simd-abi-checks-s390x.rs:100:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret(
LL | | x: &TransparentWrapper<i8x16>,
@ -48,7 +48,7 @@ LL | | ) -> TransparentWrapper<i8x16> {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:123:1
--> $DIR/simd-abi-checks-s390x.rs:116:1
|
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -58,7 +58,7 @@ LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:129:1
--> $DIR/simd-abi-checks-s390x.rs:122:1
|
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -68,7 +68,7 @@ LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `Wrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:141:1
--> $DIR/simd-abi-checks-s390x.rs:134:1
|
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -78,7 +78,7 @@ LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `Wrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:147:1
--> $DIR/simd-abi-checks-s390x.rs:140:1
|
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -88,7 +88,7 @@ LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:159:1
--> $DIR/simd-abi-checks-s390x.rs:152:1
|
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -98,7 +98,7 @@ LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:165:1
--> $DIR/simd-abi-checks-s390x.rs:158:1
|
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -111,7 +111,7 @@ error: aborting due to 10 previous errors
Future incompatibility report: Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:46:1
--> $DIR/simd-abi-checks-s390x.rs:39:1
|
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -120,14 +120,14 @@ LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:52:1
--> $DIR/simd-abi-checks-s390x.rs:45:1
|
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -136,14 +136,14 @@ LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:99:1
--> $DIR/simd-abi-checks-s390x.rs:92:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
LL | | x: &TransparentWrapper<i8x8>,
@ -154,14 +154,14 @@ LL | | ) -> TransparentWrapper<i8x8> {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:107:1
--> $DIR/simd-abi-checks-s390x.rs:100:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret(
LL | | x: &TransparentWrapper<i8x16>,
@ -172,14 +172,14 @@ LL | | ) -> TransparentWrapper<i8x16> {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x8` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:123:1
--> $DIR/simd-abi-checks-s390x.rs:116:1
|
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -188,14 +188,14 @@ LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `i8x16` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:129:1
--> $DIR/simd-abi-checks-s390x.rs:122:1
|
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -204,14 +204,14 @@ LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `Wrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:141:1
--> $DIR/simd-abi-checks-s390x.rs:134:1
|
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -220,14 +220,14 @@ LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `Wrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:147:1
--> $DIR/simd-abi-checks-s390x.rs:140:1
|
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -236,14 +236,14 @@ LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x8>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:159:1
--> $DIR/simd-abi-checks-s390x.rs:152:1
|
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -252,14 +252,14 @@ LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: this function definition uses SIMD vector type `TransparentWrapper<i8x16>` which (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:165:1
--> $DIR/simd-abi-checks-s390x.rs:158:1
|
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -268,7 +268,7 @@ LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>)
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
--> $DIR/simd-abi-checks-s390x.rs:16:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,6 @@
//! Ensure we trigger abi_unsupported_vector_types for target features that are usually enabled
//! on a target, but disabled in this file via a `-C` flag.
//@ add-core-stubs
//@ compile-flags: --crate-type=rlib --target=i586-unknown-linux-gnu -C target-feature=-sse,-sse2
//@ build-pass
//@ ignore-pass (test emits codegen-time warnings)
@ -8,11 +9,8 @@
#![no_core]
#![allow(improper_ctypes_definitions)]
#[lang = "sized"]
trait Sized {}
#[lang = "copy"]
trait Copy {}
extern crate minicore;
use minicore::*;
#[repr(simd)]
pub struct SseVector([i64; 2]);

View file

@ -1,5 +1,5 @@
warning: this function definition uses SIMD vector type `SseVector` which (with the chosen ABI) requires the `sse` target feature, which is not enabled
--> $DIR/sse-abi-checks.rs:21:1
--> $DIR/sse-abi-checks.rs:19:1
|
LL | pub unsafe extern "C" fn f(_: SseVector) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@ -13,7 +13,7 @@ warning: 1 warning emitted
Future incompatibility report: Future breakage diagnostic:
warning: this function definition uses SIMD vector type `SseVector` which (with the chosen ABI) requires the `sse` target feature, which is not enabled
--> $DIR/sse-abi-checks.rs:21:1
--> $DIR/sse-abi-checks.rs:19:1
|
LL | pub unsafe extern "C" fn f(_: SseVector) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here