diff --git a/.mailmap b/.mailmap index 219f21c05096a..19adab647a553 100644 --- a/.mailmap +++ b/.mailmap @@ -505,6 +505,11 @@ Nathaniel Hamovitz <18648574+nhamovitz@users.noreply.github.com> Nathaniel Herman Nathaniel Herman Neil Pankey Ngo Iok Ui (Wu Yu Wei) +Nia Deckers +Nia Deckers +Nia Deckers +Nia Deckers +Nia Deckers Nicholas Baron Nicholas Bishop Nicholas Bishop diff --git a/compiler/rustc_ast_lowering/src/stability.rs b/compiler/rustc_ast_lowering/src/stability.rs index c56edb5f8ee7e..5c770e6880630 100644 --- a/compiler/rustc_ast_lowering/src/stability.rs +++ b/compiler/rustc_ast_lowering/src/stability.rs @@ -70,6 +70,7 @@ pub fn extern_abi_stability(abi: ExternAbi) -> Result<(), UnstableAbi> { ExternAbi::Rust | ExternAbi::C { .. } | ExternAbi::Cdecl { .. } + | ExternAbi::Custom | ExternAbi::Stdcall { .. } | ExternAbi::Fastcall { .. } | ExternAbi::Thiscall { .. } @@ -144,9 +145,6 @@ pub fn extern_abi_stability(abi: ExternAbi) -> Result<(), UnstableAbi> { feature: sym::cmse_nonsecure_entry, explain: GateReason::Experimental, }), - ExternAbi::Custom => { - Err(UnstableAbi { abi, feature: sym::abi_custom, explain: GateReason::Experimental }) - } ExternAbi::Swift => { Err(UnstableAbi { abi, feature: sym::abi_swift, explain: GateReason::Experimental }) } diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index c71fecf046c9b..30ae99a56f6ad 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -46,6 +46,8 @@ declare_features! ( /// Allows `#[target_feature(...)]` on aarch64 platforms (accepted, aarch64_target_feature, "1.61.0", Some(44839)), + /// Allows `extern "custom" fn()`. + (accepted, abi_custom, "CURRENT_RUSTC_VERSION", Some(140829)), /// Allows using the `efiapi` ABI. (accepted, abi_efiapi, "1.68.0", Some(65815)), /// Allows the sysV64 ABI to be specified on all platforms diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index 3a80145e2897d..665661f43006e 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -372,8 +372,6 @@ declare_features! ( (unstable, abi_avr_interrupt, "1.45.0", Some(69664)), /// Allows `extern "cmse-nonsecure-call" fn()`. (unstable, abi_cmse_nonsecure_call, "1.90.0", Some(81391)), - /// Allows `extern "custom" fn()`. - (unstable, abi_custom, "1.89.0", Some(140829)), /// Allows `extern "gpu-kernel" fn()`. (unstable, abi_gpu_kernel, "1.86.0", Some(135467)), /// Allows `extern "msp430-interrupt" fn()`. diff --git a/library/compiler-builtins/compiler-builtins/src/lib.rs b/library/compiler-builtins/compiler-builtins/src/lib.rs index 9e847206caf19..6bde5195e8af4 100644 --- a/library/compiler-builtins/compiler-builtins/src/lib.rs +++ b/library/compiler-builtins/compiler-builtins/src/lib.rs @@ -1,6 +1,5 @@ #![cfg_attr(feature = "compiler-builtins", compiler_builtins)] #![cfg_attr(all(target_family = "wasm"), feature(wasm_numeric_instr))] -#![feature(abi_custom)] #![feature(abi_unadjusted)] #![feature(asm_experimental_arch)] #![feature(cfg_target_has_atomic)] diff --git a/src/bootstrap/src/cli_main.rs b/src/bootstrap/src/cli_main.rs index 59f3c1a1e5e1c..c11e1478f4d42 100644 --- a/src/bootstrap/src/cli_main.rs +++ b/src/bootstrap/src/cli_main.rs @@ -14,8 +14,8 @@ use std::time::Instant; use std::{env, process}; use crate::core::builder::StepStack; -use crate::core::config::flags::Flags; -use crate::core::config::{ChangeId, Config, Subcommand}; +use crate::core::config::flags::{Flags, Subcommand}; +use crate::core::config::{ChangeId, Config}; use crate::utils::change_tracker::{ CONFIG_CHANGE_HISTORY, find_recent_config_change_ids, human_readable_changes, }; diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index 82b7a11d0183c..ff16a814c456d 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -16,7 +16,8 @@ use crate::core::builder::{ self, Alias, Builder, Cargo, CommandLineStep, Kind, RunConfig, ShouldRun, Step, StepMetadata, crate_description, }; -use crate::core::config::{Subcommand, TargetSelection}; +use crate::core::config::TargetSelection; +use crate::core::config::flags::Subcommand; use crate::utils::build_stamp::{self, BuildStamp}; use crate::utils::helpers::t; use crate::{CodegenBackendKind, Compiler, Mode}; diff --git a/src/bootstrap/src/core/build_steps/clean.rs b/src/bootstrap/src/core/build_steps/clean.rs index 57a5ccdeadfac..b7dae28c42ab3 100644 --- a/src/bootstrap/src/core/build_steps/clean.rs +++ b/src/bootstrap/src/core/build_steps/clean.rs @@ -12,7 +12,7 @@ use std::path::Path; use crate::core::builder::{ Builder, CommandLineStep, Kind, RunConfig, ShouldRun, crate_description, }; -use crate::core::config::Subcommand; +use crate::core::config::flags::Subcommand; use crate::utils::build_stamp::BuildStamp; use crate::utils::helpers::t; use crate::{Build, Compiler, Mode}; diff --git a/src/bootstrap/src/core/build_steps/clippy.rs b/src/bootstrap/src/core/build_steps/clippy.rs index e3b550b603359..0d5dd410a57c6 100644 --- a/src/bootstrap/src/core/build_steps/clippy.rs +++ b/src/bootstrap/src/core/build_steps/clippy.rs @@ -18,11 +18,12 @@ use crate::core::build_steps::check::{CompilerForCheck, prepare_compiler_for_che use crate::core::build_steps::compile::{ ArtifactKeepMode, run_cargo, rustc_cargo, std_cargo, std_crates_for_make_run, }; -use crate::core::builder; use crate::core::builder::{ - Alias, Builder, CommandLineStep, Kind, RunConfig, ShouldRun, StepMetadata, crate_description, + self, Alias, Builder, CommandLineStep, Kind, RunConfig, ShouldRun, StepMetadata, + crate_description, }; -use crate::core::config::{Subcommand, TargetSelection}; +use crate::core::config::TargetSelection; +use crate::core::config::flags::Subcommand; use crate::utils::build_stamp::{self, BuildStamp}; use crate::utils::helpers; use crate::{Compiler, Mode}; diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs index 8894a7d257de1..21f1395351a80 100644 --- a/src/bootstrap/src/core/build_steps/doc.rs +++ b/src/bootstrap/src/core/build_steps/doc.rs @@ -16,12 +16,12 @@ use crate::core::build_steps::tool::{ self, RustcPrivateCompilers, SourceType, Tool, prepare_tool_cargo, }; use crate::core::builder::{ - self, Builder, CommandLineStep, Compiler, Kind, RunConfig, ShouldRun, Step, StepMetadata, + self, Builder, CommandLineStep, Kind, RunConfig, ShouldRun, Step, StepMetadata, crate_description, }; use crate::core::config::{Config, TargetSelection}; use crate::utils::helpers::{submodule_path_of, symlink_dir, t, up_to_date}; -use crate::{FileType, Mode}; +use crate::{Compiler, FileType, Mode}; macro_rules! book { ($($name:ident, $path:expr, $book_name:expr, $lang:expr ;)+) => { diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 762bf0a271704..8fa1ce956c3ca 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -31,8 +31,8 @@ use crate::core::build_steps::tool::{ use crate::core::build_steps::toolstate::ToolState; use crate::core::build_steps::{compile, dist, llvm}; use crate::core::builder::{ - self, Alias, Builder, CommandLineStep, Compiler, Kind, RunConfig, ShouldRun, Step, - StepMetadata, crate_description, + self, Alias, Builder, CommandLineStep, Kind, RunConfig, ShouldRun, Step, StepMetadata, + crate_description, }; use crate::core::config::TargetSelection; use crate::core::config::flags::{Subcommand, get_completion, top_level_help}; @@ -45,7 +45,7 @@ use crate::utils::helpers::{ up_to_date, }; use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests}; -use crate::{CLang, CodegenBackendKind, GitRepo, Mode, TestTarget, envify}; +use crate::{CLang, CodegenBackendKind, Compiler, GitRepo, Mode, TestTarget, envify}; mod compiletest; pub mod failed_tests; diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index cd4e40a58ffc3..1ae2f69ccfe84 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -12,7 +12,8 @@ use crate::utils::build_stamp; use crate::utils::exec::{BootstrapCommand, command}; use crate::utils::helpers::{self, LldThreads, check_cfg_arg, linker_flags, t}; use crate::{ - CLang, Compiler, EXTRA_CHECK_CFGS, GitRepo, Mode, RemapScheme, prepare_behaviour_dump_dir, + CLang, Compiler, EXTRA_CHECK_CFGS, GitRepo, Mode, RemapScheme, envify, + prepare_behaviour_dump_dir, }; /// Represents flag values in `String` form with a `\x1f` delimiter to pass to the compiler later. @@ -349,7 +350,7 @@ impl Cargo { // any fingerprint difference between host==target versus cross-compiled targets // when it comes to those host build artifacts. if let Some(host_linker) = builder.linker(compiler.host) { - let host = crate::envify(&compiler.host.triple); + let host = envify(&compiler.host.triple); self.command.env(format!("CARGO_TARGET_{host}_LINKER"), host_linker); } for arg in linker_flags(builder, compiler.host, LldThreads::Yes) { @@ -357,7 +358,7 @@ impl Cargo { } if let Some(target_linker) = builder.linker(target) { - let target = crate::envify(&target.triple); + let target = envify(&target.triple); self.command.env(format!("CARGO_TARGET_{target}_LINKER"), target_linker); } // We want to set -Clinker using Cargo, therefore we only call `linker_flags` and not diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index c21322740fa61..e941e26e43efb 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -14,7 +14,6 @@ use clap::ValueEnum; use tracing::instrument; pub use self::cargo::{Cargo, apply_pgo, cargo_profile_var}; -pub use crate::Compiler; use crate::core::build_steps::compile::{Std, StdLink, looks_like_codegen_backend}; use crate::core::build_steps::tool::RustcPrivateCompilers; use crate::core::build_steps::{ @@ -29,7 +28,7 @@ use crate::utils::cache::Cache; use crate::utils::exec::{BootstrapCommand, ExecutionContext, command}; use crate::utils::helpers::{self, LldThreads, add_dylib_path, exe, libdir, linker_args, t}; use crate::utils::tracing::format_location; -use crate::{Build, Crate, trace}; +use crate::{Build, Compiler, Crate, trace}; mod cargo; mod cli_paths; diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 20319e4f400f3..f4d8db99aaf69 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -32,8 +32,7 @@ use crate::CodegenBackendKind; use crate::core::build_steps::llvm; use crate::core::build_steps::llvm::LLVM_INVALIDATION_PATHS; use crate::core::build_steps::test::failed_tests::collect_previously_failed_tests; -pub use crate::core::config::flags::Subcommand; -use crate::core::config::flags::{Color, Flags, Warnings}; +use crate::core::config::flags::{Color, Flags, Subcommand, Warnings}; use crate::core::config::macros::check_ci_llvm; use crate::core::config::target_selection::TargetSelectionList; use crate::core::config::toml::TomlConfig; diff --git a/src/bootstrap/src/core/config/tests.rs b/src/bootstrap/src/core/config/tests.rs index ad0859727c8fc..2c5a4b22e3c89 100644 --- a/src/bootstrap/src/core/config/tests.rs +++ b/src/bootstrap/src/core/config/tests.rs @@ -14,6 +14,7 @@ use super::toml::rust::parse_codegen_backends; use super::{Config, DebuggerPath, RUSTC_IF_UNCHANGED_ALLOWED_PATHS}; use crate::core::build_steps::clippy::{LintConfig, get_clippy_rules_in_order}; use crate::core::build_steps::llvm::LLVM_INVALIDATION_PATHS; +use crate::core::config::flags::Subcommand; use crate::core::config::{ BootstrapOverrideLld, ChangeId, CompilerBuiltins, Target, TargetSelection, }; @@ -287,7 +288,7 @@ fn order_of_clippy_rules() { let config = TestCtx::new().config(&args[0]).args(&args[1..]).create_config(); let actual = match config.cmd.clone() { - crate::Subcommand::Clippy { allow, deny, warn, forbid, .. } => { + Subcommand::Clippy { allow, deny, warn, forbid, .. } => { let cfg = LintConfig { allow, deny, warn, forbid }; let args_vec: Vec = args.iter().map(|s| s.to_string()).collect(); get_clippy_rules_in_order(&args_vec, &cfg) @@ -311,7 +312,7 @@ fn clippy_rule_separate_prefix() { let config = TestCtx::new().config(&args[0]).args(&args[1..]).create_config(); let actual = match config.cmd.clone() { - crate::Subcommand::Clippy { allow, deny, warn, forbid, .. } => { + Subcommand::Clippy { allow, deny, warn, forbid, .. } => { let cfg = LintConfig { allow, deny, warn, forbid }; let args_vec: Vec = args.iter().map(|s| s.to_string()).collect(); get_clippy_rules_in_order(&args_vec, &cfg) diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index 0256aabe54edb..e9996b16708d1 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -17,7 +17,8 @@ use std::{env, fs}; use crate::Build; use crate::core::build_steps::tool; use crate::core::builder::Builder; -use crate::core::config::{CompilerBuiltins, DebuggerPath, Subcommand, Target}; +use crate::core::config::flags::Subcommand; +use crate::core::config::{CompilerBuiltins, DebuggerPath, Target}; use crate::utils::exec::command; use crate::utils::helpers::{self, t}; diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index eb68daa0cf074..116099ee3972f 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -30,14 +30,13 @@ use std::time::{Instant, SystemTime}; use std::{env, fs, io, str}; use build_helper::ci::gha; -use cc::Tool; use termcolor::{ColorChoice, StandardStream, WriteColor}; #[cfg(feature = "tracing")] use tracing::{instrument, span}; use crate::core::build_steps::format::InternalRustfmt; use crate::core::build_steps::vendor::VENDOR_DIR; -use crate::core::builder::{self, Kind}; +use crate::core::builder::{Builder, Kind}; use crate::core::config::flags::{self, Subcommand}; use crate::core::config::{BootstrapOverrideLld, Config, DryRun, LlvmLibunwind, TargetSelection}; use crate::utils::build_stamp::BuildStamp; @@ -597,7 +596,7 @@ impl Build { } build.do_if_verbose(|| println!("finding compilers")); - utils::cc_detect::fill_compilers(&mut build); + crate::utils::cc_detect::fill_compilers(&mut build); // When running `setup`, the profile is about to change, so any requirements we have now may // be different on the next invocation. Don't check for them until the next time x.py is // run. This is ok because `setup` never runs any build commands, so it won't fail if commands are missing. @@ -752,12 +751,12 @@ impl Build { match &self.config.cmd { Subcommand::Format { check, all } => { - let builder = builder::Builder::new(self); + let builder = Builder::new(self); let rustfmt_path = builder.ensure(InternalRustfmt).unwrap_or_else(|| { eprintln!("fmt error: `x fmt` is not supported on this channel"); helpers::exit_process(1); }); - return core::build_steps::format::format( + return crate::core::build_steps::format::format( &builder, rustfmt_path, *check, @@ -766,7 +765,7 @@ impl Build { ); } Subcommand::Perf(args) => { - return core::build_steps::perf::perf(&builder::Builder::new(self), args); + return crate::core::build_steps::perf::perf(&Builder::new(self), args); } _cmd => { debug!(cmd = ?_cmd, "not a hardcoded subcommand; returning to normal handling"); @@ -787,7 +786,7 @@ impl Build { let _sanity_check_span = span!(tracing::Level::DEBUG, "(1) executing dry-run sanity-check").entered(); self.config.set_dry_run(DryRun::SelfCheck); - let builder = builder::Builder::new(self); + let builder = Builder::new(self); builder.execute_cli(); } @@ -797,14 +796,14 @@ impl Build { let _actual_run_span = span!(tracing::Level::DEBUG, "(2) executing actual run").entered(); self.config.set_dry_run(DryRun::Disabled); - let builder = builder::Builder::new(self); + let builder = Builder::new(self); builder.execute_cli(); } } else { #[cfg(feature = "tracing")] let _dry_run_span = span!(tracing::Level::DEBUG, "executing dry run").entered(); - let builder = builder::Builder::new(self); + let builder = Builder::new(self); builder.execute_cli(); } @@ -1207,12 +1206,12 @@ impl Build { } /// Returns the internal `cc::Tool` for the C compiler. - fn cc_tool(&self, target: TargetSelection) -> Tool { + fn cc_tool(&self, target: TargetSelection) -> cc::Tool { self.cc[&target].clone() } /// Returns the internal `cc::Tool` for the C++ compiler. - fn cxx_tool(&self, target: TargetSelection) -> Tool { + fn cxx_tool(&self, target: TargetSelection) -> cc::Tool { self.cxx[&target].clone() } diff --git a/src/bootstrap/src/utils/build_stamp/tests.rs b/src/bootstrap/src/utils/build_stamp/tests.rs index ae70c6085e7fb..6ca1c8bd4f1f5 100644 --- a/src/bootstrap/src/utils/build_stamp/tests.rs +++ b/src/bootstrap/src/utils/build_stamp/tests.rs @@ -1,6 +1,6 @@ use tempfile::TempDir; -use crate::BuildStamp; +use crate::utils::build_stamp::BuildStamp; #[test] #[should_panic(expected = "prefix can not start or end with '.'")] diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs index 5a3fac5afeadf..977b4a31eadc4 100644 --- a/src/bootstrap/src/utils/cc_detect.rs +++ b/src/bootstrap/src/utils/cc_detect.rs @@ -25,7 +25,8 @@ use std::collections::HashSet; use std::iter; use std::path::{Path, PathBuf}; -use crate::core::config::{CompressDebuginfo, Subcommand, TargetSelection}; +use crate::core::config::flags::Subcommand; +use crate::core::config::{CompressDebuginfo, TargetSelection}; use crate::utils::exec::{BootstrapCommand, command}; use crate::{Build, CLang, GitRepo}; diff --git a/src/bootstrap/src/utils/step_graph.rs b/src/bootstrap/src/utils/step_graph.rs index d6a2d89482ee4..92f14f3fba805 100644 --- a/src/bootstrap/src/utils/step_graph.rs +++ b/src/bootstrap/src/utils/step_graph.rs @@ -5,7 +5,7 @@ use std::panic::Location; use std::path::Path; use crate::core::builder::{AnyDebug, Step, pretty_step_name}; -use crate::t; +use crate::utils::helpers::t; use crate::utils::tracing::format_location; /// Records the executed steps and their dependencies in a directed graph, diff --git a/src/bootstrap/src/utils/tarball.rs b/src/bootstrap/src/utils/tarball.rs index 87e975e8dfad9..41ad6b022ac18 100644 --- a/src/bootstrap/src/utils/tarball.rs +++ b/src/bootstrap/src/utils/tarball.rs @@ -11,9 +11,9 @@ use crate::FileType; use crate::core::build_steps::dist::distdir; use crate::core::builder::{Builder, Kind}; use crate::core::config::BUILDER_CONFIG_FILENAME; +use crate::utils::channel; use crate::utils::exec::BootstrapCommand; -use crate::utils::helpers::{move_file, t}; -use crate::utils::{channel, helpers}; +use crate::utils::helpers::{self, move_file, t}; #[derive(Copy, Clone)] pub(crate) enum OverlayKind { diff --git a/src/bootstrap/src/utils/tracing.rs b/src/bootstrap/src/utils/tracing.rs index 9ab1ca23ee5a8..a614ee865571a 100644 --- a/src/bootstrap/src/utils/tracing.rs +++ b/src/bootstrap/src/utils/tracing.rs @@ -74,7 +74,7 @@ pub fn format_location(location: std::panic::Location<'static>) -> String { const COMMAND_SPAN_TARGET: &str = "COMMAND"; #[cfg(feature = "tracing")] -pub fn trace_cmd(command: &crate::BootstrapCommand) -> tracing::span::EnteredSpan { +pub fn trace_cmd(command: &crate::utils::exec::BootstrapCommand) -> tracing::span::EnteredSpan { let fingerprint = command.fingerprint(); let location = command.get_created_location(); let location = format_location(location); diff --git a/src/ci/scripts/verify-channel.sh b/src/ci/scripts/verify-channel.sh index 286869e8a411b..ff577fe3a6cb9 100755 --- a/src/ci/scripts/verify-channel.sh +++ b/src/ci/scripts/verify-channel.sh @@ -8,7 +8,8 @@ IFS=$'\n\t' source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" -if isCiBranch try-perf || isCiBranch automation/bors/try || isCiBranch automation/bors/auto; then +if isCiBranch try-perf || isCiBranch automation/bors/try-perf || \ + isCiBranch automation/bors/try || isCiBranch automation/bors/auto; then echo "channel verification is only executed on PR builds" exit fi diff --git a/src/doc/unstable-book/src/compiler-flags/instrument-mcount.md b/src/doc/unstable-book/src/compiler-flags/instrument-mcount.md index 07af4435bc7c1..f7beca6e5a627 100644 --- a/src/doc/unstable-book/src/compiler-flags/instrument-mcount.md +++ b/src/doc/unstable-book/src/compiler-flags/instrument-mcount.md @@ -40,7 +40,6 @@ The following example can be compiled with `-Zinstrument-mcount=yes` or `-Zinstr ```rust #![feature(instrument_fn)] -#![feature(abi_custom)] fn main() { // Ensure all the early startup occurs before attempting to call this trivial, single-threaded diff --git a/src/librustdoc/clean/cfg.rs b/src/librustdoc/clean/cfg.rs index 04dd0eaf22899..04c54e134b48e 100644 --- a/src/librustdoc/clean/cfg.rs +++ b/src/librustdoc/clean/cfg.rs @@ -227,14 +227,22 @@ impl Cfg { } fn should_append_only_to_description(&self) -> bool { - match self.0 { - CfgEntry::Any(..) - | CfgEntry::All(..) - | CfgEntry::NameValue { .. } - | CfgEntry::Version(..) - | CfgEntry::Not(CfgEntry::NameValue { .. }, _) => true, - CfgEntry::Not(..) | CfgEntry::Bool(..) => false, + fn should_append_only_to_description(cfg: &CfgEntry) -> bool { + match cfg { + CfgEntry::NameValue { .. } + | CfgEntry::Version(..) + | CfgEntry::Not(CfgEntry::NameValue { .. }, _) => true, + CfgEntry::Any(a, _) | CfgEntry::All(a, _) => { + if a.is_empty() { + false + } else { + a.iter().any(|sub| should_append_only_to_description(sub)) + } + } + CfgEntry::Not(..) | CfgEntry::Bool(..) => false, + } } + should_append_only_to_description(&self.0) } fn should_use_with_in_description(&self) -> bool { @@ -309,7 +317,19 @@ impl Cfg { } fn omit_preposition(&self) -> bool { - matches!(self.0, CfgEntry::Bool(..)) + fn omit_preposition(cfg: &CfgEntry) -> bool { + match cfg { + CfgEntry::NameValue { .. } + | CfgEntry::Version(..) + | CfgEntry::Not(CfgEntry::NameValue { .. }, _) => false, + CfgEntry::Any(a, _) | CfgEntry::All(a, _) => { + a.is_empty() || matches!(a.as_slice(), [a] if omit_preposition(&a)) + } + CfgEntry::Not(a, _) => omit_preposition(a), + CfgEntry::Bool(..) => true, + } + } + omit_preposition(&self.0) } pub(crate) fn inner(&self) -> &CfgEntry { @@ -459,15 +479,20 @@ impl Display<'_> { use fmt::Display as _; let short_longhand = self.1.is_long() && { - let all_crate_features = sub_cfgs.iter().all(|sub_cfg| { - matches!(sub_cfg, CfgEntry::NameValue { name: sym::feature, value: Some(_), .. }) - }); - let all_target_features = sub_cfgs.iter().all(|sub_cfg| { - matches!( - sub_cfg, - CfgEntry::NameValue { name: sym::target_feature, value: Some(_), .. } - ) - }); + let all_crate_features = !sub_cfgs.is_empty() + && sub_cfgs.iter().all(|sub_cfg| { + matches!( + sub_cfg, + CfgEntry::NameValue { name: sym::feature, value: Some(_), .. } + ) + }); + let all_target_features = !sub_cfgs.is_empty() + && sub_cfgs.iter().all(|sub_cfg| { + matches!( + sub_cfg, + CfgEntry::NameValue { name: sym::target_feature, value: Some(_), .. } + ) + }); if all_crate_features { fmt.write_str("crate features ")?; @@ -506,20 +531,45 @@ impl Display<'_> { impl fmt::Display for Display<'_> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { + fn display_bool(fmt: &mut fmt::Formatter<'_>, value: bool) -> fmt::Result { + if value { fmt.write_str("everywhere") } else { fmt.write_str("nowhere") } + } + match &self.0 { - CfgEntry::Not(CfgEntry::Any(sub_cfgs, _), _) => { - let separator = if sub_cfgs.iter().all(is_simple_cfg) { " nor " } else { ", nor " }; - fmt.write_str("neither ")?; - - sub_cfgs - .iter() - .map(|sub_cfg| { - Wrapped::with_parens() - .when(is_any_cfg(sub_cfg)) - .wrap(Display(sub_cfg, self.1)) - }) - .joined(separator, fmt) - } + CfgEntry::Not(CfgEntry::Not(sub_cfg, _), _) => Display(sub_cfg, self.1).fmt(fmt), + CfgEntry::Not(CfgEntry::Any(sub_cfgs, _), _) => match sub_cfgs.as_slice() { + // `not(any())` is `true` because `any()` is `false`. + [] => display_bool(fmt, true), + [CfgEntry::Bool(value, _)] => display_bool(fmt, !*value), + sub_cfgs => { + let separator = + if sub_cfgs.iter().all(is_simple_cfg) { " nor " } else { ", nor " }; + if sub_cfgs.len() > 1 { + fmt.write_str("neither ")?; + } else { + fmt.write_str("not(")?; + } + + sub_cfgs + .iter() + .map(|sub_cfg| { + Wrapped::with_parens() + .when(is_any_cfg(sub_cfg)) + .wrap(Display(sub_cfg, self.1)) + }) + .joined(separator, fmt)?; + if sub_cfgs.len() == 1 { + fmt.write_str(")")?; + } + Ok(()) + } + }, + CfgEntry::Not(s @ CfgEntry::All(sub_cfgs, _), _) => match sub_cfgs.as_slice() { + // `not(all())` is `false` because `all()` is `true`. + [] => display_bool(fmt, false), + [CfgEntry::Bool(value, _)] => display_bool(fmt, !*value), + _ => write!(fmt, "not ({})", Display(s, self.1)), + }, CfgEntry::Not(simple @ CfgEntry::NameValue { .. }, _) => { write!(fmt, "non-{}", Display(simple, self.1)) } @@ -531,13 +581,7 @@ impl fmt::Display for Display<'_> { } CfgEntry::All(sub_cfgs, _) => self.display_sub_cfgs(fmt, sub_cfgs.as_slice(), " and "), - CfgEntry::Bool(v, _) => { - if *v { - fmt.write_str("everywhere") - } else { - fmt.write_str("nowhere") - } - } + CfgEntry::Bool(v, _) => display_bool(fmt, *v), &CfgEntry::NameValue { name, value, .. } => { let human_readable = match (*name, value) { diff --git a/src/librustdoc/clean/cfg/tests.rs b/src/librustdoc/clean/cfg/tests.rs index 97f9d1fe71673..a1c25d4251823 100644 --- a/src/librustdoc/clean/cfg/tests.rs +++ b/src/librustdoc/clean/cfg/tests.rs @@ -42,11 +42,19 @@ fn cfg_any_e(v: ThinVec) -> CfgEntry { } fn cfg_not(v: CfgEntry) -> Cfg { - Cfg(CfgEntry::Not(Box::new(v), DUMMY_SP)) + Cfg(cfg_not_e(v)) +} + +fn cfg_not_e(v: CfgEntry) -> CfgEntry { + CfgEntry::Not(Box::new(v), DUMMY_SP) } fn cfg_true() -> Cfg { - Cfg(CfgEntry::Bool(true, DUMMY_SP)) + Cfg(cfg_true_e()) +} + +fn cfg_true_e() -> CfgEntry { + CfgEntry::Bool(true, DUMMY_SP) } fn cfg_false() -> Cfg { @@ -377,6 +385,32 @@ fn test_render_long_html() { .render_long_html(), "Available on x86-64 and target feature sse2 only." ); + // `any(true)` + assert_eq!( + cfg_any(thin_vec![cfg_true_e()]).render_long_html(), + "Available everywhere.", + ); + // `not(any(true))` + assert_eq!( + cfg_not(cfg_any_e(thin_vec![cfg_true_e()])).render_long_html(), + "Available nowhere.", + ); + // `any(all(true))` + assert_eq!( + cfg_any(thin_vec![cfg_all_e(thin_vec![cfg_true_e()])]).render_long_html(), + "Available everywhere." + ); + // `not(any(all(true)))` + assert_eq!( + cfg_not(cfg_any_e(thin_vec![cfg_all_e(thin_vec![cfg_true_e()])])).render_long_html(), + "Available not(everywhere).", + ); + // `not(not(any(all(true))))` + assert_eq!( + cfg_not(cfg_not_e(cfg_any_e(thin_vec![cfg_all_e(thin_vec![cfg_true_e()])]))) + .render_long_html(), + "Available everywhere.", + ); }) } diff --git a/tests/rustdoc-html/doc-cfg/always-true.rs b/tests/rustdoc-html/doc-cfg/always-true.rs new file mode 100644 index 0000000000000..a753a25619af1 --- /dev/null +++ b/tests/rustdoc-html/doc-cfg/always-true.rs @@ -0,0 +1,20 @@ +// Some generated "cfg text" check. +// Regression test for . + +#![feature(doc_cfg)] +#![crate_name = "foo"] + +// This one doesn't display any cfg label. +//@ has 'foo/fn.f.html' +//@ count - '//*[@class="stab portability"]' 0 +#[cfg(any(all()))] +pub fn f() {} + +//@ has 'foo/fn.f2.html' +// If you change the selector in this one, don't forget to update the one of the `f` +// function as well! +//@ count - '//*[@class="stab portability"]' 1 +//@ has - '//*[@class="stab portability"]' 'Available everywhere.' +// This one display a cfg label. +#[cfg(any(true))] +pub fn f2() {} diff --git a/tests/ui/abi/bad-custom.rs b/tests/ui/abi/bad-custom.rs index 6811520df44cb..93c054a8c900f 100644 --- a/tests/ui/abi/bad-custom.rs +++ b/tests/ui/abi/bad-custom.rs @@ -1,7 +1,6 @@ //@ edition: 2021 //@ check-fail //@ needs-asm-support -#![feature(abi_custom)] #[unsafe(naked)] unsafe extern "custom" fn return_explicit_unit() -> () { diff --git a/tests/ui/abi/bad-custom.stderr b/tests/ui/abi/bad-custom.stderr index 4801b294d818f..472c0041234e6 100644 --- a/tests/ui/abi/bad-custom.stderr +++ b/tests/ui/abi/bad-custom.stderr @@ -1,5 +1,5 @@ error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:14:50 + --> $DIR/bad-custom.rs:13:50 | LL | unsafe extern "custom" fn return_alias_unit() -> UnitAlias { | ^^^^^^^^^ @@ -12,7 +12,7 @@ LL + unsafe extern "custom" fn return_alias_unit() { | error: functions with the "custom" ABI must be unsafe - --> $DIR/bad-custom.rs:20:1 + --> $DIR/bad-custom.rs:19:1 | LL | extern "custom" fn must_be_unsafe(a: i64) -> i64 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ LL | unsafe extern "custom" fn must_be_unsafe(a: i64) -> i64 { | ++++++ error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:20:35 + --> $DIR/bad-custom.rs:19:35 | LL | extern "custom" fn must_be_unsafe(a: i64) -> i64 { | ^^^^^^ ^^^ @@ -36,7 +36,7 @@ LL + extern "custom" fn must_be_unsafe() { | error: functions with the "custom" ABI must be unsafe - --> $DIR/bad-custom.rs:26:21 + --> $DIR/bad-custom.rs:25:21 | LL | type MustbeUnsafe = extern "custom" fn(i64) -> i64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | type MustbeUnsafe = unsafe extern "custom" fn(i64) -> i64; | ++++++ error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:26:40 + --> $DIR/bad-custom.rs:25:40 | LL | type MustbeUnsafe = extern "custom" fn(i64) -> i64; | ^^^ ^^^ @@ -60,7 +60,7 @@ LL + type MustbeUnsafe = extern "custom" fn(); | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:31:41 + --> $DIR/bad-custom.rs:30:41 | LL | unsafe extern "custom" fn no_parameters(a: i64) { | ^^^^^^ @@ -73,7 +73,7 @@ LL + unsafe extern "custom" fn no_parameters() { | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:36:47 + --> $DIR/bad-custom.rs:35:47 | LL | type NoParameters = unsafe extern "custom" fn(i64); | ^^^ @@ -86,7 +86,7 @@ LL + type NoParameters = unsafe extern "custom" fn(); | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:40:47 + --> $DIR/bad-custom.rs:39:47 | LL | unsafe extern "custom" fn no_return_type() -> i64 { | ^^^ @@ -99,7 +99,7 @@ LL + unsafe extern "custom" fn no_return_type() { | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:45:52 + --> $DIR/bad-custom.rs:44:52 | LL | type NoReturnType = unsafe extern "custom" fn() -> i64; | ^^^ @@ -112,7 +112,7 @@ LL + type NoReturnType = unsafe extern "custom" fn(); | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:49:53 + --> $DIR/bad-custom.rs:48:53 | LL | unsafe extern "custom" fn no_never_return_type() -> ! { | ^ @@ -125,7 +125,7 @@ LL + unsafe extern "custom" fn no_never_return_type() { | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:54:57 + --> $DIR/bad-custom.rs:53:57 | LL | type NoNeverReturnType = unsafe extern "custom" fn() -> !; | ^ @@ -138,7 +138,7 @@ LL + type NoNeverReturnType = unsafe extern "custom" fn(); | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:57:36 + --> $DIR/bad-custom.rs:56:36 | LL | unsafe extern "custom" fn not_both(a: i64) -> i64 { | ^^^^^^ ^^^ @@ -151,7 +151,7 @@ LL + unsafe extern "custom" fn not_both() { | error: an `extern "custom"` function can only be declared externally or defined via naked functions - --> $DIR/bad-custom.rs:57:1 + --> $DIR/bad-custom.rs:56:1 | LL | unsafe extern "custom" fn not_both(a: i64) -> i64 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -163,7 +163,7 @@ LL | unsafe extern "custom" fn not_both(a: i64) -> i64 { | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:63:42 + --> $DIR/bad-custom.rs:62:42 | LL | type NotBoth = unsafe extern "custom" fn(i64) -> i64; | ^^^ ^^^ @@ -176,7 +176,7 @@ LL + type NotBoth = unsafe extern "custom" fn(); | error: functions with the "custom" ABI must be unsafe - --> $DIR/bad-custom.rs:69:5 + --> $DIR/bad-custom.rs:68:5 | LL | extern "custom" fn is_even(self) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -187,7 +187,7 @@ LL | unsafe extern "custom" fn is_even(self) -> bool { | ++++++ error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:69:32 + --> $DIR/bad-custom.rs:68:32 | LL | extern "custom" fn is_even(self) -> bool { | ^^^^ ^^^^ @@ -200,7 +200,7 @@ LL + extern "custom" fn is_even() { | error: an `extern "custom"` function can only be declared externally or defined via naked functions - --> $DIR/bad-custom.rs:69:5 + --> $DIR/bad-custom.rs:68:5 | LL | extern "custom" fn is_even(self) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -212,7 +212,7 @@ LL | extern "custom" fn is_even(self) -> bool { | error: functions with the "custom" ABI must be unsafe - --> $DIR/bad-custom.rs:78:5 + --> $DIR/bad-custom.rs:77:5 | LL | extern "custom" fn bitwise_not(a: i64) -> i64 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -223,7 +223,7 @@ LL | unsafe extern "custom" fn bitwise_not(a: i64) -> i64 { | ++++++ error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:78:36 + --> $DIR/bad-custom.rs:77:36 | LL | extern "custom" fn bitwise_not(a: i64) -> i64 { | ^^^^^^ ^^^ @@ -236,7 +236,7 @@ LL + extern "custom" fn bitwise_not() { | error: an `extern "custom"` function can only be declared externally or defined via naked functions - --> $DIR/bad-custom.rs:78:5 + --> $DIR/bad-custom.rs:77:5 | LL | extern "custom" fn bitwise_not(a: i64) -> i64 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -248,7 +248,7 @@ LL | extern "custom" fn bitwise_not(a: i64) -> i64 { | error: functions with the "custom" ABI must be unsafe - --> $DIR/bad-custom.rs:89:5 + --> $DIR/bad-custom.rs:88:5 | LL | extern "custom" fn negate(a: i64) -> i64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -259,7 +259,7 @@ LL | unsafe extern "custom" fn negate(a: i64) -> i64; | ++++++ error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:89:31 + --> $DIR/bad-custom.rs:88:31 | LL | extern "custom" fn negate(a: i64) -> i64; | ^^^^^^ ^^^ @@ -272,7 +272,7 @@ LL + extern "custom" fn negate(); | error: functions with the "custom" ABI must be unsafe - --> $DIR/bad-custom.rs:95:5 + --> $DIR/bad-custom.rs:94:5 | LL | extern "custom" fn negate(a: i64) -> i64 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -283,7 +283,7 @@ LL | unsafe extern "custom" fn negate(a: i64) -> i64 { | ++++++ error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:95:31 + --> $DIR/bad-custom.rs:94:31 | LL | extern "custom" fn negate(a: i64) -> i64 { | ^^^^^^ ^^^ @@ -296,7 +296,7 @@ LL + extern "custom" fn negate() { | error: an `extern "custom"` function can only be declared externally or defined via naked functions - --> $DIR/bad-custom.rs:95:5 + --> $DIR/bad-custom.rs:94:5 | LL | extern "custom" fn negate(a: i64) -> i64 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -308,7 +308,7 @@ LL | extern "custom" fn negate(a: i64) -> i64 { | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:104:18 + --> $DIR/bad-custom.rs:103:18 | LL | fn increment(a: i64) -> i64; | ^^^^^^ ^^^ @@ -321,7 +321,7 @@ LL + fn increment(); | error: foreign functions with the "custom" ABI cannot be safe - --> $DIR/bad-custom.rs:107:5 + --> $DIR/bad-custom.rs:106:5 | LL | safe fn extern_cannot_be_safe(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -333,7 +333,7 @@ LL + fn extern_cannot_be_safe(); | error: function pointers cannot be declared with `safe` safety qualifier - --> $DIR/bad-custom.rs:111:13 + --> $DIR/bad-custom.rs:110:13 | LL | type Safe = safe extern "custom" fn(); | ^^^^ @@ -345,7 +345,7 @@ LL + type Safe = extern "custom" fn(); | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:114:40 + --> $DIR/bad-custom.rs:113:40 | LL | fn caller(f: unsafe extern "custom" fn(i64) -> i64, mut x: i64) -> i64 { | ^^^ ^^^ @@ -358,7 +358,7 @@ LL + fn caller(f: unsafe extern "custom" fn(), mut x: i64) -> i64 { | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:120:48 + --> $DIR/bad-custom.rs:119:48 | LL | fn caller_by_ref(f: &unsafe extern "custom" fn(i64) -> i64, mut x: i64) -> i64 { | ^^^ ^^^ @@ -371,7 +371,7 @@ LL + fn caller_by_ref(f: &unsafe extern "custom" fn(), mut x: i64) -> i64 { | error: invalid signature for `extern "custom"` function - --> $DIR/bad-custom.rs:126:40 + --> $DIR/bad-custom.rs:125:40 | LL | type Alias = unsafe extern "custom" fn(i64) -> i64; | ^^^ ^^^ @@ -384,7 +384,7 @@ LL + type Alias = unsafe extern "custom" fn(); | error: functions with the "custom" ABI cannot be `async` - --> $DIR/bad-custom.rs:140:1 + --> $DIR/bad-custom.rs:139:1 | LL | async unsafe extern "custom" fn no_async_fn() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -396,7 +396,7 @@ LL + unsafe extern "custom" fn no_async_fn() { | error: an `extern "custom"` function can only be declared externally or defined via naked functions - --> $DIR/bad-custom.rs:140:1 + --> $DIR/bad-custom.rs:139:1 | LL | async unsafe extern "custom" fn no_async_fn() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -408,7 +408,7 @@ LL | async unsafe extern "custom" fn no_async_fn() { | error: an `extern "custom"` function cannot be marked `#[cold]` - --> $DIR/bad-custom.rs:152:1 + --> $DIR/bad-custom.rs:151:1 | LL | #[cold] | ------- help: remove the `#[cold]` attribute @@ -419,7 +419,7 @@ LL | unsafe extern "custom" fn no_cold_attribute() { | `extern "custom"` because of this error[E0277]: expected an `Fn()` closure, found `unsafe extern "custom" fn()` - --> $DIR/bad-custom.rs:145:64 + --> $DIR/bad-custom.rs:144:64 | LL | fn no_promotion_to_fn_trait(f: unsafe extern "custom" fn()) -> impl Fn() { | ^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }` @@ -432,91 +432,91 @@ LL | f = note: unsafe function cannot be called generically without an unsafe block error: functions with the "custom" ABI cannot be called - --> $DIR/bad-custom.rs:116:14 + --> $DIR/bad-custom.rs:115:14 | LL | unsafe { f(x) } | ^^^^ | note: an `extern "custom"` function can only be called using inline assembly - --> $DIR/bad-custom.rs:116:14 + --> $DIR/bad-custom.rs:115:14 | LL | unsafe { f(x) } | ^^^^ error: functions with the "custom" ABI cannot be called - --> $DIR/bad-custom.rs:122:14 + --> $DIR/bad-custom.rs:121:14 | LL | unsafe { f(x) } | ^^^^ | note: an `extern "custom"` function can only be called using inline assembly - --> $DIR/bad-custom.rs:122:14 + --> $DIR/bad-custom.rs:121:14 | LL | unsafe { f(x) } | ^^^^ error: functions with the "custom" ABI cannot be called - --> $DIR/bad-custom.rs:130:14 + --> $DIR/bad-custom.rs:129:14 | LL | unsafe { f(x) } | ^^^^ | note: an `extern "custom"` function can only be called using inline assembly - --> $DIR/bad-custom.rs:130:14 + --> $DIR/bad-custom.rs:129:14 | LL | unsafe { f(x) } | ^^^^ error: functions with the "custom" ABI cannot be called - --> $DIR/bad-custom.rs:159:20 + --> $DIR/bad-custom.rs:158:20 | LL | assert_eq!(not_both(21), 42); | ^^^^^^^^^^^^ | note: an `extern "custom"` function can only be called using inline assembly - --> $DIR/bad-custom.rs:159:20 + --> $DIR/bad-custom.rs:158:20 | LL | assert_eq!(not_both(21), 42); | ^^^^^^^^^^^^ error: functions with the "custom" ABI cannot be called - --> $DIR/bad-custom.rs:162:29 + --> $DIR/bad-custom.rs:161:29 | LL | assert_eq!(unsafe { increment(41) }, 42); | ^^^^^^^^^^^^^ | note: an `extern "custom"` function can only be called using inline assembly - --> $DIR/bad-custom.rs:162:29 + --> $DIR/bad-custom.rs:161:29 | LL | assert_eq!(unsafe { increment(41) }, 42); | ^^^^^^^^^^^^^ error: functions with the "custom" ABI cannot be called - --> $DIR/bad-custom.rs:165:17 + --> $DIR/bad-custom.rs:164:17 | LL | assert!(Thing(41).is_even()); | ^^^^^^^^^^^^^^^^^^^ | note: an `extern "custom"` function can only be called using inline assembly - --> $DIR/bad-custom.rs:165:17 + --> $DIR/bad-custom.rs:164:17 | LL | assert!(Thing(41).is_even()); | ^^^^^^^^^^^^^^^^^^^ error: functions with the "custom" ABI cannot be called - --> $DIR/bad-custom.rs:168:20 + --> $DIR/bad-custom.rs:167:20 | LL | assert_eq!(Thing::bitwise_not(42), !42); | ^^^^^^^^^^^^^^^^^^^^^^ | note: an `extern "custom"` function can only be called using inline assembly - --> $DIR/bad-custom.rs:168:20 + --> $DIR/bad-custom.rs:167:20 | LL | assert_eq!(Thing::bitwise_not(42), !42); | ^^^^^^^^^^^^^^^^^^^^^^ error[E0015]: inline assembly is not allowed in constant functions - --> $DIR/bad-custom.rs:136:5 + --> $DIR/bad-custom.rs:135:5 | LL | std::arch::naked_asm!("") | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/custom.rs b/tests/ui/abi/custom.rs index dae3925f19916..fba4f2bc70844 100644 --- a/tests/ui/abi/custom.rs +++ b/tests/ui/abi/custom.rs @@ -3,7 +3,6 @@ // //@ run-pass //@ only-x86_64 -#![feature(abi_custom)] use std::arch::{asm, global_asm, naked_asm}; diff --git a/tests/ui/abi/unsupported.aarch64.stderr b/tests/ui/abi/unsupported.aarch64.stderr index f0768b8953c5b..ed9cde8658159 100644 --- a/tests/ui/abi/unsupported.aarch64.stderr +++ b/tests/ui/abi/unsupported.aarch64.stderr @@ -1,89 +1,89 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:53:8 + --> $DIR/unsupported.rs:52:8 | LL | extern "aapcs" fn aapcs() {} | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:55:24 + --> $DIR/unsupported.rs:54:24 | LL | fn aapcs_ptr(f: extern "aapcs" fn()) { | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:59:8 + --> $DIR/unsupported.rs:58:8 | LL | extern "aapcs" {} | ^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target - --> $DIR/unsupported.rs:68:8 + --> $DIR/unsupported.rs:67:8 | LL | extern "riscv-interrupt-m" {} | ^^^^^^^^^^^^^^^^^^^ error[E0570]: "x86-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:71:8 + --> $DIR/unsupported.rs:70:8 | LL | extern "x86-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:74:8 + --> $DIR/unsupported.rs:73:8 | LL | extern "thiscall" fn thiscall() {} | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:76:27 + --> $DIR/unsupported.rs:75:27 | LL | fn thiscall_ptr(f: extern "thiscall" fn()) { | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:80:8 + --> $DIR/unsupported.rs:79:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:83:8 + --> $DIR/unsupported.rs:82:8 | LL | extern "stdcall" fn stdcall() {} | ^^^^^^^^^ @@ -91,7 +91,7 @@ LL | extern "stdcall" fn stdcall() {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:87:26 + --> $DIR/unsupported.rs:86:26 | LL | fn stdcall_ptr(f: extern "stdcall" fn()) { | ^^^^^^^^^ @@ -99,7 +99,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:93:8 + --> $DIR/unsupported.rs:92:8 | LL | extern "stdcall" {} | ^^^^^^^^^ @@ -107,7 +107,7 @@ LL | extern "stdcall" {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:97:8 + --> $DIR/unsupported.rs:96:8 | LL | extern "stdcall-unwind" {} | ^^^^^^^^^^^^^^^^ @@ -115,49 +115,49 @@ LL | extern "stdcall-unwind" {} = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"` error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:117:8 + --> $DIR/unsupported.rs:116:8 | LL | extern "vectorcall" fn vectorcall() {} | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:119:29 + --> $DIR/unsupported.rs:118:29 | LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) { | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:123:8 + --> $DIR/unsupported.rs:122:8 | LL | extern "vectorcall" {} | ^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:105:17 + --> $DIR/unsupported.rs:104:17 | LL | fn cdecl_ptr(f: extern "cdecl" fn()) { | ^^^^^^^^^^^^^^^^^^^ @@ -168,7 +168,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:110:1 + --> $DIR/unsupported.rs:109:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -178,7 +178,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "cdecl-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:113:1 + --> $DIR/unsupported.rs:112:1 | LL | extern "cdecl-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -188,7 +188,7 @@ LL | extern "cdecl-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:102:1 + --> $DIR/unsupported.rs:101:1 | LL | extern "cdecl" fn cdecl() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/unsupported.arm.stderr b/tests/ui/abi/unsupported.arm.stderr index dc50397601690..63b27f428543e 100644 --- a/tests/ui/abi/unsupported.arm.stderr +++ b/tests/ui/abi/unsupported.arm.stderr @@ -1,71 +1,71 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target - --> $DIR/unsupported.rs:68:8 + --> $DIR/unsupported.rs:67:8 | LL | extern "riscv-interrupt-m" {} | ^^^^^^^^^^^^^^^^^^^ error[E0570]: "x86-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:71:8 + --> $DIR/unsupported.rs:70:8 | LL | extern "x86-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:74:8 + --> $DIR/unsupported.rs:73:8 | LL | extern "thiscall" fn thiscall() {} | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:76:27 + --> $DIR/unsupported.rs:75:27 | LL | fn thiscall_ptr(f: extern "thiscall" fn()) { | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:80:8 + --> $DIR/unsupported.rs:79:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:83:8 + --> $DIR/unsupported.rs:82:8 | LL | extern "stdcall" fn stdcall() {} | ^^^^^^^^^ @@ -73,7 +73,7 @@ LL | extern "stdcall" fn stdcall() {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:87:26 + --> $DIR/unsupported.rs:86:26 | LL | fn stdcall_ptr(f: extern "stdcall" fn()) { | ^^^^^^^^^ @@ -81,7 +81,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:93:8 + --> $DIR/unsupported.rs:92:8 | LL | extern "stdcall" {} | ^^^^^^^^^ @@ -89,7 +89,7 @@ LL | extern "stdcall" {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:97:8 + --> $DIR/unsupported.rs:96:8 | LL | extern "stdcall-unwind" {} | ^^^^^^^^^^^^^^^^ @@ -97,49 +97,49 @@ LL | extern "stdcall-unwind" {} = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"` error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:117:8 + --> $DIR/unsupported.rs:116:8 | LL | extern "vectorcall" fn vectorcall() {} | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:119:29 + --> $DIR/unsupported.rs:118:29 | LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) { | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:123:8 + --> $DIR/unsupported.rs:122:8 | LL | extern "vectorcall" {} | ^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:105:17 + --> $DIR/unsupported.rs:104:17 | LL | fn cdecl_ptr(f: extern "cdecl" fn()) { | ^^^^^^^^^^^^^^^^^^^ @@ -150,7 +150,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:110:1 + --> $DIR/unsupported.rs:109:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -160,7 +160,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "cdecl-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:113:1 + --> $DIR/unsupported.rs:112:1 | LL | extern "cdecl-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -170,7 +170,7 @@ LL | extern "cdecl-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:102:1 + --> $DIR/unsupported.rs:101:1 | LL | extern "cdecl" fn cdecl() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/unsupported.i686.stderr b/tests/ui/abi/unsupported.i686.stderr index 65a8e44d06b4b..11084099308c8 100644 --- a/tests/ui/abi/unsupported.i686.stderr +++ b/tests/ui/abi/unsupported.i686.stderr @@ -1,83 +1,83 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:53:8 + --> $DIR/unsupported.rs:52:8 | LL | extern "aapcs" fn aapcs() {} | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:55:24 + --> $DIR/unsupported.rs:54:24 | LL | fn aapcs_ptr(f: extern "aapcs" fn()) { | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:59:8 + --> $DIR/unsupported.rs:58:8 | LL | extern "aapcs" {} | ^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target - --> $DIR/unsupported.rs:68:8 + --> $DIR/unsupported.rs:67:8 | LL | extern "riscv-interrupt-m" {} | ^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/unsupported.riscv32.stderr b/tests/ui/abi/unsupported.riscv32.stderr index de7f5e436154e..584a7769fd4a2 100644 --- a/tests/ui/abi/unsupported.riscv32.stderr +++ b/tests/ui/abi/unsupported.riscv32.stderr @@ -1,83 +1,83 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:53:8 + --> $DIR/unsupported.rs:52:8 | LL | extern "aapcs" fn aapcs() {} | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:55:24 + --> $DIR/unsupported.rs:54:24 | LL | fn aapcs_ptr(f: extern "aapcs" fn()) { | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:59:8 + --> $DIR/unsupported.rs:58:8 | LL | extern "aapcs" {} | ^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "x86-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:71:8 + --> $DIR/unsupported.rs:70:8 | LL | extern "x86-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:74:8 + --> $DIR/unsupported.rs:73:8 | LL | extern "thiscall" fn thiscall() {} | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:76:27 + --> $DIR/unsupported.rs:75:27 | LL | fn thiscall_ptr(f: extern "thiscall" fn()) { | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:80:8 + --> $DIR/unsupported.rs:79:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:83:8 + --> $DIR/unsupported.rs:82:8 | LL | extern "stdcall" fn stdcall() {} | ^^^^^^^^^ @@ -85,7 +85,7 @@ LL | extern "stdcall" fn stdcall() {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:87:26 + --> $DIR/unsupported.rs:86:26 | LL | fn stdcall_ptr(f: extern "stdcall" fn()) { | ^^^^^^^^^ @@ -93,7 +93,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:93:8 + --> $DIR/unsupported.rs:92:8 | LL | extern "stdcall" {} | ^^^^^^^^^ @@ -101,7 +101,7 @@ LL | extern "stdcall" {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:97:8 + --> $DIR/unsupported.rs:96:8 | LL | extern "stdcall-unwind" {} | ^^^^^^^^^^^^^^^^ @@ -109,49 +109,49 @@ LL | extern "stdcall-unwind" {} = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"` error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:117:8 + --> $DIR/unsupported.rs:116:8 | LL | extern "vectorcall" fn vectorcall() {} | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:119:29 + --> $DIR/unsupported.rs:118:29 | LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) { | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:123:8 + --> $DIR/unsupported.rs:122:8 | LL | extern "vectorcall" {} | ^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:105:17 + --> $DIR/unsupported.rs:104:17 | LL | fn cdecl_ptr(f: extern "cdecl" fn()) { | ^^^^^^^^^^^^^^^^^^^ @@ -162,7 +162,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:110:1 + --> $DIR/unsupported.rs:109:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -172,7 +172,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "cdecl-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:113:1 + --> $DIR/unsupported.rs:112:1 | LL | extern "cdecl-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -182,7 +182,7 @@ LL | extern "cdecl-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:102:1 + --> $DIR/unsupported.rs:101:1 | LL | extern "cdecl" fn cdecl() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/unsupported.riscv64.stderr b/tests/ui/abi/unsupported.riscv64.stderr index de7f5e436154e..584a7769fd4a2 100644 --- a/tests/ui/abi/unsupported.riscv64.stderr +++ b/tests/ui/abi/unsupported.riscv64.stderr @@ -1,83 +1,83 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:53:8 + --> $DIR/unsupported.rs:52:8 | LL | extern "aapcs" fn aapcs() {} | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:55:24 + --> $DIR/unsupported.rs:54:24 | LL | fn aapcs_ptr(f: extern "aapcs" fn()) { | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:59:8 + --> $DIR/unsupported.rs:58:8 | LL | extern "aapcs" {} | ^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "x86-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:71:8 + --> $DIR/unsupported.rs:70:8 | LL | extern "x86-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:74:8 + --> $DIR/unsupported.rs:73:8 | LL | extern "thiscall" fn thiscall() {} | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:76:27 + --> $DIR/unsupported.rs:75:27 | LL | fn thiscall_ptr(f: extern "thiscall" fn()) { | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:80:8 + --> $DIR/unsupported.rs:79:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:83:8 + --> $DIR/unsupported.rs:82:8 | LL | extern "stdcall" fn stdcall() {} | ^^^^^^^^^ @@ -85,7 +85,7 @@ LL | extern "stdcall" fn stdcall() {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:87:26 + --> $DIR/unsupported.rs:86:26 | LL | fn stdcall_ptr(f: extern "stdcall" fn()) { | ^^^^^^^^^ @@ -93,7 +93,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:93:8 + --> $DIR/unsupported.rs:92:8 | LL | extern "stdcall" {} | ^^^^^^^^^ @@ -101,7 +101,7 @@ LL | extern "stdcall" {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:97:8 + --> $DIR/unsupported.rs:96:8 | LL | extern "stdcall-unwind" {} | ^^^^^^^^^^^^^^^^ @@ -109,49 +109,49 @@ LL | extern "stdcall-unwind" {} = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"` error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:117:8 + --> $DIR/unsupported.rs:116:8 | LL | extern "vectorcall" fn vectorcall() {} | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:119:29 + --> $DIR/unsupported.rs:118:29 | LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) { | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:123:8 + --> $DIR/unsupported.rs:122:8 | LL | extern "vectorcall" {} | ^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:105:17 + --> $DIR/unsupported.rs:104:17 | LL | fn cdecl_ptr(f: extern "cdecl" fn()) { | ^^^^^^^^^^^^^^^^^^^ @@ -162,7 +162,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:110:1 + --> $DIR/unsupported.rs:109:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -172,7 +172,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "cdecl-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:113:1 + --> $DIR/unsupported.rs:112:1 | LL | extern "cdecl-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -182,7 +182,7 @@ LL | extern "cdecl-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:102:1 + --> $DIR/unsupported.rs:101:1 | LL | extern "cdecl" fn cdecl() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/unsupported.rs b/tests/ui/abi/unsupported.rs index a0b9e14b912e5..4d67d1b4f6019 100644 --- a/tests/ui/abi/unsupported.rs +++ b/tests/ui/abi/unsupported.rs @@ -32,8 +32,7 @@ abi_riscv_interrupt, abi_cmse_nonsecure_call, abi_vectorcall, - cmse_nonsecure_entry, - abi_custom + cmse_nonsecure_entry )] extern crate minicore; diff --git a/tests/ui/abi/unsupported.wasm32.stderr b/tests/ui/abi/unsupported.wasm32.stderr index 826658ba7de87..ff38ef8cfbf88 100644 --- a/tests/ui/abi/unsupported.wasm32.stderr +++ b/tests/ui/abi/unsupported.wasm32.stderr @@ -1,89 +1,89 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:53:8 + --> $DIR/unsupported.rs:52:8 | LL | extern "aapcs" fn aapcs() {} | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:55:24 + --> $DIR/unsupported.rs:54:24 | LL | fn aapcs_ptr(f: extern "aapcs" fn()) { | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:59:8 + --> $DIR/unsupported.rs:58:8 | LL | extern "aapcs" {} | ^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target - --> $DIR/unsupported.rs:68:8 + --> $DIR/unsupported.rs:67:8 | LL | extern "riscv-interrupt-m" {} | ^^^^^^^^^^^^^^^^^^^ error[E0570]: "x86-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:71:8 + --> $DIR/unsupported.rs:70:8 | LL | extern "x86-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:74:8 + --> $DIR/unsupported.rs:73:8 | LL | extern "thiscall" fn thiscall() {} | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:76:27 + --> $DIR/unsupported.rs:75:27 | LL | fn thiscall_ptr(f: extern "thiscall" fn()) { | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:80:8 + --> $DIR/unsupported.rs:79:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:83:8 + --> $DIR/unsupported.rs:82:8 | LL | extern "stdcall" fn stdcall() {} | ^^^^^^^^^ @@ -91,7 +91,7 @@ LL | extern "stdcall" fn stdcall() {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:87:26 + --> $DIR/unsupported.rs:86:26 | LL | fn stdcall_ptr(f: extern "stdcall" fn()) { | ^^^^^^^^^ @@ -99,7 +99,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:93:8 + --> $DIR/unsupported.rs:92:8 | LL | extern "stdcall" {} | ^^^^^^^^^ @@ -107,7 +107,7 @@ LL | extern "stdcall" {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:97:8 + --> $DIR/unsupported.rs:96:8 | LL | extern "stdcall-unwind" {} | ^^^^^^^^^^^^^^^^ @@ -115,61 +115,61 @@ LL | extern "stdcall-unwind" {} = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"` error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:117:8 + --> $DIR/unsupported.rs:116:8 | LL | extern "vectorcall" fn vectorcall() {} | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:119:29 + --> $DIR/unsupported.rs:118:29 | LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) { | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:123:8 + --> $DIR/unsupported.rs:122:8 | LL | extern "vectorcall" {} | ^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "custom" is not a supported ABI for the current target - --> $DIR/unsupported.rs:146:32 + --> $DIR/unsupported.rs:145:32 | LL | fn custom_ptr(f: unsafe extern "custom" fn()) { | ^^^^^^^^ error[E0570]: "custom" is not a supported ABI for the current target - --> $DIR/unsupported.rs:150:8 + --> $DIR/unsupported.rs:149:8 | LL | extern "custom" {} | ^^^^^^^^ warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:105:17 + --> $DIR/unsupported.rs:104:17 | LL | fn cdecl_ptr(f: extern "cdecl" fn()) { | ^^^^^^^^^^^^^^^^^^^ @@ -180,7 +180,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:110:1 + --> $DIR/unsupported.rs:109:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -190,7 +190,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "cdecl-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:113:1 + --> $DIR/unsupported.rs:112:1 | LL | extern "cdecl-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,7 +200,7 @@ LL | extern "cdecl-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:102:1 + --> $DIR/unsupported.rs:101:1 | LL | extern "cdecl" fn cdecl() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/unsupported.wasm64.stderr b/tests/ui/abi/unsupported.wasm64.stderr index 826658ba7de87..ff38ef8cfbf88 100644 --- a/tests/ui/abi/unsupported.wasm64.stderr +++ b/tests/ui/abi/unsupported.wasm64.stderr @@ -1,89 +1,89 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:53:8 + --> $DIR/unsupported.rs:52:8 | LL | extern "aapcs" fn aapcs() {} | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:55:24 + --> $DIR/unsupported.rs:54:24 | LL | fn aapcs_ptr(f: extern "aapcs" fn()) { | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:59:8 + --> $DIR/unsupported.rs:58:8 | LL | extern "aapcs" {} | ^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target - --> $DIR/unsupported.rs:68:8 + --> $DIR/unsupported.rs:67:8 | LL | extern "riscv-interrupt-m" {} | ^^^^^^^^^^^^^^^^^^^ error[E0570]: "x86-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:71:8 + --> $DIR/unsupported.rs:70:8 | LL | extern "x86-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:74:8 + --> $DIR/unsupported.rs:73:8 | LL | extern "thiscall" fn thiscall() {} | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:76:27 + --> $DIR/unsupported.rs:75:27 | LL | fn thiscall_ptr(f: extern "thiscall" fn()) { | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:80:8 + --> $DIR/unsupported.rs:79:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:83:8 + --> $DIR/unsupported.rs:82:8 | LL | extern "stdcall" fn stdcall() {} | ^^^^^^^^^ @@ -91,7 +91,7 @@ LL | extern "stdcall" fn stdcall() {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:87:26 + --> $DIR/unsupported.rs:86:26 | LL | fn stdcall_ptr(f: extern "stdcall" fn()) { | ^^^^^^^^^ @@ -99,7 +99,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:93:8 + --> $DIR/unsupported.rs:92:8 | LL | extern "stdcall" {} | ^^^^^^^^^ @@ -107,7 +107,7 @@ LL | extern "stdcall" {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:97:8 + --> $DIR/unsupported.rs:96:8 | LL | extern "stdcall-unwind" {} | ^^^^^^^^^^^^^^^^ @@ -115,61 +115,61 @@ LL | extern "stdcall-unwind" {} = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"` error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:117:8 + --> $DIR/unsupported.rs:116:8 | LL | extern "vectorcall" fn vectorcall() {} | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:119:29 + --> $DIR/unsupported.rs:118:29 | LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) { | ^^^^^^^^^^^^ error[E0570]: "vectorcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:123:8 + --> $DIR/unsupported.rs:122:8 | LL | extern "vectorcall" {} | ^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "custom" is not a supported ABI for the current target - --> $DIR/unsupported.rs:146:32 + --> $DIR/unsupported.rs:145:32 | LL | fn custom_ptr(f: unsafe extern "custom" fn()) { | ^^^^^^^^ error[E0570]: "custom" is not a supported ABI for the current target - --> $DIR/unsupported.rs:150:8 + --> $DIR/unsupported.rs:149:8 | LL | extern "custom" {} | ^^^^^^^^ warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:105:17 + --> $DIR/unsupported.rs:104:17 | LL | fn cdecl_ptr(f: extern "cdecl" fn()) { | ^^^^^^^^^^^^^^^^^^^ @@ -180,7 +180,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:110:1 + --> $DIR/unsupported.rs:109:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -190,7 +190,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "cdecl-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:113:1 + --> $DIR/unsupported.rs:112:1 | LL | extern "cdecl-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,7 +200,7 @@ LL | extern "cdecl-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:102:1 + --> $DIR/unsupported.rs:101:1 | LL | extern "cdecl" fn cdecl() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/unsupported.x64.stderr b/tests/ui/abi/unsupported.x64.stderr index a1233e2c13cf3..a664651a80867 100644 --- a/tests/ui/abi/unsupported.x64.stderr +++ b/tests/ui/abi/unsupported.x64.stderr @@ -1,83 +1,83 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:53:8 + --> $DIR/unsupported.rs:52:8 | LL | extern "aapcs" fn aapcs() {} | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:55:24 + --> $DIR/unsupported.rs:54:24 | LL | fn aapcs_ptr(f: extern "aapcs" fn()) { | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:59:8 + --> $DIR/unsupported.rs:58:8 | LL | extern "aapcs" {} | ^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target - --> $DIR/unsupported.rs:68:8 + --> $DIR/unsupported.rs:67:8 | LL | extern "riscv-interrupt-m" {} | ^^^^^^^^^^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:74:8 + --> $DIR/unsupported.rs:73:8 | LL | extern "thiscall" fn thiscall() {} | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:76:27 + --> $DIR/unsupported.rs:75:27 | LL | fn thiscall_ptr(f: extern "thiscall" fn()) { | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:80:8 + --> $DIR/unsupported.rs:79:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:83:8 + --> $DIR/unsupported.rs:82:8 | LL | extern "stdcall" fn stdcall() {} | ^^^^^^^^^ @@ -85,7 +85,7 @@ LL | extern "stdcall" fn stdcall() {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:87:26 + --> $DIR/unsupported.rs:86:26 | LL | fn stdcall_ptr(f: extern "stdcall" fn()) { | ^^^^^^^^^ @@ -93,7 +93,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:93:8 + --> $DIR/unsupported.rs:92:8 | LL | extern "stdcall" {} | ^^^^^^^^^ @@ -101,7 +101,7 @@ LL | extern "stdcall" {} = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` error[E0570]: "stdcall-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:97:8 + --> $DIR/unsupported.rs:96:8 | LL | extern "stdcall-unwind" {} | ^^^^^^^^^^^^^^^^ @@ -109,31 +109,31 @@ LL | extern "stdcall-unwind" {} = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"` error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:105:17 + --> $DIR/unsupported.rs:104:17 | LL | fn cdecl_ptr(f: extern "cdecl" fn()) { | ^^^^^^^^^^^^^^^^^^^ @@ -144,7 +144,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:110:1 + --> $DIR/unsupported.rs:109:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -154,7 +154,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "cdecl-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:113:1 + --> $DIR/unsupported.rs:112:1 | LL | extern "cdecl-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -164,7 +164,7 @@ LL | extern "cdecl-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:102:1 + --> $DIR/unsupported.rs:101:1 | LL | extern "cdecl" fn cdecl() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/unsupported.x64_win.stderr b/tests/ui/abi/unsupported.x64_win.stderr index a011fcf4a06fb..5a6d2f148d470 100644 --- a/tests/ui/abi/unsupported.x64_win.stderr +++ b/tests/ui/abi/unsupported.x64_win.stderr @@ -1,107 +1,107 @@ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:42:8 + --> $DIR/unsupported.rs:41:8 | LL | extern "ptx-kernel" fn ptx() {} | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:44:22 + --> $DIR/unsupported.rs:43:22 | LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) { | ^^^^^^^^^^^^ error[E0570]: "ptx-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:48:8 + --> $DIR/unsupported.rs:47:8 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^ error[E0570]: "gpu-kernel" is not a supported ABI for the current target - --> $DIR/unsupported.rs:50:8 + --> $DIR/unsupported.rs:49:8 | LL | extern "gpu-kernel" fn gpu() {} | ^^^^^^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:53:8 + --> $DIR/unsupported.rs:52:8 | LL | extern "aapcs" fn aapcs() {} | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:55:24 + --> $DIR/unsupported.rs:54:24 | LL | fn aapcs_ptr(f: extern "aapcs" fn()) { | ^^^^^^^ error[E0570]: "aapcs" is not a supported ABI for the current target - --> $DIR/unsupported.rs:59:8 + --> $DIR/unsupported.rs:58:8 | LL | extern "aapcs" {} | ^^^^^^^ error[E0570]: "msp430-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:62:8 + --> $DIR/unsupported.rs:61:8 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^ error[E0570]: "avr-interrupt" is not a supported ABI for the current target - --> $DIR/unsupported.rs:65:8 + --> $DIR/unsupported.rs:64:8 | LL | extern "avr-interrupt" {} | ^^^^^^^^^^^^^^^ error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target - --> $DIR/unsupported.rs:68:8 + --> $DIR/unsupported.rs:67:8 | LL | extern "riscv-interrupt-m" {} | ^^^^^^^^^^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:74:8 + --> $DIR/unsupported.rs:73:8 | LL | extern "thiscall" fn thiscall() {} | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:76:27 + --> $DIR/unsupported.rs:75:27 | LL | fn thiscall_ptr(f: extern "thiscall" fn()) { | ^^^^^^^^^^ error[E0570]: "thiscall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:80:8 + --> $DIR/unsupported.rs:79:8 | LL | extern "thiscall" {} | ^^^^^^^^^^ error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target - --> $DIR/unsupported.rs:126:28 + --> $DIR/unsupported.rs:125:28 | LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:131:8 + --> $DIR/unsupported.rs:130:8 | LL | extern "cmse-nonsecure-entry" fn cmse_entry() {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:133:29 + --> $DIR/unsupported.rs:132:29 | LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) { | ^^^^^^^^^^^^^^^^^^^^^^ error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target - --> $DIR/unsupported.rs:137:8 + --> $DIR/unsupported.rs:136:8 | LL | extern "cmse-nonsecure-entry" {} | ^^^^^^^^^^^^^^^^^^^^^^ warning: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:87:19 + --> $DIR/unsupported.rs:86:19 | LL | fn stdcall_ptr(f: extern "stdcall" fn()) { | ^^^^^^^^^^^^^^^^^^^^^ @@ -112,7 +112,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:93:1 + --> $DIR/unsupported.rs:92:1 | LL | extern "stdcall" {} | ^^^^^^^^^^^^^^^^^^^ @@ -122,7 +122,7 @@ LL | extern "stdcall" {} = note: for more information, see issue #137018 warning: "stdcall-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:97:1 + --> $DIR/unsupported.rs:96:1 | LL | extern "stdcall-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -132,7 +132,7 @@ LL | extern "stdcall-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:105:17 + --> $DIR/unsupported.rs:104:17 | LL | fn cdecl_ptr(f: extern "cdecl" fn()) { | ^^^^^^^^^^^^^^^^^^^ @@ -142,7 +142,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:110:1 + --> $DIR/unsupported.rs:109:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -152,7 +152,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "cdecl-unwind" is not a supported ABI for the current target - --> $DIR/unsupported.rs:113:1 + --> $DIR/unsupported.rs:112:1 | LL | extern "cdecl-unwind" {} | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -162,7 +162,7 @@ LL | extern "cdecl-unwind" {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:142:1 + --> $DIR/unsupported.rs:141:1 | LL | extern "cdecl" {} | ^^^^^^^^^^^^^^^^^ @@ -172,7 +172,7 @@ LL | extern "cdecl" {} = note: for more information, see issue #137018 warning: "stdcall" is not a supported ABI for the current target - --> $DIR/unsupported.rs:83:1 + --> $DIR/unsupported.rs:82:1 | LL | extern "stdcall" fn stdcall() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -182,7 +182,7 @@ LL | extern "stdcall" fn stdcall() {} = note: for more information, see issue #137018 warning: "cdecl" is not a supported ABI for the current target - --> $DIR/unsupported.rs:102:1 + --> $DIR/unsupported.rs:101:1 | LL | extern "cdecl" fn cdecl() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/asm/naked-functions/naked-functions.rs b/tests/ui/asm/naked-functions/naked-functions.rs index a6ed7d69a0866..d994b1151514a 100644 --- a/tests/ui/asm/naked-functions/naked-functions.rs +++ b/tests/ui/asm/naked-functions/naked-functions.rs @@ -3,7 +3,7 @@ //@ ignore-spirv //@ reference: attributes.codegen.naked.body -#![feature(asm_unwind, linkage, rustc_attrs, cfg_target_object_format, abi_custom)] +#![feature(asm_unwind, linkage, rustc_attrs, cfg_target_object_format)] #![crate_type = "lib"] use std::arch::{asm, naked_asm}; diff --git a/tests/ui/feature-gates/feature-gate-abi-custom.rs b/tests/ui/feature-gates/feature-gate-abi-custom.rs deleted file mode 100644 index f5e3c8e28b47c..0000000000000 --- a/tests/ui/feature-gates/feature-gate-abi-custom.rs +++ /dev/null @@ -1,51 +0,0 @@ -//@ add-minicore -//@ needs-asm-support -#![no_core] -#![feature(no_core, lang_items)] -#![crate_type = "rlib"] - -extern crate minicore; -use minicore::*; - -#[unsafe(naked)] -unsafe extern "custom" fn f7() { - //~^ ERROR "custom" ABI is experimental - naked_asm!("") -} -trait Tr { - extern "custom" fn m7(); - //~^ ERROR "custom" ABI is experimental - //~| ERROR functions with the "custom" ABI must be unsafe - #[unsafe(naked)] - extern "custom" fn dm7() { - //~^ ERROR "custom" ABI is experimental - //~| ERROR functions with the "custom" ABI must be unsafe - naked_asm!("") - } -} - -struct S; - -// Methods in trait impl -impl Tr for S { - #[unsafe(naked)] - extern "custom" fn m7() { - //~^ ERROR "custom" ABI is experimental - //~| ERROR functions with the "custom" ABI must be unsafe - naked_asm!("") - } -} - -// Methods in inherent impl -impl S { - #[unsafe(naked)] - extern "custom" fn im7() { - //~^ ERROR "custom" ABI is experimental - //~| ERROR functions with the "custom" ABI must be unsafe - naked_asm!("") - } -} - -type A7 = unsafe extern "custom" fn(); //~ ERROR "custom" ABI is experimental - -extern "custom" {} //~ ERROR "custom" ABI is experimental diff --git a/tests/ui/feature-gates/feature-gate-abi-custom.stderr b/tests/ui/feature-gates/feature-gate-abi-custom.stderr deleted file mode 100644 index cee258d843b8e..0000000000000 --- a/tests/ui/feature-gates/feature-gate-abi-custom.stderr +++ /dev/null @@ -1,117 +0,0 @@ -error: functions with the "custom" ABI must be unsafe - --> $DIR/feature-gate-abi-custom.rs:16:5 - | -LL | extern "custom" fn m7(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | -help: add the `unsafe` keyword to this definition - | -LL | unsafe extern "custom" fn m7(); - | ++++++ - -error: functions with the "custom" ABI must be unsafe - --> $DIR/feature-gate-abi-custom.rs:20:5 - | -LL | extern "custom" fn dm7() { - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | -help: add the `unsafe` keyword to this definition - | -LL | unsafe extern "custom" fn dm7() { - | ++++++ - -error: functions with the "custom" ABI must be unsafe - --> $DIR/feature-gate-abi-custom.rs:32:5 - | -LL | extern "custom" fn m7() { - | ^^^^^^^^^^^^^^^^^^^^^^^ - | -help: add the `unsafe` keyword to this definition - | -LL | unsafe extern "custom" fn m7() { - | ++++++ - -error: functions with the "custom" ABI must be unsafe - --> $DIR/feature-gate-abi-custom.rs:42:5 - | -LL | extern "custom" fn im7() { - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | -help: add the `unsafe` keyword to this definition - | -LL | unsafe extern "custom" fn im7() { - | ++++++ - -error[E0658]: the extern "custom" ABI is experimental and subject to change - --> $DIR/feature-gate-abi-custom.rs:11:15 - | -LL | unsafe extern "custom" fn f7() { - | ^^^^^^^^ - | - = note: see issue #140829 for more information - = help: add `#![feature(abi_custom)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: the extern "custom" ABI is experimental and subject to change - --> $DIR/feature-gate-abi-custom.rs:16:12 - | -LL | extern "custom" fn m7(); - | ^^^^^^^^ - | - = note: see issue #140829 for more information - = help: add `#![feature(abi_custom)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: the extern "custom" ABI is experimental and subject to change - --> $DIR/feature-gate-abi-custom.rs:20:12 - | -LL | extern "custom" fn dm7() { - | ^^^^^^^^ - | - = note: see issue #140829 for more information - = help: add `#![feature(abi_custom)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: the extern "custom" ABI is experimental and subject to change - --> $DIR/feature-gate-abi-custom.rs:32:12 - | -LL | extern "custom" fn m7() { - | ^^^^^^^^ - | - = note: see issue #140829 for more information - = help: add `#![feature(abi_custom)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: the extern "custom" ABI is experimental and subject to change - --> $DIR/feature-gate-abi-custom.rs:42:12 - | -LL | extern "custom" fn im7() { - | ^^^^^^^^ - | - = note: see issue #140829 for more information - = help: add `#![feature(abi_custom)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: the extern "custom" ABI is experimental and subject to change - --> $DIR/feature-gate-abi-custom.rs:49:25 - | -LL | type A7 = unsafe extern "custom" fn(); - | ^^^^^^^^ - | - = note: see issue #140829 for more information - = help: add `#![feature(abi_custom)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: the extern "custom" ABI is experimental and subject to change - --> $DIR/feature-gate-abi-custom.rs:51:8 - | -LL | extern "custom" {} - | ^^^^^^^^ - | - = note: see issue #140829 for more information - = help: add `#![feature(abi_custom)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: aborting due to 11 previous errors - -For more information about this error, try `rustc --explain E0658`.