1
Fork 0

Rollup merge of #136603 - workingjubilee:move-abi-versioning-into-ast, r=compiler-errors

compiler: gate `extern "{abi}"` in ast_lowering

I don't believe low-level crates like `rustc_abi` should have to know or care about higher-level concerns like whether the ABI string is stable for users. These implementation details can be made less open to public inspection. This way the code that governs stability is near the code that enforces stability, and compiled together.

It also abstracts away certain error messages instead of constantly repeating them.

A few error messages are simply deleted outright, instead of made uniform, because they are either too dated to be useful or redundant with other diagnostic improvements we could make. These can be pursued in followups: my first concern was making sure there wasn't unnecessary diagnostics-related code in `rustc_abi`, which is not well-positioned to understand what kind of errors are going to be generated based on how it is used.

r? ``@ghost``
This commit is contained in:
Matthias Krüger 2025-02-11 02:53:44 +01:00 committed by GitHub
commit 38f4c1f49a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 395 additions and 420 deletions

View file

@ -3317,7 +3317,6 @@ dependencies = [
"rand 0.8.5", "rand 0.8.5",
"rand_xoshiro", "rand_xoshiro",
"rustc_data_structures", "rustc_data_structures",
"rustc_feature",
"rustc_index", "rustc_index",
"rustc_macros", "rustc_macros",
"rustc_serialize", "rustc_serialize",
@ -3379,6 +3378,7 @@ dependencies = [
"rustc_ast_pretty", "rustc_ast_pretty",
"rustc_data_structures", "rustc_data_structures",
"rustc_errors", "rustc_errors",
"rustc_feature",
"rustc_fluent_macro", "rustc_fluent_macro",
"rustc_hir", "rustc_hir",
"rustc_index", "rustc_index",
@ -3683,6 +3683,7 @@ version = "0.0.0"
dependencies = [ dependencies = [
"ctrlc", "ctrlc",
"libc", "libc",
"rustc_abi",
"rustc_ast", "rustc_ast",
"rustc_ast_lowering", "rustc_ast_lowering",
"rustc_ast_passes", "rustc_ast_passes",
@ -4337,6 +4338,7 @@ version = "0.0.0"
dependencies = [ dependencies = [
"rustc_abi", "rustc_abi",
"rustc_ast", "rustc_ast",
"rustc_ast_lowering",
"rustc_ast_pretty", "rustc_ast_pretty",
"rustc_attr_parsing", "rustc_attr_parsing",
"rustc_data_structures", "rustc_data_structures",

View file

@ -9,7 +9,6 @@ bitflags = "2.4.1"
rand = { version = "0.8.4", default-features = false, optional = true } rand = { version = "0.8.4", default-features = false, optional = true }
rand_xoshiro = { version = "0.6.0", optional = true } rand_xoshiro = { version = "0.6.0", optional = true }
rustc_data_structures = { path = "../rustc_data_structures", optional = true } rustc_data_structures = { path = "../rustc_data_structures", optional = true }
rustc_feature = { path = "../rustc_feature", optional = true }
rustc_index = { path = "../rustc_index", default-features = false } rustc_index = { path = "../rustc_index", default-features = false }
rustc_macros = { path = "../rustc_macros", optional = true } rustc_macros = { path = "../rustc_macros", optional = true }
rustc_serialize = { path = "../rustc_serialize", optional = true } rustc_serialize = { path = "../rustc_serialize", optional = true }
@ -24,7 +23,6 @@ default = ["nightly", "randomize"]
# without depending on rustc_data_structures, rustc_macros and rustc_serialize # without depending on rustc_data_structures, rustc_macros and rustc_serialize
nightly = [ nightly = [
"dep:rustc_data_structures", "dep:rustc_data_structures",
"dep:rustc_feature",
"dep:rustc_macros", "dep:rustc_macros",
"dep:rustc_serialize", "dep:rustc_serialize",
"dep:rustc_span", "dep:rustc_span",

View file

@ -1,6 +1,5 @@
#[cfg(feature = "nightly")] #[cfg(feature = "nightly")]
use crate::{BackendRepr, FieldsShape, TyAbiInterface, TyAndLayout}; use crate::{BackendRepr, FieldsShape, Primitive, Size, TyAbiInterface, TyAndLayout, Variants};
use crate::{Primitive, Size, Variants};
mod reg; mod reg;

View file

@ -1,7 +1,6 @@
use std::fmt; use std::fmt;
use rustc_macros::{Decodable, Encodable, HashStable_Generic}; use rustc_macros::{Decodable, Encodable, HashStable_Generic};
use rustc_span::{Span, Symbol, sym};
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;
@ -95,14 +94,14 @@ impl Abi {
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct AbiData { pub struct AbiData {
abi: Abi, pub abi: Abi,
/// Name of this ABI as we like it called. /// Name of this ABI as we like it called.
name: &'static str, pub name: &'static str,
} }
#[allow(non_upper_case_globals)] #[allow(non_upper_case_globals)]
const AbiDatas: &[AbiData] = &[ pub const AbiDatas: &[AbiData] = &[
AbiData { abi: Abi::Rust, name: "Rust" }, AbiData { abi: Abi::Rust, name: "Rust" },
AbiData { abi: Abi::C { unwind: false }, name: "C" }, AbiData { abi: Abi::C { unwind: false }, name: "C" },
AbiData { abi: Abi::C { unwind: true }, name: "C-unwind" }, AbiData { abi: Abi::C { unwind: true }, name: "C-unwind" },
@ -142,131 +141,20 @@ const AbiDatas: &[AbiData] = &[
]; ];
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
pub enum AbiUnsupported { pub struct AbiUnsupported {}
Unrecognized,
Reason { explain: &'static str },
}
/// Returns the ABI with the given name (if any). /// Returns the ABI with the given name (if any).
pub fn lookup(name: &str) -> Result<Abi, AbiUnsupported> { pub fn lookup(name: &str) -> Result<Abi, AbiUnsupported> {
AbiDatas.iter().find(|abi_data| name == abi_data.name).map(|&x| x.abi).ok_or_else(|| match name { AbiDatas
"riscv-interrupt" => AbiUnsupported::Reason { .iter()
explain: "please use one of riscv-interrupt-m or riscv-interrupt-s for machine- or supervisor-level interrupts, respectively", .find(|abi_data| name == abi_data.name)
}, .map(|&x| x.abi)
"riscv-interrupt-u" => AbiUnsupported::Reason { .ok_or_else(|| AbiUnsupported {})
explain: "user-mode interrupt handlers have been removed from LLVM pending standardization, see: https://reviews.llvm.org/D149314",
},
"wasm" => AbiUnsupported::Reason {
explain: "non-standard wasm ABI is no longer supported",
},
_ => AbiUnsupported::Unrecognized,
})
} }
pub fn all_names() -> Vec<&'static str> { pub fn all_names() -> Vec<&'static str> {
AbiDatas.iter().map(|d| d.name).collect() AbiDatas.iter().map(|d| d.name).collect()
} }
pub fn enabled_names(features: &rustc_feature::Features, span: Span) -> Vec<&'static str> {
AbiDatas
.iter()
.map(|d| d.name)
.filter(|name| is_enabled(features, span, name).is_ok())
.collect()
}
pub enum AbiDisabled {
Unstable { feature: Symbol, explain: &'static str },
Unrecognized,
}
pub fn is_enabled(
features: &rustc_feature::Features,
span: Span,
name: &str,
) -> Result<(), AbiDisabled> {
let s = is_stable(name);
if let Err(AbiDisabled::Unstable { feature, .. }) = s {
if features.enabled(feature) || span.allows_unstable(feature) {
return Ok(());
}
}
s
}
/// Returns whether the ABI is stable to use.
///
/// Note that there is a separate check determining whether the ABI is even supported
/// on the current target; see `fn is_abi_supported` in `rustc_target::spec`.
pub fn is_stable(name: &str) -> Result<(), AbiDisabled> {
match name {
// Stable
"Rust" | "C" | "C-unwind" | "cdecl" | "cdecl-unwind" | "stdcall" | "stdcall-unwind"
| "fastcall" | "fastcall-unwind" | "aapcs" | "aapcs-unwind" | "win64" | "win64-unwind"
| "sysv64" | "sysv64-unwind" | "system" | "system-unwind" | "efiapi" | "thiscall"
| "thiscall-unwind" => Ok(()),
"rust-intrinsic" => Err(AbiDisabled::Unstable {
feature: sym::intrinsics,
explain: "intrinsics are subject to change",
}),
"vectorcall" => Err(AbiDisabled::Unstable {
feature: sym::abi_vectorcall,
explain: "vectorcall is experimental and subject to change",
}),
"vectorcall-unwind" => Err(AbiDisabled::Unstable {
feature: sym::abi_vectorcall,
explain: "vectorcall-unwind ABI is experimental and subject to change",
}),
"rust-call" => Err(AbiDisabled::Unstable {
feature: sym::unboxed_closures,
explain: "rust-call ABI is subject to change",
}),
"rust-cold" => Err(AbiDisabled::Unstable {
feature: sym::rust_cold_cc,
explain: "rust-cold is experimental and subject to change",
}),
"ptx-kernel" => Err(AbiDisabled::Unstable {
feature: sym::abi_ptx,
explain: "PTX ABIs are experimental and subject to change",
}),
"unadjusted" => Err(AbiDisabled::Unstable {
feature: sym::abi_unadjusted,
explain: "unadjusted ABI is an implementation detail and perma-unstable",
}),
"msp430-interrupt" => Err(AbiDisabled::Unstable {
feature: sym::abi_msp430_interrupt,
explain: "msp430-interrupt ABI is experimental and subject to change",
}),
"x86-interrupt" => Err(AbiDisabled::Unstable {
feature: sym::abi_x86_interrupt,
explain: "x86-interrupt ABI is experimental and subject to change",
}),
"gpu-kernel" => Err(AbiDisabled::Unstable {
feature: sym::abi_gpu_kernel,
explain: "gpu-kernel ABI is experimental and subject to change",
}),
"avr-interrupt" | "avr-non-blocking-interrupt" => Err(AbiDisabled::Unstable {
feature: sym::abi_avr_interrupt,
explain: "avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change",
}),
"riscv-interrupt-m" | "riscv-interrupt-s" => Err(AbiDisabled::Unstable {
feature: sym::abi_riscv_interrupt,
explain: "riscv-interrupt ABIs are experimental and subject to change",
}),
"C-cmse-nonsecure-call" => Err(AbiDisabled::Unstable {
feature: sym::abi_c_cmse_nonsecure_call,
explain: "C-cmse-nonsecure-call ABI is experimental and subject to change",
}),
"C-cmse-nonsecure-entry" => Err(AbiDisabled::Unstable {
feature: sym::cmse_nonsecure_entry,
explain: "C-cmse-nonsecure-entry ABI is experimental and subject to change",
}),
_ => Err(AbiDisabled::Unrecognized),
}
}
impl Abi { impl Abi {
/// Default ABI chosen for `extern fn` declarations without an explicit ABI. /// Default ABI chosen for `extern fn` declarations without an explicit ABI.
pub const FALLBACK: Abi = Abi::C { unwind: false }; pub const FALLBACK: Abi = Abi::C { unwind: false };

View file

@ -18,7 +18,7 @@ fn lookup_cdecl() {
#[test] #[test]
fn lookup_baz() { fn lookup_baz() {
let abi = lookup("baz"); let abi = lookup("baz");
assert_matches!(abi, Err(AbiUnsupported::Unrecognized)); assert_matches!(abi, Err(AbiUnsupported {}));
} }
#[test] #[test]

View file

@ -66,9 +66,7 @@ mod extern_abi;
pub use callconv::{Heterogeneous, HomogeneousAggregate, Reg, RegKind}; pub use callconv::{Heterogeneous, HomogeneousAggregate, Reg, RegKind};
#[cfg(feature = "nightly")] #[cfg(feature = "nightly")]
pub use extern_abi::{ pub use extern_abi::{AbiDatas, AbiUnsupported, ExternAbi, all_names, lookup};
AbiDisabled, AbiUnsupported, ExternAbi, all_names, enabled_names, is_enabled, is_stable, lookup,
};
#[cfg(feature = "nightly")] #[cfg(feature = "nightly")]
pub use layout::{FIRST_VARIANT, FieldIdx, Layout, TyAbiInterface, TyAndLayout, VariantIdx}; pub use layout::{FIRST_VARIANT, FieldIdx, Layout, TyAbiInterface, TyAndLayout, VariantIdx};
pub use layout::{LayoutCalculator, LayoutCalculatorError}; pub use layout::{LayoutCalculator, LayoutCalculatorError};

View file

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

View file

@ -41,13 +41,13 @@ use std::iter;
use ast::visit::Visitor; use ast::visit::Visitor;
use hir::def::{DefKind, PartialRes, Res}; use hir::def::{DefKind, PartialRes, Res};
use hir::{BodyId, HirId}; use hir::{BodyId, HirId};
use rustc_abi::ExternAbi;
use rustc_ast::*; use rustc_ast::*;
use rustc_errors::ErrorGuaranteed; use rustc_errors::ErrorGuaranteed;
use rustc_hir::def_id::DefId; use rustc_hir::def_id::DefId;
use rustc_middle::span_bug; use rustc_middle::span_bug;
use rustc_middle::ty::{Asyncness, ResolverAstLowering}; use rustc_middle::ty::{Asyncness, ResolverAstLowering};
use rustc_span::{Ident, Span}; use rustc_span::{Ident, Span};
use rustc_target::spec::abi;
use {rustc_ast as ast, rustc_hir as hir}; use {rustc_ast as ast, rustc_hir as hir};
use super::{GenericArgsMode, ImplTraitContext, LoweringContext, ParamMode}; use super::{GenericArgsMode, ImplTraitContext, LoweringContext, ParamMode};
@ -398,7 +398,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
safety: hir::Safety::Safe.into(), safety: hir::Safety::Safe.into(),
constness: hir::Constness::NotConst, constness: hir::Constness::NotConst,
asyncness: hir::IsAsync::NotAsync, asyncness: hir::IsAsync::NotAsync,
abi: abi::Abi::Rust, abi: ExternAbi::Rust,
} }
} }

View file

@ -1,5 +1,5 @@
use rustc_errors::DiagArgFromDisplay;
use rustc_errors::codes::*; use rustc_errors::codes::*;
use rustc_errors::{Diag, DiagArgFromDisplay, EmissionGuarantee, SubdiagMessageOp, Subdiagnostic};
use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_span::{Ident, Span, Symbol}; use rustc_span::{Ident, Span, Symbol};
@ -32,8 +32,6 @@ pub(crate) struct InvalidAbi {
pub abi: Symbol, pub abi: Symbol,
pub command: String, pub command: String,
#[subdiagnostic] #[subdiagnostic]
pub explain: Option<InvalidAbiReason>,
#[subdiagnostic]
pub suggestion: Option<InvalidAbiSuggestion>, pub suggestion: Option<InvalidAbiSuggestion>,
} }
@ -45,19 +43,6 @@ pub(crate) struct TupleStructWithDefault {
pub span: Span, pub span: Span,
} }
pub(crate) struct InvalidAbiReason(pub &'static str);
impl Subdiagnostic for InvalidAbiReason {
fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
self,
diag: &mut Diag<'_, G>,
_: &F,
) {
#[allow(rustc::untranslatable_diagnostic)]
diag.note(self.0);
}
}
#[derive(Subdiagnostic)] #[derive(Subdiagnostic)]
#[suggestion( #[suggestion(
ast_lowering_invalid_abi_suggestion, ast_lowering_invalid_abi_suggestion,

View file

@ -17,9 +17,9 @@ use thin_vec::ThinVec;
use tracing::instrument; use tracing::instrument;
use super::errors::{ use super::errors::{
InvalidAbi, InvalidAbiReason, InvalidAbiSuggestion, MisplacedRelaxTraitBound, InvalidAbi, InvalidAbiSuggestion, MisplacedRelaxTraitBound, TupleStructWithDefault,
TupleStructWithDefault,
}; };
use super::stability::{enabled_names, gate_unstable_abi};
use super::{ use super::{
AstOwner, FnDeclKind, ImplTraitContext, ImplTraitPosition, LoweringContext, ParamMode, AstOwner, FnDeclKind, ImplTraitContext, ImplTraitPosition, LoweringContext, ParamMode,
ResolverAstLoweringExt, ResolverAstLoweringExt,
@ -1479,11 +1479,16 @@ impl<'hir> LoweringContext<'_, 'hir> {
} }
} }
pub(super) fn lower_abi(&mut self, abi: StrLit) -> ExternAbi { pub(super) fn lower_abi(&mut self, abi_str: StrLit) -> ExternAbi {
rustc_abi::lookup(abi.symbol_unescaped.as_str()).unwrap_or_else(|err| { let ast::StrLit { symbol_unescaped, span, .. } = abi_str;
self.error_on_invalid_abi(abi, err); let extern_abi = rustc_abi::lookup(symbol_unescaped.as_str()).unwrap_or_else(|_| {
self.error_on_invalid_abi(abi_str);
ExternAbi::Rust ExternAbi::Rust
}) });
let sess = self.tcx.sess;
let features = self.tcx.features();
gate_unstable_abi(sess, features, span, extern_abi);
extern_abi
} }
pub(super) fn lower_extern(&mut self, ext: Extern) -> ExternAbi { pub(super) fn lower_extern(&mut self, ext: Extern) -> ExternAbi {
@ -1494,8 +1499,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
} }
} }
fn error_on_invalid_abi(&self, abi: StrLit, err: rustc_abi::AbiUnsupported) { fn error_on_invalid_abi(&self, abi: StrLit) {
let abi_names = rustc_abi::enabled_names(self.tcx.features(), abi.span) let abi_names = enabled_names(self.tcx.features(), abi.span)
.iter() .iter()
.map(|s| Symbol::intern(s)) .map(|s| Symbol::intern(s))
.collect::<Vec<_>>(); .collect::<Vec<_>>();
@ -1503,10 +1508,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
self.dcx().emit_err(InvalidAbi { self.dcx().emit_err(InvalidAbi {
abi: abi.symbol_unescaped, abi: abi.symbol_unescaped,
span: abi.span, span: abi.span,
explain: match err {
rustc_abi::AbiUnsupported::Reason { explain } => Some(InvalidAbiReason(explain)),
_ => None,
},
suggestion: suggested_name.map(|suggested_name| InvalidAbiSuggestion { suggestion: suggested_name.map(|suggested_name| InvalidAbiSuggestion {
span: abi.span, span: abi.span,
suggestion: format!("\"{suggested_name}\""), suggestion: format!("\"{suggested_name}\""),

View file

@ -84,6 +84,7 @@ mod index;
mod item; mod item;
mod pat; mod pat;
mod path; mod path;
pub mod stability;
rustc_fluent_macro::fluent_messages! { "../messages.ftl" } rustc_fluent_macro::fluent_messages! { "../messages.ftl" }

View file

@ -0,0 +1,147 @@
use std::fmt;
use rustc_abi::ExternAbi;
use rustc_feature::Features;
use rustc_session::Session;
use rustc_session::parse::feature_err;
use rustc_span::symbol::sym;
use rustc_span::{Span, Symbol};
pub(crate) fn enabled_names(features: &rustc_feature::Features, span: Span) -> Vec<&'static str> {
rustc_abi::AbiDatas
.iter()
.filter(|data| extern_abi_enabled(features, span, data.abi).is_ok())
.map(|d| d.name)
.collect()
}
pub(crate) fn extern_abi_enabled(
features: &rustc_feature::Features,
span: Span,
abi: ExternAbi,
) -> Result<(), UnstableAbi> {
extern_abi_stability(abi).or_else(|unstable @ UnstableAbi { feature, .. }| {
if features.enabled(feature) || span.allows_unstable(feature) {
Ok(())
} else {
Err(unstable)
}
})
}
#[allow(rustc::untranslatable_diagnostic)]
pub(crate) fn gate_unstable_abi(sess: &Session, features: &Features, span: Span, abi: ExternAbi) {
match extern_abi_enabled(features, span, abi) {
Ok(_) => (),
Err(unstable_abi) => {
let explain = unstable_abi.to_string();
feature_err(sess, unstable_abi.feature, span, explain).emit();
}
}
}
pub struct UnstableAbi {
abi: ExternAbi,
feature: Symbol,
explain: GateReason,
}
enum GateReason {
Experimental,
ImplDetail,
}
impl fmt::Display for UnstableAbi {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let Self { abi, .. } = self;
let name = abi.to_string();
let name = name.trim_matches('"');
match self.explain {
GateReason::Experimental => {
write!(f, r#"the extern "{name}" ABI is experimental and subject to change"#)
}
GateReason::ImplDetail => {
write!(
f,
r#"the extern "{name}" ABI is an implementation detail and perma-unstable"#
)
}
}
}
}
pub fn extern_abi_stability(abi: ExternAbi) -> Result<(), UnstableAbi> {
match abi {
// stable ABIs
ExternAbi::Rust
| ExternAbi::C { .. }
| ExternAbi::Cdecl { .. }
| ExternAbi::Stdcall { .. }
| ExternAbi::Fastcall { .. }
| ExternAbi::Thiscall { .. }
| ExternAbi::Aapcs { .. }
| ExternAbi::Win64 { .. }
| ExternAbi::SysV64 { .. }
| ExternAbi::System { .. }
| ExternAbi::EfiApi => Ok(()),
// implementation details
ExternAbi::RustIntrinsic => {
Err(UnstableAbi { abi, feature: sym::intrinsics, explain: GateReason::ImplDetail })
}
ExternAbi::Unadjusted => {
Err(UnstableAbi { abi, feature: sym::abi_unadjusted, explain: GateReason::ImplDetail })
}
// experimental
ExternAbi::Vectorcall { .. } => Err(UnstableAbi {
abi,
feature: sym::abi_vectorcall,
explain: GateReason::Experimental,
}),
ExternAbi::RustCall => Err(UnstableAbi {
abi,
feature: sym::unboxed_closures,
explain: GateReason::Experimental,
}),
ExternAbi::RustCold => {
Err(UnstableAbi { abi, feature: sym::rust_cold_cc, explain: GateReason::Experimental })
}
ExternAbi::GpuKernel => Err(UnstableAbi {
abi,
feature: sym::abi_gpu_kernel,
explain: GateReason::Experimental,
}),
ExternAbi::PtxKernel => {
Err(UnstableAbi { abi, feature: sym::abi_ptx, explain: GateReason::Experimental })
}
ExternAbi::Msp430Interrupt => Err(UnstableAbi {
abi,
feature: sym::abi_msp430_interrupt,
explain: GateReason::Experimental,
}),
ExternAbi::X86Interrupt => Err(UnstableAbi {
abi,
feature: sym::abi_x86_interrupt,
explain: GateReason::Experimental,
}),
ExternAbi::AvrInterrupt | ExternAbi::AvrNonBlockingInterrupt => Err(UnstableAbi {
abi,
feature: sym::abi_avr_interrupt,
explain: GateReason::Experimental,
}),
ExternAbi::RiscvInterruptM | ExternAbi::RiscvInterruptS => Err(UnstableAbi {
abi,
feature: sym::abi_riscv_interrupt,
explain: GateReason::Experimental,
}),
ExternAbi::CCmseNonSecureCall => Err(UnstableAbi {
abi,
feature: sym::abi_c_cmse_nonsecure_call,
explain: GateReason::Experimental,
}),
ExternAbi::CCmseNonSecureEntry => Err(UnstableAbi {
abi,
feature: sym::cmse_nonsecure_entry,
explain: GateReason::Experimental,
}),
}
}

View file

@ -20,6 +20,7 @@ use std::mem;
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};
use itertools::{Either, Itertools}; use itertools::{Either, Itertools};
use rustc_abi::ExternAbi;
use rustc_ast::ptr::P; use rustc_ast::ptr::P;
use rustc_ast::visit::{AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor, walk_list}; use rustc_ast::visit::{AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor, walk_list};
use rustc_ast::*; use rustc_ast::*;
@ -35,7 +36,6 @@ use rustc_session::lint::builtin::{
}; };
use rustc_session::lint::{BuiltinLintDiag, LintBuffer}; use rustc_session::lint::{BuiltinLintDiag, LintBuffer};
use rustc_span::{Ident, Span, kw, sym}; use rustc_span::{Ident, Span, kw, sym};
use rustc_target::spec::abi;
use thin_vec::thin_vec; use thin_vec::thin_vec;
use crate::errors::{self, TildeConstReason}; use crate::errors::{self, TildeConstReason};
@ -723,7 +723,7 @@ impl<'a> AstValidator<'a> {
MISSING_ABI, MISSING_ABI,
id, id,
span, span,
BuiltinLintDiag::MissingAbi(span, abi::Abi::FALLBACK), BuiltinLintDiag::MissingAbi(span, ExternAbi::FALLBACK),
) )
} }
} }

View file

@ -1,9 +1,9 @@
use rustc_ast as ast; use rustc_ast as ast;
use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor}; use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
use rustc_ast::{NodeId, PatKind, attr, token}; use rustc_ast::{NodeId, PatKind, attr, token};
use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP, BuiltinAttribute, Features, GateIssue}; use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP, BuiltinAttribute, Features};
use rustc_session::Session; use rustc_session::Session;
use rustc_session::parse::{feature_err, feature_err_issue, feature_warn}; use rustc_session::parse::{feature_err, feature_warn};
use rustc_span::source_map::Spanned; use rustc_span::source_map::Spanned;
use rustc_span::{Span, Symbol, sym}; use rustc_span::{Span, Symbol, sym};
use thin_vec::ThinVec; use thin_vec::ThinVec;
@ -72,35 +72,6 @@ struct PostExpansionVisitor<'a> {
} }
impl<'a> PostExpansionVisitor<'a> { impl<'a> PostExpansionVisitor<'a> {
#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
fn check_abi(&self, abi: ast::StrLit) {
let ast::StrLit { symbol_unescaped, span, .. } = abi;
match rustc_abi::is_enabled(self.features, span, symbol_unescaped.as_str()) {
Ok(()) => (),
Err(rustc_abi::AbiDisabled::Unstable { feature, explain }) => {
feature_err_issue(&self.sess, feature, span, GateIssue::Language, explain).emit();
}
Err(rustc_abi::AbiDisabled::Unrecognized) => {
if self.sess.opts.pretty.is_none_or(|ppm| ppm.needs_hir()) {
self.sess.dcx().span_delayed_bug(
span,
format!(
"unrecognized ABI not caught in lowering: {}",
symbol_unescaped.as_str()
),
);
}
}
}
}
fn check_extern(&self, ext: ast::Extern) {
if let ast::Extern::Explicit(abi, _) = ext {
self.check_abi(abi);
}
}
/// Feature gate `impl Trait` inside `type Alias = $type_expr;`. /// Feature gate `impl Trait` inside `type Alias = $type_expr;`.
fn check_impl_trait(&self, ty: &ast::Ty, in_associated_ty: bool) { fn check_impl_trait(&self, ty: &ast::Ty, in_associated_ty: bool) {
struct ImplTraitVisitor<'a> { struct ImplTraitVisitor<'a> {
@ -223,12 +194,9 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
fn visit_item(&mut self, i: &'a ast::Item) { fn visit_item(&mut self, i: &'a ast::Item) {
match &i.kind { match &i.kind {
ast::ItemKind::ForeignMod(foreign_module) => { ast::ItemKind::ForeignMod(_foreign_module) => {
if let Some(abi) = foreign_module.abi { // handled during lowering
self.check_abi(abi);
} }
}
ast::ItemKind::Struct(..) | ast::ItemKind::Enum(..) | ast::ItemKind::Union(..) => { ast::ItemKind::Struct(..) | ast::ItemKind::Enum(..) | ast::ItemKind::Union(..) => {
for attr in attr::filter_by_name(&i.attrs, sym::repr) { for attr in attr::filter_by_name(&i.attrs, sym::repr) {
for item in attr.meta_item_list().unwrap_or_else(ThinVec::new) { for item in attr.meta_item_list().unwrap_or_else(ThinVec::new) {
@ -315,7 +283,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
match &ty.kind { match &ty.kind {
ast::TyKind::BareFn(bare_fn_ty) => { ast::TyKind::BareFn(bare_fn_ty) => {
// Function pointers cannot be `const` // Function pointers cannot be `const`
self.check_extern(bare_fn_ty.ext);
self.check_late_bound_lifetime_defs(&bare_fn_ty.generic_params); self.check_late_bound_lifetime_defs(&bare_fn_ty.generic_params);
} }
ast::TyKind::Never => { ast::TyKind::Never => {
@ -418,9 +385,8 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
} }
fn visit_fn(&mut self, fn_kind: FnKind<'a>, span: Span, _: NodeId) { fn visit_fn(&mut self, fn_kind: FnKind<'a>, span: Span, _: NodeId) {
if let Some(header) = fn_kind.header() { if let Some(_header) = fn_kind.header() {
// Stability of const fn methods are covered in `visit_assoc_item` below. // Stability of const fn methods are covered in `visit_assoc_item` below.
self.check_extern(header.ext);
} }
if let FnKind::Closure(ast::ClosureBinder::For { generic_params, .. }, ..) = fn_kind { if let FnKind::Closure(ast::ClosureBinder::For { generic_params, .. }, ..) = fn_kind {

View file

@ -1,5 +1,6 @@
use std::str::FromStr; use std::str::FromStr;
use rustc_abi::ExternAbi;
use rustc_ast::attr::list_contains_name; use rustc_ast::attr::list_contains_name;
use rustc_ast::expand::autodiff_attrs::{ use rustc_ast::expand::autodiff_attrs::{
AutoDiffAttrs, DiffActivity, DiffMode, valid_input_activity, valid_ret_activity, AutoDiffAttrs, DiffActivity, DiffMode, valid_input_activity, valid_ret_activity,
@ -23,7 +24,7 @@ use rustc_middle::ty::{self as ty, TyCtxt};
use rustc_session::parse::feature_err; use rustc_session::parse::feature_err;
use rustc_session::{Session, lint}; use rustc_session::{Session, lint};
use rustc_span::{Ident, Span, sym}; use rustc_span::{Ident, Span, sym};
use rustc_target::spec::{SanitizerSet, abi}; use rustc_target::spec::SanitizerSet;
use tracing::debug; use tracing::debug;
use crate::errors; use crate::errors;
@ -219,7 +220,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
if !is_closure if !is_closure
&& let Some(fn_sig) = fn_sig() && let Some(fn_sig) = fn_sig()
&& fn_sig.skip_binder().abi() != abi::Abi::Rust && fn_sig.skip_binder().abi() != ExternAbi::Rust
{ {
struct_span_code_err!( struct_span_code_err!(
tcx.dcx(), tcx.dcx(),

View file

@ -5,6 +5,7 @@ edition = "2021"
[dependencies] [dependencies]
# tidy-alphabetical-start # tidy-alphabetical-start
rustc_abi = { path = "../rustc_abi" }
rustc_ast = { path = "../rustc_ast" } rustc_ast = { path = "../rustc_ast" }
rustc_ast_lowering = { path = "../rustc_ast_lowering" } rustc_ast_lowering = { path = "../rustc_ast_lowering" }
rustc_ast_passes = { path = "../rustc_ast_passes" } rustc_ast_passes = { path = "../rustc_ast_passes" }

View file

@ -747,7 +747,7 @@ fn print_crate_info(
} }
} }
CallingConventions => { CallingConventions => {
let mut calling_conventions = rustc_target::spec::abi::all_names(); let mut calling_conventions = rustc_abi::all_names();
calling_conventions.sort_unstable(); calling_conventions.sort_unstable();
println_info!("{}", calling_conventions.join("\n")); println_info!("{}", calling_conventions.join("\n"));
} }

View file

@ -7,6 +7,7 @@ edition = "2021"
# tidy-alphabetical-start # tidy-alphabetical-start
rustc_abi = { path = "../rustc_abi" } rustc_abi = { path = "../rustc_abi" }
rustc_ast = { path = "../rustc_ast" } rustc_ast = { path = "../rustc_ast" }
rustc_ast_lowering = { path = "../rustc_ast_lowering" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" } rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_attr_parsing = { path = "../rustc_attr_parsing" } rustc_attr_parsing = { path = "../rustc_attr_parsing" }
rustc_data_structures = { path = "../rustc_data_structures" } rustc_data_structures = { path = "../rustc_data_structures" }

View file

@ -1,5 +1,6 @@
//! Checks validity of naked functions. //! Checks validity of naked functions.
use rustc_abi::ExternAbi;
use rustc_hir as hir; use rustc_hir as hir;
use rustc_hir::def::DefKind; use rustc_hir::def::DefKind;
use rustc_hir::def_id::{LocalDefId, LocalModDefId}; use rustc_hir::def_id::{LocalDefId, LocalModDefId};
@ -11,7 +12,6 @@ use rustc_middle::span_bug;
use rustc_middle::ty::TyCtxt; use rustc_middle::ty::TyCtxt;
use rustc_session::lint::builtin::UNDEFINED_NAKED_FUNCTION_ABI; use rustc_session::lint::builtin::UNDEFINED_NAKED_FUNCTION_ABI;
use rustc_span::{Span, sym}; use rustc_span::{Span, sym};
use rustc_target::spec::abi::Abi;
use crate::errors::{ use crate::errors::{
NakedAsmOutsideNakedFn, NakedFunctionsAsmBlock, NakedFunctionsMustNakedAsm, NoPatterns, NakedAsmOutsideNakedFn, NakedFunctionsAsmBlock, NakedFunctionsMustNakedAsm, NoPatterns,
@ -61,8 +61,8 @@ fn check_mod_naked_functions(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
} }
/// Checks that function uses non-Rust ABI. /// Checks that function uses non-Rust ABI.
fn check_abi(tcx: TyCtxt<'_>, def_id: LocalDefId, abi: Abi) { fn check_abi(tcx: TyCtxt<'_>, def_id: LocalDefId, abi: ExternAbi) {
if abi == Abi::Rust { if abi == ExternAbi::Rust {
let hir_id = tcx.local_def_id_to_hir_id(def_id); let hir_id = tcx.local_def_id_to_hir_id(def_id);
let span = tcx.def_span(def_id); let span = tcx.def_span(def_id);
tcx.emit_node_span_lint( tcx.emit_node_span_lint(

View file

@ -4,6 +4,7 @@
use std::mem::replace; use std::mem::replace;
use std::num::NonZero; use std::num::NonZero;
use rustc_ast_lowering::stability::extern_abi_stability;
use rustc_attr_parsing::{ use rustc_attr_parsing::{
self as attr, ConstStability, DeprecatedSince, Stability, StabilityLevel, StableSince, self as attr, ConstStability, DeprecatedSince, Stability, StabilityLevel, StableSince,
UnstableReason, VERSION_PLACEHOLDER, UnstableReason, VERSION_PLACEHOLDER,
@ -1027,8 +1028,8 @@ impl<'tcx> Visitor<'tcx> for CheckTraitImplStable<'tcx> {
if let TyKind::Never = t.kind { if let TyKind::Never = t.kind {
self.fully_stable = false; self.fully_stable = false;
} }
if let TyKind::BareFn(f) = t.kind { if let TyKind::BareFn(function) = t.kind {
if rustc_target::spec::abi::is_stable(f.abi.name()).is_err() { if extern_abi_stability(function.abi).is_err() {
self.fully_stable = false; self.fully_stable = false;
} }
} }

View file

@ -57,13 +57,6 @@ use crate::spec::crt_objects::CrtObjects;
pub mod crt_objects; pub mod crt_objects;
pub mod abi {
pub use rustc_abi::{
AbiDisabled, AbiUnsupported, ExternAbi as Abi, all_names, enabled_names, is_enabled,
is_stable, lookup,
};
}
mod base; mod base;
mod json; mod json;

View file

@ -10,4 +10,4 @@ fn main() {
} }
extern "unadjusted" fn foo() {} extern "unadjusted" fn foo() {}
//[cfail2]~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable //[cfail2]~^ ERROR: "unadjusted" ABI is an implementation detail and perma-unstable

View file

@ -1,4 +0,0 @@
extern "wasm" fn test() {}
//~^ ERROR invalid ABI: found `wasm`
fn main() {}

View file

@ -8,10 +8,9 @@ LL | extern "riscv-interrupt" fn isr() {}
| help: did you mean: `"riscv-interrupt-m"` | help: did you mean: `"riscv-interrupt-m"`
| |
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
= note: please use one of riscv-interrupt-m or riscv-interrupt-s for machine- or supervisor-level interrupts, respectively
error[E0703]: invalid ABI: found `riscv-interrupt-u` error[E0703]: invalid ABI: found `riscv-interrupt-u`
--> $DIR/riscv-discoverability-guidance.rs:23:8 --> $DIR/riscv-discoverability-guidance.rs:22:8
| |
LL | extern "riscv-interrupt-u" fn isr_U() {} LL | extern "riscv-interrupt-u" fn isr_U() {}
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
@ -20,7 +19,6 @@ LL | extern "riscv-interrupt-u" fn isr_U() {}
| help: did you mean: `"riscv-interrupt-m"` | help: did you mean: `"riscv-interrupt-m"`
| |
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
= note: user-mode interrupt handlers have been removed from LLVM pending standardization, see: https://reviews.llvm.org/D149314
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -8,10 +8,9 @@ LL | extern "riscv-interrupt" fn isr() {}
| help: did you mean: `"riscv-interrupt-m"` | help: did you mean: `"riscv-interrupt-m"`
| |
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
= note: please use one of riscv-interrupt-m or riscv-interrupt-s for machine- or supervisor-level interrupts, respectively
error[E0703]: invalid ABI: found `riscv-interrupt-u` error[E0703]: invalid ABI: found `riscv-interrupt-u`
--> $DIR/riscv-discoverability-guidance.rs:23:8 --> $DIR/riscv-discoverability-guidance.rs:22:8
| |
LL | extern "riscv-interrupt-u" fn isr_U() {} LL | extern "riscv-interrupt-u" fn isr_U() {}
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
@ -20,7 +19,6 @@ LL | extern "riscv-interrupt-u" fn isr_U() {}
| help: did you mean: `"riscv-interrupt-m"` | help: did you mean: `"riscv-interrupt-m"`
| |
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
= note: user-mode interrupt handlers have been removed from LLVM pending standardization, see: https://reviews.llvm.org/D149314
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -18,10 +18,8 @@ extern "riscv-interrupt" fn isr() {}
//~^ ERROR invalid ABI //~^ ERROR invalid ABI
//~^^ NOTE invalid ABI //~^^ NOTE invalid ABI
//~^^^ NOTE invoke `rustc --print=calling-conventions` for a full list of supported calling conventions //~^^^ NOTE invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
//~^^^^ NOTE please use one of riscv-interrupt-m or riscv-interrupt-s
extern "riscv-interrupt-u" fn isr_U() {} extern "riscv-interrupt-u" fn isr_U() {}
//~^ ERROR invalid ABI //~^ ERROR invalid ABI
//~^^ NOTE invalid ABI //~^^ NOTE invalid ABI
//~^^^ NOTE invoke `rustc --print=calling-conventions` for a full list of supported calling conventions //~^^^ NOTE invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
//~^^^^ NOTE user-mode interrupt handlers have been removed from LLVM pending standardization

View file

@ -1,4 +1,4 @@
error[E0658]: C-cmse-nonsecure-call ABI is experimental and subject to change error[E0658]: the extern "C-cmse-nonsecure-call" ABI is experimental and subject to change
--> $DIR/gate_test.rs:5:46 --> $DIR/gate_test.rs:5:46
| |
LL | core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>( LL | core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(

View file

@ -1,4 +1,4 @@
error[E0658]: C-cmse-nonsecure-entry ABI is experimental and subject to change error[E0658]: the extern "C-cmse-nonsecure-entry" ABI is experimental and subject to change
--> $DIR/gate_test.rs:4:12 --> $DIR/gate_test.rs:4:12
| |
LL | pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 { LL | pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {

3
tests/ui/extern/fictional-abi.rs vendored Normal file
View file

@ -0,0 +1,3 @@
#![crate_type = "lib"]
pub extern "fictional" fn lol() {} //~ ERROR: invalid ABI

View file

@ -1,11 +1,10 @@
error[E0703]: invalid ABI: found `wasm` error[E0703]: invalid ABI: found `fictional`
--> $DIR/removed-wasm-abi.rs:1:8 --> $DIR/fictional-abi.rs:3:12
| |
LL | extern "wasm" fn test() {} LL | pub extern "fictional" fn lol() {}
| ^^^^^^ invalid ABI | ^^^^^^^^^^^ invalid ABI
| |
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
= note: non-standard wasm ABI is no longer supported
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -9,43 +9,43 @@ trait Sized { }
// feature gate is not used. // feature gate is not used.
extern "avr-non-blocking-interrupt" fn fu() {} extern "avr-non-blocking-interrupt" fn fu() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-non-blocking-interrupt" ABI is experimental
extern "avr-interrupt" fn f() {} extern "avr-interrupt" fn f() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-interrupt" ABI is experimental
trait T { trait T {
extern "avr-interrupt" fn m(); extern "avr-interrupt" fn m();
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-interrupt" ABI is experimental
extern "avr-non-blocking-interrupt" fn mu(); extern "avr-non-blocking-interrupt" fn mu();
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-non-blocking-interrupt" ABI is experimental
extern "avr-interrupt" fn dm() {} extern "avr-interrupt" fn dm() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-interrupt" ABI is experimental
extern "avr-non-blocking-interrupt" fn dmu() {} extern "avr-non-blocking-interrupt" fn dmu() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-non-blocking-interrupt" ABI is experimental
} }
struct S; struct S;
impl T for S { impl T for S {
extern "avr-interrupt" fn m() {} extern "avr-interrupt" fn m() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-interrupt" ABI is experimental
extern "avr-non-blocking-interrupt" fn mu() {} extern "avr-non-blocking-interrupt" fn mu() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-non-blocking-interrupt" ABI is experimental
} }
impl S { impl S {
extern "avr-interrupt" fn im() {} extern "avr-interrupt" fn im() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-interrupt" ABI is experimental
extern "avr-non-blocking-interrupt" fn imu() {} extern "avr-non-blocking-interrupt" fn imu() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-non-blocking-interrupt" ABI is experimental
} }
type TA = extern "avr-interrupt" fn(); type TA = extern "avr-interrupt" fn();
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-interrupt" ABI is experimental
type TAU = extern "avr-non-blocking-interrupt" fn(); type TAU = extern "avr-non-blocking-interrupt" fn();
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-non-blocking-interrupt" ABI is experimental
extern "avr-interrupt" {} extern "avr-interrupt" {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-interrupt" ABI is experimental
extern "avr-non-blocking-interrupt" {} extern "avr-non-blocking-interrupt" {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental //~^ ERROR extern "avr-non-blocking-interrupt" ABI is experimental

View file

@ -1,4 +1,4 @@
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-non-blocking-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:11:8 --> $DIR/feature-gate-abi-avr-interrupt.rs:11:8
| |
LL | extern "avr-non-blocking-interrupt" fn fu() {} LL | extern "avr-non-blocking-interrupt" fn fu() {}
@ -8,7 +8,7 @@ LL | extern "avr-non-blocking-interrupt" fn fu() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:13:8 --> $DIR/feature-gate-abi-avr-interrupt.rs:13:8
| |
LL | extern "avr-interrupt" fn f() {} LL | extern "avr-interrupt" fn f() {}
@ -18,7 +18,7 @@ LL | extern "avr-interrupt" fn f() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:17:12 --> $DIR/feature-gate-abi-avr-interrupt.rs:17:12
| |
LL | extern "avr-interrupt" fn m(); LL | extern "avr-interrupt" fn m();
@ -28,7 +28,7 @@ LL | extern "avr-interrupt" fn m();
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-non-blocking-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:19:12 --> $DIR/feature-gate-abi-avr-interrupt.rs:19:12
| |
LL | extern "avr-non-blocking-interrupt" fn mu(); LL | extern "avr-non-blocking-interrupt" fn mu();
@ -38,7 +38,7 @@ LL | extern "avr-non-blocking-interrupt" fn mu();
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:22:12 --> $DIR/feature-gate-abi-avr-interrupt.rs:22:12
| |
LL | extern "avr-interrupt" fn dm() {} LL | extern "avr-interrupt" fn dm() {}
@ -48,7 +48,7 @@ LL | extern "avr-interrupt" fn dm() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-non-blocking-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:24:12 --> $DIR/feature-gate-abi-avr-interrupt.rs:24:12
| |
LL | extern "avr-non-blocking-interrupt" fn dmu() {} LL | extern "avr-non-blocking-interrupt" fn dmu() {}
@ -58,7 +58,7 @@ LL | extern "avr-non-blocking-interrupt" fn dmu() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:30:12 --> $DIR/feature-gate-abi-avr-interrupt.rs:30:12
| |
LL | extern "avr-interrupt" fn m() {} LL | extern "avr-interrupt" fn m() {}
@ -68,7 +68,7 @@ LL | extern "avr-interrupt" fn m() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-non-blocking-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:32:12 --> $DIR/feature-gate-abi-avr-interrupt.rs:32:12
| |
LL | extern "avr-non-blocking-interrupt" fn mu() {} LL | extern "avr-non-blocking-interrupt" fn mu() {}
@ -78,7 +78,7 @@ LL | extern "avr-non-blocking-interrupt" fn mu() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:37:12 --> $DIR/feature-gate-abi-avr-interrupt.rs:37:12
| |
LL | extern "avr-interrupt" fn im() {} LL | extern "avr-interrupt" fn im() {}
@ -88,7 +88,7 @@ LL | extern "avr-interrupt" fn im() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-non-blocking-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:39:12 --> $DIR/feature-gate-abi-avr-interrupt.rs:39:12
| |
LL | extern "avr-non-blocking-interrupt" fn imu() {} LL | extern "avr-non-blocking-interrupt" fn imu() {}
@ -98,7 +98,7 @@ LL | extern "avr-non-blocking-interrupt" fn imu() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:43:18 --> $DIR/feature-gate-abi-avr-interrupt.rs:43:18
| |
LL | type TA = extern "avr-interrupt" fn(); LL | type TA = extern "avr-interrupt" fn();
@ -108,7 +108,7 @@ LL | type TA = extern "avr-interrupt" fn();
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-non-blocking-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:45:19 --> $DIR/feature-gate-abi-avr-interrupt.rs:45:19
| |
LL | type TAU = extern "avr-non-blocking-interrupt" fn(); LL | type TAU = extern "avr-non-blocking-interrupt" fn();
@ -118,7 +118,7 @@ LL | type TAU = extern "avr-non-blocking-interrupt" fn();
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:48:8 --> $DIR/feature-gate-abi-avr-interrupt.rs:48:8
| |
LL | extern "avr-interrupt" {} LL | extern "avr-interrupt" {}
@ -128,7 +128,7 @@ LL | extern "avr-interrupt" {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change error[E0658]: the extern "avr-non-blocking-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:50:8 --> $DIR/feature-gate-abi-avr-interrupt.rs:50:8
| |
LL | extern "avr-non-blocking-interrupt" {} LL | extern "avr-non-blocking-interrupt" {}

View file

@ -6,29 +6,29 @@
trait Sized { } trait Sized { }
extern "msp430-interrupt" fn f() {} extern "msp430-interrupt" fn f() {}
//~^ ERROR msp430-interrupt ABI is experimental //~^ ERROR "msp430-interrupt" ABI is experimental
trait T { trait T {
extern "msp430-interrupt" fn m(); extern "msp430-interrupt" fn m();
//~^ ERROR msp430-interrupt ABI is experimental //~^ ERROR "msp430-interrupt" ABI is experimental
extern "msp430-interrupt" fn dm() {} extern "msp430-interrupt" fn dm() {}
//~^ ERROR msp430-interrupt ABI is experimental //~^ ERROR "msp430-interrupt" ABI is experimental
} }
struct S; struct S;
impl T for S { impl T for S {
extern "msp430-interrupt" fn m() {} extern "msp430-interrupt" fn m() {}
//~^ ERROR msp430-interrupt ABI is experimental //~^ ERROR "msp430-interrupt" ABI is experimental
} }
impl S { impl S {
extern "msp430-interrupt" fn im() {} extern "msp430-interrupt" fn im() {}
//~^ ERROR msp430-interrupt ABI is experimental //~^ ERROR "msp430-interrupt" ABI is experimental
} }
type TA = extern "msp430-interrupt" fn(); type TA = extern "msp430-interrupt" fn();
//~^ ERROR msp430-interrupt ABI is experimental //~^ ERROR "msp430-interrupt" ABI is experimental
extern "msp430-interrupt" {} extern "msp430-interrupt" {}
//~^ ERROR msp430-interrupt ABI is experimental //~^ ERROR "msp430-interrupt" ABI is experimental

View file

@ -1,4 +1,4 @@
error[E0658]: msp430-interrupt ABI is experimental and subject to change error[E0658]: the extern "msp430-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-msp430-interrupt.rs:8:8 --> $DIR/feature-gate-abi-msp430-interrupt.rs:8:8
| |
LL | extern "msp430-interrupt" fn f() {} LL | extern "msp430-interrupt" fn f() {}
@ -8,7 +8,7 @@ LL | extern "msp430-interrupt" fn f() {}
= help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: msp430-interrupt ABI is experimental and subject to change error[E0658]: the extern "msp430-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-msp430-interrupt.rs:12:12 --> $DIR/feature-gate-abi-msp430-interrupt.rs:12:12
| |
LL | extern "msp430-interrupt" fn m(); LL | extern "msp430-interrupt" fn m();
@ -18,7 +18,7 @@ LL | extern "msp430-interrupt" fn m();
= help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: msp430-interrupt ABI is experimental and subject to change error[E0658]: the extern "msp430-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-msp430-interrupt.rs:15:12 --> $DIR/feature-gate-abi-msp430-interrupt.rs:15:12
| |
LL | extern "msp430-interrupt" fn dm() {} LL | extern "msp430-interrupt" fn dm() {}
@ -28,7 +28,7 @@ LL | extern "msp430-interrupt" fn dm() {}
= help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: msp430-interrupt ABI is experimental and subject to change error[E0658]: the extern "msp430-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-msp430-interrupt.rs:21:12 --> $DIR/feature-gate-abi-msp430-interrupt.rs:21:12
| |
LL | extern "msp430-interrupt" fn m() {} LL | extern "msp430-interrupt" fn m() {}
@ -38,7 +38,7 @@ LL | extern "msp430-interrupt" fn m() {}
= help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: msp430-interrupt ABI is experimental and subject to change error[E0658]: the extern "msp430-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-msp430-interrupt.rs:26:12 --> $DIR/feature-gate-abi-msp430-interrupt.rs:26:12
| |
LL | extern "msp430-interrupt" fn im() {} LL | extern "msp430-interrupt" fn im() {}
@ -48,7 +48,7 @@ LL | extern "msp430-interrupt" fn im() {}
= help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: msp430-interrupt ABI is experimental and subject to change error[E0658]: the extern "msp430-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-msp430-interrupt.rs:30:18 --> $DIR/feature-gate-abi-msp430-interrupt.rs:30:18
| |
LL | type TA = extern "msp430-interrupt" fn(); LL | type TA = extern "msp430-interrupt" fn();
@ -58,7 +58,7 @@ LL | type TA = extern "msp430-interrupt" fn();
= help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: msp430-interrupt ABI is experimental and subject to change error[E0658]: the extern "msp430-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-msp430-interrupt.rs:33:8 --> $DIR/feature-gate-abi-msp430-interrupt.rs:33:8
| |
LL | extern "msp430-interrupt" {} LL | extern "msp430-interrupt" {}

View file

@ -9,25 +9,25 @@ trait Sized {}
// feature gate is not used. // feature gate is not used.
extern "riscv-interrupt-m" fn f() {} extern "riscv-interrupt-m" fn f() {}
//~^ ERROR riscv-interrupt ABIs are experimental //~^ ERROR "riscv-interrupt-m" ABI is experimental
extern "riscv-interrupt-s" fn f_s() {} extern "riscv-interrupt-s" fn f_s() {}
//~^ ERROR riscv-interrupt ABIs are experimental //~^ ERROR "riscv-interrupt-s" ABI is experimental
trait T { trait T {
extern "riscv-interrupt-m" fn m(); extern "riscv-interrupt-m" fn m();
//~^ ERROR riscv-interrupt ABIs are experimental //~^ ERROR "riscv-interrupt-m" ABI is experimental
} }
struct S; struct S;
impl T for S { impl T for S {
extern "riscv-interrupt-m" fn m() {} extern "riscv-interrupt-m" fn m() {}
//~^ ERROR riscv-interrupt ABIs are experimental //~^ ERROR "riscv-interrupt-m" ABI is experimental
} }
impl S { impl S {
extern "riscv-interrupt-m" fn im() {} extern "riscv-interrupt-m" fn im() {}
//~^ ERROR riscv-interrupt ABIs are experimental //~^ ERROR "riscv-interrupt-m" ABI is experimental
} }
type TA = extern "riscv-interrupt-m" fn(); type TA = extern "riscv-interrupt-m" fn();
//~^ ERROR riscv-interrupt ABIs are experimental //~^ ERROR "riscv-interrupt-m" ABI is experimental

View file

@ -1,4 +1,4 @@
error[E0658]: riscv-interrupt ABIs are experimental and subject to change error[E0658]: the extern "riscv-interrupt-m" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:11:8 --> $DIR/feature-gate-abi-riscv-interrupt.rs:11:8
| |
LL | extern "riscv-interrupt-m" fn f() {} LL | extern "riscv-interrupt-m" fn f() {}
@ -8,7 +8,7 @@ LL | extern "riscv-interrupt-m" fn f() {}
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: riscv-interrupt ABIs are experimental and subject to change error[E0658]: the extern "riscv-interrupt-s" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:13:8 --> $DIR/feature-gate-abi-riscv-interrupt.rs:13:8
| |
LL | extern "riscv-interrupt-s" fn f_s() {} LL | extern "riscv-interrupt-s" fn f_s() {}
@ -18,7 +18,7 @@ LL | extern "riscv-interrupt-s" fn f_s() {}
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: riscv-interrupt ABIs are experimental and subject to change error[E0658]: the extern "riscv-interrupt-m" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:17:12 --> $DIR/feature-gate-abi-riscv-interrupt.rs:17:12
| |
LL | extern "riscv-interrupt-m" fn m(); LL | extern "riscv-interrupt-m" fn m();
@ -28,7 +28,7 @@ LL | extern "riscv-interrupt-m" fn m();
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: riscv-interrupt ABIs are experimental and subject to change error[E0658]: the extern "riscv-interrupt-m" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:23:12 --> $DIR/feature-gate-abi-riscv-interrupt.rs:23:12
| |
LL | extern "riscv-interrupt-m" fn m() {} LL | extern "riscv-interrupt-m" fn m() {}
@ -38,7 +38,7 @@ LL | extern "riscv-interrupt-m" fn m() {}
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: riscv-interrupt ABIs are experimental and subject to change error[E0658]: the extern "riscv-interrupt-m" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:28:12 --> $DIR/feature-gate-abi-riscv-interrupt.rs:28:12
| |
LL | extern "riscv-interrupt-m" fn im() {} LL | extern "riscv-interrupt-m" fn im() {}
@ -48,7 +48,7 @@ LL | extern "riscv-interrupt-m" fn im() {}
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: riscv-interrupt ABIs are experimental and subject to change error[E0658]: the extern "riscv-interrupt-m" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:32:18 --> $DIR/feature-gate-abi-riscv-interrupt.rs:32:18
| |
LL | type TA = extern "riscv-interrupt-m" fn(); LL | type TA = extern "riscv-interrupt-m" fn();

View file

@ -5,24 +5,24 @@
#[lang="sized"] #[lang="sized"]
trait Sized { } trait Sized { }
extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experimental extern "x86-interrupt" fn f7() {} //~ ERROR "x86-interrupt" ABI is experimental
trait Tr { trait Tr {
extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experimental extern "x86-interrupt" fn m7(); //~ ERROR "x86-interrupt" ABI is experimental
extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is experimental extern "x86-interrupt" fn dm7() {} //~ ERROR "x86-interrupt" ABI is experimental
} }
struct S; struct S;
// Methods in trait impl // Methods in trait impl
impl Tr for S { impl Tr for S {
extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experimental extern "x86-interrupt" fn m7() {} //~ ERROR "x86-interrupt" ABI is experimental
} }
// Methods in inherent impl // Methods in inherent impl
impl S { impl S {
extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is experimental extern "x86-interrupt" fn im7() {} //~ ERROR "x86-interrupt" ABI is experimental
} }
type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is experimental type A7 = extern "x86-interrupt" fn(); //~ ERROR "x86-interrupt" ABI is experimental
extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental extern "x86-interrupt" {} //~ ERROR "x86-interrupt" ABI is experimental

View file

@ -1,4 +1,4 @@
error[E0658]: x86-interrupt ABI is experimental and subject to change error[E0658]: the extern "x86-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-x86-interrupt.rs:8:8 --> $DIR/feature-gate-abi-x86-interrupt.rs:8:8
| |
LL | extern "x86-interrupt" fn f7() {} LL | extern "x86-interrupt" fn f7() {}
@ -8,7 +8,7 @@ LL | extern "x86-interrupt" fn f7() {}
= help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: x86-interrupt ABI is experimental and subject to change error[E0658]: the extern "x86-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-x86-interrupt.rs:10:12 --> $DIR/feature-gate-abi-x86-interrupt.rs:10:12
| |
LL | extern "x86-interrupt" fn m7(); LL | extern "x86-interrupt" fn m7();
@ -18,7 +18,7 @@ LL | extern "x86-interrupt" fn m7();
= help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: x86-interrupt ABI is experimental and subject to change error[E0658]: the extern "x86-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-x86-interrupt.rs:11:12 --> $DIR/feature-gate-abi-x86-interrupt.rs:11:12
| |
LL | extern "x86-interrupt" fn dm7() {} LL | extern "x86-interrupt" fn dm7() {}
@ -28,7 +28,7 @@ LL | extern "x86-interrupt" fn dm7() {}
= help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: x86-interrupt ABI is experimental and subject to change error[E0658]: the extern "x86-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-x86-interrupt.rs:18:12 --> $DIR/feature-gate-abi-x86-interrupt.rs:18:12
| |
LL | extern "x86-interrupt" fn m7() {} LL | extern "x86-interrupt" fn m7() {}
@ -38,7 +38,7 @@ LL | extern "x86-interrupt" fn m7() {}
= help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: x86-interrupt ABI is experimental and subject to change error[E0658]: the extern "x86-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-x86-interrupt.rs:23:12 --> $DIR/feature-gate-abi-x86-interrupt.rs:23:12
| |
LL | extern "x86-interrupt" fn im7() {} LL | extern "x86-interrupt" fn im7() {}
@ -48,7 +48,7 @@ LL | extern "x86-interrupt" fn im7() {}
= help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: x86-interrupt ABI is experimental and subject to change error[E0658]: the extern "x86-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-x86-interrupt.rs:26:18 --> $DIR/feature-gate-abi-x86-interrupt.rs:26:18
| |
LL | type A7 = extern "x86-interrupt" fn(); LL | type A7 = extern "x86-interrupt" fn();
@ -58,7 +58,7 @@ LL | type A7 = extern "x86-interrupt" fn();
= help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: x86-interrupt ABI is experimental and subject to change error[E0658]: the extern "x86-interrupt" ABI is experimental and subject to change
--> $DIR/feature-gate-abi-x86-interrupt.rs:28:8 --> $DIR/feature-gate-abi-x86-interrupt.rs:28:8
| |
LL | extern "x86-interrupt" {} LL | extern "x86-interrupt" {}

View file

@ -11,49 +11,49 @@ trait Sized { }
trait Tuple { } trait Tuple { }
// Functions // Functions
extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn f1() {} //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
extern "rust-intrinsic" fn f2() {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn f2() {} //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is subject to change extern "rust-call" fn f4(_: ()) {} //~ ERROR extern "rust-call" ABI is experimental and subject to change
// Methods in trait definition // Methods in trait definition
trait Tr { trait Tr {
extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn m1(); //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
extern "rust-intrinsic" fn m2(); //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn m2(); //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
extern "rust-call" fn m4(_: ()); //~ ERROR rust-call ABI is subject to change extern "rust-call" fn m4(_: ()); //~ ERROR extern "rust-call" ABI is experimental and subject to change
extern "rust-call" fn dm4(_: ()) {} //~ ERROR rust-call ABI is subject to change extern "rust-call" fn dm4(_: ()) {} //~ ERROR extern "rust-call" ABI is experimental and subject to change
} }
struct S; struct S;
// Methods in trait impl // Methods in trait impl
impl Tr for S { impl Tr for S {
extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn m1() {} //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
extern "rust-intrinsic" fn m2() {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn m2() {} //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
extern "rust-call" fn m4(_: ()) {} //~ ERROR rust-call ABI is subject to change extern "rust-call" fn m4(_: ()) {} //~ ERROR extern "rust-call" ABI is experimental and subject to change
} }
// Methods in inherent impl // Methods in inherent impl
impl S { impl S {
extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn im1() {} //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
extern "rust-intrinsic" fn im2() {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn im2() {} //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
extern "rust-call" fn im4(_: ()) {} //~ ERROR rust-call ABI is subject to change extern "rust-call" fn im4(_: ()) {} //~ ERROR extern "rust-call" ABI is experimental and subject to change
} }
// Function pointer types // Function pointer types
type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change type A1 = extern "rust-intrinsic" fn(); //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
type A2 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change type A2 = extern "rust-intrinsic" fn(); //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
type A4 = extern "rust-call" fn(_: ()); //~ ERROR rust-call ABI is subject to change type A4 = extern "rust-call" fn(_: ()); //~ ERROR extern "rust-call" ABI is experimental and subject to change
// Foreign modules // Foreign modules
extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" {} //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" {} //~ ERROR extern "rust-intrinsic" ABI is an implementation detail
extern "rust-call" {} //~ ERROR rust-call ABI is subject to change extern "rust-call" {} //~ ERROR extern "rust-call" ABI is experimental and subject to change

View file

@ -1,4 +1,4 @@
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:14:8 --> $DIR/feature-gate-abi.rs:14:8
| |
LL | extern "rust-intrinsic" fn f1() {} LL | extern "rust-intrinsic" fn f1() {}
@ -7,7 +7,7 @@ LL | extern "rust-intrinsic" fn f1() {}
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:16:8 --> $DIR/feature-gate-abi.rs:16:8
| |
LL | extern "rust-intrinsic" fn f2() {} LL | extern "rust-intrinsic" fn f2() {}
@ -16,7 +16,7 @@ LL | extern "rust-intrinsic" fn f2() {}
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-abi.rs:18:8 --> $DIR/feature-gate-abi.rs:18:8
| |
LL | extern "rust-call" fn f4(_: ()) {} LL | extern "rust-call" fn f4(_: ()) {}
@ -26,7 +26,7 @@ LL | extern "rust-call" fn f4(_: ()) {}
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:22:12 --> $DIR/feature-gate-abi.rs:22:12
| |
LL | extern "rust-intrinsic" fn m1(); LL | extern "rust-intrinsic" fn m1();
@ -35,7 +35,7 @@ LL | extern "rust-intrinsic" fn m1();
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:24:12 --> $DIR/feature-gate-abi.rs:24:12
| |
LL | extern "rust-intrinsic" fn m2(); LL | extern "rust-intrinsic" fn m2();
@ -44,7 +44,7 @@ LL | extern "rust-intrinsic" fn m2();
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-abi.rs:26:12 --> $DIR/feature-gate-abi.rs:26:12
| |
LL | extern "rust-call" fn m4(_: ()); LL | extern "rust-call" fn m4(_: ());
@ -54,7 +54,7 @@ LL | extern "rust-call" fn m4(_: ());
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-abi.rs:28:12 --> $DIR/feature-gate-abi.rs:28:12
| |
LL | extern "rust-call" fn dm4(_: ()) {} LL | extern "rust-call" fn dm4(_: ()) {}
@ -64,7 +64,7 @@ LL | extern "rust-call" fn dm4(_: ()) {}
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:35:12 --> $DIR/feature-gate-abi.rs:35:12
| |
LL | extern "rust-intrinsic" fn m1() {} LL | extern "rust-intrinsic" fn m1() {}
@ -73,7 +73,7 @@ LL | extern "rust-intrinsic" fn m1() {}
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:37:12 --> $DIR/feature-gate-abi.rs:37:12
| |
LL | extern "rust-intrinsic" fn m2() {} LL | extern "rust-intrinsic" fn m2() {}
@ -82,7 +82,7 @@ LL | extern "rust-intrinsic" fn m2() {}
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-abi.rs:39:12 --> $DIR/feature-gate-abi.rs:39:12
| |
LL | extern "rust-call" fn m4(_: ()) {} LL | extern "rust-call" fn m4(_: ()) {}
@ -92,7 +92,7 @@ LL | extern "rust-call" fn m4(_: ()) {}
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:44:12 --> $DIR/feature-gate-abi.rs:44:12
| |
LL | extern "rust-intrinsic" fn im1() {} LL | extern "rust-intrinsic" fn im1() {}
@ -101,7 +101,7 @@ LL | extern "rust-intrinsic" fn im1() {}
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:46:12 --> $DIR/feature-gate-abi.rs:46:12
| |
LL | extern "rust-intrinsic" fn im2() {} LL | extern "rust-intrinsic" fn im2() {}
@ -110,7 +110,7 @@ LL | extern "rust-intrinsic" fn im2() {}
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-abi.rs:48:12 --> $DIR/feature-gate-abi.rs:48:12
| |
LL | extern "rust-call" fn im4(_: ()) {} LL | extern "rust-call" fn im4(_: ()) {}
@ -120,7 +120,7 @@ LL | extern "rust-call" fn im4(_: ()) {}
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:52:18 --> $DIR/feature-gate-abi.rs:52:18
| |
LL | type A1 = extern "rust-intrinsic" fn(); LL | type A1 = extern "rust-intrinsic" fn();
@ -129,7 +129,7 @@ LL | type A1 = extern "rust-intrinsic" fn();
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:53:18 --> $DIR/feature-gate-abi.rs:53:18
| |
LL | type A2 = extern "rust-intrinsic" fn(); LL | type A2 = extern "rust-intrinsic" fn();
@ -138,7 +138,7 @@ LL | type A2 = extern "rust-intrinsic" fn();
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-abi.rs:54:18 --> $DIR/feature-gate-abi.rs:54:18
| |
LL | type A4 = extern "rust-call" fn(_: ()); LL | type A4 = extern "rust-call" fn(_: ());
@ -148,7 +148,7 @@ LL | type A4 = extern "rust-call" fn(_: ());
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:57:8 --> $DIR/feature-gate-abi.rs:57:8
| |
LL | extern "rust-intrinsic" {} LL | extern "rust-intrinsic" {}
@ -157,7 +157,7 @@ LL | extern "rust-intrinsic" {}
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi.rs:58:8 --> $DIR/feature-gate-abi.rs:58:8
| |
LL | extern "rust-intrinsic" {} LL | extern "rust-intrinsic" {}
@ -166,7 +166,7 @@ LL | extern "rust-intrinsic" {}
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-abi.rs:59:8 --> $DIR/feature-gate-abi.rs:59:8
| |
LL | extern "rust-call" {} LL | extern "rust-call" {}

View file

@ -10,14 +10,14 @@ trait Sized { }
trait Tuple { } trait Tuple { }
// Functions // Functions
extern "gpu-kernel" fn f1(_: ()) {} //~ ERROR gpu-kernel ABI is experimental and subject to change extern "gpu-kernel" fn f1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
//~^ ERROR is not a supported ABI //~^ ERROR is not a supported ABI
// Methods in trait definition // Methods in trait definition
trait Tr { trait Tr {
extern "gpu-kernel" fn m1(_: ()); //~ ERROR gpu-kernel ABI is experimental and subject to change extern "gpu-kernel" fn m1(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
extern "gpu-kernel" fn dm1(_: ()) {} //~ ERROR gpu-kernel ABI is experimental and subject to change extern "gpu-kernel" fn dm1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
//~^ ERROR is not a supported ABI //~^ ERROR is not a supported ABI
} }
@ -25,21 +25,21 @@ struct S;
// Methods in trait impl // Methods in trait impl
impl Tr for S { impl Tr for S {
extern "gpu-kernel" fn m1(_: ()) {} //~ ERROR gpu-kernel ABI is experimental and subject to change extern "gpu-kernel" fn m1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
//~^ ERROR is not a supported ABI //~^ ERROR is not a supported ABI
} }
// Methods in inherent impl // Methods in inherent impl
impl S { impl S {
extern "gpu-kernel" fn im1(_: ()) {} //~ ERROR gpu-kernel ABI is experimental and subject to change extern "gpu-kernel" fn im1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
//~^ ERROR is not a supported ABI //~^ ERROR is not a supported ABI
} }
// Function pointer types // Function pointer types
type A1 = extern "gpu-kernel" fn(_: ()); //~ ERROR gpu-kernel ABI is experimental and subject to change type A1 = extern "gpu-kernel" fn(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
//~^ WARN the calling convention "gpu-kernel" is not supported on this target //~^ WARN the calling convention "gpu-kernel" is not supported on this target
//~^^ WARN this was previously accepted by the compiler but is being phased out //~^^ WARN this was previously accepted by the compiler but is being phased out
// Foreign modules // Foreign modules
extern "gpu-kernel" {} //~ ERROR gpu-kernel ABI is experimental and subject to change extern "gpu-kernel" {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
//~^ ERROR is not a supported ABI //~^ ERROR is not a supported ABI

View file

@ -1,4 +1,4 @@
error[E0658]: gpu-kernel ABI is experimental and subject to change error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_gpu_kernel.rs:13:8 --> $DIR/feature-gate-abi_gpu_kernel.rs:13:8
| |
LL | extern "gpu-kernel" fn f1(_: ()) {} LL | extern "gpu-kernel" fn f1(_: ()) {}
@ -8,7 +8,7 @@ LL | extern "gpu-kernel" fn f1(_: ()) {}
= help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: gpu-kernel ABI is experimental and subject to change error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_gpu_kernel.rs:18:12 --> $DIR/feature-gate-abi_gpu_kernel.rs:18:12
| |
LL | extern "gpu-kernel" fn m1(_: ()); LL | extern "gpu-kernel" fn m1(_: ());
@ -18,7 +18,7 @@ LL | extern "gpu-kernel" fn m1(_: ());
= help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: gpu-kernel ABI is experimental and subject to change error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_gpu_kernel.rs:20:12 --> $DIR/feature-gate-abi_gpu_kernel.rs:20:12
| |
LL | extern "gpu-kernel" fn dm1(_: ()) {} LL | extern "gpu-kernel" fn dm1(_: ()) {}
@ -28,7 +28,7 @@ LL | extern "gpu-kernel" fn dm1(_: ()) {}
= help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: gpu-kernel ABI is experimental and subject to change error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_gpu_kernel.rs:28:12 --> $DIR/feature-gate-abi_gpu_kernel.rs:28:12
| |
LL | extern "gpu-kernel" fn m1(_: ()) {} LL | extern "gpu-kernel" fn m1(_: ()) {}
@ -38,7 +38,7 @@ LL | extern "gpu-kernel" fn m1(_: ()) {}
= help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: gpu-kernel ABI is experimental and subject to change error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_gpu_kernel.rs:34:12 --> $DIR/feature-gate-abi_gpu_kernel.rs:34:12
| |
LL | extern "gpu-kernel" fn im1(_: ()) {} LL | extern "gpu-kernel" fn im1(_: ()) {}
@ -48,7 +48,7 @@ LL | extern "gpu-kernel" fn im1(_: ()) {}
= help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: gpu-kernel ABI is experimental and subject to change error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_gpu_kernel.rs:39:18 --> $DIR/feature-gate-abi_gpu_kernel.rs:39:18
| |
LL | type A1 = extern "gpu-kernel" fn(_: ()); LL | type A1 = extern "gpu-kernel" fn(_: ());
@ -58,7 +58,7 @@ LL | type A1 = extern "gpu-kernel" fn(_: ());
= help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: gpu-kernel ABI is experimental and subject to change error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_gpu_kernel.rs:44:8 --> $DIR/feature-gate-abi_gpu_kernel.rs:44:8
| |
LL | extern "gpu-kernel" {} LL | extern "gpu-kernel" {}

View file

@ -5,22 +5,22 @@
#[lang="sized"] #[lang="sized"]
trait Sized { } trait Sized { }
extern "ptx-kernel" fn fu() {} //~ ERROR PTX ABIs are experimental extern "ptx-kernel" fn fu() {} //~ ERROR extern "ptx-kernel" ABI is experimental
trait T { trait T {
extern "ptx-kernel" fn mu(); //~ ERROR PTX ABIs are experimental extern "ptx-kernel" fn mu(); //~ ERROR extern "ptx-kernel" ABI is experimental
extern "ptx-kernel" fn dmu() {} //~ ERROR PTX ABIs are experimental extern "ptx-kernel" fn dmu() {} //~ ERROR extern "ptx-kernel" ABI is experimental
} }
struct S; struct S;
impl T for S { impl T for S {
extern "ptx-kernel" fn mu() {} //~ ERROR PTX ABIs are experimental extern "ptx-kernel" fn mu() {} //~ ERROR extern "ptx-kernel" ABI is experimental
} }
impl S { impl S {
extern "ptx-kernel" fn imu() {} //~ ERROR PTX ABIs are experimental extern "ptx-kernel" fn imu() {} //~ ERROR extern "ptx-kernel" ABI is experimental
} }
type TAU = extern "ptx-kernel" fn(); //~ ERROR PTX ABIs are experimental type TAU = extern "ptx-kernel" fn(); //~ ERROR extern "ptx-kernel" ABI is experimental
extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental extern "ptx-kernel" {} //~ ERROR extern "ptx-kernel" ABI is experimental

View file

@ -1,4 +1,4 @@
error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: the extern "ptx-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_ptx.rs:8:8 --> $DIR/feature-gate-abi_ptx.rs:8:8
| |
LL | extern "ptx-kernel" fn fu() {} LL | extern "ptx-kernel" fn fu() {}
@ -8,7 +8,7 @@ LL | extern "ptx-kernel" fn fu() {}
= help: add `#![feature(abi_ptx)]` to the crate attributes to enable = help: add `#![feature(abi_ptx)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: the extern "ptx-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_ptx.rs:11:12 --> $DIR/feature-gate-abi_ptx.rs:11:12
| |
LL | extern "ptx-kernel" fn mu(); LL | extern "ptx-kernel" fn mu();
@ -18,7 +18,7 @@ LL | extern "ptx-kernel" fn mu();
= help: add `#![feature(abi_ptx)]` to the crate attributes to enable = help: add `#![feature(abi_ptx)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: the extern "ptx-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_ptx.rs:12:12 --> $DIR/feature-gate-abi_ptx.rs:12:12
| |
LL | extern "ptx-kernel" fn dmu() {} LL | extern "ptx-kernel" fn dmu() {}
@ -28,7 +28,7 @@ LL | extern "ptx-kernel" fn dmu() {}
= help: add `#![feature(abi_ptx)]` to the crate attributes to enable = help: add `#![feature(abi_ptx)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: the extern "ptx-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_ptx.rs:17:12 --> $DIR/feature-gate-abi_ptx.rs:17:12
| |
LL | extern "ptx-kernel" fn mu() {} LL | extern "ptx-kernel" fn mu() {}
@ -38,7 +38,7 @@ LL | extern "ptx-kernel" fn mu() {}
= help: add `#![feature(abi_ptx)]` to the crate attributes to enable = help: add `#![feature(abi_ptx)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: the extern "ptx-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_ptx.rs:21:12 --> $DIR/feature-gate-abi_ptx.rs:21:12
| |
LL | extern "ptx-kernel" fn imu() {} LL | extern "ptx-kernel" fn imu() {}
@ -48,7 +48,7 @@ LL | extern "ptx-kernel" fn imu() {}
= help: add `#![feature(abi_ptx)]` to the crate attributes to enable = help: add `#![feature(abi_ptx)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: the extern "ptx-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_ptx.rs:24:19 --> $DIR/feature-gate-abi_ptx.rs:24:19
| |
LL | type TAU = extern "ptx-kernel" fn(); LL | type TAU = extern "ptx-kernel" fn();
@ -58,7 +58,7 @@ LL | type TAU = extern "ptx-kernel" fn();
= help: add `#![feature(abi_ptx)]` to the crate attributes to enable = help: add `#![feature(abi_ptx)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: PTX ABIs are experimental and subject to change error[E0658]: the extern "ptx-kernel" ABI is experimental and subject to change
--> $DIR/feature-gate-abi_ptx.rs:26:8 --> $DIR/feature-gate-abi_ptx.rs:26:8
| |
LL | extern "ptx-kernel" {} LL | extern "ptx-kernel" {}

View file

@ -1,5 +1,5 @@
extern "unadjusted" fn foo() { extern "unadjusted" fn foo() {
//~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable //~^ ERROR: "unadjusted" ABI is an implementation detail and perma-unstable
} }
fn main() { fn main() {

View file

@ -1,4 +1,4 @@
error[E0658]: unadjusted ABI is an implementation detail and perma-unstable error[E0658]: the extern "unadjusted" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-abi_unadjusted.rs:1:8 --> $DIR/feature-gate-abi_unadjusted.rs:1:8
| |
LL | extern "unadjusted" fn foo() { LL | extern "unadjusted" fn foo() {

View file

@ -1,8 +1,8 @@
extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change extern "rust-intrinsic" { //~ ERROR "rust-intrinsic" ABI is an implementation detail
fn bar(); //~ ERROR unrecognized intrinsic function: `bar` fn bar(); //~ ERROR unrecognized intrinsic function: `bar`
} }
extern "rust-intrinsic" fn baz() {} //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn baz() {} //~ ERROR "rust-intrinsic" ABI is an implementation detail
//~^ ERROR intrinsic must be in //~^ ERROR intrinsic must be in
fn main() {} fn main() {}

View file

@ -1,4 +1,4 @@
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-intrinsics.rs:1:8 --> $DIR/feature-gate-intrinsics.rs:1:8
| |
LL | extern "rust-intrinsic" { LL | extern "rust-intrinsic" {
@ -7,7 +7,7 @@ LL | extern "rust-intrinsic" {
= help: add `#![feature(intrinsics)]` to the crate attributes to enable = help: add `#![feature(intrinsics)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gate-intrinsics.rs:5:8 --> $DIR/feature-gate-intrinsics.rs:5:8
| |
LL | extern "rust-intrinsic" fn baz() {} LL | extern "rust-intrinsic" fn baz() {}

View file

@ -1,21 +1,21 @@
#![crate_type = "lib"] #![crate_type = "lib"]
extern "rust-cold" fn fu() {} //~ ERROR rust-cold is experimental extern "rust-cold" fn fu() {} //~ ERROR "rust-cold" ABI is experimental
trait T { trait T {
extern "rust-cold" fn mu(); //~ ERROR rust-cold is experimental extern "rust-cold" fn mu(); //~ ERROR "rust-cold" ABI is experimental
extern "rust-cold" fn dmu() {} //~ ERROR rust-cold is experimental extern "rust-cold" fn dmu() {} //~ ERROR "rust-cold" ABI is experimental
} }
struct S; struct S;
impl T for S { impl T for S {
extern "rust-cold" fn mu() {} //~ ERROR rust-cold is experimental extern "rust-cold" fn mu() {} //~ ERROR "rust-cold" ABI is experimental
} }
impl S { impl S {
extern "rust-cold" fn imu() {} //~ ERROR rust-cold is experimental extern "rust-cold" fn imu() {} //~ ERROR "rust-cold" ABI is experimental
} }
type TAU = extern "rust-cold" fn(); //~ ERROR rust-cold is experimental type TAU = extern "rust-cold" fn(); //~ ERROR "rust-cold" ABI is experimental
extern "rust-cold" {} //~ ERROR rust-cold is experimental extern "rust-cold" {} //~ ERROR "rust-cold" ABI is experimental

View file

@ -1,4 +1,4 @@
error[E0658]: rust-cold is experimental and subject to change error[E0658]: the extern "rust-cold" ABI is experimental and subject to change
--> $DIR/feature-gate-rust_cold_cc.rs:3:8 --> $DIR/feature-gate-rust_cold_cc.rs:3:8
| |
LL | extern "rust-cold" fn fu() {} LL | extern "rust-cold" fn fu() {}
@ -8,7 +8,7 @@ LL | extern "rust-cold" fn fu() {}
= help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-cold is experimental and subject to change error[E0658]: the extern "rust-cold" ABI is experimental and subject to change
--> $DIR/feature-gate-rust_cold_cc.rs:6:12 --> $DIR/feature-gate-rust_cold_cc.rs:6:12
| |
LL | extern "rust-cold" fn mu(); LL | extern "rust-cold" fn mu();
@ -18,7 +18,7 @@ LL | extern "rust-cold" fn mu();
= help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-cold is experimental and subject to change error[E0658]: the extern "rust-cold" ABI is experimental and subject to change
--> $DIR/feature-gate-rust_cold_cc.rs:7:12 --> $DIR/feature-gate-rust_cold_cc.rs:7:12
| |
LL | extern "rust-cold" fn dmu() {} LL | extern "rust-cold" fn dmu() {}
@ -28,7 +28,7 @@ LL | extern "rust-cold" fn dmu() {}
= help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-cold is experimental and subject to change error[E0658]: the extern "rust-cold" ABI is experimental and subject to change
--> $DIR/feature-gate-rust_cold_cc.rs:12:12 --> $DIR/feature-gate-rust_cold_cc.rs:12:12
| |
LL | extern "rust-cold" fn mu() {} LL | extern "rust-cold" fn mu() {}
@ -38,7 +38,7 @@ LL | extern "rust-cold" fn mu() {}
= help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-cold is experimental and subject to change error[E0658]: the extern "rust-cold" ABI is experimental and subject to change
--> $DIR/feature-gate-rust_cold_cc.rs:16:12 --> $DIR/feature-gate-rust_cold_cc.rs:16:12
| |
LL | extern "rust-cold" fn imu() {} LL | extern "rust-cold" fn imu() {}
@ -48,7 +48,7 @@ LL | extern "rust-cold" fn imu() {}
= help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-cold is experimental and subject to change error[E0658]: the extern "rust-cold" ABI is experimental and subject to change
--> $DIR/feature-gate-rust_cold_cc.rs:19:19 --> $DIR/feature-gate-rust_cold_cc.rs:19:19
| |
LL | type TAU = extern "rust-cold" fn(); LL | type TAU = extern "rust-cold" fn();
@ -58,7 +58,7 @@ LL | type TAU = extern "rust-cold" fn();
= help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-cold is experimental and subject to change error[E0658]: the extern "rust-cold" ABI is experimental and subject to change
--> $DIR/feature-gate-rust_cold_cc.rs:21:8 --> $DIR/feature-gate-rust_cold_cc.rs:21:8
| |
LL | extern "rust-cold" {} LL | extern "rust-cold" {}

View file

@ -11,7 +11,7 @@ impl Fn<()> for Foo {
//~| ERROR manual implementations of `Fn` are experimental //~| ERROR manual implementations of `Fn` are experimental
//~| ERROR expected a `FnMut()` closure, found `Foo` //~| ERROR expected a `FnMut()` closure, found `Foo`
extern "rust-call" fn call(self, args: ()) -> () {} extern "rust-call" fn call(self, args: ()) -> () {}
//~^ ERROR rust-call ABI is subject to change //~^ ERROR "rust-call" ABI is experimental and subject to change
//~| ERROR `call` has an incompatible type for trait //~| ERROR `call` has an incompatible type for trait
} }
struct Foo1; struct Foo1;
@ -20,7 +20,7 @@ impl FnOnce() for Foo1 {
//~| ERROR manual implementations of `FnOnce` are experimental //~| ERROR manual implementations of `FnOnce` are experimental
//~| ERROR not all trait items implemented //~| ERROR not all trait items implemented
extern "rust-call" fn call_once(self, args: ()) -> () {} extern "rust-call" fn call_once(self, args: ()) -> () {}
//~^ ERROR rust-call ABI is subject to change //~^ ERROR "rust-call" ABI is experimental and subject to change
} }
struct Bar; struct Bar;
impl FnMut<()> for Bar { impl FnMut<()> for Bar {
@ -28,7 +28,7 @@ impl FnMut<()> for Bar {
//~| ERROR manual implementations of `FnMut` are experimental //~| ERROR manual implementations of `FnMut` are experimental
//~| ERROR expected a `FnOnce()` closure, found `Bar` //~| ERROR expected a `FnOnce()` closure, found `Bar`
extern "rust-call" fn call_mut(&self, args: ()) -> () {} extern "rust-call" fn call_mut(&self, args: ()) -> () {}
//~^ ERROR rust-call ABI is subject to change //~^ ERROR "rust-call" ABI is experimental and subject to change
//~| ERROR incompatible type for trait //~| ERROR incompatible type for trait
} }
struct Baz; struct Baz;
@ -37,7 +37,7 @@ impl FnOnce<()> for Baz {
//~| ERROR manual implementations of `FnOnce` are experimental //~| ERROR manual implementations of `FnOnce` are experimental
//~| ERROR not all trait items implemented //~| ERROR not all trait items implemented
extern "rust-call" fn call_once(&self, args: ()) -> () {} extern "rust-call" fn call_once(&self, args: ()) -> () {}
//~^ ERROR rust-call ABI is subject to change //~^ ERROR "rust-call" ABI is experimental and subject to change
} }
fn main() {} fn main() {}

View file

@ -1,4 +1,4 @@
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-unboxed-closures-manual-impls.rs:13:12 --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:13:12
| |
LL | extern "rust-call" fn call(self, args: ()) -> () {} LL | extern "rust-call" fn call(self, args: ()) -> () {}
@ -8,7 +8,7 @@ LL | extern "rust-call" fn call(self, args: ()) -> () {}
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-unboxed-closures-manual-impls.rs:22:12 --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:22:12
| |
LL | extern "rust-call" fn call_once(self, args: ()) -> () {} LL | extern "rust-call" fn call_once(self, args: ()) -> () {}
@ -18,7 +18,7 @@ LL | extern "rust-call" fn call_once(self, args: ()) -> () {}
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:12 --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:12
| |
LL | extern "rust-call" fn call_mut(&self, args: ()) -> () {} LL | extern "rust-call" fn call_mut(&self, args: ()) -> () {}
@ -28,7 +28,7 @@ LL | extern "rust-call" fn call_mut(&self, args: ()) -> () {}
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-unboxed-closures-manual-impls.rs:39:12 --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:39:12
| |
LL | extern "rust-call" fn call_once(&self, args: ()) -> () {} LL | extern "rust-call" fn call_once(&self, args: ()) -> () {}

View file

@ -10,7 +10,7 @@ impl FnOnce<(u32, u32)> for Test {
extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 {
a + b a + b
} }
//~^^^ ERROR rust-call ABI is subject to change //~^^^ ERROR "rust-call" ABI is experimental and subject to change
} }
fn main() { fn main() {

View file

@ -1,4 +1,4 @@
error[E0658]: rust-call ABI is subject to change error[E0658]: the extern "rust-call" ABI is experimental and subject to change
--> $DIR/feature-gate-unboxed-closures.rs:10:12 --> $DIR/feature-gate-unboxed-closures.rs:10:12
| |
LL | extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { LL | extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 {

View file

@ -9,23 +9,23 @@ trait Sized { }
// Test that the "vectorcall" ABI is feature-gated, and cannot be used when // Test that the "vectorcall" ABI is feature-gated, and cannot be used when
// the `vectorcall` feature gate is not used. // the `vectorcall` feature gate is not used.
extern "vectorcall" fn f() {} //~ ERROR vectorcall is experimental extern "vectorcall" fn f() {} //~ ERROR "vectorcall" ABI is experimental
trait T { trait T {
extern "vectorcall" fn m(); //~ ERROR vectorcall is experimental extern "vectorcall" fn m(); //~ ERROR "vectorcall" ABI is experimental
extern "vectorcall" fn dm() {} //~ ERROR vectorcall is experimental extern "vectorcall" fn dm() {} //~ ERROR "vectorcall" ABI is experimental
} }
struct S; struct S;
impl T for S { impl T for S {
extern "vectorcall" fn m() {} //~ ERROR vectorcall is experimental extern "vectorcall" fn m() {} //~ ERROR "vectorcall" ABI is experimental
} }
impl S { impl S {
extern "vectorcall" fn im() {} //~ ERROR vectorcall is experimental extern "vectorcall" fn im() {} //~ ERROR "vectorcall" ABI is experimental
} }
type TA = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental type TA = extern "vectorcall" fn(); //~ ERROR "vectorcall" ABI is experimental
extern "vectorcall" {} //~ ERROR vectorcall is experimental extern "vectorcall" {} //~ ERROR "vectorcall" ABI is experimental

View file

@ -1,4 +1,4 @@
error[E0658]: vectorcall is experimental and subject to change error[E0658]: the extern "vectorcall" ABI is experimental and subject to change
--> $DIR/feature-gate-vectorcall.rs:12:8 --> $DIR/feature-gate-vectorcall.rs:12:8
| |
LL | extern "vectorcall" fn f() {} LL | extern "vectorcall" fn f() {}
@ -8,7 +8,7 @@ LL | extern "vectorcall" fn f() {}
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: vectorcall is experimental and subject to change error[E0658]: the extern "vectorcall" ABI is experimental and subject to change
--> $DIR/feature-gate-vectorcall.rs:15:12 --> $DIR/feature-gate-vectorcall.rs:15:12
| |
LL | extern "vectorcall" fn m(); LL | extern "vectorcall" fn m();
@ -18,7 +18,7 @@ LL | extern "vectorcall" fn m();
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: vectorcall is experimental and subject to change error[E0658]: the extern "vectorcall" ABI is experimental and subject to change
--> $DIR/feature-gate-vectorcall.rs:17:12 --> $DIR/feature-gate-vectorcall.rs:17:12
| |
LL | extern "vectorcall" fn dm() {} LL | extern "vectorcall" fn dm() {}
@ -28,7 +28,7 @@ LL | extern "vectorcall" fn dm() {}
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: vectorcall is experimental and subject to change error[E0658]: the extern "vectorcall" ABI is experimental and subject to change
--> $DIR/feature-gate-vectorcall.rs:22:12 --> $DIR/feature-gate-vectorcall.rs:22:12
| |
LL | extern "vectorcall" fn m() {} LL | extern "vectorcall" fn m() {}
@ -38,7 +38,7 @@ LL | extern "vectorcall" fn m() {}
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: vectorcall is experimental and subject to change error[E0658]: the extern "vectorcall" ABI is experimental and subject to change
--> $DIR/feature-gate-vectorcall.rs:26:12 --> $DIR/feature-gate-vectorcall.rs:26:12
| |
LL | extern "vectorcall" fn im() {} LL | extern "vectorcall" fn im() {}
@ -48,7 +48,7 @@ LL | extern "vectorcall" fn im() {}
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: vectorcall is experimental and subject to change error[E0658]: the extern "vectorcall" ABI is experimental and subject to change
--> $DIR/feature-gate-vectorcall.rs:29:18 --> $DIR/feature-gate-vectorcall.rs:29:18
| |
LL | type TA = extern "vectorcall" fn(); LL | type TA = extern "vectorcall" fn();
@ -58,7 +58,7 @@ LL | type TA = extern "vectorcall" fn();
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: vectorcall is experimental and subject to change error[E0658]: the extern "vectorcall" ABI is experimental and subject to change
--> $DIR/feature-gate-vectorcall.rs:31:8 --> $DIR/feature-gate-vectorcall.rs:31:8
| |
LL | extern "vectorcall" {} LL | extern "vectorcall" {}

View file

@ -5,7 +5,7 @@
fn main() { fn main() {
let a = &[1, 2, 3]; let a = &[1, 2, 3];
println!("{}", { println!("{}", {
extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change extern "rust-intrinsic" { //~ ERROR "rust-intrinsic" ABI is an implementation detail
fn atomic_fence(); fn atomic_fence();
} }
atomic_fence(); //~ ERROR: is unsafe atomic_fence(); //~ ERROR: is unsafe

View file

@ -1,4 +1,4 @@
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/feature-gated-feature-in-macro-arg.rs:8:16 --> $DIR/feature-gated-feature-in-macro-arg.rs:8:16
| |
LL | extern "rust-intrinsic" { LL | extern "rust-intrinsic" {

View file

@ -3,5 +3,5 @@ fn main() {
} }
extern "rust-intrinsic" fn read_via_copy() {} extern "rust-intrinsic" fn read_via_copy() {}
//~^ ERROR intrinsics are subject to change //~^ ERROR "rust-intrinsic" ABI is an implementation detail
//~| ERROR intrinsic must be in `extern "rust-intrinsic" { ... }` block //~| ERROR intrinsic must be in `extern "rust-intrinsic" { ... }` block

View file

@ -1,4 +1,4 @@
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/incorrect-read_via_copy-defn.rs:5:8 --> $DIR/incorrect-read_via_copy-defn.rs:5:8
| |
LL | extern "rust-intrinsic" fn read_via_copy() {} LL | extern "rust-intrinsic" fn read_via_copy() {}

View file

@ -3,5 +3,5 @@ fn main() {
} }
extern "rust-intrinsic" fn transmute() {} extern "rust-intrinsic" fn transmute() {}
//~^ ERROR intrinsics are subject to change //~^ ERROR "rust-intrinsic" ABI is an implementation detail
//~| ERROR intrinsic must be in `extern "rust-intrinsic" { ... }` block //~| ERROR intrinsic must be in `extern "rust-intrinsic" { ... }` block

View file

@ -1,4 +1,4 @@
error[E0658]: intrinsics are subject to change error[E0658]: the extern "rust-intrinsic" ABI is an implementation detail and perma-unstable
--> $DIR/incorrect-transmute.rs:5:8 --> $DIR/incorrect-transmute.rs:5:8
| |
LL | extern "rust-intrinsic" fn transmute() {} LL | extern "rust-intrinsic" fn transmute() {}