diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs index 8e9f24e0feb82..cff90e454c0ca 100644 --- a/compiler/rustc_abi/src/lib.rs +++ b/compiler/rustc_abi/src/lib.rs @@ -1778,12 +1778,12 @@ impl NumScalableVectors { NumScalableVectors(1) } - // Returns `NumScalableVectors` for values of two through eight, which are a valid number of - // fields for a tuple of scalable vectors to have. `1` is a valid value of `NumScalableVectors` - // but not for a tuple which would have a field count. + /// Returns `NumScalableVectors` for values of two through eight, which are a valid number of + /// fields for a tuple of scalable vectors to have. `1` is a valid value of `NumScalableVectors` + /// but not for a tuple which would have a field count. pub fn from_field_count(count: usize) -> Option { match count { - 2..8 => Some(NumScalableVectors(count as u8)), + 2..=8 => Some(NumScalableVectors(count as u8)), _ => None, } } diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index a6e88f21ba74f..88816587ae3b4 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -25,7 +25,6 @@ use rustc_abi::{CVariadicStatus, CanonAbi, ExternAbi, InterruptKind}; use rustc_ast::visit::{AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor, walk_list}; use rustc_ast::*; use rustc_ast_pretty::pprust::{self, State}; -use rustc_attr_parsing::validate_attr; use rustc_data_structures::fx::FxIndexMap; use rustc_errors::{DiagCtxtHandle, Diagnostic, LintBuffer}; use rustc_feature::Features; @@ -1402,10 +1401,6 @@ fn validate_generic_param_order(dcx: DiagCtxtHandle<'_>, generics: &[GenericPara } impl Visitor<'_> for AstValidator<'_> { - fn visit_attribute(&mut self, attr: &Attribute) { - validate_attr::check_attr(&self.sess.psess, attr); - } - fn visit_ty(&mut self, ty: &Ty) { self.visit_ty_common(ty); self.walk_ty(ty) diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 862d4736ca33c..89105722f6c8e 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -241,12 +241,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { // Function pointers cannot be `const` self.check_late_bound_lifetime_defs(&fn_ptr_ty.generic_params); } - ast::TyKind::Pat(..) => { - gate!(self, pattern_types, ty.span, "pattern types are unstable"); - } - ast::TyKind::View(..) => { - gate!(self, view_types, ty.span, "view types are unstable"); - } _ => {} } visit::walk_ty(self, ty) @@ -469,7 +463,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { gate_all!(unnamed_enum_variants, "unnamed enum variants are experimental"); gate_all!(unsafe_binders, "unsafe binder types are experimental"); gate_all!(unsafe_fields, "`unsafe` fields are experimental"); - gate_all!(view_types, "view types are experimental"); gate_all!(where_clause_attrs, "attributes in `where` clause are unstable"); gate_all!(yeet_expr, "`do yeet` expression is experimental"); // tidy-alphabetical-end diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs index a5dbaf81376c1..36096cb09eb1b 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state.rs @@ -1437,9 +1437,12 @@ impl<'a> State<'a> { self.word("..."); } ast::TyKind::Pat(ty, pat) => { + self.word("k#pattern_type"); + self.popen(); self.print_type(ty); self.word(" is "); self.print_ty_pat(pat); + self.pclose(); } ast::TyKind::FieldOf(ty, variant, field) => { self.word("k#field_of"); @@ -1459,8 +1462,11 @@ impl<'a> State<'a> { self.pclose(); } ast::TyKind::View(ty, fields) => { + self.word("k#view_type"); + self.popen(); self.print_type(ty); self.print_view(fields); + self.pclose(); } ast::TyKind::GcaMacro(expr) => { self.word_nbsp("core::gca!"); diff --git a/compiler/rustc_ast_pretty/src/pprust/tests.rs b/compiler/rustc_ast_pretty/src/pprust/tests.rs index 43bb68216d929..1a5a518ee41e0 100644 --- a/compiler/rustc_ast_pretty/src/pprust/tests.rs +++ b/compiler/rustc_ast_pretty/src/pprust/tests.rs @@ -80,6 +80,6 @@ fn test_field_view() { }; let ty_str = ty_to_string(&ty); - assert_eq!(ty_str, "(/*DUMMY*/).{ milhouse, apu }"); + assert_eq!(ty_str, "k#view_type((/*DUMMY*/).{ milhouse, apu })"); }); } diff --git a/compiler/rustc_attr_parsing/src/interface.rs b/compiler/rustc_attr_parsing/src/interface.rs index a4cf7b9342dd5..9bd489a5aea8f 100644 --- a/compiler/rustc_attr_parsing/src/interface.rs +++ b/compiler/rustc_attr_parsing/src/interface.rs @@ -23,6 +23,7 @@ use crate::diagnostics::ParsedDescription; use crate::generated::GeneratedAttrState; use crate::parser::{AllowExprMetavar, ArgParser, PathParser, RefPathParser}; use crate::synthetic::SyntheticAttrState; +use crate::validate_attr::parse_meta; use crate::{AttributeTemplate, ShouldEmit, diagnostics}; pub struct EmitAttribute( @@ -359,7 +360,8 @@ impl<'sess> AttributeParser<'sess> { n.item.path.segments.iter().map(|seg| seg.ident.name).collect::>(); let inner_span = lower_span(n.item.span); - if let Some(accept) = ATTRIBUTE_PARSERS.accepters.get(parts.as_slice()) { + let accepter = ATTRIBUTE_PARSERS.accepters.get(parts.as_slice()); + if let Some(accept) = accepter { self.check_attribute_safety( &attr_path, inner_span, @@ -492,6 +494,18 @@ impl<'sess> AttributeParser<'sess> { attributes.push(attr); }; + + if accepter.is_none() + && let rustc_ast::AttrArgs::Eq { .. } = n.item.args + { + // All key-value attributes are restricted to meta-item syntax. + match parse_meta(&self.sess.psess, &attr) { + Ok(_) => {} + Err(err) => { + err.emit(); + } + } + } } } } diff --git a/compiler/rustc_attr_parsing/src/validate_attr.rs b/compiler/rustc_attr_parsing/src/validate_attr.rs index 74cc6690d54cf..44a8ef8ddb446 100644 --- a/compiler/rustc_attr_parsing/src/validate_attr.rs +++ b/compiler/rustc_attr_parsing/src/validate_attr.rs @@ -1,72 +1,22 @@ //! Meta-syntax validation logic of attributes for post-expansion. use std::convert::identity; -use std::slice; use rustc_ast::SyntheticAttr::CfgAttrTrace; use rustc_ast::token::Delimiter; use rustc_ast::tokenstream::DelimSpan; use rustc_ast::{ - self as ast, AttrArgs, AttrKind, Attribute, DelimArgs, MetaItem, MetaItemInner, MetaItemKind, - Safety, + self as ast, AttrArgs, Attribute, DelimArgs, MetaItem, MetaItemInner, MetaItemKind, Safety, }; use rustc_attr_ir::AttrPath; use rustc_errors::{Applicability, Diagnostic, PResult}; -use rustc_feature::BUILTIN_ATTRIBUTE_SET; use rustc_lint_defs::builtin::ILL_FORMED_ATTRIBUTE_INPUT; use rustc_parse::parse_in; use rustc_session::diagnostics::report_lit_error; use rustc_session::parse::ParseSess; use rustc_span::{Span, Symbol, sym}; -use crate::{AttributeParser, AttributeTemplate, diagnostics as errors, template}; - -pub fn check_attr(psess: &ParseSess, attr: &Attribute) { - use ast::SyntheticAttr::*; - match &attr.kind { - AttrKind::Normal(_) => {} - AttrKind::Synthetic(CfgTrace(_) | CfgAttrTrace(_)) - | AttrKind::DocComment(..) - | AttrKind::Generated(..) => return, - } - - let builtin_attr_info = attr.name().and_then(|name| BUILTIN_ATTRIBUTE_SET.get(&name)); - - // Check input tokens for built-in and key-value attributes. - if let Some(name) = builtin_attr_info { - if AttributeParser::is_parsed_attribute(slice::from_ref(name)) { - return; - } - match parse_meta(psess, attr) { - // Don't check safety again, we just did that - Ok(meta) => { - // FIXME The only unparsed builtin attributes that are left are the lint attributes, so we can hardcode the template here - let lint_attrs = [sym::forbid, sym::allow, sym::warn, sym::deny, sym::expect]; - assert!(lint_attrs.contains(name)); - - let template = template!( - List: &["lint1", "lint1, lint2, ...", r#"lint1, lint2, lint3, reason = "...""#], - "https://doc.rust-lang.org/reference/attributes/diagnostics.html#lint-check-attributes" - ); - check_builtin_meta_item(psess, &meta, attr.style, *name, template, false) - } - Err(err) => { - err.emit(); - } - } - } else { - let attr_item = attr.get_normal_item(); - if let AttrArgs::Eq { .. } = attr_item.args { - // All key-value attributes are restricted to meta-item syntax. - match parse_meta(psess, attr) { - Ok(_) => {} - Err(err) => { - err.emit(); - } - } - } - } -} +use crate::{AttributeTemplate, diagnostics as errors}; pub fn parse_meta<'a>(psess: &'a ParseSess, attr: &Attribute) -> PResult<'a, MetaItem> { let item = attr.get_normal_item(); diff --git a/compiler/rustc_builtin_macros/src/lib.rs b/compiler/rustc_builtin_macros/src/lib.rs index f1e7846f54f9b..b2089f9b4567a 100644 --- a/compiler/rustc_builtin_macros/src/lib.rs +++ b/compiler/rustc_builtin_macros/src/lib.rs @@ -45,13 +45,11 @@ mod global_allocator; mod iter; mod log_syntax; mod offload; -mod pattern_type; mod rustdoc_skip_body; mod source_util; mod test; mod test_binder_constraints; mod trace_macros; -mod view_type; pub mod asm; pub mod cmdline_attrs; @@ -100,13 +98,11 @@ pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand) { module_path: source_util::expand_mod, naked_asm: asm::expand_naked_asm, option_env: env::expand_option_env, - pattern_type: pattern_type::expand, std_panic: edition_panic::expand_panic, stringify: source_util::expand_stringify, test_binder_constraints: test_binder_constraints::expand, trace_macros: trace_macros::expand_trace_macros, unreachable: edition_panic::expand_unreachable, - view_type: view_type::expand, // tidy-alphabetical-end } diff --git a/compiler/rustc_builtin_macros/src/pattern_type.rs b/compiler/rustc_builtin_macros/src/pattern_type.rs deleted file mode 100644 index 4d34ba963e4e8..0000000000000 --- a/compiler/rustc_builtin_macros/src/pattern_type.rs +++ /dev/null @@ -1,75 +0,0 @@ -use rustc_ast::tokenstream::TokenStream; -use rustc_ast::{AnonConst, DUMMY_NODE_ID, Ty, TyPat, TyPatKind, ast, token}; -use rustc_errors::PResult; -use rustc_expand::base::{self, DummyResult, ExpandResult, ExtCtxt, MacroExpanderResult}; -use rustc_parse::exp; -use rustc_parse::parser::{CommaRecoveryMode, RecoverColon, RecoverComma}; -use rustc_span::Span; - -pub(crate) fn expand<'cx>( - cx: &'cx mut ExtCtxt<'_>, - sp: Span, - tts: TokenStream, -) -> MacroExpanderResult<'cx> { - let (ty, pat) = match parse_pat_ty(cx, tts) { - Ok(parsed) => parsed, - Err(err) => { - return ExpandResult::Ready(DummyResult::any(sp, err.emit_err())); - } - }; - - ExpandResult::Ready(base::MacEager::ty(cx.ty(sp, ast::TyKind::Pat(ty, pat)))) -} - -fn parse_pat_ty<'a>( - cx: &mut ExtCtxt<'a>, - stream: TokenStream, -) -> PResult<'a, (Box, Box)> { - let mut parser = cx.new_parser_from_tts(stream); - - let ty = parser.parse_ty()?; - parser.expect_keyword(exp!(Is))?; - - let start = parser.token.span; - let pat = if parser.eat(exp!(Bang)) { - parser.expect_keyword(exp!(Null))?; - ty_pat(TyPatKind::NotNull, start.to(parser.token.span)) - } else { - pat_to_ty_pat( - cx, - parser.parse_pat_no_top_guard( - None, - RecoverComma::No, - RecoverColon::No, - CommaRecoveryMode::EitherTupleOrPipe, - )?, - ) - }; - - if parser.token != token::Eof { - parser.unexpected()?; - } - - Ok((ty, Box::new(pat))) -} - -fn ty_pat(kind: TyPatKind, span: Span) -> TyPat { - TyPat { id: DUMMY_NODE_ID, kind, span } -} - -fn pat_to_ty_pat(cx: &mut ExtCtxt<'_>, pat: ast::Pat) -> TyPat { - let kind = match pat.kind { - ast::PatKind::Range(start, end, include_end) => TyPatKind::Range( - start.map(|value| Box::new(AnonConst { id: DUMMY_NODE_ID, value })), - end.map(|value| Box::new(AnonConst { id: DUMMY_NODE_ID, value })), - include_end, - ), - ast::PatKind::Or(variants) => { - TyPatKind::Or(variants.into_iter().map(|pat| pat_to_ty_pat(cx, pat)).collect()) - } - ast::PatKind::Err(guar) => TyPatKind::Err(guar), - ast::PatKind::Paren(p) => pat_to_ty_pat(cx, *p).kind, - _ => TyPatKind::Err(cx.dcx().span_err(pat.span, "pattern not supported in pattern types")), - }; - ty_pat(kind, pat.span) -} diff --git a/compiler/rustc_builtin_macros/src/view_type.rs b/compiler/rustc_builtin_macros/src/view_type.rs deleted file mode 100644 index 69bd8f2727fc3..0000000000000 --- a/compiler/rustc_builtin_macros/src/view_type.rs +++ /dev/null @@ -1,47 +0,0 @@ -use rustc_ast::token::TokenKind; -use rustc_ast::tokenstream::TokenStream; -use rustc_ast::{Ty, ast}; -use rustc_errors::PResult; -use rustc_expand::base::{self, DummyResult, ExpandResult, ExtCtxt, MacroExpanderResult}; -use rustc_parse::parser::{ExpTokenPair, TokenType}; -use rustc_span::{Ident, Span}; -use thin_vec::ThinVec; - -pub(crate) fn expand<'cx>( - cx: &'cx mut ExtCtxt<'_>, - sp: Span, - tts: TokenStream, -) -> MacroExpanderResult<'cx> { - let (ty, pat) = match parse_view_ty(cx, tts) { - Ok(parsed) => parsed, - Err(err) => { - return ExpandResult::Ready(DummyResult::any(sp, err.emit_err())); - } - }; - - ExpandResult::Ready(base::MacEager::ty(cx.ty(sp, ast::TyKind::View(ty, pat)))) -} - -fn parse_view_ty<'a>( - cx: &mut ExtCtxt<'a>, - stream: TokenStream, -) -> PResult<'a, (Box, ThinVec)> { - let mut parser = cx.new_parser_from_tts(stream); - - let ty = parser.parse_ty()?; - - parser.expect(ExpTokenPair { tok: TokenKind::Dot, token_type: TokenType::Dot })?; - - let fields = match parser.parse_delim_comma_seq( - ExpTokenPair { tok: TokenKind::OpenBrace, token_type: TokenType::OpenBrace }, - ExpTokenPair { tok: TokenKind::CloseBrace, token_type: TokenType::CloseBrace }, - |p| p.parse_field_name(), - ) { - Ok((fields, _)) => fields, - Err(diag) => { - return Err(diag); - } - }; - - Ok((ty, fields)) -} diff --git a/compiler/rustc_codegen_cranelift/example/mini_core.rs b/compiler/rustc_codegen_cranelift/example/mini_core.rs index d6d82a9d2af69..3c9f6bdddc129 100644 --- a/compiler/rustc_codegen_cranelift/example/mini_core.rs +++ b/compiler/rustc_codegen_cranelift/example/mini_core.rs @@ -6,9 +6,10 @@ extern_types, decl_macro, rustc_attrs, + allow_internal_unstable, + forced_keywords, rustc_private, transparent_unions, - pattern_types, auto_traits, freeze_impls )] @@ -591,12 +592,9 @@ pub trait Deref { fn deref(&self) -> &Self::Target; } -#[rustc_builtin_macro(pattern_type)] -#[macro_export] -macro_rules! pattern_type { - ($($arg:tt)*) => { - /* compiler built-in */ - }; +#[allow_internal_unstable(internal_syntax)] +pub macro pattern_type($($arg:tt)*) { + k#pattern_type($($arg)*) } impl CoerceUnsized for pattern_type!(*const T is !null) where diff --git a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs index c53ec2ec6710d..2db42f3bd5930 100644 --- a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs +++ b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs @@ -1,12 +1,4 @@ -#![feature( - no_core, - lang_items, - extern_types, - thread_local, - repr_simd, - pattern_types, - rustc_private -)] +#![feature(no_core, lang_items, extern_types, thread_local, repr_simd, rustc_private)] #![cfg_attr(not(any(jit, target_vendor = "apple", windows)), feature(linkage))] #![no_core] #![allow(dead_code, non_camel_case_types, internal_features)] diff --git a/compiler/rustc_codegen_gcc/build_system/src/test.rs b/compiler/rustc_codegen_gcc/build_system/src/test.rs index fe36adba0587e..5ae6d5fee5770 100644 --- a/compiler/rustc_codegen_gcc/build_system/src/test.rs +++ b/compiler/rustc_codegen_gcc/build_system/src/test.rs @@ -247,6 +247,8 @@ fn mini_tests(env: &Env, args: &TestArg) -> Result<(), String> { &"mini_core", &"--crate-type", &crate_types, + &"--edition", + &"2024", &"--target", &args.config_info.target_triple, ]); diff --git a/compiler/rustc_codegen_gcc/example/mini_core.rs b/compiler/rustc_codegen_gcc/example/mini_core.rs index 383fbfc678922..e5e8f6042e4a2 100644 --- a/compiler/rustc_codegen_gcc/example/mini_core.rs +++ b/compiler/rustc_codegen_gcc/example/mini_core.rs @@ -6,10 +6,11 @@ extern_types, decl_macro, rustc_attrs, + allow_internal_unstable, + forced_keywords, transparent_unions, auto_traits, freeze_impls, - pattern_types, thread_local, rustc_private )] @@ -40,9 +41,9 @@ unsafe extern "C" { type VTable; } -#[no_mangle] +#[unsafe(no_mangle)] unsafe extern "C" fn _Unwind_Resume() { - intrinsics::unreachable(); + unsafe { intrinsics::unreachable(); } } #[lang = "pointee_sized"] @@ -607,12 +608,9 @@ impl Allocator for Global {} #[rustc_nonnull_optimization_guaranteed] pub struct NonNull(pub pattern_type!(*const T is !null)); -#[rustc_builtin_macro(pattern_type)] -#[macro_export] -macro_rules! pattern_type { - ($($arg:tt)*) => { - /* compiler built-in */ - }; +#[allow_internal_unstable(internal_syntax)] +pub macro pattern_type($($arg:tt)*) { + k#pattern_type($($arg)*) } impl CoerceUnsized for pattern_type!(*const T is !null) where @@ -703,11 +701,11 @@ pub mod intrinsics { #[rustc_intrinsic] pub const fn size_of() -> usize; #[rustc_intrinsic] - pub unsafe fn size_of_val(val: *const T) -> usize; + pub unsafe fn size_of_val(val: *const T) -> usize; #[rustc_intrinsic] pub const fn align_of() -> usize; #[rustc_intrinsic] - pub unsafe fn align_of_val(val: *const T) -> usize; + pub unsafe fn align_of_val(val: *const T) -> usize; #[rustc_intrinsic] pub unsafe fn copy(src: *const T, dst: *mut T, count: usize); #[rustc_intrinsic] @@ -715,7 +713,7 @@ pub mod intrinsics { #[rustc_intrinsic] pub unsafe fn ctlz_nonzero(x: T) -> u32; #[rustc_intrinsic] - pub const fn needs_drop() -> bool; + pub const fn needs_drop() -> bool; #[rustc_intrinsic] pub fn bitreverse(x: T) -> T; #[rustc_intrinsic] @@ -728,7 +726,7 @@ pub mod intrinsics { pub mod libc { #[link(name = "c")] - extern "C" { + unsafe extern "C" { pub fn puts(s: *const u8) -> i32; pub fn printf(format: *const i8, ...) -> i32; pub fn malloc(size: usize) -> *mut u8; @@ -783,7 +781,7 @@ impl Index for [T] { } } -extern "C" { +unsafe extern "C" { type VaListImpl; } @@ -824,7 +822,7 @@ struct PanicLocation { column: u32, } -#[no_mangle] +#[unsafe(no_mangle)] pub fn get_tls() -> u8 { #[thread_local] static A: u8 = 42; diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index 752cbc67d5637..585d0b20420a4 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -1007,6 +1007,7 @@ pub(crate) fn build_compile_unit_di_node<'ll, 'tcx>( kind, 0, tcx.sess.opts.unstable_opts.split_dwarf_inlining, + tcx.sess.opts.unstable_opts.debuginfo_for_profiling, debug_name_table_kind, ); diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index 23065419f9f1d..3ff967e0894f9 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -744,7 +744,7 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> { assert_matches!( self.layout_of(fn_args.type_at(0)).backend_repr, BackendRepr::SimdScalableVector { - number_of_vectors: NumScalableVectors(2 | 3 | 4 | 5 | 6 | 7 | 8), + number_of_vectors: NumScalableVectors(2..=8), .. } ); @@ -765,7 +765,7 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> { assert_matches!( self.layout_of(fn_args.type_at(0)).backend_repr, BackendRepr::SimdScalableVector { - number_of_vectors: NumScalableVectors(2 | 3 | 4 | 5 | 6 | 7 | 8), + number_of_vectors: NumScalableVectors(2..=8), .. } ); diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 08a63c5b48bd7..5d22224ceba0b 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -2273,6 +2273,7 @@ unsafe extern "C" { kind: DebugEmissionKind, DWOId: u64, SplitDebugInlining: bool, + DebugInfoForProfiling: bool, DebugNameTableKind: DebugNameTableKind, ) -> &'a DIDescriptor; diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index c20ac042516af..2eccbbc4fb28b 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -10,6 +10,7 @@ #![allow(internal_features)] #![allow(rustc::default_hash_types)] #![allow(rustc::potential_query_instability)] +#![cfg_attr(bootstrap, feature(pattern_type_macro))] #![cfg_attr(bootstrap, feature(unwrap_infallible))] #![cfg_attr(test, feature(test))] #![deny(unsafe_op_in_unsafe_fn)] @@ -26,7 +27,6 @@ #![feature(min_specialization)] #![feature(negative_impls)] #![feature(nonzero_internals)] -#![feature(pattern_type_macro)] #![feature(pattern_types)] #![feature(ptr_alignment_type)] #![feature(rustc_attrs)] diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index b9c1bb9545d2f..326014b2699db 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -41,7 +41,6 @@ use crate::diagnostics::{ GlobDelegationTraitlessQpath, IncompleteParse, RecursionLimitReached, RemoveExprNotSupported, UnsupportedKeyValue, WrongFragmentKind, }; -use crate::mbe::diagnostics::annotate_err_with_kind; use crate::module::{ DirOwnership, ParsedExternalMod, mod_dir_path, mod_file_path_from_attr, parse_external_mod, }; @@ -1067,7 +1066,6 @@ impl<'a, 'b> MacroExpander<'a, 'b> { if err.span.is_dummy() { err.span(span); } - annotate_err_with_kind(&mut err, kind, span); let guar = err.emit_err(); self.cx.macro_error_and_trace_macros_diag(); kind.dummy(span, guar) @@ -2235,7 +2233,6 @@ impl<'a, 'b> InvocationCollector<'a, 'b> { let mut attrs = attrs.iter().peekable(); let mut span: Option = None; while let Some(attr) = attrs.next() { - validate_attr::check_attr(&self.cx.sess.psess, attr); AttributeParser::parse_limited_all( self.cx.sess, slice::from_ref(attr), diff --git a/compiler/rustc_expand/src/mbe/diagnostics.rs b/compiler/rustc_expand/src/mbe/diagnostics.rs index c724857d572ec..281f55f8ec090 100644 --- a/compiler/rustc_expand/src/mbe/diagnostics.rs +++ b/compiler/rustc_expand/src/mbe/diagnostics.rs @@ -434,8 +434,8 @@ pub(super) fn emit_frag_parse_err( } } }, - _ => annotate_err_with_kind(&mut e, kind, site_span), - }; + _ => {} + } if parser.token.kind == token::Dollar { let dollar_span = parser.token.span; @@ -504,18 +504,6 @@ pub(super) fn emit_frag_parse_err( e.emit_err() } -pub(crate) fn annotate_err_with_kind(err: &mut Diag<'_>, kind: AstFragmentKind, span: Span) { - match kind { - AstFragmentKind::Ty => { - err.span_label(span, "this macro call doesn't expand to a type"); - } - AstFragmentKind::Pat => { - err.span_label(span, "this macro call doesn't expand to a pattern"); - } - _ => {} - }; -} - #[derive(Subdiagnostic)] enum ExplainDocComment { #[label( diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index ed2bf64263c67..e8f7400af076e 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -318,8 +318,6 @@ declare_features! ( (internal, needs_panic_runtime, "1.10.0", Some(32837)), /// Allows using the `#![panic_runtime]` attribute. (internal, panic_runtime, "1.10.0", Some(32837)), - /// Allows using pattern types. - (internal, pattern_types, "1.79.0", Some(123646)), /// Allows `repr(simd)` and importing the various simd intrinsics. (internal, repr_simd, "1.4.0", Some(27731)), /// Allows using compiler's own crates. @@ -780,8 +778,6 @@ declare_features! ( (internal, unsized_fn_params, "1.49.0", Some(48055)), /// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute. (unstable, used_with_arg, "1.60.0", Some(93798)), - /// Allows view types. - (unstable, view_types, "1.97.0", Some(155938)), /// Target features on wasm. (unstable, wasm_target_feature, "1.30.0", Some(150260)), /// Allows use of attributes in `where` clauses. diff --git a/compiler/rustc_index_macros/src/lib.rs b/compiler/rustc_index_macros/src/lib.rs index b0bc40a9d8b1a..86681332ceb47 100644 --- a/compiler/rustc_index_macros/src/lib.rs +++ b/compiler/rustc_index_macros/src/lib.rs @@ -41,7 +41,7 @@ mod newtype; rustc_attrs, trusted_step, pattern_types, - pattern_type_macro, + pattern_type_macro, // cfg(bootstrap) FIXME: remove on bump structural_match, ) )] diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index b1d3b2131812d..d723d8aa97167 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1007,13 +1007,14 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateCompileUnit( const char *Producer, size_t ProducerLen, bool isOptimized, const char *Flags, unsigned RuntimeVer, const char *SplitName, size_t SplitNameLen, LLVMRustDebugEmissionKind Kind, uint64_t DWOId, - bool SplitDebugInlining, LLVMRustDebugNameTableKind TableKind) { + bool SplitDebugInlining, bool DebugInfoForProfiling, + LLVMRustDebugNameTableKind TableKind) { auto *File = unwrapDI(FileRef); return wrap(unwrap(Builder)->createCompileUnit( Lang, File, StringRef(Producer, ProducerLen), isOptimized, Flags, RuntimeVer, StringRef(SplitName, SplitNameLen), fromRust(Kind), DWOId, - SplitDebugInlining, false, fromRust(TableKind))); + SplitDebugInlining, DebugInfoForProfiling, fromRust(TableKind))); } extern "C" LLVMMetadataRef diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index a89fd9b6298f3..10f4d73e3e4cd 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -1101,7 +1101,7 @@ impl<'a> Parser<'a> { /// Parses a comma-separated sequence, including both delimiters. /// The function `f` must consume tokens until reaching the next separator or /// closing bracket. - pub fn parse_delim_comma_seq( + fn parse_delim_comma_seq( &mut self, open: ExpTokenPair, close: ExpTokenPair, @@ -1351,7 +1351,7 @@ impl<'a> Parser<'a> { /// ```enbf /// FieldName = IntLit | Ident /// ``` - pub fn parse_field_name(&mut self) -> PResult<'a, Ident> { + fn parse_field_name(&mut self) -> PResult<'a, Ident> { if let token::Literal(token::Lit { kind: token::Integer, symbol, suffix }) = self.token.kind { if let Some(suffix) = suffix { diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index b66d7310dbea5..f09faad96e16a 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -4,7 +4,7 @@ use rustc_ast::{ self as ast, BoundAsyncness, BoundConstness, BoundPolarity, DUMMY_NODE_ID, FnPtrTy, FnRetTy, GenericBound, GenericBounds, GenericParam, Generics, Lifetime, MacCall, Mutability, Path, Pinnedness, PolyTraitRef, PreciseCapturingArg, TraitBoundModifiers, TraitObjectSyntax, Ty, - TyKind, UnsafeBinderTy, + TyKind, TyPatKind, UnsafeBinderTy, }; use rustc_errors::{Applicability, Diag, E0516, PResult}; use rustc_span::{ErrorGuaranteed, Ident, Span, kw, sym}; @@ -423,6 +423,10 @@ impl<'a> Parser<'a> { self.parse_unsafe_binder_ty()? } else if self.eat_forced_keyword_noexpect(kw::FieldOf) { self.parse_ty_field_of(lo)? + } else if self.eat_forced_keyword_noexpect(kw::PatternType) { + self.parse_pat_ty(lo)? + } else if self.eat_forced_keyword_noexpect(kw::ViewType) { + self.parse_view_ty(lo)? } else { let msg = format!("expected type, found {}", super::token_descr(&self.token)); let mut err = self.dcx().struct_span_err(lo, msg); @@ -826,7 +830,7 @@ impl<'a> Parser<'a> { Ok(TyKind::Err(guar)) } - pub(crate) fn parse_ty_field_of(&mut self, lo: Span) -> PResult<'a, TyKind> { + fn parse_ty_field_of(&mut self, lo: Span) -> PResult<'a, TyKind> { self.expect(exp!(OpenParen))?; let container = self.parse_ty()?; @@ -871,6 +875,69 @@ impl<'a> Parser<'a> { } } + fn parse_pat_ty(&mut self, lo: Span) -> PResult<'a, TyKind> { + self.expect(exp!(OpenParen))?; + + let ty = self.parse_ty()?; + self.expect_keyword(exp!(Is))?; + + let pat = if self.eat(exp!(Bang)) { + let lo = self.prev_token.span; + self.expect_keyword(exp!(Null))?; + Self::mk_ty_pat(TyPatKind::NotNull, lo.to(self.token.span)) + } else { + let pat = self.parse_pat_no_top_guard( + None, + super::RecoverComma::No, + super::RecoverColon::No, + super::CommaRecoveryMode::EitherTupleOrPipe, + )?; + self.pat_to_ty_pat(pat) + }; + + self.expect(exp!(CloseParen))?; + + self.psess.gated_spans.gate(sym::internal_syntax, lo.to(self.token.span)); + + Ok(TyKind::Pat(ty, Box::new(pat))) + } + + fn pat_to_ty_pat(&self, pat: ast::Pat) -> ast::TyPat { + let kind = match pat.kind { + ast::PatKind::Range(start, end, include_end) => TyPatKind::Range( + start.map(|value| Box::new(ast::AnonConst { id: DUMMY_NODE_ID, value })), + end.map(|value| Box::new(ast::AnonConst { id: DUMMY_NODE_ID, value })), + include_end, + ), + ast::PatKind::Or(variants) => { + TyPatKind::Or(variants.into_iter().map(|pat| self.pat_to_ty_pat(pat)).collect()) + } + ast::PatKind::Err(guar) => TyPatKind::Err(guar), + ast::PatKind::Paren(p) => self.pat_to_ty_pat(*p).kind, + _ => TyPatKind::Err( + self.dcx().span_err(pat.span, "pattern not supported in pattern types"), + ), + }; + Self::mk_ty_pat(kind, pat.span) + } + + fn mk_ty_pat(kind: TyPatKind, span: Span) -> ast::TyPat { + ast::TyPat { id: DUMMY_NODE_ID, kind, span } + } + + fn parse_view_ty(&mut self, lo: Span) -> PResult<'a, ast::TyKind> { + self.expect(exp!(OpenParen))?; + let ty = self.parse_ty()?; + self.expect(exp!(Dot))?; + let (fields, _) = self + .parse_delim_comma_seq(exp!(OpenBrace), exp!(CloseBrace), |p| p.parse_field_name())?; + self.expect(exp!(CloseParen))?; + + self.psess.gated_spans.gate(sym::internal_syntax, lo.to(self.prev_token.span)); + + Ok(ast::TyKind::View(ty, fields)) + } + /// Parses a function pointer type (`TyKind::FnPtr`). /// ```ignore (illustrative) /// [unsafe] [extern "ABI"] fn (S) -> T diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 2170f610f0939..bc3af250a8d15 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -133,6 +133,7 @@ symbols! { FieldOf: "field_of", MacroRules: "macro_rules", OffsetOf: "offset_of", + PatternType: "pattern_type", Pin: "pin", Raw: "raw", Reuse: "reuse", @@ -140,6 +141,7 @@ symbols! { TypeAscribe: "type_ascribe", Union: "union", UnwrapBinder: "unwrap_binder", + ViewType: "view_type", WrapBinder: "wrap_binder", Yeet: "yeet", // tidy-alphabetical-end @@ -1607,7 +1609,6 @@ symbols! { path, pattern_complexity_limit, pattern_parentheses, - pattern_type, pattern_type_range_trait, pattern_types, phantom_data, @@ -2388,7 +2389,6 @@ symbols! { vgpr384, vgpr512, vgpr1024, - view_type, view_types, vis, visible_private_types, diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 634b89885bca4..e55b7bd2c8e4f 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -98,7 +98,7 @@ #![feature(io_const_error)] #![feature(offset_of_enum)] #![feature(panic_internals)] -#![feature(pattern_type_macro)] +#![feature(pattern_types)] #![feature(ub_checks)] // tidy-alphabetical-end // @@ -145,7 +145,6 @@ #![feature(must_not_suspend)] #![feature(negative_impls)] #![feature(no_core)] -#![feature(pattern_types)] #![feature(pin_macro_internals)] #![feature(prelude_import)] #![feature(register_tool)] @@ -313,7 +312,7 @@ pub mod option; pub mod os; pub mod panic; pub mod panicking; -#[unstable(feature = "pattern_type_macro", issue = "123646")] +#[unstable(feature = "pattern_types", issue = "123646")] pub mod pat; pub mod pin; #[unstable(feature = "abort_immediate", issue = "154601")] @@ -350,7 +349,7 @@ mod bool; mod escape; mod tuple; mod unit; -#[unstable(feature = "view_type_macro", issue = "155938")] +#[unstable(feature = "view_types", issue = "155938")] pub mod view; #[stable(feature = "core_primitive", since = "1.43.0")] diff --git a/library/core/src/num/niche_types.rs b/library/core/src/num/niche_types.rs index 37037d8145fb0..6d3e59b05a2c3 100644 --- a/library/core/src/num/niche_types.rs +++ b/library/core/src/num/niche_types.rs @@ -5,9 +5,10 @@ )] use crate::cmp::Ordering; +use crate::fmt; use crate::hash::{Hash, Hasher}; use crate::marker::StructuralPartialEq; -use crate::{fmt, pattern_type}; +use crate::pat::pattern_type; macro_rules! define_valid_range_type { ($( diff --git a/library/core/src/pat.rs b/library/core/src/pat.rs index 0cf9f10fc8c28..1315c2a46d128 100644 --- a/library/core/src/pat.rs +++ b/library/core/src/pat.rs @@ -7,13 +7,11 @@ use crate::ops::{CoerceUnsized, DispatchFromDyn}; /// ```ignore (cannot test this from within core yet) /// type Positive = std::pat::pattern_type!(i32 is 1..); /// ``` -#[macro_export] -#[rustc_builtin_macro(pattern_type)] -#[unstable(feature = "pattern_type_macro", issue = "123646")] -macro_rules! pattern_type { - ($($arg:tt)*) => { - /* compiler built-in */ - }; +#[allow_internal_unstable(internal_syntax)] +#[unstable(feature = "pattern_types", issue = "123646")] +#[diagnostic::opaque] +pub macro pattern_type($( $arg:tt )*) { + k#pattern_type($( $arg )*) } /// A trait implemented for integer types and `char`. diff --git a/library/core/src/prelude/v1.rs b/library/core/src/prelude/v1.rs index f68d3e614c53f..d21fa351f5bce 100644 --- a/library/core/src/prelude/v1.rs +++ b/library/core/src/prelude/v1.rs @@ -104,9 +104,9 @@ pub use crate::const_format_args; #[doc(no_inline)] pub use crate::log_syntax; -#[unstable(feature = "pattern_type_macro", issue = "123646")] +#[unstable(feature = "pattern_types", issue = "123646")] #[doc(no_inline)] -pub use crate::pattern_type; +pub use crate::pat::pattern_type; #[unstable( feature = "trace_macros", diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 7d444cc8698a5..cf23690992ef1 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -76,7 +76,7 @@ use crate::{fmt, hash, intrinsics, mem, ptr}; #[rustc_nonnull_optimization_guaranteed] #[lang = "non_null"] pub struct NonNull<#[rustc_assert_variance(covariant)] T: PointeeSized> { - pointer: crate::pattern_type!(*const T is !null), + pointer: crate::pat::pattern_type!(*const T is !null), } /// `NonNull` pointers are not `Send` because the data they reference may be aliased. diff --git a/library/core/src/view.rs b/library/core/src/view.rs index 68eca3f3598d2..c68382b2effc9 100644 --- a/library/core/src/view.rs +++ b/library/core/src/view.rs @@ -2,7 +2,7 @@ /// Creates a view type. /// ``` -/// #![feature(view_types, view_type_macro)] +/// #![feature(view_types)] // /// struct Foo { /// bar: usize, @@ -11,11 +11,9 @@ /// /// type FooBar = std::view::view_type!(Foo.{ bar }); /// ``` -#[macro_export] -#[rustc_builtin_macro(view_type)] -#[unstable(feature = "view_type_macro", issue = "155938")] -macro_rules! view_type { - ($($arg:tt)*) => { - /* compiler built-in */ - }; +#[allow_internal_unstable(internal_syntax)] +#[unstable(feature = "view_types", issue = "155938")] +#[diagnostic::opaque] +pub macro view_type($($arg:tt)*) { + k#view_type($($arg)*) } diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index 2f21b78352abb..6248f3c79fb57 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -166,6 +166,8 @@ check-cfg = [ 'cfg(target_has_reliable_f16_math)', 'cfg(target_has_reliable_f128)', 'cfg(target_has_reliable_f128_math)', + # Controlling which tests we run in Miri. + 'cfg(skip_unsupported_miri_tests)', ] [lints.cargo] diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 01977792b5751..82e1441e59462 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // fs API support in Miri is quite spotty + use rand::RngCore; use super::Dir; @@ -2567,7 +2569,6 @@ fn test_eq_windows_file_type() { /// Regression test for https://github.com/rust-lang/rust/issues/50619. #[test] #[cfg(target_os = "linux")] -#[cfg_attr(miri, ignore)] // Cannot spawn processes on Miri fn test_read_dir_infinite_loop() { use crate::io::ErrorKind; use crate::process::Command; diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 1f684c162496b..6b0d32f3ba5f2 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -641,7 +641,7 @@ pub mod num; #[allow(unreachable_pub)] pub mod os; pub mod panic; -#[unstable(feature = "pattern_type_macro", issue = "123646")] +#[unstable(feature = "pattern_types", issue = "123646")] pub mod pat; pub mod path; pub mod process; @@ -649,7 +649,7 @@ pub mod process; pub mod random; pub mod sync; pub mod time; -#[unstable(feature = "view_type_macro", issue = "155938")] +#[unstable(feature = "view_types", issue = "155938")] pub mod view; // Pull in `std_float` crate into std. The contents of diff --git a/library/std/src/net/socket_addr/tests.rs b/library/std/src/net/socket_addr/tests.rs index 2f3e3add5c22d..3eedb86b1650c 100644 --- a/library/std/src/net/socket_addr/tests.rs +++ b/library/std/src/net/socket_addr/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(all(windows, skip_unsupported_miri_tests)))] // Miri has no net support on Windows + use crate::net::tests::{sa4, sa6, tsa}; use crate::net::*; diff --git a/library/std/src/net/tcp/tests.rs b/library/std/src/net/tcp/tests.rs index 9aeddff864918..de62bd66c5c74 100644 --- a/library/std/src/net/tcp/tests.rs +++ b/library/std/src/net/tcp/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(all(windows, skip_unsupported_miri_tests)))] // Miri has no net support on Windows + use rand::Rng; use crate::io::prelude::*; @@ -898,6 +900,7 @@ fn ttl() { #[test] #[cfg_attr(target_env = "sgx", ignore)] #[cfg(any(target_family = "unix", target_os = "windows"))] +#[cfg(not(skip_unsupported_miri_tests))] // socket flag not supported by Miri fn hop_limit() { let hlim = 100; @@ -979,6 +982,7 @@ fn connect_timeout_valid() { // macOS with `EINVAL`; `write_all` should now transfer it via short sends. #[test] #[cfg(all(target_pointer_width = "64", unix))] +#[cfg(not(skip_unsupported_miri_tests))] // read-only mmap not supported by Miri fn write_buffer_larger_than_c_int_max() { const LEN: usize = crate::ffi::c_int::MAX as usize + 1; diff --git a/library/std/src/net/tests.rs b/library/std/src/net/tests.rs index 213c9a5a3e3a1..f07a7f6e8894a 100644 --- a/library/std/src/net/tests.rs +++ b/library/std/src/net/tests.rs @@ -88,6 +88,7 @@ impl Drop for ZeroedMmap { } #[test] +#[cfg(not(all(windows, skip_unsupported_miri_tests)))] // Miri has no net support on Windows fn hostname_smoketest() { // Just a smoke test to ensure it can be called. let name = crate::net::hostname(); diff --git a/library/std/src/net/udp/tests.rs b/library/std/src/net/udp/tests.rs index 6296e07044c55..f5dd0464f430b 100644 --- a/library/std/src/net/udp/tests.rs +++ b/library/std/src/net/udp/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // UDP sockets are not supported in Miri + use crate::io::ErrorKind; use crate::net::tests::{LOCALHOST_IP4, LOCALHOST_IP6, compare_ignore_zoneid}; use crate::net::*; diff --git a/library/std/src/os/darwin/fs/dirs.rs b/library/std/src/os/darwin/fs/dirs.rs index 6aaa910981b0b..d5d1449d9973b 100644 --- a/library/std/src/os/darwin/fs/dirs.rs +++ b/library/std/src/os/darwin/fs/dirs.rs @@ -291,6 +291,7 @@ mod sys { #[cfg(test)] #[cfg(target_vendor = "apple")] +#[cfg(not(skip_unsupported_miri_tests))] // macOS sysdir APIs are not supported in Miri mod tests { use super::*; diff --git a/library/std/src/os/fd/owned.rs b/library/std/src/os/fd/owned.rs index fa775a9373427..594de872a17de 100644 --- a/library/std/src/os/fd/owned.rs +++ b/library/std/src/os/fd/owned.rs @@ -94,7 +94,7 @@ impl BorrowedFd<'_> { /// Converts a `BorrowedFd` into a reference to a file-like type. /// - #[cfg_attr(all(unix, not(miri)), doc = "```")] + #[cfg_attr(unix, doc = "```")] #[cfg_attr(not(unix), doc = "```ignore (needs unix)")] /// # #![feature(fd_view)] /// # use std::fs::File; diff --git a/library/std/src/os/net/linux_ext/tests.rs b/library/std/src/os/net/linux_ext/tests.rs index a63524e63b6d8..e76cc1e44d7f5 100644 --- a/library/std/src/os/net/linux_ext/tests.rs +++ b/library/std/src/os/net/linux_ext/tests.rs @@ -1,4 +1,5 @@ #[test] +#[cfg(not(skip_unsupported_miri_tests))] // socket flag not supported by Miri fn quickack() { use crate::net::tests::LOCALHOST_IP4; use crate::net::{TcpListener, TcpStream}; @@ -28,6 +29,7 @@ fn quickack() { #[test] #[cfg(target_os = "linux")] +#[cfg(not(skip_unsupported_miri_tests))] // socket flag not supported by Miri fn deferaccept() { use crate::net::tests::LOCALHOST_IP4; use crate::net::{TcpListener, TcpStream}; diff --git a/library/std/src/os/unix/fs/tests.rs b/library/std/src/os/unix/fs/tests.rs index 52e0fe940a81f..3b7b0ef0ce0ba 100644 --- a/library/std/src/os/unix/fs/tests.rs +++ b/library/std/src/os/unix/fs/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // fs API support in Miri is quite spotty + use super::*; #[test] diff --git a/library/std/src/os/unix/net/tests.rs b/library/std/src/os/unix/net/tests.rs index 4014767461389..d310aa81db3e5 100644 --- a/library/std/src/os/unix/net/tests.rs +++ b/library/std/src/os/unix/net/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // Unix domain sockets are not supported in Miri + use super::*; use crate::io::prelude::*; use crate::io::{self, ErrorKind, IoSlice, IoSliceMut}; diff --git a/library/std/src/os/windows/fs/dirs.rs b/library/std/src/os/windows/fs/dirs.rs index 52710375e6eb2..56cf055d3299b 100644 --- a/library/std/src/os/windows/fs/dirs.rs +++ b/library/std/src/os/windows/fs/dirs.rs @@ -287,6 +287,7 @@ mod sys { } #[cfg(test)] +#[cfg(not(skip_unsupported_miri_tests))] // Windows known directory APIs are not supported in Miri mod tests { use super::*; diff --git a/library/std/src/pat.rs b/library/std/src/pat.rs index aeddd84c2cb54..3d227b1903f33 100644 --- a/library/std/src/pat.rs +++ b/library/std/src/pat.rs @@ -1,3 +1,3 @@ //! Helper module for exporting the `pattern_type` macro -pub use core::pattern_type; +pub use core::pat::pattern_type; diff --git a/library/std/src/process/tests.rs b/library/std/src/process/tests.rs index e31cb002c0265..ecb42906e8ca8 100644 --- a/library/std/src/process/tests.rs +++ b/library/std/src/process/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // process spawning is not supported in Miri + use super::{Command, Output, Stdio}; use crate::io::prelude::*; use crate::io::{BorrowedBuf, ErrorKind}; diff --git a/library/std/src/sys/fs/windows/tests.rs b/library/std/src/sys/fs/windows/tests.rs index b53dfddecf627..dc57598d8984d 100644 --- a/library/std/src/sys/fs/windows/tests.rs +++ b/library/std/src/sys/fs/windows/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // Windows fs APIs are not supported in Miri + use super::{get_path_canonical, get_path_fallback}; use crate::env; use crate::fs::{File, canonicalize}; diff --git a/library/std/src/sys/net/connection/socket/tests.rs b/library/std/src/sys/net/connection/socket/tests.rs index cc072420b754b..d1c001d9d424d 100644 --- a/library/std/src/sys/net/connection/socket/tests.rs +++ b/library/std/src/sys/net/connection/socket/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(all(windows, skip_unsupported_miri_tests)))] // Miri has no net support on Windows + use super::*; use crate::collections::HashMap; diff --git a/library/std/src/sys/pal/unix/conf/tests.rs b/library/std/src/sys/pal/unix/conf/tests.rs index a84086037ce0b..76aed1c6e608b 100644 --- a/library/std/src/sys/pal/unix/conf/tests.rs +++ b/library/std/src/sys/pal/unix/conf/tests.rs @@ -26,6 +26,7 @@ fn test_parse_glibc_version() { // logic is correct. #[test] #[cfg(target_vendor = "apple")] +#[cfg(not(skip_unsupported_miri_tests))] // macOS conf API is not supported in Miri fn test_confstr() { for key in [libc::_CS_DARWIN_USER_TEMP_DIR, libc::_CS_PATH] { let value_nohint = super::confstr(key, None).unwrap_or_else(|e| { diff --git a/library/std/src/sys/platform_version/darwin/tests.rs b/library/std/src/sys/platform_version/darwin/tests.rs index 17b2cc18ec096..24895c73bf3d6 100644 --- a/library/std/src/sys/platform_version/darwin/tests.rs +++ b/library/std/src/sys/platform_version/darwin/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // macOS version APIs are not supported in Miri + use super::public_extern::*; use super::*; use crate::process::Command; diff --git a/library/std/src/sys/process/unix/common/tests.rs b/library/std/src/sys/process/unix/common/tests.rs index eacb4d2d43122..c652488d0570b 100644 --- a/library/std/src/sys/process/unix/common/tests.rs +++ b/library/std/src/sys/process/unix/common/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // process spawning is not supported in Miri + use super::*; use crate::ffi::OsStr; use crate::sys::{cvt, cvt_nz}; diff --git a/library/std/src/sys/process/unix/pidfd/tests.rs b/library/std/src/sys/process/unix/pidfd/tests.rs index 4cc2368c25a22..97578eea370f3 100644 --- a/library/std/src/sys/process/unix/pidfd/tests.rs +++ b/library/std/src/sys/process/unix/pidfd/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // pidfd is not supported in Miri + use super::PidFd as InternalPidFd; use crate::assert_matches; use crate::os::fd::AsRawFd; diff --git a/library/std/src/sys/process/unix/unix/tests.rs b/library/std/src/sys/process/unix/unix/tests.rs index e360b61851b2e..22b65bae4a6dc 100644 --- a/library/std/src/sys/process/unix/unix/tests.rs +++ b/library/std/src/sys/process/unix/unix/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // process spawning is not supported in Miri + use crate::os::unix::process::{CommandExt, ExitStatusExt}; use crate::panic::catch_unwind; use crate::process::Command; diff --git a/library/std/src/sys/process/windows/tests.rs b/library/std/src/sys/process/windows/tests.rs index bc5e0d5c7fc97..22b5334c76472 100644 --- a/library/std/src/sys/process/windows/tests.rs +++ b/library/std/src/sys/process/windows/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(skip_unsupported_miri_tests))] // process spawning is not supported in Miri + use super::child_pipe::{Pipes, child_pipe}; use super::{Arg, make_command_line}; use crate::ffi::{OsStr, OsString}; diff --git a/library/std/src/view.rs b/library/std/src/view.rs index 5806cf27c2cc8..3e0e7d1d1038a 100644 --- a/library/std/src/view.rs +++ b/library/std/src/view.rs @@ -1,3 +1,3 @@ //! Helper module for exporting the `view_types` macro. -pub use core::view_type; +pub use core::view::view_type; diff --git a/library/std/tests/create_dir_all_bare.rs b/library/std/tests/create_dir_all_bare.rs index 30f800c5aa2e6..c3e91b8c613c8 100644 --- a/library/std/tests/create_dir_all_bare.rs +++ b/library/std/tests/create_dir_all_bare.rs @@ -31,7 +31,7 @@ impl Drop for CurrentDir { } #[test] -#[cfg_attr(all(miri, windows), ignore)] // File system access on Windows not supported by Miri +#[cfg_attr(all(windows, skip_unsupported_miri_tests), ignore)] // File system access on Windows not supported by Miri fn create_dir_all_bare() { let tmpdir = common::tmpdir(); CurrentDir::with(tmpdir.path(), || { diff --git a/library/std/tests/env_modify.rs b/library/std/tests/env_modify.rs index 71d15bc1c47c0..9eefe0cc25126 100644 --- a/library/std/tests/env_modify.rs +++ b/library/std/tests/env_modify.rs @@ -179,8 +179,9 @@ fn env_home_dir() { } } -#[test] // miri shouldn't detect any data race in this fn -#[cfg_attr(any(not(miri), target_os = "emscripten"), ignore)] +// This is primarily a Miri test (ensuring there are no data races), but can also run natively. +#[test] +#[cfg_attr(target_os = "emscripten", ignore)] fn test_env_get_set_multithreaded() { let getter = thread::spawn(|| { for _ in 0..100 { diff --git a/library/std/tests/pipe_subprocess.rs b/library/std/tests/pipe_subprocess.rs index c14db690224db..35ad327ef4f48 100644 --- a/library/std/tests/pipe_subprocess.rs +++ b/library/std/tests/pipe_subprocess.rs @@ -1,7 +1,7 @@ fn main() { // No `Command` on Miri, emscripten or L4Re #[cfg(all( - not(miri), + not(skip_unsupported_miri_tests), any(unix, windows), not(any(target_os = "emscripten", target_os = "l4re")) ))] diff --git a/library/std/tests/process_spawning.rs b/library/std/tests/process_spawning.rs index b7a9a1077696b..e634ee5155eab 100644 --- a/library/std/tests/process_spawning.rs +++ b/library/std/tests/process_spawning.rs @@ -6,7 +6,7 @@ mod common; #[test] // Process spawning not supported by Miri, Emscripten and wasi -#[cfg_attr(any(miri, target_os = "emscripten", target_os = "wasi"), ignore)] +#[cfg_attr(any(skip_unsupported_miri_tests, target_os = "emscripten", target_os = "wasi"), ignore)] #[cfg_attr( any(target_os = "tvos", target_os = "watchos", target_os = "l4re"), ignore = "fork is prohibited" diff --git a/library/std/tests/switch-stdout.rs b/library/std/tests/switch-stdout.rs index 91fe0200f6cae..829909bc364d0 100644 --- a/library/std/tests/switch-stdout.rs +++ b/library/std/tests/switch-stdout.rs @@ -50,7 +50,7 @@ fn switch_stdout_to(file: OwnedHandle) -> OwnedHandle { } #[test] -#[cfg_attr(miri, ignore)] // dup/SetStdHandle not supported by Miri +#[cfg_attr(all(windows, skip_unsupported_miri_tests), ignore)] // SetStdHandle not supported by Miri fn switch_stdout() { let temp = common::tmpdir(); let path = temp.join("switch-stdout-output"); diff --git a/library/std/tests/sync/mpsc_sync.rs b/library/std/tests/sync/mpsc_sync.rs index dfe1f8c6b7b8c..25faeb6323548 100644 --- a/library/std/tests/sync/mpsc_sync.rs +++ b/library/std/tests/sync/mpsc_sync.rs @@ -420,34 +420,48 @@ fn oneshot_multi_thread_send_recv_stress() { #[test] fn stream_send_recv_stress() { - for _ in 0..stress_factor() { - let (tx, rx) = sync_channel::>(0); - - send(tx, 0); - recv(rx, 0); + thread::scope(|s| { + for _ in 0..stress_factor() { + let (tx, rx) = sync_channel::>(0); + + send(tx, 0, s); + recv(rx, 0, s); + + fn send<'scope, 'env>( + tx: SyncSender>, + i: i32, + s: &'scope thread::Scope<'scope, 'env>, + ) where + 'env: 'scope, + { + if i == 10 { + return; + } - fn send(tx: SyncSender>, i: i32) { - if i == 10 { - return; + s.spawn(move || { + tx.send(Box::new(i)).unwrap(); + send(tx, i + 1, s); + }); } - thread::spawn(move || { - tx.send(Box::new(i)).unwrap(); - send(tx, i + 1); - }); - } + fn recv<'scope, 'env>( + rx: Receiver>, + i: i32, + s: &'scope thread::Scope<'scope, 'env>, + ) where + 'env: 'scope, + { + if i == 10 { + return; + } - fn recv(rx: Receiver>, i: i32) { - if i == 10 { - return; + s.spawn(move || { + assert!(*rx.recv().unwrap() == i); + recv(rx, i + 1, s); + }); } - - thread::spawn(move || { - assert!(*rx.recv().unwrap() == i); - recv(rx, i + 1); - }); } - } + }) } #[test] diff --git a/library/std/tests/thread.rs b/library/std/tests/thread.rs index ef13ce44d3180..433b804952694 100644 --- a/library/std/tests/thread.rs +++ b/library/std/tests/thread.rs @@ -6,7 +6,7 @@ use std::time::{Duration, Instant}; #[test] #[cfg_attr(any(target_os = "emscripten", target_os = "wasi"), ignore)] // no threads -#[cfg_attr(miri, ignore)] // Miri does not like the thread leak +#[cfg_attr(miri, ignore)] // Test leaks memory; a copy in the Miri test suite covers this fn sleep_very_long() { let finished = Arc::new(Mutex::new(false)); let t_finished = finished.clone(); diff --git a/library/std/tests/thread_local/tests.rs b/library/std/tests/thread_local/tests.rs index c2164a0bc2cff..734437585efcb 100644 --- a/library/std/tests/thread_local/tests.rs +++ b/library/std/tests/thread_local/tests.rs @@ -403,7 +403,7 @@ fn thread_current_in_dtor() { // https://github.com/rust-lang/rust/pull/148799#issuecomment-3731806901 #[cfg(target_os = "windows")] #[test] -#[cfg_attr(miri, ignore)] // Miri does not support fibers +#[cfg_attr(skip_unsupported_miri_tests, ignore)] // Miri does not support fibers fn fiber_does_not_trigger_dtor() { use core::ffi::c_void; use std::ptr; diff --git a/library/std/tests/win_delete_self.rs b/library/std/tests/win_delete_self.rs index ce505de69a22d..1b4e95174664b 100644 --- a/library/std/tests/win_delete_self.rs +++ b/library/std/tests/win_delete_self.rs @@ -2,7 +2,7 @@ /// Attempting to delete a running binary should return an error on Windows. #[test] -#[cfg_attr(miri, ignore)] // `remove_file` does not work in Miri on Windows +#[cfg_attr(skip_unsupported_miri_tests, ignore)] // `remove_file` does not work in Miri on Windows fn win_delete_self() { let path = std::env::current_exe().unwrap(); assert!(std::fs::remove_file(path).is_err()); diff --git a/library/std/tests/windows_unix_socket.rs b/library/std/tests/windows_unix_socket.rs index dd71b1f135dce..865794361eabb 100644 --- a/library/std/tests/windows_unix_socket.rs +++ b/library/std/tests/windows_unix_socket.rs @@ -1,5 +1,5 @@ #![cfg(windows)] -#![cfg(not(miri))] // no Windows socket support in Miri +#![cfg(not(skip_unsupported_miri_tests))] // no Windows socket support in Miri #![feature(windows_unix_domain_sockets)] // Now only test windows_unix_domain_sockets feature // in the future, will test both unix and windows uds diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index 886966fdd496e..07412657f8687 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -58,13 +58,13 @@ check-aux: $(Q)$(BOOTSTRAP) test --stage 2 \ build-std \ $(BOOTSTRAP_ARGS) - # Run standard library tests in Miri. + ## Run standard library tests in Miri. $(Q)MIRIFLAGS="-Zmiri-strict-provenance" \ $(BOOTSTRAP) miri --stage 2 \ library/core \ library/alloc \ $(BOOTSTRAP_ARGS) \ - --tests # exclude doc tests + --tests # exclude doc tests, they are run below # Some doctests use file system operations to demonstrate dealing with `Result`, # so we have to run them with isolation disabled. $(Q)MIRIFLAGS="-Zmiri-disable-isolation" \ @@ -73,22 +73,15 @@ check-aux: library/alloc \ $(BOOTSTRAP_ARGS) \ --doc - # In `std` we cannot test everything, so we skip some modules. - $(Q)MIRIFLAGS="-Zmiri-disable-isolation" \ - $(BOOTSTRAP) miri --stage 2 \ - library/std \ - $(BOOTSTRAP_ARGS) \ - -- \ - --skip fs:: --skip net:: --skip process:: --skip sys:: - # Also test some very target-specific modules on other targets - # (making sure to cover an i686 target as well). - $(Q)MIRIFLAGS="-Zmiri-disable-isolation" BOOTSTRAP_SKIP_TARGET_SANITY=1 \ + # In `std` we cannot test everything. Tests should be disabled under `skip_unsupported_miri_tests`. + # We cover all three tier 1 architectures and operating systems. + $(Q)MIRIFLAGS="--cfg skip_unsupported_miri_tests -Zmiri-disable-isolation -Zmiri-no-short-fd-operations" \ + BOOTSTRAP_SKIP_TARGET_SANITY=1 \ $(BOOTSTRAP) miri --stage 2 \ library/std \ - --target aarch64-apple-darwin,i686-pc-windows-msvc \ $(BOOTSTRAP_ARGS) \ - -- \ - time:: sync:: thread:: env:: + --target x86_64-unknown-linux-gnu,aarch64-apple-darwin,i686-pc-windows-msvc \ + --tests # skip all doctests, they are not using skip_unsupported_miri_tests dist: $(Q)$(BOOTSTRAP) dist $(BOOTSTRAP_ARGS) distcheck: diff --git a/src/ci/docker/host-x86_64/test-x86_64-gnu-miri/check-miri.sh b/src/ci/docker/host-x86_64/test-x86_64-gnu-miri/check-miri.sh index d6fae3ac9d94f..da9797d05495e 100755 --- a/src/ci/docker/host-x86_64/test-x86_64-gnu-miri/check-miri.sh +++ b/src/ci/docker/host-x86_64/test-x86_64-gnu-miri/check-miri.sh @@ -46,12 +46,13 @@ case $HOST_TARGET in exit 1 ;; esac + # Also smoke-test `x.py miri`. This doesn't run any actual tests (that would take too long), # but it ensures that the crates build properly when tested with Miri. - #FIXME: Re-enable this for msvc once CI issues are fixed if [ "$HOST_TARGET" != "x86_64-pc-windows-msvc" ]; then python3 "$X_PY" miri --stage 2 library/core -- notest python3 "$X_PY" miri --stage 2 library/alloc -- notest - python3 "$X_PY" miri --stage 2 library/std -- notest + # This runs some tests that don't use a test harness and hence ignore the filter. + MIRIFLAGS="--cfg skip_unsupported_miri_tests" python3 "$X_PY" miri --stage 2 library/std -- notest fi diff --git a/src/tools/clippy/tests/ui/eager_transmute.fixed b/src/tools/clippy/tests/ui/eager_transmute.fixed index a62b4ff7c75e5..30e741755d9b4 100644 --- a/src/tools/clippy/tests/ui/eager_transmute.fixed +++ b/src/tools/clippy/tests/ui/eager_transmute.fixed @@ -1,4 +1,4 @@ -#![feature(rustc_attrs, pattern_types, pattern_type_macro)] +#![feature(rustc_attrs, pattern_types)] #![warn(clippy::eager_transmute)] #![expect(clippy::missing_transmute_annotations, clippy::transmute_int_to_non_zero)] diff --git a/src/tools/clippy/tests/ui/eager_transmute.rs b/src/tools/clippy/tests/ui/eager_transmute.rs index cc6fbc2ebd37d..c9f4c19d8837d 100644 --- a/src/tools/clippy/tests/ui/eager_transmute.rs +++ b/src/tools/clippy/tests/ui/eager_transmute.rs @@ -1,4 +1,4 @@ -#![feature(rustc_attrs, pattern_types, pattern_type_macro)] +#![feature(rustc_attrs, pattern_types)] #![warn(clippy::eager_transmute)] #![expect(clippy::missing_transmute_annotations, clippy::transmute_int_to_non_zero)] diff --git a/src/tools/miri/src/shims/windows/foreign_items.rs b/src/tools/miri/src/shims/windows/foreign_items.rs index efaf79af02e88..7e5f545bffbfb 100644 --- a/src/tools/miri/src/shims/windows/foreign_items.rs +++ b/src/tools/miri/src/shims/windows/foreign_items.rs @@ -1214,6 +1214,14 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // We need to return something non-null here to make `compat_fn!` work. ecx.write_int(1, dest)?; } + "GetModuleHandleW" if ecx.frame_in_std() => { + let [_module_name] = &ecx.check_shim_sig( + shim_sig!(extern "system" fn(*_) -> winapi::HMODULE), + (link_name, abi, args), + )?; + // Returning null works best for `format_error`. + ecx.write_int(0, dest)?; + } "SetConsoleTextAttribute" if ecx.frame_in_std() => { let [_console_output, _attribute] = &ecx.check_shim_sig( shim_sig!(extern "system" fn(winapi::HANDLE, u16) -> winapi::BOOL), diff --git a/src/tools/miri/tests/fail/validity/nonzero.rs b/src/tools/miri/tests/fail/validity/nonzero.rs index fba37ee170e3a..1e847c4792442 100644 --- a/src/tools/miri/tests/fail/validity/nonzero.rs +++ b/src/tools/miri/tests/fail/validity/nonzero.rs @@ -1,4 +1,4 @@ -#![feature(rustc_attrs, pattern_types, pattern_type_macro)] +#![feature(rustc_attrs, pattern_types)] #![allow(unused_attributes)] #[repr(transparent)] diff --git a/src/tools/miri/tests/pass/pattern-types.rs b/src/tools/miri/tests/pass/pattern-types.rs index 90fe0de546915..2422f79d25d88 100644 --- a/src/tools/miri/tests/pass/pattern-types.rs +++ b/src/tools/miri/tests/pass/pattern-types.rs @@ -1,4 +1,4 @@ -#![feature(pattern_types, pattern_type_macro, sized_hierarchy)] +#![feature(pattern_types, sized_hierarchy)] #![allow(dead_code)] use std::marker::PointeeSized; diff --git a/src/tools/miri/tests/pass/shims/io.rs b/src/tools/miri/tests/pass/shims/io.rs index a96b98c022746..554ee2dd0cee1 100644 --- a/src/tools/miri/tests/pass/shims/io.rs +++ b/src/tools/miri/tests/pass/shims/io.rs @@ -12,7 +12,8 @@ fn main() { let raw_os_error = if cfg!(unix) { 22 // EINVAL (on most Unixes, anyway) } else if cfg!(windows) { - 87 // ERROR_INVALID_PARAMETER + // FACILITY_NT_BIT hits an extra codepath in std + 87 | 268435456 // ERROR_INVALID_PARAMETER | FACILITY_NT_BIT } else { panic!("unsupported OS") }; diff --git a/tests/auxiliary/minicore.rs b/tests/auxiliary/minicore.rs index e7e924f9ebc08..530a6496c39b5 100644 --- a/tests/auxiliary/minicore.rs +++ b/tests/auxiliary/minicore.rs @@ -23,11 +23,12 @@ intrinsics, lang_items, auto_traits, + forced_keywords, freeze_impls, negative_impls, - pattern_types, rustc_attrs, decl_macro, + allow_internal_unstable, f16, f16b, cfg_target_has_reliable_f16b, @@ -468,12 +469,9 @@ pub enum c_void { __variant2, } -#[rustc_builtin_macro(pattern_type)] -#[macro_export] -macro_rules! pattern_type { - ($($arg:tt)*) => { - /* compiler built-in */ - }; +#[allow_internal_unstable(internal_syntax)] +pub macro pattern_type($($arg:tt)*) { + k#pattern_type($($arg)*) } #[lang = "Ordering"] diff --git a/tests/codegen-llvm/debuginfo-for-profiling.rs b/tests/codegen-llvm/debuginfo-for-profiling.rs index f7e401415ac7e..38d87d4b95712 100644 --- a/tests/codegen-llvm/debuginfo-for-profiling.rs +++ b/tests/codegen-llvm/debuginfo-for-profiling.rs @@ -1,6 +1,7 @@ // Verify that additional discriminators are emitted for profiling with `-Zdebuginfo-for-profiling`: // - 0 discriminators are emitted without the flag in the test below // - at least 1 discriminator is emitted with the flag in the test below +// - the compile unit has `debugInfoForProfiling: true` only with the flag // // //@ add-minicore @@ -8,6 +9,8 @@ //@ compile-flags: -Copt-level=2 -Cdebuginfo=line-tables-only //@ [DEBUGINFO] compile-flags: -Zdebuginfo-for-profiling // DEFAULT-NOT: discriminator +// DEFAULT-NOT: debugInfoForProfiling +// DEBUGINFO: !DICompileUnit({{.*}}debugInfoForProfiling: true // DEBUGINFO-COUNT-1: discriminator #![feature(no_core)] diff --git a/tests/codegen-llvm/enum/enum-aggregate.rs b/tests/codegen-llvm/enum/enum-aggregate.rs index 46a1a03e96371..1e359480ad6a6 100644 --- a/tests/codegen-llvm/enum/enum-aggregate.rs +++ b/tests/codegen-llvm/enum/enum-aggregate.rs @@ -2,7 +2,7 @@ //@ only-64bit #![crate_type = "lib"] -#![feature(pattern_types, pattern_type_macro)] +#![feature(pattern_types)] use std::cmp::Ordering; use std::num::NonZero; diff --git a/tests/codegen-llvm/pattern_type_symbols.rs b/tests/codegen-llvm/pattern_type_symbols.rs index a90262ff12d21..f20940780d84d 100644 --- a/tests/codegen-llvm/pattern_type_symbols.rs +++ b/tests/codegen-llvm/pattern_type_symbols.rs @@ -4,11 +4,10 @@ //@ compile-flags: -Csymbol-mangling-version=v0 -Copt-level=0 --crate-type=lib #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; -type NanoU32 = crate::pattern_type!(u32 is 0..=999_999_999); +type NanoU32 = pattern_type!(u32 is 0..=999_999_999); fn foo() {} diff --git a/tests/debuginfo/msvc-pretty-enums.rs b/tests/debuginfo/msvc-pretty-enums.rs index d418d8f0987e6..2ec127390ca75 100644 --- a/tests/debuginfo/msvc-pretty-enums.rs +++ b/tests/debuginfo/msvc-pretty-enums.rs @@ -232,7 +232,7 @@ //@ cdb-command: dx c_style_i128_d //@ cdb-check: c_style_i128_d : D [Type: enum2$] -#![feature(pattern_types, pattern_type_macro)] +#![feature(pattern_types)] use std::num::NonZero; @@ -271,9 +271,7 @@ enum NicheLayoutWithFields3 { } #[repr(transparent)] -struct Wrapping128( - std::pat::pattern_type!(i128 is -2..=1), -); +struct Wrapping128(std::pat::pattern_type!(i128 is -2..=1)); enum Wrapping128Niche { X(Wrapping128), diff --git a/tests/mir-opt/dataflow-const-prop/enum.rs b/tests/mir-opt/dataflow-const-prop/enum.rs index 80553a3974881..454e2849597f1 100644 --- a/tests/mir-opt/dataflow-const-prop/enum.rs +++ b/tests/mir-opt/dataflow-const-prop/enum.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Zdump-mir-exclude-alloc-bytes // EMIT_MIR_FOR_EACH_BIT_WIDTH -#![feature(custom_mir, core_intrinsics, rustc_attrs, pattern_types, pattern_type_macro)] +#![feature(custom_mir, core_intrinsics, rustc_attrs, pattern_types)] use std::intrinsics::mir::*; diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs index 2ce475f7401ac..366af8355c031 100644 --- a/tests/mir-opt/gvn.rs +++ b/tests/mir-opt/gvn.rs @@ -6,7 +6,7 @@ #![feature(rustc_attrs)] #![feature(custom_mir)] #![feature(core_intrinsics)] -#![feature(freeze, pattern_type_range_trait, const_trait_impl, pattern_types, pattern_type_macro)] +#![feature(freeze, pattern_type_range_trait, const_trait_impl, pattern_types)] #![allow(ambiguous_wide_pointer_comparisons)] #![allow(unconditional_panic)] #![allow(unnecessary_transmutes)] diff --git a/tests/mir-opt/jump_threading.rs b/tests/mir-opt/jump_threading.rs index ae56921bb1d44..cdf49fb36bef4 100644 --- a/tests/mir-opt/jump_threading.rs +++ b/tests/mir-opt/jump_threading.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Zmir-enable-passes=+Inline // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -#![feature(try_trait_v2, pattern_type_macro, pattern_types)] +#![feature(try_trait_v2, pattern_types)] #![feature(custom_mir, core_intrinsics, rustc_attrs)] use std::intrinsics::mir::*; diff --git a/tests/mir-opt/pattern_types.rs b/tests/mir-opt/pattern_types.rs index dfa4c40d2dd7b..c714060619c16 100644 --- a/tests/mir-opt/pattern_types.rs +++ b/tests/mir-opt/pattern_types.rs @@ -1,5 +1,4 @@ #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/rustdoc-html/pattern-types-implementors.rs b/tests/rustdoc-html/pattern-types-implementors.rs index 2f49837b27e74..030b8b85f58dc 100644 --- a/tests/rustdoc-html/pattern-types-implementors.rs +++ b/tests/rustdoc-html/pattern-types-implementors.rs @@ -1,4 +1,4 @@ -#![feature(pattern_types, pattern_type_macro)] +#![feature(pattern_types)] #![crate_name = "pattern_types_implementors"] use std::pat::pattern_type; diff --git a/tests/ui/abi/abi-sysv64-arg-passing.rs b/tests/ui/abi/abi-sysv64-arg-passing.rs index e21ca94aa6e8f..602f3e467f528 100644 --- a/tests/ui/abi/abi-sysv64-arg-passing.rs +++ b/tests/ui/abi/abi-sysv64-arg-passing.rs @@ -28,7 +28,6 @@ //@ ignore-arm //@ ignore-aarch64 //@ ignore-windows -//@ ignore-backends: gcc // Windows is ignored because bootstrap doesn't yet know to compile rust_test_helpers with // the sysv64 ABI on Windows. diff --git a/tests/ui/abi/abi-sysv64-register-usage.rs b/tests/ui/abi/abi-sysv64-register-usage.rs index 576af8e696438..12c597b43c1f5 100644 --- a/tests/ui/abi/abi-sysv64-register-usage.rs +++ b/tests/ui/abi/abi-sysv64-register-usage.rs @@ -6,7 +6,6 @@ //@ ignore-arm //@ ignore-aarch64 //@ needs-asm-support -//@ ignore-backends: gcc #[cfg(target_arch = "x86_64")] pub extern "sysv64" fn all_the_registers( diff --git a/tests/ui/abi/arm-unadjusted-intrinsic.rs b/tests/ui/abi/arm-unadjusted-intrinsic.rs index 6068ef539133a..11577211fe2c3 100644 --- a/tests/ui/abi/arm-unadjusted-intrinsic.rs +++ b/tests/ui/abi/arm-unadjusted-intrinsic.rs @@ -6,7 +6,6 @@ //@ revisions: aarch64 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu //@[aarch64] needs-llvm-components: aarch64 -//@ ignore-backends: gcc #![feature(no_core, lang_items, link_llvm_intrinsics, arm_target_feature)] #![no_std] #![no_core] diff --git a/tests/ui/abi/avr-sram.rs b/tests/ui/abi/avr-sram.rs index 7b8ec5ee8fa0c..a7cdf6ec2c7d0 100644 --- a/tests/ui/abi/avr-sram.rs +++ b/tests/ui/abi/avr-sram.rs @@ -18,7 +18,6 @@ //@[default_cpu] compile-flags: --target avr-none //@[default_cpu] needs-llvm-components: avr // -//@ ignore-backends: gcc // //[no_sram,disable_sram]~? WARN target feature `sram` must be enabled //[disable_sram]~? WARN target feature `sram` cannot be disabled with `-Ctarget-feature` diff --git a/tests/ui/abi/compatibility.rs b/tests/ui/abi/compatibility.rs index 666910789dfb7..1116cb1a7e0fb 100644 --- a/tests/ui/abi/compatibility.rs +++ b/tests/ui/abi/compatibility.rs @@ -85,7 +85,6 @@ //@ revisions: nvptx64 //@[nvptx64] compile-flags: --target nvptx64-nvidia-cuda //@[nvptx64] needs-llvm-components: nvptx -//@ ignore-backends: gcc #![feature(no_core, rustc_attrs, lang_items)] #![feature(unsized_fn_params, transparent_unions)] #![no_core] diff --git a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs index 21c6c276bb1c7..9fb2edb7bd5f9 100644 --- a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs +++ b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs @@ -6,7 +6,6 @@ //@ run-pass //@ needs-subprocess -//@ ignore-backends: gcc //@ ignore-i586 (no SSE2) #![allow(overflowing_literals)] diff --git a/tests/ui/abi/interrupt-returns-never-or-unit.rs b/tests/ui/abi/interrupt-returns-never-or-unit.rs index 75786730a2ca4..52f2594e80179 100644 --- a/tests/ui/abi/interrupt-returns-never-or-unit.rs +++ b/tests/ui/abi/interrupt-returns-never-or-unit.rs @@ -21,7 +21,6 @@ This test uses `cfg` because it is not testing whether these ABIs work on the pl //@ [avr] compile-flags: --target=avr-none -C target-cpu=atmega328p --crate-type=rlib //@ [msp430] needs-llvm-components: msp430 //@ [msp430] compile-flags: --target=msp430-none-elf --crate-type=rlib -//@ ignore-backends: gcc #![no_core] #![feature( no_core, diff --git a/tests/ui/abi/issue-28676.rs b/tests/ui/abi/issue-28676.rs index 616ed6bde24b1..6fc26ac307c0d 100644 --- a/tests/ui/abi/issue-28676.rs +++ b/tests/ui/abi/issue-28676.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc #![allow(dead_code)] diff --git a/tests/ui/abi/large-byval-align.rs b/tests/ui/abi/large-byval-align.rs index 7e640fb42a3cb..7b6538c818b41 100644 --- a/tests/ui/abi/large-byval-align.rs +++ b/tests/ui/abi/large-byval-align.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Copt-level=0 //@ only-x86_64 //@ build-pass -//@ ignore-backends: gcc #[repr(C, align(536870912))] pub struct A(i64); diff --git a/tests/ui/abi/numbers-arithmetic/float-struct.rs b/tests/ui/abi/numbers-arithmetic/float-struct.rs index dc4c536a14e2d..a958dc272722f 100644 --- a/tests/ui/abi/numbers-arithmetic/float-struct.rs +++ b/tests/ui/abi/numbers-arithmetic/float-struct.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc use std::fmt::Debug; use std::hint::black_box; diff --git a/tests/ui/abi/pass-indirectly-attr.rs b/tests/ui/abi/pass-indirectly-attr.rs index bb90b8354ea91..72a5678b91753 100644 --- a/tests/ui/abi/pass-indirectly-attr.rs +++ b/tests/ui/abi/pass-indirectly-attr.rs @@ -1,7 +1,6 @@ //@ add-minicore //@ check-fail //@ normalize-stderr: "randomization_seed: \d+" -> "randomization_seed: $$SEED" -//@ ignore-backends: gcc #![feature(rustc_attrs)] #![crate_type = "lib"] diff --git a/tests/ui/abi/pass-indirectly-attr.stderr b/tests/ui/abi/pass-indirectly-attr.stderr index f2ba517a43a6e..600e38004908d 100644 --- a/tests/ui/abi/pass-indirectly-attr.stderr +++ b/tests/ui/abi/pass-indirectly-attr.stderr @@ -1,5 +1,5 @@ error[E0692]: transparent struct cannot have other repr hints - --> $DIR/pass-indirectly-attr.rs:35:1 + --> $DIR/pass-indirectly-attr.rs:34:1 | LL | #[rustc_pass_indirectly_in_non_rustic_abis] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -82,7 +82,7 @@ error: fn_abi_of(extern_c) = FnAbi { conv: C, can_unwind: false, } - --> $DIR/pass-indirectly-attr.rs:20:1 + --> $DIR/pass-indirectly-attr.rs:19:1 | LL | pub extern "C" fn extern_c(_: Type) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -171,7 +171,7 @@ error: fn_abi_of(extern_rust) = FnAbi { conv: Rust, can_unwind: false, } - --> $DIR/pass-indirectly-attr.rs:27:1 + --> $DIR/pass-indirectly-attr.rs:26:1 | LL | pub extern "Rust" fn extern_rust(_: Type) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/abi/s390x-softfloat-gate.rs b/tests/ui/abi/s390x-softfloat-gate.rs index 496929eb09551..f8e05ebef2ed4 100644 --- a/tests/ui/abi/s390x-softfloat-gate.rs +++ b/tests/ui/abi/s390x-softfloat-gate.rs @@ -11,7 +11,6 @@ //@ [disable-softfloat] compile-flags: --target=s390x-unknown-linux-gnu //@ [disable-softfloat] compile-flags: -C target-feature=+soft-float //@ [disable-softfloat] needs-llvm-components: systemz -//@ ignore-backends: gcc //[disable-softfloat]~? WARN target feature `soft-float` must be disabled to ensure that the ABI of the current target can be implemented correctly //[disable-softfloat]~? WARN target feature `soft-float` cannot be enabled with `-Ctarget-feature` diff --git a/tests/ui/abi/segfault-no-out-of-stack.rs b/tests/ui/abi/segfault-no-out-of-stack.rs index b122079d36f76..5e8b4e0dbf2a6 100644 --- a/tests/ui/abi/segfault-no-out-of-stack.rs +++ b/tests/ui/abi/segfault-no-out-of-stack.rs @@ -2,7 +2,6 @@ //@ needs-subprocess //@ compile-flags: -Zub-checks=no -Zmir-enable-passes=-CheckNull //@ ignore-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590) -//@ ignore-backends: gcc #![feature(rustc_private)] diff --git a/tests/ui/abi/shadow-call-stack-without-fixed-x18.rs b/tests/ui/abi/shadow-call-stack-without-fixed-x18.rs index 824327ad06d36..b3bd0666ab21f 100644 --- a/tests/ui/abi/shadow-call-stack-without-fixed-x18.rs +++ b/tests/ui/abi/shadow-call-stack-without-fixed-x18.rs @@ -1,7 +1,6 @@ //@ compile-flags: --target aarch64-unknown-none -Zsanitizer=shadow-call-stack //@ dont-check-compiler-stderr //@ needs-llvm-components: aarch64 -//@ ignore-backends: gcc #![allow(internal_features)] #![crate_type = "rlib"] diff --git a/tests/ui/abi/stack-probes.rs b/tests/ui/abi/stack-probes.rs index be36eeefc31ea..c6a72fde0123c 100644 --- a/tests/ui/abi/stack-probes.rs +++ b/tests/ui/abi/stack-probes.rs @@ -11,7 +11,6 @@ //@ ignore-tvos Stack probes are enabled, but the SIGSEGV handler isn't //@ ignore-watchos Stack probes are enabled, but the SIGSEGV handler isn't //@ ignore-visionos Stack probes are enabled, but the SIGSEGV handler isn't -//@ ignore-backends: gcc use std::env; use std::mem::MaybeUninit; diff --git a/tests/ui/abi/stack-protector.rs b/tests/ui/abi/stack-protector.rs index 560b29576f3ab..ee12b541a3d53 100644 --- a/tests/ui/abi/stack-protector.rs +++ b/tests/ui/abi/stack-protector.rs @@ -4,7 +4,6 @@ //@ [ssp] compile-flags: -Z stack-protector=all -Z allow-partial-mitigations=stack-protector //@ compile-flags: -C opt-level=2 //@ compile-flags: -g -//@ ignore-backends: gcc #![allow(function_casts_as_integer)] diff --git a/tests/ui/abi/struct-enums/struct-return.rs b/tests/ui/abi/struct-enums/struct-return.rs index 5fe80d5f670b2..b8492de4974fa 100644 --- a/tests/ui/abi/struct-enums/struct-return.rs +++ b/tests/ui/abi/struct-enums/struct-return.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc #![allow(dead_code)] diff --git a/tests/ui/abi/swift-abi-non-apple.rs b/tests/ui/abi/swift-abi-non-apple.rs index a374f38c9c8eb..3ef85cf2003ba 100644 --- a/tests/ui/abi/swift-abi-non-apple.rs +++ b/tests/ui/abi/swift-abi-non-apple.rs @@ -1,7 +1,6 @@ //@ add-minicore //@ needs-llvm-components: x86 //@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -//@ ignore-backends: gcc #![no_core] #![feature(no_core, lang_items, abi_swift)] diff --git a/tests/ui/abi/swift-abi-non-apple.stderr b/tests/ui/abi/swift-abi-non-apple.stderr index 7dae75c96d46a..af0f5dd4ebaeb 100644 --- a/tests/ui/abi/swift-abi-non-apple.stderr +++ b/tests/ui/abi/swift-abi-non-apple.stderr @@ -1,41 +1,41 @@ error[E0570]: "Swift" is not a supported ABI for the current target - --> $DIR/swift-abi-non-apple.rs:14:8 + --> $DIR/swift-abi-non-apple.rs:13:8 | LL | extern "Swift" fn f() {} | ^^^^^^^ error[E0570]: "Swift" is not a supported ABI for the current target - --> $DIR/swift-abi-non-apple.rs:17:12 + --> $DIR/swift-abi-non-apple.rs:16:12 | LL | extern "Swift" fn m(); | ^^^^^^^ error[E0570]: "Swift" is not a supported ABI for the current target - --> $DIR/swift-abi-non-apple.rs:19:12 + --> $DIR/swift-abi-non-apple.rs:18:12 | LL | extern "Swift" fn dm() {} | ^^^^^^^ error[E0570]: "Swift" is not a supported ABI for the current target - --> $DIR/swift-abi-non-apple.rs:24:12 + --> $DIR/swift-abi-non-apple.rs:23:12 | LL | extern "Swift" fn m() {} | ^^^^^^^ error[E0570]: "Swift" is not a supported ABI for the current target - --> $DIR/swift-abi-non-apple.rs:28:12 + --> $DIR/swift-abi-non-apple.rs:27:12 | LL | extern "Swift" fn im() {} | ^^^^^^^ error[E0570]: "Swift" is not a supported ABI for the current target - --> $DIR/swift-abi-non-apple.rs:31:18 + --> $DIR/swift-abi-non-apple.rs:30:18 | LL | type TA = extern "Swift" fn(); | ^^^^^^^ error[E0570]: "Swift" is not a supported ABI for the current target - --> $DIR/swift-abi-non-apple.rs:33:8 + --> $DIR/swift-abi-non-apple.rs:32:8 | LL | extern "Swift" {} | ^^^^^^^ diff --git a/tests/ui/abi/variadic-ffi.rs b/tests/ui/abi/variadic-ffi.rs index 0f6183d6e2d40..293dc74fabec7 100644 --- a/tests/ui/abi/variadic-ffi.rs +++ b/tests/ui/abi/variadic-ffi.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc use std::ffi::VaList; diff --git a/tests/ui/abi/x86stdcall.rs b/tests/ui/abi/x86stdcall.rs index 77866c30f0e49..c1bd35b80d266 100644 --- a/tests/ui/abi/x86stdcall.rs +++ b/tests/ui/abi/x86stdcall.rs @@ -1,6 +1,5 @@ //@ run-pass //@ only-windows -//@ ignore-backends: gcc // GetLastError doesn't seem to work with stack switching #[cfg(windows)] diff --git a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs index 7b7ca2f6cc6bd..1b0f0608fc61b 100644 --- a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs +++ b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs @@ -2,7 +2,6 @@ //@ ignore-android no libc //@ ignore-emscripten no libc //@ ignore-sgx no libc -//@ ignore-backends: gcc //@ only-linux //@ compile-flags:-C panic=abort //@ aux-build:helper.rs diff --git a/tests/ui/allocator/no_std-alloc-error-handler-default.rs b/tests/ui/allocator/no_std-alloc-error-handler-default.rs index 5a6c0b33d5108..51ecf1a6731ac 100644 --- a/tests/ui/allocator/no_std-alloc-error-handler-default.rs +++ b/tests/ui/allocator/no_std-alloc-error-handler-default.rs @@ -2,7 +2,6 @@ //@ ignore-android no libc //@ ignore-emscripten no libc //@ ignore-sgx no libc -//@ ignore-backends: gcc //@ only-linux //@ compile-flags:-C panic=abort //@ aux-build:helper.rs diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs index 5f4e381c983a2..c7c05946c4ca9 100644 --- a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs +++ b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc #![allow(overflowing_literals)] diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs index ea37d3e721264..98175a26ec0d1 100644 --- a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs +++ b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc #![allow(overflowing_literals)] diff --git a/tests/ui/array-slice-vec/nested-vec-3.rs b/tests/ui/array-slice-vec/nested-vec-3.rs index e3c04ed6f6bf0..51975743742cf 100644 --- a/tests/ui/array-slice-vec/nested-vec-3.rs +++ b/tests/ui/array-slice-vec/nested-vec-3.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc #![allow(overflowing_literals)] diff --git a/tests/ui/array-slice-vec/slice-panic-1.rs b/tests/ui/array-slice-vec/slice-panic-1.rs index 60680c367a671..9c66cd285aeb4 100644 --- a/tests/ui/array-slice-vec/slice-panic-1.rs +++ b/tests/ui/array-slice-vec/slice-panic-1.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc // Test that if a slicing expr[..] fails, the correct cleanups happen. diff --git a/tests/ui/array-slice-vec/slice-panic-2.rs b/tests/ui/array-slice-vec/slice-panic-2.rs index e5ba045248da2..b2b841642ae4b 100644 --- a/tests/ui/array-slice-vec/slice-panic-2.rs +++ b/tests/ui/array-slice-vec/slice-panic-2.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc // Test that if a slicing expr[..] fails, the correct cleanups happen. diff --git a/tests/ui/asm/aarch64/aarch64-sve.rs b/tests/ui/asm/aarch64/aarch64-sve.rs index daa4ab98dee75..ac19b7bc98131 100644 --- a/tests/ui/asm/aarch64/aarch64-sve.rs +++ b/tests/ui/asm/aarch64/aarch64-sve.rs @@ -2,7 +2,6 @@ //@ add-minicore //@ compile-flags: --target aarch64-unknown-linux-gnu //@ needs-llvm-components: aarch64 -//@ ignore-backends: gcc #![crate_type = "rlib"] #![feature(no_core)] #![no_core] diff --git a/tests/ui/asm/aarch64/ttbr0_el2.rs b/tests/ui/asm/aarch64/ttbr0_el2.rs index 4032c70ed03c0..5e1e12de6f9c3 100644 --- a/tests/ui/asm/aarch64/ttbr0_el2.rs +++ b/tests/ui/asm/aarch64/ttbr0_el2.rs @@ -3,7 +3,6 @@ //@ build-pass //@ compile-flags: --target aarch64-unknown-linux-gnu //@ needs-llvm-components: aarch64 -//@ ignore-backends: gcc #![crate_type = "lib"] #![feature(no_core)] #![no_core] diff --git a/tests/ui/asm/aarch64v8r.rs b/tests/ui/asm/aarch64v8r.rs index abc254ad5f8ee..4136c3e99763e 100644 --- a/tests/ui/asm/aarch64v8r.rs +++ b/tests/ui/asm/aarch64v8r.rs @@ -11,7 +11,6 @@ //@ [r82] compile-flags: --target aarch64v8r-unknown-none -C target-cpu=cortex-r82 //@ [r82] needs-llvm-components: aarch64 //@ build-pass -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/asm/arm-low-dreg.rs b/tests/ui/asm/arm-low-dreg.rs index 6c1491ff06641..26f594f8362af 100644 --- a/tests/ui/asm/arm-low-dreg.rs +++ b/tests/ui/asm/arm-low-dreg.rs @@ -2,7 +2,6 @@ //@ build-pass //@ compile-flags: --target=armv7-unknown-linux-gnueabihf //@ needs-llvm-components: arm -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] #![no_core] diff --git a/tests/ui/asm/cortex-r82.rs b/tests/ui/asm/cortex-r82.rs index 74313e5cb48c1..c7a13ad7dccbd 100644 --- a/tests/ui/asm/cortex-r82.rs +++ b/tests/ui/asm/cortex-r82.rs @@ -4,7 +4,6 @@ //@ compile-flags: --target aarch64v8r-unknown-none -C target-cpu=cortex-r82 //@ needs-llvm-components: aarch64 //@ build-pass -//@ ignore-backends: gcc #![deny(dead_code)] #![feature(no_core)] diff --git a/tests/ui/asm/global-target-feature.rs b/tests/ui/asm/global-target-feature.rs index d84b4d51e6582..c3e4a171a663d 100644 --- a/tests/ui/asm/global-target-feature.rs +++ b/tests/ui/asm/global-target-feature.rs @@ -1,7 +1,6 @@ //@ build-pass //@ add-minicore //@ min-llvm-version: 23 -//@ ignore-backends: gcc // //@ revisions: riscv opt-0-bitcode-no opt-0 opt-s-bitcode-no // diff --git a/tests/ui/asm/issue-92378.rs b/tests/ui/asm/issue-92378.rs index 89ef2247d84b3..7a41ed5993aea 100644 --- a/tests/ui/asm/issue-92378.rs +++ b/tests/ui/asm/issue-92378.rs @@ -2,7 +2,6 @@ //@ compile-flags: --target armv5te-unknown-linux-gnueabi //@ needs-llvm-components: arm //@ build-pass -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/asm/naked-functions/shim.rs b/tests/ui/asm/naked-functions/shim.rs index 8d5b87f0bedde..218f9a670fe90 100644 --- a/tests/ui/asm/naked-functions/shim.rs +++ b/tests/ui/asm/naked-functions/shim.rs @@ -8,7 +8,6 @@ //@ [aarch64] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 -//@ ignore-backends: gcc #![feature(no_core, lang_items)] #![crate_type = "lib"] diff --git a/tests/ui/asm/thumbv6m-clobber-abi-r14.rs b/tests/ui/asm/thumbv6m-clobber-abi-r14.rs index 342e65b52d9d8..bf4f724f28751 100644 --- a/tests/ui/asm/thumbv6m-clobber-abi-r14.rs +++ b/tests/ui/asm/thumbv6m-clobber-abi-r14.rs @@ -2,7 +2,6 @@ //@ build-pass //@ compile-flags: --target thumbv6m-none-eabi //@ needs-llvm-components: arm -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/asm/x86_64/issue-96797.rs b/tests/ui/asm/x86_64/issue-96797.rs index 9978a4856a81f..5d3bbbb74bf56 100644 --- a/tests/ui/asm/x86_64/issue-96797.rs +++ b/tests/ui/asm/x86_64/issue-96797.rs @@ -2,7 +2,6 @@ //@ build-pass //@ compile-flags: --target x86_64-unknown-linux-gnu -O //@ needs-llvm-components: x86 -//@ ignore-backends: gcc #![crate_type = "lib"] #![feature(no_core)] #![no_core] diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs index d6180bb2f45d8..4bafb39f60096 100644 --- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs +++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ edition: 2021 //@ known-bug: #108309 diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr index 4feaee82fef79..fb80fe2b5a0d8 100644 --- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr +++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr @@ -1,12 +1,12 @@ error[E0053]: method `foo` has an incompatible type for trait - --> $DIR/dont-project-to-specializable-projection.rs:14:35 + --> $DIR/dont-project-to-specializable-projection.rs:13:35 | LL | impl MyTrait for MyStruct { LL | default async fn foo(_: T) -> &'static str { | ^^^^^^^^^^^^ expected associated type, found future | note: type in trait - --> $DIR/dont-project-to-specializable-projection.rs:10:27 + --> $DIR/dont-project-to-specializable-projection.rs:9:27 | LL | trait MyTrait { LL | async fn foo(_: T) -> &'static str; @@ -15,7 +15,7 @@ LL | async fn foo(_: T) -> &'static str; found signature `fn(_) -> impl Future` error: async associated function in trait cannot be specialized - --> $DIR/dont-project-to-specializable-projection.rs:14:5 + --> $DIR/dont-project-to-specializable-projection.rs:13:5 | LL | default async fn foo(_: T) -> &'static str { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ LL | default async fn foo(_: T) -> &'static str { = note: specialization behaves in inconsistent and surprising ways with async functions in traits, and for now is disallowed error[E0599]: no method named `poll` found for struct `Pin<&mut impl Future>` in the current scope - --> $DIR/dont-project-to-specializable-projection.rs:49:28 + --> $DIR/dont-project-to-specializable-projection.rs:48:28 | LL | match fut.as_mut().poll(ctx) { | ^^^^ method not found in `Pin<&mut impl Future>` diff --git a/tests/ui/attributes/issue-90873.stderr b/tests/ui/attributes/issue-90873.stderr index 444497538e8dc..afe36156f0e3a 100644 --- a/tests/ui/attributes/issue-90873.stderr +++ b/tests/ui/attributes/issue-90873.stderr @@ -1,15 +1,3 @@ -error: attribute value must be a literal - --> $DIR/issue-90873.rs:1:6 - | -LL | #![u=||{static d=||1;}] - | ^^^^^^^^^^^^^^^^^ - -error: attribute value must be a literal - --> $DIR/issue-90873.rs:6:6 - | -LL | #![a={impl std::ops::Neg for i8 {}}] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - error: cannot find attribute `u` in this scope --> $DIR/issue-90873.rs:1:4 | @@ -22,6 +10,18 @@ error: cannot find attribute `a` in this scope LL | #![a={impl std::ops::Neg for i8 {}}] | ^ +error: attribute value must be a literal + --> $DIR/issue-90873.rs:1:6 + | +LL | #![u=||{static d=||1;}] + | ^^^^^^^^^^^^^^^^^ + +error: attribute value must be a literal + --> $DIR/issue-90873.rs:6:6 + | +LL | #![a={impl std::ops::Neg for i8 {}}] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error[E0601]: `main` function not found in crate `issue_90873` --> $DIR/issue-90873.rs:6:37 | diff --git a/tests/ui/attributes/main-removed-2/main.rs b/tests/ui/attributes/main-removed-2/main.rs index 21a05dc4b40be..53696d68ced07 100644 --- a/tests/ui/attributes/main-removed-2/main.rs +++ b/tests/ui/attributes/main-removed-2/main.rs @@ -2,7 +2,6 @@ //@ proc-macro: tokyo.rs //@ compile-flags:--extern tokyo //@ edition:2021 -//@ ignore-backends: gcc use tokyo::main; diff --git a/tests/ui/attributes/unused-item-in-attr.stderr b/tests/ui/attributes/unused-item-in-attr.stderr index 84130965d31cf..1d4437647d3cc 100644 --- a/tests/ui/attributes/unused-item-in-attr.stderr +++ b/tests/ui/attributes/unused-item-in-attr.stderr @@ -1,14 +1,14 @@ -error: attribute value must be a literal - --> $DIR/unused-item-in-attr.rs:1:7 - | -LL | #[w = { extern crate alloc; }] - | ^^^^^^^^^^^^^^^^^^^^^^^ - error: cannot find attribute `w` in this scope --> $DIR/unused-item-in-attr.rs:1:3 | LL | #[w = { extern crate alloc; }] | ^ +error: attribute value must be a literal + --> $DIR/unused-item-in-attr.rs:1:7 + | +LL | #[w = { extern crate alloc; }] + | ^^^^^^^^^^^^^^^^^^^^^^^ + error: aborting due to 2 previous errors diff --git a/tests/ui/backtrace/dylib-dep.rs b/tests/ui/backtrace/dylib-dep.rs index a51ce3d8d04cc..e01a6ade1d368 100644 --- a/tests/ui/backtrace/dylib-dep.rs +++ b/tests/ui/backtrace/dylib-dep.rs @@ -13,7 +13,6 @@ //@ ignore-watchos needs the `.dSYM` files to be moved to the device //@ ignore-visionos needs the `.dSYM` files to be moved to the device //@ needs-unwind -//@ ignore-backends: gcc //@ compile-flags: -g -Copt-level=0 -Cstrip=none -Cforce-frame-pointers=yes //@ ignore-wasm Requires custom symbolization code //@ aux-crate: dylib_dep_helper=dylib-dep-helper.rs diff --git a/tests/ui/backtrace/synchronized-panic-handler.rs b/tests/ui/backtrace/synchronized-panic-handler.rs index ef7cc1faec8de..29431ae3c458a 100644 --- a/tests/ui/backtrace/synchronized-panic-handler.rs +++ b/tests/ui/backtrace/synchronized-panic-handler.rs @@ -4,7 +4,6 @@ //@ exec-env:RUST_BACKTRACE=0 //@ needs-threads //@ needs-unwind -//@ ignore-backends: gcc use std::thread; const PANIC_MESSAGE: &str = "oops oh no woe is me"; diff --git a/tests/ui/backtrace/synchronized-panic-handler.run.stderr b/tests/ui/backtrace/synchronized-panic-handler.run.stderr index 5296a0d39ff30..c604d49c193c5 100644 --- a/tests/ui/backtrace/synchronized-panic-handler.run.stderr +++ b/tests/ui/backtrace/synchronized-panic-handler.run.stderr @@ -1,7 +1,7 @@ -thread '' ($TID) panicked at $DIR/synchronized-panic-handler.rs:12:5: +thread '' ($TID) panicked at $DIR/synchronized-panic-handler.rs:11:5: oops oh no woe is me note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace -thread '' ($TID) panicked at $DIR/synchronized-panic-handler.rs:12:5: +thread '' ($TID) panicked at $DIR/synchronized-panic-handler.rs:11:5: oops oh no woe is me diff --git a/tests/ui/c-variadic/copy.rs b/tests/ui/c-variadic/copy.rs index 7befce36902c7..9f9c56f65da70 100644 --- a/tests/ui/c-variadic/copy.rs +++ b/tests/ui/c-variadic/copy.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc // Test the behavior of `VaList::clone`. In C a `va_list` is duplicated using `va_copy`, but the // rust api just uses `Clone`. This should create a completely independent cursor into the diff --git a/tests/ui/c-variadic/inherent-method.rs b/tests/ui/c-variadic/inherent-method.rs index 5f5cdc76d4a2e..156187fd67335 100644 --- a/tests/ui/c-variadic/inherent-method.rs +++ b/tests/ui/c-variadic/inherent-method.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc #[repr(transparent)] struct S(i32); diff --git a/tests/ui/c-variadic/naked-invalid.rs b/tests/ui/c-variadic/naked-invalid.rs index 0cd37c94b6764..8d0b5607b5840 100644 --- a/tests/ui/c-variadic/naked-invalid.rs +++ b/tests/ui/c-variadic/naked-invalid.rs @@ -1,7 +1,6 @@ //@ add-minicore //@ compile-flags: --target x86_64-unknown-linux-gnu //@ needs-llvm-components: x86 -//@ ignore-backends: gcc #![feature(no_core, lang_items, rustc_attrs)] #![feature(abi_x86_interrupt, naked_functions_rustic_abi)] diff --git a/tests/ui/c-variadic/naked-invalid.stderr b/tests/ui/c-variadic/naked-invalid.stderr index 0842be296fe33..8d81bd0e10a11 100644 --- a/tests/ui/c-variadic/naked-invalid.stderr +++ b/tests/ui/c-variadic/naked-invalid.stderr @@ -1,5 +1,5 @@ error: `...` is not supported for `extern "Rust"` naked functions - --> $DIR/naked-invalid.rs:26:41 + --> $DIR/naked-invalid.rs:25:41 | LL | unsafe extern "Rust" fn c_variadic_rust(_: ...) { | ------------- ^^^^^^ @@ -9,7 +9,7 @@ LL | unsafe extern "Rust" fn c_variadic_rust(_: ...) { = help: C-variadic function must have a compatible calling convention error: `...` is not supported for `extern "x86-interrupt"` naked functions - --> $DIR/naked-invalid.rs:32:59 + --> $DIR/naked-invalid.rs:31:59 | LL | unsafe extern "x86-interrupt" fn c_variadic_x86_interrupt(_: ...) { | ---------------------- ^^^^^^ @@ -19,7 +19,7 @@ LL | unsafe extern "x86-interrupt" fn c_variadic_x86_interrupt(_: ...) { = help: C-variadic function must have a compatible calling convention error[E0703]: invalid ABI: found `nonsense` - --> $DIR/naked-invalid.rs:38:15 + --> $DIR/naked-invalid.rs:37:15 | LL | unsafe extern "nonsense" fn c_variadic_x86_nonsense(_: ...) { | ^^^^^^^^^^ invalid ABI diff --git a/tests/ui/c-variadic/roundtrip.rs b/tests/ui/c-variadic/roundtrip.rs index 992daa139a1fd..ba1f7f3bea8aa 100644 --- a/tests/ui/c-variadic/roundtrip.rs +++ b/tests/ui/c-variadic/roundtrip.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc #![feature( const_c_variadic, c_variadic_va_arg_safe, diff --git a/tests/ui/c-variadic/trait-method.rs b/tests/ui/c-variadic/trait-method.rs index 9a3ba87614214..557fbfe1a059c 100644 --- a/tests/ui/c-variadic/trait-method.rs +++ b/tests/ui/c-variadic/trait-method.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc #[repr(transparent)] struct Struct(i32); diff --git a/tests/ui/c-variadic/valid.rs b/tests/ui/c-variadic/valid.rs index 9d937e611afe8..fba85cca8dc48 100644 --- a/tests/ui/c-variadic/valid.rs +++ b/tests/ui/c-variadic/valid.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc // In rust (and C23 and above) `...` can be the only argument. unsafe extern "C" fn only_dot_dot_dot(mut ap: ...) -> i32 { diff --git a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs index 2ca004d9a906d..cafb7389e29fa 100644 --- a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs +++ b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs @@ -2,7 +2,6 @@ //@ proc-macro: ver-cfg-rel.rs //@ revisions: assume no_assume //@ [assume]compile-flags: -Z assume-incomplete-release -//@ ignore-backends: gcc #![feature(cfg_version)] diff --git a/tests/ui/cfg/cfg-panic-abort.rs b/tests/ui/cfg/cfg-panic-abort.rs index af4e119ef9fe3..b3255476c64c2 100644 --- a/tests/ui/cfg/cfg-panic-abort.rs +++ b/tests/ui/cfg/cfg-panic-abort.rs @@ -1,7 +1,6 @@ //@ build-pass //@ compile-flags: -C panic=abort //@ no-prefer-dynamic -//@ ignore-backends: gcc //@ reference: cfg.panic.def //@ reference: cfg.panic.values diff --git a/tests/ui/cfg/cfg_target_object_format.rs b/tests/ui/cfg/cfg_target_object_format.rs index cea2027b35c0b..dcb54d177cb48 100644 --- a/tests/ui/cfg/cfg_target_object_format.rs +++ b/tests/ui/cfg/cfg_target_object_format.rs @@ -1,6 +1,5 @@ //@ add-minicore //@ check-pass -//@ ignore-backends: gcc // //@ revisions: linux_gnu linux_musl linux_ohos linux_powerpc //@[linux_gnu] compile-flags: --target aarch64-unknown-linux-gnu diff --git a/tests/ui/check-cfg/values-target-json.rs b/tests/ui/check-cfg/values-target-json.rs index 21b6af9b55605..4e2cef3bc16e4 100644 --- a/tests/ui/check-cfg/values-target-json.rs +++ b/tests/ui/check-cfg/values-target-json.rs @@ -6,7 +6,6 @@ //@ needs-llvm-components: x86 //@ compile-flags: --crate-type=lib --check-cfg=cfg() //@ compile-flags: -Zunstable-options --target={{src-base}}/check-cfg/my-awesome-platform.json -//@ ignore-backends: gcc #![feature(lang_items, no_core, auto_traits, rustc_attrs)] #![no_core] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs index 0546b26820bca..de5823cccdf85 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs @@ -2,7 +2,6 @@ //@ build-pass //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib //@ needs-llvm-components: arm -//@ ignore-backends: gcc #![feature(abi_cmse_nonsecure_call, cmse_nonsecure_entry, no_core, lang_items, intrinsics)] #![no_core] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs index 5528865fc840e..db9a51969a9f3 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs @@ -2,7 +2,6 @@ //@ build-pass //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib //@ needs-llvm-components: arm -//@ ignore-backends: gcc #![feature(abi_cmse_nonsecure_call, no_core, lang_items, intrinsics)] #![no_core] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs index 756cc6816acd8..3f979b5acba2b 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs @@ -2,7 +2,6 @@ //@ build-pass //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib //@ needs-llvm-components: arm -//@ ignore-backends: gcc #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #![crate_type = "lib"] diff --git a/tests/ui/codegen/custom-target-invalid-llvm-target.rs b/tests/ui/codegen/custom-target-invalid-llvm-target.rs index d90b56c5d13c0..8b9af65cf3550 100644 --- a/tests/ui/codegen/custom-target-invalid-llvm-target.rs +++ b/tests/ui/codegen/custom-target-invalid-llvm-target.rs @@ -3,7 +3,6 @@ // ignore-tidy-target-specific-tests //@ check-fail //@ compile-flags: --target={{src-base}}/codegen/custom-target-invalid-llvm-target.json -Z unstable-options -//@ ignore-backends: gcc fn main() {} diff --git a/tests/ui/codegen/mismatched-data-layouts.rs b/tests/ui/codegen/mismatched-data-layouts.rs index bf866c3b1c9d0..ea1457148a52c 100644 --- a/tests/ui/codegen/mismatched-data-layouts.rs +++ b/tests/ui/codegen/mismatched-data-layouts.rs @@ -6,7 +6,6 @@ //@ normalize-stderr: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" //@ normalize-stderr: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" //@ normalize-stderr: "`mismatched-data-layout-\d+`" -> "`mismatched-data-layout-`" -//@ ignore-backends: gcc #![feature(lang_items, no_core, auto_traits)] #![no_core] diff --git a/tests/ui/codegen/passes-default-pipeline.rs b/tests/ui/codegen/passes-default-pipeline.rs index dd90b55e2da9f..9c4b19fec3c81 100644 --- a/tests/ui/codegen/passes-default-pipeline.rs +++ b/tests/ui/codegen/passes-default-pipeline.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc //@ compile-flags: -O -Cpasses=default fn main() { diff --git a/tests/ui/codegen/target-cpus.rs b/tests/ui/codegen/target-cpus.rs index 77a3f18dfa0fd..2d46e00f8034e 100644 --- a/tests/ui/codegen/target-cpus.rs +++ b/tests/ui/codegen/target-cpus.rs @@ -1,4 +1,3 @@ //@ needs-llvm-components: webassembly //@ compile-flags: --print=target-cpus --target=wasm32-unknown-unknown //@ check-pass -//@ ignore-backends: gcc diff --git a/tests/ui/compile-flags/invalid/function-return/requires-x86-or-x86_64.rs b/tests/ui/compile-flags/invalid/function-return/requires-x86-or-x86_64.rs index e46530a12c382..c7973c686da00 100644 --- a/tests/ui/compile-flags/invalid/function-return/requires-x86-or-x86_64.rs +++ b/tests/ui/compile-flags/invalid/function-return/requires-x86-or-x86_64.rs @@ -13,7 +13,6 @@ //@[aarch64] check-fail //@[aarch64] needs-llvm-components: aarch64 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/compile-flags/invalid/indirect-branch-cs-prefix/requires-x86-or-x86_64.rs b/tests/ui/compile-flags/invalid/indirect-branch-cs-prefix/requires-x86-or-x86_64.rs index f0409a6f07796..bc81c993d26ef 100644 --- a/tests/ui/compile-flags/invalid/indirect-branch-cs-prefix/requires-x86-or-x86_64.rs +++ b/tests/ui/compile-flags/invalid/indirect-branch-cs-prefix/requires-x86-or-x86_64.rs @@ -13,7 +13,6 @@ //@[aarch64] check-fail //@[aarch64] needs-llvm-components: aarch64 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/compile-flags/invalid/reg-struct-return/requires-x86.rs b/tests/ui/compile-flags/invalid/reg-struct-return/requires-x86.rs index 321cf56cd2a0f..436442ee72993 100644 --- a/tests/ui/compile-flags/invalid/reg-struct-return/requires-x86.rs +++ b/tests/ui/compile-flags/invalid/reg-struct-return/requires-x86.rs @@ -13,7 +13,6 @@ //@[aarch64] check-fail //@[aarch64] needs-llvm-components: aarch64 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/compile-flags/invalid/regparm/regparm-valid-values.rs b/tests/ui/compile-flags/invalid/regparm/regparm-valid-values.rs index 6999eaac962aa..a66dfe8597718 100644 --- a/tests/ui/compile-flags/invalid/regparm/regparm-valid-values.rs +++ b/tests/ui/compile-flags/invalid/regparm/regparm-valid-values.rs @@ -17,7 +17,6 @@ //@[regparm4] check-fail //@[regparm4] compile-flags: -Zregparm=4 -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/compile-flags/invalid/regparm/requires-x86.rs b/tests/ui/compile-flags/invalid/regparm/requires-x86.rs index 983e412376dc0..32c4b5af35772 100644 --- a/tests/ui/compile-flags/invalid/regparm/requires-x86.rs +++ b/tests/ui/compile-flags/invalid/regparm/requires-x86.rs @@ -13,7 +13,6 @@ //@[aarch64] check-fail //@[aarch64] needs-llvm-components: aarch64 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/compile-flags/print-request-help-stable-unstable.rs b/tests/ui/compile-flags/print-request-help-stable-unstable.rs index f75996f28e6bd..a1bde032784dd 100644 --- a/tests/ui/compile-flags/print-request-help-stable-unstable.rs +++ b/tests/ui/compile-flags/print-request-help-stable-unstable.rs @@ -2,7 +2,6 @@ //! //! Issue: -//@ ignore-backends: gcc //@ compile-flags: --print xxx // //@ revisions: stable nightly diff --git a/tests/ui/const-generics/early/macro_rules-braces.stderr b/tests/ui/const-generics/early/macro_rules-braces.stderr index 6cc9a67f194b7..98e905d71c04b 100644 --- a/tests/ui/const-generics/early/macro_rules-braces.stderr +++ b/tests/ui/const-generics/early/macro_rules-braces.stderr @@ -2,7 +2,7 @@ error: expressions must be enclosed in braces to be used as const generic argume --> $DIR/macro_rules-braces.rs:44:17 | LL | let _: baz!(m::P); - | -----^^^^- this macro call doesn't expand to a type + | ^^^^ | help: enclose the `const` expression in braces | @@ -13,7 +13,7 @@ error: expressions must be enclosed in braces to be used as const generic argume --> $DIR/macro_rules-braces.rs:64:17 | LL | let _: baz!(10 + 7); - | -----^^^^^^- this macro call doesn't expand to a type + | ^^^^^^ | help: enclose the `const` expression in braces | diff --git a/tests/ui/const-generics/min_const_generics/macro-fail-const.stderr b/tests/ui/const-generics/min_const_generics/macro-fail-const.stderr index 2fa529c750d10..2688675f3aa43 100644 --- a/tests/ui/const-generics/min_const_generics/macro-fail-const.stderr +++ b/tests/ui/const-generics/min_const_generics/macro-fail-const.stderr @@ -2,10 +2,7 @@ error: expected type, found `{` --> $DIR/macro-fail-const.rs:16:27 | LL | fn make_marker() -> impl Marker { - | ---------------------- - | | - | this macro call doesn't expand to a type - | in this macro invocation + | ---------------------- in this macro invocation ... LL | macro_rules! gimme_a_const { LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }} @@ -15,10 +12,7 @@ error: expected type, found `{` --> $DIR/macro-fail-const.rs:16:27 | LL | Example:: - | ---------------------- - | | - | this macro call doesn't expand to a type - | in this macro invocation + | ---------------------- in this macro invocation ... LL | macro_rules! gimme_a_const { LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }} diff --git a/tests/ui/const-generics/min_const_generics/macro-fail.stderr b/tests/ui/const-generics/min_const_generics/macro-fail.stderr index 23eeec7f6daa0..c190ceb40a82d 100644 --- a/tests/ui/const-generics/min_const_generics/macro-fail.stderr +++ b/tests/ui/const-generics/min_const_generics/macro-fail.stderr @@ -2,10 +2,7 @@ error: expected type, found `{` --> $DIR/macro-fail.rs:27:27 | LL | fn make_marker() -> impl Marker { - | ---------------------- - | | - | this macro call doesn't expand to a type - | in this macro invocation + | ---------------------- in this macro invocation ... LL | macro_rules! gimme_a_const { LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }} @@ -15,10 +12,7 @@ error: expected type, found `{` --> $DIR/macro-fail.rs:27:27 | LL | Example:: - | ---------------------- - | | - | this macro call doesn't expand to a type - | in this macro invocation + | ---------------------- in this macro invocation ... LL | macro_rules! gimme_a_const { LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }} @@ -32,10 +26,7 @@ LL | () => {{ | ^ expected type ... LL | let _fail = Example::; - | ----------------- - | | - | this macro call doesn't expand to a type - | in this macro invocation + | ----------------- in this macro invocation error: unexpected end of macro invocation --> $DIR/macro-fail.rs:36:25 diff --git a/tests/ui/consts/const-destruct-stable-toolchain.nightly.stderr b/tests/ui/consts/const-destruct-stable-toolchain.nightly.stderr index 2d05a300165aa..d23fe15c126ab 100644 --- a/tests/ui/consts/const-destruct-stable-toolchain.nightly.stderr +++ b/tests/ui/consts/const-destruct-stable-toolchain.nightly.stderr @@ -1,5 +1,5 @@ error[E0493]: destructor of `T` cannot be evaluated at compile-time - --> $DIR/const-destruct-stable-toolchain.rs:12:24 + --> $DIR/const-destruct-stable-toolchain.rs:11:24 | LL | const fn const_drop(_: T) {} | ^ - value is dropped here diff --git a/tests/ui/consts/const-destruct-stable-toolchain.rs b/tests/ui/consts/const-destruct-stable-toolchain.rs index ad16a74508e4c..d14ab320516fd 100644 --- a/tests/ui/consts/const-destruct-stable-toolchain.rs +++ b/tests/ui/consts/const-destruct-stable-toolchain.rs @@ -3,7 +3,6 @@ // requires an unstable feature. // //@ needs-target-std -//@ ignore-backends: gcc // //@ revisions: stable nightly // diff --git a/tests/ui/consts/const-destruct-stable-toolchain.stable.stderr b/tests/ui/consts/const-destruct-stable-toolchain.stable.stderr index 4755afcd3f1e3..e56e66bade980 100644 --- a/tests/ui/consts/const-destruct-stable-toolchain.stable.stderr +++ b/tests/ui/consts/const-destruct-stable-toolchain.stable.stderr @@ -1,5 +1,5 @@ error[E0493]: destructor of `T` cannot be evaluated at compile-time - --> $DIR/const-destruct-stable-toolchain.rs:12:24 + --> $DIR/const-destruct-stable-toolchain.rs:11:24 | LL | const fn const_drop(_: T) {} | ^ - value is dropped here diff --git a/tests/ui/consts/const-eval/c-variadic.rs b/tests/ui/consts/const-eval/c-variadic.rs index 6dba6e1af5997..57c49ef283f3e 100644 --- a/tests/ui/consts/const-eval/c-variadic.rs +++ b/tests/ui/consts/const-eval/c-variadic.rs @@ -1,6 +1,5 @@ //@ edition: 2021 //@ run-pass -//@ ignore-backends: gcc #![feature(const_c_variadic)] #![feature(const_destruct)] diff --git a/tests/ui/consts/const-eval/parse_ints.rs b/tests/ui/consts/const-eval/parse_ints.rs index 6a7e157ea5039..409fae9e51d92 100644 --- a/tests/ui/consts/const-eval/parse_ints.rs +++ b/tests/ui/consts/const-eval/parse_ints.rs @@ -1,5 +1,3 @@ -//@ ignore-backends: gcc - const _OK: () = match i32::from_str_radix("-1234", 10) { Ok(x) => assert!(x == -1234), Err(_) => panic!(), diff --git a/tests/ui/consts/const-eval/parse_ints.stderr b/tests/ui/consts/const-eval/parse_ints.stderr index b8027fd951d5a..ef2214ce19d8c 100644 --- a/tests/ui/consts/const-eval/parse_ints.stderr +++ b/tests/ui/consts/const-eval/parse_ints.stderr @@ -1,5 +1,5 @@ error[E0080]: evaluation panicked: from_ascii_bytes_radix: radix must lie in the range `[2, 36]` - --> $DIR/parse_ints.rs:7:24 + --> $DIR/parse_ints.rs:5:24 | LL | const _TOO_LOW: () = { u64::from_str_radix("12345ABCD", 1); }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_TOO_LOW` failed inside this call @@ -17,7 +17,7 @@ note: inside `core::num::::from_ascii_bytes_radix_impl` = note: this error originates in the macro `from_str_int_impl` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: from_ascii_bytes_radix: radix must lie in the range `[2, 36]` - --> $DIR/parse_ints.rs:8:25 + --> $DIR/parse_ints.rs:6:25 | LL | const _TOO_HIGH: () = { u64::from_str_radix("12345ABCD", 37); }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_TOO_HIGH` failed inside this call diff --git a/tests/ui/consts/const-eval/raw-bytes.rs b/tests/ui/consts/const-eval/raw-bytes.rs index c682a17b8decf..8d13b5513fb9f 100644 --- a/tests/ui/consts/const-eval/raw-bytes.rs +++ b/tests/ui/consts/const-eval/raw-bytes.rs @@ -4,7 +4,7 @@ // ignore-tidy-file-linelength #![allow(invalid_value, unnecessary_transmutes)] -#![feature(pattern_types, pattern_type_macro)] +#![feature(pattern_types)] #![feature(rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)] use std::mem; diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs index 9cd47e4b155e3..eadb7ccf1126c 100644 --- a/tests/ui/consts/const-eval/ub-ref-ptr.rs +++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs @@ -6,7 +6,7 @@ //@ normalize-stderr: "0x[0-9](\.\.|\])" -> "0x%$1" //@ normalize-stderr: "╾ALLOC\$ID╼\s+│.*╾.*╼" -> "╾ALLOC$$ID╼ │ ╾─╼" -#![feature(pattern_types, pattern_type_macro)] +#![feature(pattern_types)] #![allow(invalid_value)] use std::{mem, pat::pattern_type}; diff --git a/tests/ui/consts/const_cmp_type_id.rs b/tests/ui/consts/const_cmp_type_id.rs index dc0701d3b1d6a..da0ba3ffebac8 100644 --- a/tests/ui/consts/const_cmp_type_id.rs +++ b/tests/ui/consts/const_cmp_type_id.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ compile-flags: -Znext-solver #![feature(const_trait_impl, const_cmp)] diff --git a/tests/ui/consts/const_cmp_type_id.stderr b/tests/ui/consts/const_cmp_type_id.stderr index b991b6af08cc1..dd2d1e86cced2 100644 --- a/tests/ui/consts/const_cmp_type_id.stderr +++ b/tests/ui/consts/const_cmp_type_id.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `TypeId: const PartialOrd` is not satisfied - --> $DIR/const_cmp_type_id.rs:11:18 + --> $DIR/const_cmp_type_id.rs:10:18 | LL | let _a = TypeId::of::() < TypeId::of::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/consts/issue-73976-monomorphic.rs b/tests/ui/consts/issue-73976-monomorphic.rs index 6459150a66045..2867b836f4826 100644 --- a/tests/ui/consts/issue-73976-monomorphic.rs +++ b/tests/ui/consts/issue-73976-monomorphic.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ check-pass // // This test is complement to the test in issue-73976-polymorphic.rs. diff --git a/tests/ui/consts/issue-90878-2.stderr b/tests/ui/consts/issue-90878-2.stderr index 0b332840042ef..f5991ef9bcf7b 100644 --- a/tests/ui/consts/issue-90878-2.stderr +++ b/tests/ui/consts/issue-90878-2.stderr @@ -1,14 +1,14 @@ -error: attribute value must be a literal - --> $DIR/issue-90878-2.rs:1:7 - | -LL | #![l=|x|[b;x ]] - | ^^^^^^^^^ - error: cannot find attribute `l` in this scope --> $DIR/issue-90878-2.rs:1:5 | LL | #![l=|x|[b;x ]] | ^ +error: attribute value must be a literal + --> $DIR/issue-90878-2.rs:1:7 + | +LL | #![l=|x|[b;x ]] + | ^^^^^^^^^ + error: aborting due to 2 previous errors diff --git a/tests/ui/consts/issue-94675.rs b/tests/ui/consts/issue-94675.rs index 73ab2c7655800..c13fe26ae05a0 100644 --- a/tests/ui/consts/issue-94675.rs +++ b/tests/ui/consts/issue-94675.rs @@ -1,5 +1,3 @@ -//@ ignore-backends: gcc - #![feature(const_trait_impl)] struct Foo<'a> { diff --git a/tests/ui/consts/issue-94675.stderr b/tests/ui/consts/issue-94675.stderr index 3e89e37814fad..9a12c0ef6a75b 100644 --- a/tests/ui/consts/issue-94675.stderr +++ b/tests/ui/consts/issue-94675.stderr @@ -1,5 +1,5 @@ error: `IndexMut` is not yet stable as a const trait - --> $DIR/issue-94675.rs:11:17 + --> $DIR/issue-94675.rs:9:17 | LL | self.bar[0] = baz.len(); | ^^^ diff --git a/tests/ui/consts/issue-miri-1910.rs b/tests/ui/consts/issue-miri-1910.rs index 97cc92417bf46..dfc7bb737cd9e 100644 --- a/tests/ui/consts/issue-miri-1910.rs +++ b/tests/ui/consts/issue-miri-1910.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ normalize-stderr: "alloc[0-9]+\+0x[a-z0-9]+" -> "ALLOC" const C: () = unsafe { diff --git a/tests/ui/consts/issue-miri-1910.stderr b/tests/ui/consts/issue-miri-1910.stderr index af4e3f3fc5352..a5b518e94213f 100644 --- a/tests/ui/consts/issue-miri-1910.stderr +++ b/tests/ui/consts/issue-miri-1910.stderr @@ -1,5 +1,5 @@ error[E0080]: unable to turn pointer into integer - --> $DIR/issue-miri-1910.rs:7:5 + --> $DIR/issue-miri-1910.rs:6:5 | LL | const C: () = unsafe { ... diff --git a/tests/ui/consts/missing_span_in_backtrace.rs b/tests/ui/consts/missing_span_in_backtrace.rs index b679493eb08eb..94de3390a0267 100644 --- a/tests/ui/consts/missing_span_in_backtrace.rs +++ b/tests/ui/consts/missing_span_in_backtrace.rs @@ -1,5 +1,4 @@ //! Check what happens when the error occurs inside a std function that we can't print the span of. -//@ ignore-backends: gcc //@ compile-flags: -Z ui-testing=no --diagnostic-width=80 use std::{ diff --git a/tests/ui/consts/missing_span_in_backtrace.stderr b/tests/ui/consts/missing_span_in_backtrace.stderr index 7af55684861bc..411dbe5403eb0 100644 --- a/tests/ui/consts/missing_span_in_backtrace.stderr +++ b/tests/ui/consts/missing_span_in_backtrace.stderr @@ -1,13 +1,13 @@ error[E0080]: memory access failed: attempting to access 1 byte, but got ALLOC$ID+0x4 which is at or beyond the end of the allocation of size 4 bytes - --> $DIR/missing_span_in_backtrace.rs:16:9 + --> $DIR/missing_span_in_backtrace.rs:15:9 | -10 | const X: () = { + 9 | const X: () = { ... -16 | / ptr::swap_nonoverlapping( -17 | | &mut x1 as *mut _ as *mut MaybeUninit, -18 | | &mut x2 as *mut _ as *mut MaybeUninit, -19 | | 10, -20 | | ); +15 | / ptr::swap_nonoverlapping( +16 | | &mut x1 as *mut _ as *mut MaybeUninit, +17 | | &mut x2 as *mut _ as *mut MaybeUninit, +18 | | 10, +19 | | ); | |_________^ evaluation of `X` failed inside this call | note: inside `swap_nonoverlapping::compiletime::>` diff --git a/tests/ui/consts/try-operator.rs b/tests/ui/consts/try-operator.rs index 54a6ed26241c6..8beff899bb5af 100644 --- a/tests/ui/consts/try-operator.rs +++ b/tests/ui/consts/try-operator.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ run-pass #![feature(const_trait_impl)] diff --git a/tests/ui/coroutine/gen_block_panic.rs b/tests/ui/coroutine/gen_block_panic.rs index 5417ed583e8ca..b6362d5046a3b 100644 --- a/tests/ui/coroutine/gen_block_panic.rs +++ b/tests/ui/coroutine/gen_block_panic.rs @@ -1,7 +1,6 @@ //@ edition: 2024 //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc #![feature(gen_blocks)] fn main() { diff --git a/tests/ui/coroutine/gen_block_panic.stderr b/tests/ui/coroutine/gen_block_panic.stderr index d0a146e7baf9a..a43c9e03691a5 100644 --- a/tests/ui/coroutine/gen_block_panic.stderr +++ b/tests/ui/coroutine/gen_block_panic.stderr @@ -1,5 +1,5 @@ warning: unreachable statement - --> $DIR/gen_block_panic.rs:11:9 + --> $DIR/gen_block_panic.rs:10:9 | LL | panic!("foo"); | ------------- any code following this expression is unreachable diff --git a/tests/ui/coroutine/panic-drops-resume.rs b/tests/ui/coroutine/panic-drops-resume.rs index ee58dab3e3703..b23666b7885fb 100644 --- a/tests/ui/coroutine/panic-drops-resume.rs +++ b/tests/ui/coroutine/panic-drops-resume.rs @@ -2,7 +2,6 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/ui/coroutine/panic-drops.rs b/tests/ui/coroutine/panic-drops.rs index c8ac401372f78..8c2cf560f2acc 100644 --- a/tests/ui/coroutine/panic-drops.rs +++ b/tests/ui/coroutine/panic-drops.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/ui/coroutine/panic-safe.rs b/tests/ui/coroutine/panic-safe.rs index cee2afacb6145..d25eaa418fe14 100644 --- a/tests/ui/coroutine/panic-safe.rs +++ b/tests/ui/coroutine/panic-safe.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/ui/coroutine/resume-after-return.rs b/tests/ui/coroutine/resume-after-return.rs index f566bd37d3d10..7028e1e81e55c 100644 --- a/tests/ui/coroutine/resume-after-return.rs +++ b/tests/ui/coroutine/resume-after-return.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ run-pass //@ needs-unwind diff --git a/tests/ui/coroutine/unwind-abort-mix.rs b/tests/ui/coroutine/unwind-abort-mix.rs index 175c2928a8010..517c6613e3d8b 100644 --- a/tests/ui/coroutine/unwind-abort-mix.rs +++ b/tests/ui/coroutine/unwind-abort-mix.rs @@ -6,7 +6,6 @@ //@ aux-build:unwind-aux.rs //@ compile-flags: -Cpanic=abort //@ needs-unwind -//@ ignore-backends: gcc extern crate unwind_aux; pub fn main() { diff --git a/tests/ui/crate-loading/missing-target-error.rs b/tests/ui/crate-loading/missing-target-error.rs index 3a75d568d2c8e..aece47ec3f9d4 100644 --- a/tests/ui/crate-loading/missing-target-error.rs +++ b/tests/ui/crate-loading/missing-target-error.rs @@ -8,6 +8,5 @@ //@ compile-flags: --target=thumbv6m-none-eabi //@ ignore-arm //@ needs-llvm-components: arm -//@ ignore-backends: gcc fn main() { } diff --git a/tests/ui/crate-loading/missing-target-no-std-error.rs b/tests/ui/crate-loading/missing-target-no-std-error.rs index c285740c62bec..6c337aa02b3bd 100644 --- a/tests/ui/crate-loading/missing-target-no-std-error.rs +++ b/tests/ui/crate-loading/missing-target-no-std-error.rs @@ -5,7 +5,6 @@ //@ compile-flags: --target thumbv7em-none-eabihf //@ needs-llvm-components: arm -//@ ignore-backends: gcc #![deny(unsafe_code)] #![deny(warnings)] #![no_std] diff --git a/tests/ui/cross-crate/mut-ref-write-visible-after-unwind.rs b/tests/ui/cross-crate/mut-ref-write-visible-after-unwind.rs index 2e3073286f0f6..9db910d0d242e 100644 --- a/tests/ui/cross-crate/mut-ref-write-visible-after-unwind.rs +++ b/tests/ui/cross-crate/mut-ref-write-visible-after-unwind.rs @@ -4,7 +4,6 @@ //@ aux-build:mut-ref-write-visible-after-unwind.rs //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc extern crate mut_ref_write_visible_after_unwind as lib; diff --git a/tests/ui/debuginfo/windows_gnu_split_debuginfo_off.rs b/tests/ui/debuginfo/windows_gnu_split_debuginfo_off.rs index e0d0f9cff324d..3a8d9c998cf74 100644 --- a/tests/ui/debuginfo/windows_gnu_split_debuginfo_off.rs +++ b/tests/ui/debuginfo/windows_gnu_split_debuginfo_off.rs @@ -22,7 +22,6 @@ //@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu //@[x86_64_uwp_g] needs-llvm-components: x86 -//@ ignore-backends: gcc #![feature(no_core)] diff --git a/tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs b/tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs index e6f830ea73eb4..75b8141cc385f 100644 --- a/tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs +++ b/tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs @@ -21,7 +21,6 @@ //@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu //@[x86_64_uwp_g] needs-llvm-components: x86 -//@ ignore-backends: gcc #![feature(no_core)] diff --git a/tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs b/tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs index e8edbc669b5cc..3f4da555aadf1 100644 --- a/tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs +++ b/tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs @@ -21,7 +21,6 @@ //@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu //@[x86_64_uwp_g] needs-llvm-components: x86 -//@ ignore-backends: gcc #![feature(no_core)] diff --git a/tests/ui/delegation/fn-header-variadic.rs b/tests/ui/delegation/fn-header-variadic.rs index 051be3a51502d..132c0a22402c6 100644 --- a/tests/ui/delegation/fn-header-variadic.rs +++ b/tests/ui/delegation/fn-header-variadic.rs @@ -1,5 +1,4 @@ //@ aux-crate:fn_header_aux=fn-header-aux.rs -//@ ignore-backends: gcc #![feature(fn_delegation)] diff --git a/tests/ui/delegation/fn-header-variadic.stderr b/tests/ui/delegation/fn-header-variadic.stderr index a0b5a6313d080..e10ad339d8c2a 100644 --- a/tests/ui/delegation/fn-header-variadic.stderr +++ b/tests/ui/delegation/fn-header-variadic.stderr @@ -1,5 +1,5 @@ error: delegation to C-variadic functions is not allowed - --> $DIR/fn-header-variadic.rs:10:17 + --> $DIR/fn-header-variadic.rs:9:17 | LL | pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) {} | ------------------------------------------------------------- callee defined here @@ -8,7 +8,7 @@ LL | reuse to_reuse::variadic_fn; | ^^^^^^^^^^^ error: delegation to C-variadic functions is not allowed - --> $DIR/fn-header-variadic.rs:12:22 + --> $DIR/fn-header-variadic.rs:11:22 | LL | reuse fn_header_aux::variadic_fn_extern; | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/delegation/fn-header.rs b/tests/ui/delegation/fn-header.rs index a036dec4872a9..0b5154b29b9ca 100644 --- a/tests/ui/delegation/fn-header.rs +++ b/tests/ui/delegation/fn-header.rs @@ -4,7 +4,6 @@ //@ check-pass //@ edition:2018 //@ aux-crate:fn_header_aux=fn-header-aux.rs -//@ ignore-backends: gcc #![feature(fn_delegation)] #![deny(unused_unsafe)] diff --git a/tests/ui/derives/debug/nonsense-input-to-debug.stderr b/tests/ui/derives/debug/nonsense-input-to-debug.stderr index 207d7b1969de5..ee35d5e624856 100644 --- a/tests/ui/derives/debug/nonsense-input-to-debug.stderr +++ b/tests/ui/derives/debug/nonsense-input-to-debug.stderr @@ -12,7 +12,6 @@ LL | should_be_vec_t: vec![T], | | | expected type | in this macro invocation - | this macro call doesn't expand to a type error[E0392]: type parameter `T` is never used --> $DIR/nonsense-input-to-debug.rs:5:17 diff --git a/tests/ui/diagnostic_namespace/invalid_lit.rs b/tests/ui/diagnostic_namespace/invalid_lit.rs new file mode 100644 index 0000000000000..2198258fa498a --- /dev/null +++ b/tests/ui/diagnostic_namespace/invalid_lit.rs @@ -0,0 +1,8 @@ +#[diagnostic::on_unimplemented = 1 + 1] +//~^ ERROR attribute value must be a literal +#[diagnostic::not_exist = 1 + 1] +//~^ ERROR attribute value must be a literal +//~| WARN unknown diagnostic attribute +fn main() { + +} diff --git a/tests/ui/diagnostic_namespace/invalid_lit.stderr b/tests/ui/diagnostic_namespace/invalid_lit.stderr new file mode 100644 index 0000000000000..5659d4f56b02f --- /dev/null +++ b/tests/ui/diagnostic_namespace/invalid_lit.stderr @@ -0,0 +1,22 @@ +error: attribute value must be a literal + --> $DIR/invalid_lit.rs:1:34 + | +LL | #[diagnostic::on_unimplemented = 1 + 1] + | ^^^^^ + +error: attribute value must be a literal + --> $DIR/invalid_lit.rs:3:27 + | +LL | #[diagnostic::not_exist = 1 + 1] + | ^^^^^ + +warning: unknown diagnostic attribute + --> $DIR/invalid_lit.rs:3:15 + | +LL | #[diagnostic::not_exist = 1 + 1] + | ^^^^^^^^^ + | + = note: `#[warn(unknown_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default + +error: aborting due to 2 previous errors; 1 warning emitted + diff --git a/tests/ui/drop/drop-once-on-panic.rs b/tests/ui/drop/drop-once-on-panic.rs index baba7abae91b0..4245f1649903b 100644 --- a/tests/ui/drop/drop-once-on-panic.rs +++ b/tests/ui/drop/drop-once-on-panic.rs @@ -3,7 +3,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc use std::thread; diff --git a/tests/ui/drop/drop-trait-enum.rs b/tests/ui/drop/drop-trait-enum.rs index efb6b2a912ab1..5a88d959ec6fa 100644 --- a/tests/ui/drop/drop-trait-enum.rs +++ b/tests/ui/drop/drop-trait-enum.rs @@ -4,7 +4,6 @@ #![allow(unused_variables)] //@ needs-threads //@ needs-unwind -//@ ignore-backends: gcc use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/drop/dynamic-drop-async.rs b/tests/ui/drop/dynamic-drop-async.rs index 64de6995c7a82..e7a32d3c24e92 100644 --- a/tests/ui/drop/dynamic-drop-async.rs +++ b/tests/ui/drop/dynamic-drop-async.rs @@ -6,7 +6,6 @@ //@ run-pass //@ needs-unwind //@ edition:2018 -//@ ignore-backends: gcc #![allow(unused)] diff --git a/tests/ui/drop/dynamic-drop.rs b/tests/ui/drop/dynamic-drop.rs index 408604fe3e6a2..70e0e523f1c62 100644 --- a/tests/ui/drop/dynamic-drop.rs +++ b/tests/ui/drop/dynamic-drop.rs @@ -1,7 +1,6 @@ //@ edition:2015..2021 //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] diff --git a/tests/ui/drop/enum-destructor-on-unwind.rs b/tests/ui/drop/enum-destructor-on-unwind.rs index 9d2655564ca8c..498de521bd761 100644 --- a/tests/ui/drop/enum-destructor-on-unwind.rs +++ b/tests/ui/drop/enum-destructor-on-unwind.rs @@ -3,7 +3,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc use std::sync::atomic::{Ordering, AtomicUsize}; use std::thread; diff --git a/tests/ui/drop/move-closure-drop-on-unwind.rs b/tests/ui/drop/move-closure-drop-on-unwind.rs index ad110c1de01c8..28932aa36cc1d 100644 --- a/tests/ui/drop/move-closure-drop-on-unwind.rs +++ b/tests/ui/drop/move-closure-drop-on-unwind.rs @@ -4,7 +4,6 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc use std::panic; diff --git a/tests/ui/drop/panic-during-drop-14875.rs b/tests/ui/drop/panic-during-drop-14875.rs index 5a6f8f427758d..0c33f74ed61f7 100644 --- a/tests/ui/drop/panic-during-drop-14875.rs +++ b/tests/ui/drop/panic-during-drop-14875.rs @@ -2,7 +2,6 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc // Check that values are not leaked when a dtor panics (#14875) diff --git a/tests/ui/drop/panic-during-slice-init.rs b/tests/ui/drop/panic-during-slice-init.rs index ddf1e01dd8e7a..3e8e12536991c 100644 --- a/tests/ui/drop/panic-during-slice-init.rs +++ b/tests/ui/drop/panic-during-slice-init.rs @@ -6,7 +6,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc struct Foo; diff --git a/tests/ui/drop/terminate-in-initializer.rs b/tests/ui/drop/terminate-in-initializer.rs index 5dd8fe43c71e3..24ec39fe09638 100644 --- a/tests/ui/drop/terminate-in-initializer.rs +++ b/tests/ui/drop/terminate-in-initializer.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc // Issue #787 // Don't try to clean up uninitialized locals diff --git a/tests/ui/enum-discriminant/ptr_niche.rs b/tests/ui/enum-discriminant/ptr_niche.rs index 45dbe50248217..4390b69de0516 100644 --- a/tests/ui/enum-discriminant/ptr_niche.rs +++ b/tests/ui/enum-discriminant/ptr_niche.rs @@ -2,7 +2,7 @@ //! Check that we can codegen setting and getting discriminants, including non-null niches, //! for enums with a pointer-like ABI. This used to crash llvm. -#![feature(rustc_attrs, pattern_types, pattern_type_macro)] +#![feature(rustc_attrs, pattern_types)] use std::{ptr, mem, pat::pattern_type}; #[derive(Copy, Clone)] diff --git a/tests/ui/explicit-tail-calls/become-cast-return.rs b/tests/ui/explicit-tail-calls/become-cast-return.rs index d4cdcbf3a0112..2927185bbbc13 100644 --- a/tests/ui/explicit-tail-calls/become-cast-return.rs +++ b/tests/ui/explicit-tail-calls/become-cast-return.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc //@ ignore-wasm 'tail-call' feature not enabled in target wasm32-wasip1 //@ ignore-cross-compile #![expect(incomplete_features)] diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller.rs b/tests/ui/explicit-tail-calls/callee_is_track_caller.rs index b5e1b97e9da8d..f357ee3524a15 100644 --- a/tests/ui/explicit-tail-calls/callee_is_track_caller.rs +++ b/tests/ui/explicit-tail-calls/callee_is_track_caller.rs @@ -1,6 +1,5 @@ //@ run-pass //@ no-pass-override (checks for a warning produced by codegen) -//@ ignore-backends: gcc #![expect(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr b/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr index 020a0542a57fd..e1a251d156f76 100644 --- a/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr +++ b/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr @@ -1,5 +1,5 @@ warning: tail calling a function marked with `#[track_caller]` has no special effect - --> $DIR/callee_is_track_caller.rs:8:12 + --> $DIR/callee_is_track_caller.rs:7:12 | LL | become b(x); | ^^^^ diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs index 7623dd558251b..4214c26defb0a 100644 --- a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs +++ b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs @@ -1,6 +1,5 @@ //@ run-pass //@ no-pass-override (checks for a warning produced by codegen) -//@ ignore-backends: gcc #![expect(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr index 7b4c144acffa5..5a1c40509ad3a 100644 --- a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr +++ b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr @@ -1,5 +1,5 @@ warning: tail calling a function marked with `#[track_caller]` has no special effect - --> $DIR/callee_is_track_caller_polymorphic.rs:8:12 + --> $DIR/callee_is_track_caller_polymorphic.rs:7:12 | LL | become T::f(); | ^^^^^^ diff --git a/tests/ui/explicit-tail-calls/default-trait-method.rs b/tests/ui/explicit-tail-calls/default-trait-method.rs index fbf2e80ced45e..144909fc1d1b6 100644 --- a/tests/ui/explicit-tail-calls/default-trait-method.rs +++ b/tests/ui/explicit-tail-calls/default-trait-method.rs @@ -3,7 +3,6 @@ // in a path determining whether the method in question is marked as `#[track_caller]`. // //@ run-pass -//@ ignore-backends: gcc #![feature(explicit_tail_calls)] #![expect(incomplete_features)] diff --git a/tests/ui/explicit-tail-calls/drop-order.rs b/tests/ui/explicit-tail-calls/drop-order.rs index ff6e2f09f57ce..58e1afbdf0c51 100644 --- a/tests/ui/explicit-tail-calls/drop-order.rs +++ b/tests/ui/explicit-tail-calls/drop-order.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc #![expect(incomplete_features)] #![feature(explicit_tail_calls)] use std::cell::RefCell; diff --git a/tests/ui/explicit-tail-calls/indexer.rs b/tests/ui/explicit-tail-calls/indexer.rs index c26d9774ce780..5644506b2f584 100644 --- a/tests/ui/explicit-tail-calls/indexer.rs +++ b/tests/ui/explicit-tail-calls/indexer.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc // Indexing taken from // https://github.com/phi-go/rfcs/blob/guaranteed-tco/text%2F0000-explicit-tail-calls.md#tail-call-elimination // no other test has utilized the "function table" diff --git a/tests/ui/explicit-tail-calls/recursion-etc.rs b/tests/ui/explicit-tail-calls/recursion-etc.rs index c22401d23799d..8c89ceb7869aa 100644 --- a/tests/ui/explicit-tail-calls/recursion-etc.rs +++ b/tests/ui/explicit-tail-calls/recursion-etc.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc #![expect(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/explicit-tail-calls/support/basic.rs b/tests/ui/explicit-tail-calls/support/basic.rs index eb3041f106171..c2f327154066e 100644 --- a/tests/ui/explicit-tail-calls/support/basic.rs +++ b/tests/ui/explicit-tail-calls/support/basic.rs @@ -1,5 +1,4 @@ //@ build-pass -//@ ignore-backends: gcc //@ add-minicore // //@ revisions: i686 diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs index 9fe1cdf3bc47a..a9562ac9fb015 100644 --- a/tests/ui/extern/extern-types-field-offset.rs +++ b/tests/ui/extern/extern-types-field-offset.rs @@ -3,7 +3,6 @@ //@ exec-env:RUST_BACKTRACE=0 //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> "" -//@ ignore-backends: gcc #![feature(extern_types)] extern "C" { diff --git a/tests/ui/field_representing_types/invalid.next.stderr b/tests/ui/field_representing_types/invalid.next.stderr index 82b2aa81451ab..3d6775fe8b376 100644 --- a/tests/ui/field_representing_types/invalid.next.stderr +++ b/tests/ui/field_representing_types/invalid.next.stderr @@ -37,10 +37,7 @@ error: `field_of` expects dot-separated field and variant names --> $DIR/invalid.rs:28:12 | LL | let _: field_of!(Enum, Variant..field); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | in this macro invocation - | this macro call doesn't expand to a type + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation error: offset_of expects dot-separated field and variant names --> $DIR/invalid.rs:30:30 @@ -52,19 +49,13 @@ error: `field_of` expects dot-separated field and variant names --> $DIR/invalid.rs:30:12 | LL | let _: field_of!(Struct, [42]); - | ^^^^^^^^^^^^^^^^^^^^^^^ - | | - | in this macro invocation - | this macro call doesn't expand to a type + | ^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation error: `field_of` only supports a single field or a variant with a field --> $DIR/invalid.rs:32:30 | LL | let _: field_of!(Struct, field1.field2.field3); - | ------------------^^^^^^-^^^^^^-^^^^^^- - | | - | in this macro invocation - | this macro call doesn't expand to a type + | ------------------^^^^^^-^^^^^^-^^^^^^- in this macro invocation error: aborting due to 8 previous errors diff --git a/tests/ui/field_representing_types/invalid.old.stderr b/tests/ui/field_representing_types/invalid.old.stderr index 82b2aa81451ab..3d6775fe8b376 100644 --- a/tests/ui/field_representing_types/invalid.old.stderr +++ b/tests/ui/field_representing_types/invalid.old.stderr @@ -37,10 +37,7 @@ error: `field_of` expects dot-separated field and variant names --> $DIR/invalid.rs:28:12 | LL | let _: field_of!(Enum, Variant..field); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | in this macro invocation - | this macro call doesn't expand to a type + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation error: offset_of expects dot-separated field and variant names --> $DIR/invalid.rs:30:30 @@ -52,19 +49,13 @@ error: `field_of` expects dot-separated field and variant names --> $DIR/invalid.rs:30:12 | LL | let _: field_of!(Struct, [42]); - | ^^^^^^^^^^^^^^^^^^^^^^^ - | | - | in this macro invocation - | this macro call doesn't expand to a type + | ^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation error: `field_of` only supports a single field or a variant with a field --> $DIR/invalid.rs:32:30 | LL | let _: field_of!(Struct, field1.field2.field3); - | ------------------^^^^^^-^^^^^^-^^^^^^- - | | - | in this macro invocation - | this macro call doesn't expand to a type + | ------------------^^^^^^-^^^^^^-^^^^^^- in this macro invocation error: aborting due to 8 previous errors diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs index 794b51c7a8a25..26d483e43ae50 100644 --- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs +++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs @@ -1,5 +1,4 @@ //@ proc-macro: format-string-proc-macro.rs -//@ ignore-backends: gcc extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr index c341c6ee4c513..e7ed2a76e6af1 100644 --- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr +++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr @@ -1,5 +1,5 @@ error: there is no argument named `x` - --> $DIR/format-args-capture-from-pm-first-arg-macro.rs:7:5 + --> $DIR/format-args-capture-from-pm-first-arg-macro.rs:6:5 | LL | format_string_proc_macro::bad_format_args_captures!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/frontmatter/location-proc-macro-observer.rs b/tests/ui/frontmatter/location-proc-macro-observer.rs index 5237a0e982a6f..6c4c8c572897e 100644 --- a/tests/ui/frontmatter/location-proc-macro-observer.rs +++ b/tests/ui/frontmatter/location-proc-macro-observer.rs @@ -1,7 +1,6 @@ //@ check-pass //@ proc-macro: makro.rs //@ edition: 2021 -//@ ignore-backends: gcc // Check that a proc-macro doesn't try to parse frontmatter and instead treats // it as a regular Rust token sequence. See `auxiliary/makro.rs` for details. diff --git a/tests/ui/hygiene/issue-77523-def-site-async-await.rs b/tests/ui/hygiene/issue-77523-def-site-async-await.rs index 0a279682b71bb..ad6bd5e0b78bc 100644 --- a/tests/ui/hygiene/issue-77523-def-site-async-await.rs +++ b/tests/ui/hygiene/issue-77523-def-site-async-await.rs @@ -1,6 +1,5 @@ //@ build-pass //@ aux-build:def-site-async-await.rs -//@ ignore-backends: gcc // Regression test for issue #77523 // Tests that we don't ICE when an unusual combination diff --git a/tests/ui/impl-trait/precise-capturing/external-macro.rs b/tests/ui/impl-trait/precise-capturing/external-macro.rs index 1342ecd58dcf2..9d4d8a1bb119a 100644 --- a/tests/ui/impl-trait/precise-capturing/external-macro.rs +++ b/tests/ui/impl-trait/precise-capturing/external-macro.rs @@ -6,7 +6,6 @@ //@ aux-crate: no_use_macro=no-use-macro.rs //@ edition: 2024 //@ check-pass -//@ ignore-backends: gcc no_use_pm::pm_rpit!{} diff --git a/tests/ui/instrument-xray/platform-support.rs b/tests/ui/instrument-xray/platform-support.rs index 68b0e4f5c9821..238018b348dee 100644 --- a/tests/ui/instrument-xray/platform-support.rs +++ b/tests/ui/instrument-xray/platform-support.rs @@ -19,7 +19,6 @@ //@[aarch64-darwin] needs-llvm-components: aarch64 //@[aarch64-darwin] compile-flags: -Z instrument-xray --target=aarch64-apple-darwin //@[aarch64-darwin] check-pass -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs index e2f251f77e4a9..110c039bee837 100644 --- a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs +++ b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs @@ -4,7 +4,6 @@ //@ revisions: default strict //@ [strict]compile-flags: -Zstrict-init-checks //@ needs-subprocess -//@ ignore-backends: gcc //@ edition:2024 #![allow(deprecated, invalid_value, unreachable_code)] diff --git a/tests/ui/iterators/iter-filter-count-debug-check.rs b/tests/ui/iterators/iter-filter-count-debug-check.rs index 6e3a3f73920e4..121e97a393fff 100644 --- a/tests/ui/iterators/iter-filter-count-debug-check.rs +++ b/tests/ui/iterators/iter-filter-count-debug-check.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc //@ compile-flags: -C overflow-checks use std::panic; diff --git a/tests/ui/iterators/iter-sum-overflow-debug.rs b/tests/ui/iterators/iter-sum-overflow-debug.rs index 974282b03792b..32efc925a454e 100644 --- a/tests/ui/iterators/iter-sum-overflow-debug.rs +++ b/tests/ui/iterators/iter-sum-overflow-debug.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc //@ compile-flags: -C debug_assertions=yes use std::panic; diff --git a/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs b/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs index aba6f9a188f3a..8fffd19e2beae 100644 --- a/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs +++ b/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc //@ compile-flags: -C overflow-checks use std::panic; diff --git a/tests/ui/linking/no-gc-encapsulation-symbols.rs b/tests/ui/linking/no-gc-encapsulation-symbols.rs index c60f35b55eb2f..36d69969199ce 100644 --- a/tests/ui/linking/no-gc-encapsulation-symbols.rs +++ b/tests/ui/linking/no-gc-encapsulation-symbols.rs @@ -5,7 +5,6 @@ // //@ build-pass //@ only-x86_64-unknown-linux-gnu -//@ ignore-backends: gcc unsafe extern "Rust" { // The __start_ section name is magical for the linker, diff --git a/tests/ui/lint/clashing-extern-fn.rs b/tests/ui/lint/clashing-extern-fn.rs index e4477c9620221..195aab24899cf 100644 --- a/tests/ui/lint/clashing-extern-fn.rs +++ b/tests/ui/lint/clashing-extern-fn.rs @@ -1,7 +1,7 @@ //@ check-pass //@ aux-build:external_extern_fn.rs #![crate_type = "lib"] -#![feature(pattern_type_macro, pattern_types)] +#![feature(pattern_types)] mod redeclared_different_signature { mod a { extern "C" { diff --git a/tests/ui/lint/invalid_value.rs b/tests/ui/lint/invalid_value.rs index 301283853eb26..f76d988f44c68 100644 --- a/tests/ui/lint/invalid_value.rs +++ b/tests/ui/lint/invalid_value.rs @@ -2,7 +2,7 @@ // in a lint. #![allow(deprecated)] #![deny(invalid_value)] -#![feature(rustc_attrs, pattern_types, pattern_type_macro)] +#![feature(rustc_attrs, pattern_types)] use std::mem::{self, MaybeUninit}; use std::num::NonZero; diff --git a/tests/ui/lint/unused-qualification-in-derive-expansion.rs b/tests/ui/lint/unused-qualification-in-derive-expansion.rs index bf095c6449d8f..b2067e22c4443 100644 --- a/tests/ui/lint/unused-qualification-in-derive-expansion.rs +++ b/tests/ui/lint/unused-qualification-in-derive-expansion.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: add-impl.rs -//@ ignore-backends: gcc #![forbid(unused_qualifications)] diff --git a/tests/ui/macros/macro-interpolation.stderr b/tests/ui/macros/macro-interpolation.stderr index 3dc6ef6132d2a..304e7311e2d4e 100644 --- a/tests/ui/macros/macro-interpolation.stderr +++ b/tests/ui/macros/macro-interpolation.stderr @@ -7,10 +7,7 @@ LL | <$type as $trait>::$name | ^^^^^^ expected identifier, found metavariable ... LL | let _: qpath!(ty, ::Owned); - | ----------------------------- - | | - | this macro call doesn't expand to a type - | in this macro invocation + | ----------------------------- in this macro invocation error: aborting due to 1 previous error diff --git a/tests/ui/macros/same-sequence-span.rs b/tests/ui/macros/same-sequence-span.rs index 9fae847a4e2fa..dfaf669a769a6 100644 --- a/tests/ui/macros/same-sequence-span.rs +++ b/tests/ui/macros/same-sequence-span.rs @@ -1,5 +1,4 @@ //@ proc-macro: proc_macro_sequence.rs -//@ ignore-backends: gcc // Regression test for issue #62831: Check that multiple sequences with the same span in the // left-hand side of a macro definition behave as if they had unique spans, and in particular that diff --git a/tests/ui/macros/same-sequence-span.stderr b/tests/ui/macros/same-sequence-span.stderr index d6652453e9a9e..c4289f07feb36 100644 --- a/tests/ui/macros/same-sequence-span.stderr +++ b/tests/ui/macros/same-sequence-span.stderr @@ -1,5 +1,5 @@ error: `$x:expr` may be followed by `$y:tt`, which is not allowed for `expr` fragments - --> $DIR/same-sequence-span.rs:15:18 + --> $DIR/same-sequence-span.rs:14:18 | LL | (1 $x:expr $($y:tt,)* | ^^^^^ not allowed after `expr` fragments @@ -7,7 +7,7 @@ LL | (1 $x:expr $($y:tt,)* = note: allowed there are: `=>`, `,` or `;` error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragments - --> $DIR/same-sequence-span.rs:16:18 + --> $DIR/same-sequence-span.rs:15:18 | LL | $(= $z:tt)* | ^ not allowed after `expr` fragments @@ -15,7 +15,7 @@ LL | $(= $z:tt)* = note: allowed there are: `=>`, `,` or `;` error: `$x:expr` may be followed by `$y:tt`, which is not allowed for `expr` fragments - --> $DIR/same-sequence-span.rs:20:1 + --> $DIR/same-sequence-span.rs:19:1 | LL | proc_macro_sequence::make_foo!(); | -------------------------------- in this macro invocation @@ -24,7 +24,7 @@ LL | proc_macro_sequence::make_foo!(); = note: this error originates in the macro `proc_macro_sequence::make_foo` (in Nightly builds, run with -Z macro-backtrace for more info) error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragments - --> $DIR/same-sequence-span.rs:20:1 + --> $DIR/same-sequence-span.rs:19:1 | LL | proc_macro_sequence::make_foo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not allowed after `expr` fragments diff --git a/tests/ui/mir/mir_drop_order.rs b/tests/ui/mir/mir_drop_order.rs index a7a1a26a956bf..21d1054c4222d 100644 --- a/tests/ui/mir/mir_drop_order.rs +++ b/tests/ui/mir/mir_drop_order.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc use std::cell::RefCell; use std::panic; diff --git a/tests/ui/mir/mir_let_chains_drop_order.rs b/tests/ui/mir/mir_let_chains_drop_order.rs index 1579e298ee79a..8a54f21b57fa5 100644 --- a/tests/ui/mir/mir_let_chains_drop_order.rs +++ b/tests/ui/mir/mir_let_chains_drop_order.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc //@ edition: 2024 // See `mir_drop_order.rs` for more information diff --git a/tests/ui/mir/mir_match_guard_let_chains_drop_order.rs b/tests/ui/mir/mir_match_guard_let_chains_drop_order.rs index d2007dd2a2070..9c1eaf0fac635 100644 --- a/tests/ui/mir/mir_match_guard_let_chains_drop_order.rs +++ b/tests/ui/mir/mir_match_guard_let_chains_drop_order.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc //@ revisions: edition2021 edition2024 //@ [edition2021] edition: 2021 //@ [edition2024] edition: 2024 diff --git a/tests/ui/mir/ssa-analysis-regression-50041.rs b/tests/ui/mir/ssa-analysis-regression-50041.rs index 28690624f63ec..37d78acc2c452 100644 --- a/tests/ui/mir/ssa-analysis-regression-50041.rs +++ b/tests/ui/mir/ssa-analysis-regression-50041.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Z mir-opt-level=4 #![crate_type = "lib"] -#![feature(lang_items, pattern_type_macro, pattern_types)] +#![feature(lang_items, pattern_types)] #![no_std] struct NonNull(pattern_type!(*const T is !null)); diff --git a/tests/ui/numbers-arithmetic/int-abs-overflow.rs b/tests/ui/numbers-arithmetic/int-abs-overflow.rs index fd4a5a6052b83..6397f62d06551 100644 --- a/tests/ui/numbers-arithmetic/int-abs-overflow.rs +++ b/tests/ui/numbers-arithmetic/int-abs-overflow.rs @@ -2,7 +2,6 @@ //@ compile-flags: -C overflow-checks=on //@ needs-threads //@ needs-unwind -//@ ignore-backends: gcc use std::thread; diff --git a/tests/ui/numbers-arithmetic/issue-8460.rs b/tests/ui/numbers-arithmetic/issue-8460.rs index 52df432669f12..87867fdc93e41 100644 --- a/tests/ui/numbers-arithmetic/issue-8460.rs +++ b/tests/ui/numbers-arithmetic/issue-8460.rs @@ -2,7 +2,6 @@ #![allow(unused_must_use)] //@ needs-threads //@ needs-unwind -//@ ignore-backends: gcc #![feature(rustc_attrs)] use std::thread; diff --git a/tests/ui/panic-handler/catch-unwind-during-unwind-68696.rs b/tests/ui/panic-handler/catch-unwind-during-unwind-68696.rs index b4645a39691c2..aa3f9fc3bcea6 100644 --- a/tests/ui/panic-handler/catch-unwind-during-unwind-68696.rs +++ b/tests/ui/panic-handler/catch-unwind-during-unwind-68696.rs @@ -5,7 +5,6 @@ // entering the catch_unwind. // //@ run-pass -//@ ignore-backends: gcc use std::panic::catch_unwind; diff --git a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs index bef2d8bcff050..0566d2319df1a 100644 --- a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs +++ b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs @@ -3,7 +3,6 @@ //@ aux-build:exit-success-if-unwind.rs //@ no-prefer-dynamic //@ needs-subprocess -//@ ignore-backends: gcc extern crate exit_success_if_unwind; diff --git a/tests/ui/panic-runtime/abort.rs b/tests/ui/panic-runtime/abort.rs index 2a52228801f8e..8cdfd018a9282 100644 --- a/tests/ui/panic-runtime/abort.rs +++ b/tests/ui/panic-runtime/abort.rs @@ -2,7 +2,6 @@ //@ compile-flags:-C panic=abort //@ no-prefer-dynamic //@ needs-subprocess -//@ ignore-backends: gcc use std::env; use std::process::Command; diff --git a/tests/ui/panic-runtime/link-to-abort.rs b/tests/ui/panic-runtime/link-to-abort.rs index 98718ab8342b8..a4013f2a6cf70 100644 --- a/tests/ui/panic-runtime/link-to-abort.rs +++ b/tests/ui/panic-runtime/link-to-abort.rs @@ -2,7 +2,6 @@ //@ compile-flags:-C panic=abort //@ no-prefer-dynamic -//@ ignore-backends: gcc #![feature(panic_abort)] diff --git a/tests/ui/panics/alloc_error_hook-unwind.rs b/tests/ui/panics/alloc_error_hook-unwind.rs index 8a107bc390d4a..ee8a13f78332c 100644 --- a/tests/ui/panics/alloc_error_hook-unwind.rs +++ b/tests/ui/panics/alloc_error_hook-unwind.rs @@ -3,7 +3,6 @@ //@ run-pass //@ needs-unwind //@ only-linux -//@ ignore-backends: gcc #![feature(alloc_error_hook)] diff --git a/tests/ui/panics/lsda-multiple-action.rs b/tests/ui/panics/lsda-multiple-action.rs index 236e8b90ca5b1..82d425bb1306b 100644 --- a/tests/ui/panics/lsda-multiple-action.rs +++ b/tests/ui/panics/lsda-multiple-action.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc //@ compile-flags: -Copt-level=3 struct Guard; diff --git a/tests/ui/panics/panic-abort-backtrace-without-debuginfo.rs b/tests/ui/panics/panic-abort-backtrace-without-debuginfo.rs index 00c90b30af968..a29afd68523be 100644 --- a/tests/ui/panics/panic-abort-backtrace-without-debuginfo.rs +++ b/tests/ui/panics/panic-abort-backtrace-without-debuginfo.rs @@ -16,7 +16,6 @@ //@ ignore-apple //@ ignore-arm-unknown-linux-gnueabihf FIXME(#146996) Try removing this once #146996 has been fixed. //@ ignore-msvc Backtraces on Windows requires debuginfo which we can't use here -//@ ignore-backends: gcc static FN_1: &str = "this_function_must_be_in_the_backtrace"; fn this_function_must_be_in_the_backtrace() { diff --git a/tests/ui/panics/panic-handler-chain-update-hook.rs b/tests/ui/panics/panic-handler-chain-update-hook.rs index b75c21c8b3b2d..cb62e8d8a85fd 100644 --- a/tests/ui/panics/panic-handler-chain-update-hook.rs +++ b/tests/ui/panics/panic-handler-chain-update-hook.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc #![feature(panic_update_hook)] diff --git a/tests/ui/panics/panic-handler-chain.rs b/tests/ui/panics/panic-handler-chain.rs index 49b76834ffe9e..4ff9f3a5a63a2 100644 --- a/tests/ui/panics/panic-handler-chain.rs +++ b/tests/ui/panics/panic-handler-chain.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-handler-flail-wildly.rs b/tests/ui/panics/panic-handler-flail-wildly.rs index b44a388caad32..d7ed84a9caf7d 100644 --- a/tests/ui/panics/panic-handler-flail-wildly.rs +++ b/tests/ui/panics/panic-handler-flail-wildly.rs @@ -4,7 +4,6 @@ #![allow(unused_must_use)] //@ needs-threads -//@ ignore-backends: gcc use std::panic; use std::thread; diff --git a/tests/ui/panics/panic-handler-set-twice.rs b/tests/ui/panics/panic-handler-set-twice.rs index aa40187f08ca2..6d95ec2402973 100644 --- a/tests/ui/panics/panic-handler-set-twice.rs +++ b/tests/ui/panics/panic-handler-set-twice.rs @@ -3,7 +3,6 @@ #![allow(unused_variables)] //@ needs-threads -//@ ignore-backends: gcc use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-in-dtor-drops-fields.rs b/tests/ui/panics/panic-in-dtor-drops-fields.rs index db07923433752..38eb6d0acfb81 100644 --- a/tests/ui/panics/panic-in-dtor-drops-fields.rs +++ b/tests/ui/panics/panic-in-dtor-drops-fields.rs @@ -4,7 +4,6 @@ #![allow(non_upper_case_globals)] //@ needs-threads -//@ ignore-backends: gcc use std::thread; diff --git a/tests/ui/panics/panic-recover-propagate.rs b/tests/ui/panics/panic-recover-propagate.rs index 36ca279bdbd25..ef6ae4fd7887d 100644 --- a/tests/ui/panics/panic-recover-propagate.rs +++ b/tests/ui/panics/panic-recover-propagate.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/rvalue-cleanup-during-box-panic.rs b/tests/ui/panics/rvalue-cleanup-during-box-panic.rs index 03571f111aac0..84c5d85d7e096 100644 --- a/tests/ui/panics/rvalue-cleanup-during-box-panic.rs +++ b/tests/ui/panics/rvalue-cleanup-during-box-panic.rs @@ -21,7 +21,6 @@ // scenario worth testing. //@ needs-threads -//@ ignore-backends: gcc use std::thread; diff --git a/tests/ui/panics/unwind-force-no-unwind-tables.rs b/tests/ui/panics/unwind-force-no-unwind-tables.rs index 715f288fff10e..2226e4dd03ebc 100644 --- a/tests/ui/panics/unwind-force-no-unwind-tables.rs +++ b/tests/ui/panics/unwind-force-no-unwind-tables.rs @@ -6,7 +6,6 @@ //@ needs-unwind //@ ignore-windows target requires uwtable //@ compile-flags: -C panic=unwind -C force-unwind-tables=n -//@ ignore-backends: gcc use std::panic::{self, AssertUnwindSafe}; diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs index c82efe79e4d0f..461890e63e37b 100644 --- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs +++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs @@ -1,5 +1,4 @@ //@ proc-macro: issue-89971-outer-attr-following-inner-attr-ice.rs -//@ ignore-backends: gcc #[macro_use] extern crate issue_89971_outer_attr_following_inner_attr_ice; diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr index 392e7d0321f03..51df17c7cc670 100644 --- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr +++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr @@ -1,5 +1,5 @@ error: an inner attribute is not permitted in this context - --> $DIR/issue-89971-outer-attr-following-inner-attr-ice.rs:12:1 + --> $DIR/issue-89971-outer-attr-following-inner-attr-ice.rs:11:1 | LL | #![deny(missing_docs)] | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/parser/macro/unicode-control-codepoints-macros.rs b/tests/ui/parser/macro/unicode-control-codepoints-macros.rs index 701e7dfa30a39..775c50779760a 100644 --- a/tests/ui/parser/macro/unicode-control-codepoints-macros.rs +++ b/tests/ui/parser/macro/unicode-control-codepoints-macros.rs @@ -1,7 +1,6 @@ // Regression test for #140281 //@ edition: 2021 //@ proc-macro: unicode-control.rs -//@ ignore-backends: gcc extern crate unicode_control; use unicode_control::*; diff --git a/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr b/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr index b1d9c9d018744..2f40e327a4052 100644 --- a/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr +++ b/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr @@ -1,5 +1,5 @@ error: unicode codepoint changing visible direction of text present in doc comment - --> $DIR/unicode-control-codepoints-macros.rs:21:9 + --> $DIR/unicode-control-codepoints-macros.rs:20:9 | LL | /// �test� RTL in doc in vec | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints @@ -10,7 +10,7 @@ LL | /// �test� RTL in doc in vec = note: `#[deny(text_direction_codepoint_in_literal)]` on by default error: unicode codepoint changing visible direction of text present in doc comment - --> $DIR/unicode-control-codepoints-macros.rs:26:9 + --> $DIR/unicode-control-codepoints-macros.rs:25:9 | LL | / /** LL | | * �test� RTL in doc in macro @@ -22,7 +22,7 @@ LL | | */ = note: if you need to keep them and make them explicit in source, rewrite this doc comment as a `#[doc = "..."]` attribute and use Unicode escapes such as '\u{202e}', '\u{2066}' error: unicode codepoint changing visible direction of text present in doc comment - --> $DIR/unicode-control-codepoints-macros.rs:33:9 + --> $DIR/unicode-control-codepoints-macros.rs:32:9 | LL | / /** LL | | * �test� RTL in doc in macro @@ -34,7 +34,7 @@ LL | | */ = note: if you need to keep them and make them explicit in source, rewrite this doc comment as a `#[doc = "..."]` attribute and use Unicode escapes such as '\u{202e}', '\u{2066}' error: unicode codepoint changing visible direction of text present in doc comment - --> $DIR/unicode-control-codepoints-macros.rs:41:9 + --> $DIR/unicode-control-codepoints-macros.rs:40:9 | LL | /// �test� RTL in doc in proc macro | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints @@ -44,7 +44,7 @@ LL | /// �test� RTL in doc in proc macro = note: if you need to keep them and make them explicit in source, rewrite this doc comment as a `#[doc = "..."]` attribute and use Unicode escapes such as '\u{202e}', '\u{2066}' error: unicode codepoint changing visible direction of text present in doc comment - --> $DIR/unicode-control-codepoints-macros.rs:46:9 + --> $DIR/unicode-control-codepoints-macros.rs:45:9 | LL | /// �test� RTL in doc in proc macro | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints diff --git a/tests/ui/parser/tuple-index-suffix-proc-macro.rs b/tests/ui/parser/tuple-index-suffix-proc-macro.rs index 2463897381ec2..557c67738d30f 100644 --- a/tests/ui/parser/tuple-index-suffix-proc-macro.rs +++ b/tests/ui/parser/tuple-index-suffix-proc-macro.rs @@ -3,7 +3,6 @@ //! Like `tuple-index-suffix.rs`, but exercises the proc-macro interaction. //@ proc-macro: tuple-index-suffix-proc-macro-aux.rs -//@ ignore-backends: gcc extern crate tuple_index_suffix_proc_macro_aux; use tuple_index_suffix_proc_macro_aux as aux; diff --git a/tests/ui/parser/tuple-index-suffix-proc-macro.stderr b/tests/ui/parser/tuple-index-suffix-proc-macro.stderr index a242af5a789f7..47d179d355513 100644 --- a/tests/ui/parser/tuple-index-suffix-proc-macro.stderr +++ b/tests/ui/parser/tuple-index-suffix-proc-macro.stderr @@ -1,23 +1,23 @@ error: suffixes on a tuple index are invalid - --> $DIR/tuple-index-suffix-proc-macro.rs:18:28 + --> $DIR/tuple-index-suffix-proc-macro.rs:17:28 | LL | aux::bad_tup_indexing!(0usize); | ^^^^^^ invalid suffix `usize` error: suffixes on a tuple index are invalid - --> $DIR/tuple-index-suffix-proc-macro.rs:20:47 + --> $DIR/tuple-index-suffix-proc-macro.rs:19:47 | LL | aux::bad_tup_struct_indexing!(tup_struct, 0isize); | ^^^^^^ invalid suffix `isize` error: suffixes on a tuple index are invalid - --> $DIR/tuple-index-suffix-proc-macro.rs:25:28 + --> $DIR/tuple-index-suffix-proc-macro.rs:24:28 | LL | aux::bad_tup_indexing!(0u8); | ^^^ invalid suffix `u8` error: suffixes on a tuple index are invalid - --> $DIR/tuple-index-suffix-proc-macro.rs:27:47 + --> $DIR/tuple-index-suffix-proc-macro.rs:26:47 | LL | aux::bad_tup_struct_indexing!(tup_struct, 0u64); | ^^^^ invalid suffix `u64` diff --git a/tests/ui/parser/unclosed-delimiter-in-dep.rs b/tests/ui/parser/unclosed-delimiter-in-dep.rs index 4f0423a704f2e..40f517f317ef7 100644 --- a/tests/ui/parser/unclosed-delimiter-in-dep.rs +++ b/tests/ui/parser/unclosed-delimiter-in-dep.rs @@ -1,5 +1,3 @@ -//@ ignore-backends: gcc - mod unclosed_delim_mod; fn main() { diff --git a/tests/ui/pattern/overflowing-literals.rs b/tests/ui/pattern/overflowing-literals.rs index 13016d3f7d197..9e33d49963ee0 100644 --- a/tests/ui/pattern/overflowing-literals.rs +++ b/tests/ui/pattern/overflowing-literals.rs @@ -1,7 +1,6 @@ //! Check that overflowing literals are in patterns are rejected #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/pattern/overflowing-literals.stderr b/tests/ui/pattern/overflowing-literals.stderr index 8164b97fd4720..54525cf6cd9f8 100644 --- a/tests/ui/pattern/overflowing-literals.stderr +++ b/tests/ui/pattern/overflowing-literals.stderr @@ -1,5 +1,5 @@ error: literal out of range for `u8` - --> $DIR/overflowing-literals.rs:8:35 + --> $DIR/overflowing-literals.rs:7:35 | LL | type TooBig = pattern_type!(u8 is 500..); | ^^^ @@ -8,7 +8,7 @@ LL | type TooBig = pattern_type!(u8 is 500..); = note: `#[deny(overflowing_literals)]` on by default error: literal out of range for `i8` - --> $DIR/overflowing-literals.rs:10:37 + --> $DIR/overflowing-literals.rs:9:37 | LL | type TooSmall = pattern_type!(i8 is -500..); | ^^^^ @@ -17,7 +17,7 @@ LL | type TooSmall = pattern_type!(i8 is -500..); = help: consider using the type `i16` instead error: literal out of range for `i8` - --> $DIR/overflowing-literals.rs:12:41 + --> $DIR/overflowing-literals.rs:11:41 | LL | type TooBigSigned = pattern_type!(i8 is 200..); | ^^^ @@ -26,7 +26,7 @@ LL | type TooBigSigned = pattern_type!(i8 is 200..); = help: consider using the type `u8` instead error: literal out of range for `u8` - --> $DIR/overflowing-literals.rs:17:9 + --> $DIR/overflowing-literals.rs:16:9 | LL | 500 => {} | ^^^ diff --git a/tests/ui/pointer_authentication/enable_pointer_authentication_validation.rs b/tests/ui/pointer_authentication/enable_pointer_authentication_validation.rs index d7306508f39d4..51f59ccab12c0 100644 --- a/tests/ui/pointer_authentication/enable_pointer_authentication_validation.rs +++ b/tests/ui/pointer_authentication/enable_pointer_authentication_validation.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ revisions: empty unprefixed all_unknown all_known mixed //@[empty] needs-llvm-components: aarch64 diff --git a/tests/ui/pointer_authentication/invalid_target_pointer_authentication.rs b/tests/ui/pointer_authentication/invalid_target_pointer_authentication.rs index 2d8b3b7a1915d..da482bcf97610 100644 --- a/tests/ui/pointer_authentication/invalid_target_pointer_authentication.rs +++ b/tests/ui/pointer_authentication/invalid_target_pointer_authentication.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ check-pass //@ needs-llvm-components: aarch64 diff --git a/tests/ui/pointer_authentication/type_discrimination_not_supported_pointer_authentication.rs b/tests/ui/pointer_authentication/type_discrimination_not_supported_pointer_authentication.rs index 6838e749fd333..03f811d0c4881 100644 --- a/tests/ui/pointer_authentication/type_discrimination_not_supported_pointer_authentication.rs +++ b/tests/ui/pointer_authentication/type_discrimination_not_supported_pointer_authentication.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ check-fail //@ needs-llvm-components: aarch64 diff --git a/tests/ui/print_type_sizes/niche-filling.rs b/tests/ui/print_type_sizes/niche-filling.rs index 2fcb1dfe3c8c2..ecd243cd01ba8 100644 --- a/tests/ui/print_type_sizes/niche-filling.rs +++ b/tests/ui/print_type_sizes/niche-filling.rs @@ -15,7 +15,7 @@ // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. #![allow(dead_code)] -#![feature(rustc_attrs, pattern_types, pattern_type_macro)] +#![feature(rustc_attrs, pattern_types)] use std::num::NonZero; diff --git a/tests/ui/proc-macro/add-impl.rs b/tests/ui/proc-macro/add-impl.rs index 645e9321bba04..2299f05c2e7fa 100644 --- a/tests/ui/proc-macro/add-impl.rs +++ b/tests/ui/proc-macro/add-impl.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: add-impl.rs -//@ ignore-backends: gcc #[macro_use] extern crate add_impl; diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs index e580e0784b34e..8ee2223822a3c 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs @@ -1,6 +1,5 @@ //@ proc-macro: builtin-attrs.rs //@ compile-flags:--test -//@ ignore-backends: gcc #![feature(decl_macro, test)] diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr index e5de873cf31f8..346cebf639d17 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `NonExistent` in this scope - --> $DIR/ambiguous-builtin-attrs-test.rs:20:5 + --> $DIR/ambiguous-builtin-attrs-test.rs:19:5 | LL | NonExistent; | ^^^^^^^^^^^ not found in this scope diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs index 922a2e4c1f463..9fd7bf26adc3b 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs @@ -1,6 +1,5 @@ //@ edition:2018 //@ proc-macro: builtin-attrs.rs -//@ ignore-backends: gcc #![feature(decl_macro)] //~ ERROR `feature` is ambiguous extern crate builtin_attrs; diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr index 611721f9c6edb..04a76c41b8bf4 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr @@ -1,11 +1,11 @@ error[E0425]: cannot find value `NonExistent` in this scope - --> $DIR/ambiguous-builtin-attrs.rs:35:5 + --> $DIR/ambiguous-builtin-attrs.rs:34:5 | LL | NonExistent; | ^^^^^^^^^^^ not found in this scope error[E0659]: `repr` is ambiguous - --> $DIR/ambiguous-builtin-attrs.rs:10:3 + --> $DIR/ambiguous-builtin-attrs.rs:9:3 | LL | #[repr(C)] | ^^^^ ambiguous name @@ -13,14 +13,14 @@ LL | #[repr(C)] = note: ambiguous because of a name conflict with a builtin attribute = note: `repr` could refer to a built-in attribute note: `repr` could also refer to the attribute macro imported here - --> $DIR/ambiguous-builtin-attrs.rs:7:5 + --> $DIR/ambiguous-builtin-attrs.rs:6:5 | LL | use builtin_attrs::*; | ^^^^^^^^^^^^^^^^ = help: use `crate::repr` to refer to this attribute macro unambiguously error[E0659]: `repr` is ambiguous - --> $DIR/ambiguous-builtin-attrs.rs:12:18 + --> $DIR/ambiguous-builtin-attrs.rs:11:18 | LL | #[cfg_attr(true, repr(C))] | ^^^^ ambiguous name @@ -28,14 +28,14 @@ LL | #[cfg_attr(true, repr(C))] = note: ambiguous because of a name conflict with a builtin attribute = note: `repr` could refer to a built-in attribute note: `repr` could also refer to the attribute macro imported here - --> $DIR/ambiguous-builtin-attrs.rs:7:5 + --> $DIR/ambiguous-builtin-attrs.rs:6:5 | LL | use builtin_attrs::*; | ^^^^^^^^^^^^^^^^ = help: use `crate::repr` to refer to this attribute macro unambiguously error[E0659]: `repr` is ambiguous - --> $DIR/ambiguous-builtin-attrs.rs:21:34 + --> $DIR/ambiguous-builtin-attrs.rs:20:34 | LL | fn non_macro_expanded_location<#[repr(C)] T>() { | ^^^^ ambiguous name @@ -43,14 +43,14 @@ LL | fn non_macro_expanded_location<#[repr(C)] T>() { = note: ambiguous because of a name conflict with a builtin attribute = note: `repr` could refer to a built-in attribute note: `repr` could also refer to the attribute macro imported here - --> $DIR/ambiguous-builtin-attrs.rs:7:5 + --> $DIR/ambiguous-builtin-attrs.rs:6:5 | LL | use builtin_attrs::*; | ^^^^^^^^^^^^^^^^ = help: use `crate::repr` to refer to this attribute macro unambiguously error[E0659]: `repr` is ambiguous - --> $DIR/ambiguous-builtin-attrs.rs:25:11 + --> $DIR/ambiguous-builtin-attrs.rs:24:11 | LL | #[repr(C)] | ^^^^ ambiguous name @@ -58,14 +58,14 @@ LL | #[repr(C)] = note: ambiguous because of a name conflict with a builtin attribute = note: `repr` could refer to a built-in attribute note: `repr` could also refer to the attribute macro imported here - --> $DIR/ambiguous-builtin-attrs.rs:7:5 + --> $DIR/ambiguous-builtin-attrs.rs:6:5 | LL | use builtin_attrs::*; | ^^^^^^^^^^^^^^^^ = help: use `crate::repr` to refer to this attribute macro unambiguously error[E0659]: `allow` is ambiguous - --> $DIR/ambiguous-builtin-attrs.rs:39:3 + --> $DIR/ambiguous-builtin-attrs.rs:38:3 | LL | #[allow(unused)] | ^^^^^ ambiguous name @@ -73,14 +73,14 @@ LL | #[allow(unused)] = note: ambiguous because of a name conflict with a builtin attribute = note: `allow` could refer to a built-in attribute note: `allow` could also refer to the built-in attribute imported here - --> $DIR/ambiguous-builtin-attrs.rs:38:5 + --> $DIR/ambiguous-builtin-attrs.rs:37:5 | LL | use deny as allow; | ^^^^^^^^^^^^^ = help: use `crate::allow` to refer to this built-in attribute unambiguously error[E0659]: `feature` is ambiguous - --> $DIR/ambiguous-builtin-attrs.rs:4:4 + --> $DIR/ambiguous-builtin-attrs.rs:3:4 | LL | #![feature(decl_macro)] | ^^^^^^^ ambiguous name @@ -88,14 +88,14 @@ LL | #![feature(decl_macro)] = note: ambiguous because of a name conflict with a builtin attribute = note: `feature` could refer to a built-in attribute note: `feature` could also refer to the attribute macro imported here - --> $DIR/ambiguous-builtin-attrs.rs:7:5 + --> $DIR/ambiguous-builtin-attrs.rs:6:5 | LL | use builtin_attrs::*; | ^^^^^^^^^^^^^^^^ = help: use `crate::feature` to refer to this attribute macro unambiguously error: the `repr(C)` attribute cannot be used on match arms - --> $DIR/ambiguous-builtin-attrs.rs:25:11 + --> $DIR/ambiguous-builtin-attrs.rs:24:11 | LL | #[repr(C)] | ^^^^^^^ @@ -105,7 +105,7 @@ LL | _ => {} = help: the `repr(C)` attribute can only be applied to data types error: the `repr(C)` attribute cannot be used on type parameters - --> $DIR/ambiguous-builtin-attrs.rs:21:34 + --> $DIR/ambiguous-builtin-attrs.rs:20:34 | LL | fn non_macro_expanded_location<#[repr(C)] T>() { | ^^^^^^^ diff --git a/tests/ui/proc-macro/append-impl.rs b/tests/ui/proc-macro/append-impl.rs index 48d21968de0ce..c0f208460b297 100644 --- a/tests/ui/proc-macro/append-impl.rs +++ b/tests/ui/proc-macro/append-impl.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: append-impl.rs -//@ ignore-backends: gcc #![allow(warnings)] diff --git a/tests/ui/proc-macro/attr-args.rs b/tests/ui/proc-macro/attr-args.rs index 4109b450a8ab3..1d3e0f725d250 100644 --- a/tests/ui/proc-macro/attr-args.rs +++ b/tests/ui/proc-macro/attr-args.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: attr-args.rs -//@ ignore-backends: gcc #![allow(warnings)] diff --git a/tests/ui/proc-macro/attr-invalid-exprs.rs b/tests/ui/proc-macro/attr-invalid-exprs.rs index bdfc0587b3b02..f476858a32ba1 100644 --- a/tests/ui/proc-macro/attr-invalid-exprs.rs +++ b/tests/ui/proc-macro/attr-invalid-exprs.rs @@ -1,7 +1,6 @@ //! Attributes producing expressions in invalid locations //@ proc-macro: attr-stmt-expr.rs -//@ ignore-backends: gcc #![feature(proc_macro_hygiene)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/attr-invalid-exprs.stderr b/tests/ui/proc-macro/attr-invalid-exprs.stderr index 43241e1e6fd5c..0d500c871453f 100644 --- a/tests/ui/proc-macro/attr-invalid-exprs.stderr +++ b/tests/ui/proc-macro/attr-invalid-exprs.stderr @@ -1,11 +1,11 @@ error: expected expression, found end of macro arguments - --> $DIR/attr-invalid-exprs.rs:13:13 + --> $DIR/attr-invalid-exprs.rs:12:13 | LL | let _ = #[no_output] "Hello, world!"; | ^^^^^^^^^^^^ error: macro expansion ignores `,` and any tokens following - --> $DIR/attr-invalid-exprs.rs:16:13 + --> $DIR/attr-invalid-exprs.rs:15:13 | LL | let _ = #[duplicate] "Hello, world!"; | ^^^^^^^^^^^^ caused by the macro expansion here @@ -17,7 +17,7 @@ LL | let _ = #[duplicate]; "Hello, world!"; | + error: macro expansion ignores `,` and any tokens following - --> $DIR/attr-invalid-exprs.rs:25:9 + --> $DIR/attr-invalid-exprs.rs:24:9 | LL | #[duplicate] | ^^^^^^^^^^^^ caused by the macro expansion here diff --git a/tests/ui/proc-macro/attr-on-trait.rs b/tests/ui/proc-macro/attr-on-trait.rs index 345653864f841..e95760a837c05 100644 --- a/tests/ui/proc-macro/attr-on-trait.rs +++ b/tests/ui/proc-macro/attr-on-trait.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: attr-on-trait.rs -//@ ignore-backends: gcc extern crate attr_on_trait; diff --git a/tests/ui/proc-macro/bang-macro.rs b/tests/ui/proc-macro/bang-macro.rs index 75f40de242ec9..2287e34c5dda9 100644 --- a/tests/ui/proc-macro/bang-macro.rs +++ b/tests/ui/proc-macro/bang-macro.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: bang-macro.rs -//@ ignore-backends: gcc extern crate bang_macro; use bang_macro::rewrite; diff --git a/tests/ui/proc-macro/call-site.rs b/tests/ui/proc-macro/call-site.rs index 5de4061b2a948..9c285e1ed117a 100644 --- a/tests/ui/proc-macro/call-site.rs +++ b/tests/ui/proc-macro/call-site.rs @@ -1,6 +1,5 @@ //@ check-pass //@ proc-macro: call-site.rs -//@ ignore-backends: gcc extern crate call_site; diff --git a/tests/ui/proc-macro/count_compound_ops.rs b/tests/ui/proc-macro/count_compound_ops.rs index fe90e7bfbe49a..20b0b87817e2f 100644 --- a/tests/ui/proc-macro/count_compound_ops.rs +++ b/tests/ui/proc-macro/count_compound_ops.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: count_compound_ops.rs -//@ ignore-backends: gcc extern crate count_compound_ops; use count_compound_ops::count_compound_ops; diff --git a/tests/ui/proc-macro/derive-bad.rs b/tests/ui/proc-macro/derive-bad.rs index 9b9a2bc33c946..9b237c731dbe4 100644 --- a/tests/ui/proc-macro/derive-bad.rs +++ b/tests/ui/proc-macro/derive-bad.rs @@ -1,5 +1,4 @@ //@ proc-macro: derive-bad.rs -//@ ignore-backends: gcc #[macro_use] extern crate derive_bad; diff --git a/tests/ui/proc-macro/derive-bad.stderr b/tests/ui/proc-macro/derive-bad.stderr index 8a252e826efff..43e97f40ba884 100644 --- a/tests/ui/proc-macro/derive-bad.stderr +++ b/tests/ui/proc-macro/derive-bad.stderr @@ -1,5 +1,5 @@ error: expected `:`, found `}` - --> $DIR/derive-bad.rs:7:10 + --> $DIR/derive-bad.rs:6:10 | LL | #[derive(A)] | ^ @@ -10,13 +10,13 @@ LL | #[derive(A)] = note: this error originates in the derive macro `A` (in Nightly builds, run with -Z macro-backtrace for more info) error: proc-macro derive produced unparsable tokens - --> $DIR/derive-bad.rs:7:10 + --> $DIR/derive-bad.rs:6:10 | LL | #[derive(A)] | ^ error[E0428]: the name `A` is defined multiple times - --> $DIR/derive-bad.rs:10:1 + --> $DIR/derive-bad.rs:9:1 | LL | #[derive(A)] | - previous definition of the type `A` here diff --git a/tests/ui/proc-macro/derive-helper-shadowing.edition2015.stderr b/tests/ui/proc-macro/derive-helper-shadowing.edition2015.stderr index 3a018bdcf0ad9..faae9014c38ba 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.edition2015.stderr +++ b/tests/ui/proc-macro/derive-helper-shadowing.edition2015.stderr @@ -1,5 +1,5 @@ error: cannot find attribute `empty_helper` in this scope - --> $DIR/derive-helper-shadowing.rs:41:22 + --> $DIR/derive-helper-shadowing.rs:40:22 | LL | #[derive(GenHelperUse)] | ^^^^^^^^^^^^ @@ -12,7 +12,7 @@ LL + use empty_helper; | error: cannot find attribute `empty_helper` in this scope - --> $DIR/derive-helper-shadowing.rs:17:11 + --> $DIR/derive-helper-shadowing.rs:16:11 | LL | macro_rules! gen_helper_use { LL | () => { @@ -29,26 +29,26 @@ LL + use empty_helper; | error[E0659]: `empty_helper` is ambiguous - --> $DIR/derive-helper-shadowing.rs:22:3 + --> $DIR/derive-helper-shadowing.rs:21:3 | LL | #[empty_helper] | ^^^^^^^^^^^^ ambiguous name | = note: ambiguous because of a name conflict with a derive helper attribute note: `empty_helper` could refer to the derive helper attribute defined here - --> $DIR/derive-helper-shadowing.rs:25:10 + --> $DIR/derive-helper-shadowing.rs:24:10 | LL | #[derive(Empty)] | ^^^^^ note: `empty_helper` could also refer to the attribute macro imported here - --> $DIR/derive-helper-shadowing.rs:13:5 + --> $DIR/derive-helper-shadowing.rs:12:5 | LL | use test_macros::empty_attr as empty_helper; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: use `crate::empty_helper` to refer to this attribute macro unambiguously error: derive helper attribute is used before it is introduced - --> $DIR/derive-helper-shadowing.rs:22:3 + --> $DIR/derive-helper-shadowing.rs:21:3 | LL | #[empty_helper] | ^^^^^^^^^^^^ @@ -65,7 +65,7 @@ error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0659`. Future incompatibility report: Future breakage diagnostic: error: derive helper attribute is used before it is introduced - --> $DIR/derive-helper-shadowing.rs:22:3 + --> $DIR/derive-helper-shadowing.rs:21:3 | LL | #[empty_helper] | ^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/derive-helper-shadowing.edition2018.stderr b/tests/ui/proc-macro/derive-helper-shadowing.edition2018.stderr index a5c6ef25056ce..cb92094dada4c 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.edition2018.stderr +++ b/tests/ui/proc-macro/derive-helper-shadowing.edition2018.stderr @@ -1,17 +1,17 @@ error: cannot use a derive helper attribute through an import - --> $DIR/derive-helper-shadowing.rs:45:15 + --> $DIR/derive-helper-shadowing.rs:44:15 | LL | #[renamed] | ^^^^^^^ | note: the derive helper attribute imported here - --> $DIR/derive-helper-shadowing.rs:44:17 + --> $DIR/derive-helper-shadowing.rs:43:17 | LL | use empty_helper as renamed; | ^^^^^^^^^^^^^^^^^^^^^^^ error: cannot find attribute `empty_helper` in this scope - --> $DIR/derive-helper-shadowing.rs:41:22 + --> $DIR/derive-helper-shadowing.rs:40:22 | LL | #[derive(GenHelperUse)] | ^^^^^^^^^^^^ @@ -24,7 +24,7 @@ LL + use crate::empty_helper; | error: cannot find attribute `empty_helper` in this scope - --> $DIR/derive-helper-shadowing.rs:17:11 + --> $DIR/derive-helper-shadowing.rs:16:11 | LL | macro_rules! gen_helper_use { LL | () => { @@ -41,26 +41,26 @@ LL + use crate::empty_helper; | error[E0659]: `empty_helper` is ambiguous - --> $DIR/derive-helper-shadowing.rs:22:3 + --> $DIR/derive-helper-shadowing.rs:21:3 | LL | #[empty_helper] | ^^^^^^^^^^^^ ambiguous name | = note: ambiguous because of a name conflict with a derive helper attribute note: `empty_helper` could refer to the derive helper attribute defined here - --> $DIR/derive-helper-shadowing.rs:25:10 + --> $DIR/derive-helper-shadowing.rs:24:10 | LL | #[derive(Empty)] | ^^^^^ note: `empty_helper` could also refer to the attribute macro imported here - --> $DIR/derive-helper-shadowing.rs:13:5 + --> $DIR/derive-helper-shadowing.rs:12:5 | LL | use test_macros::empty_attr as empty_helper; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: use `crate::empty_helper` to refer to this attribute macro unambiguously error: derive helper attribute is used before it is introduced - --> $DIR/derive-helper-shadowing.rs:22:3 + --> $DIR/derive-helper-shadowing.rs:21:3 | LL | #[empty_helper] | ^^^^^^^^^^^^ @@ -77,7 +77,7 @@ error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0659`. Future incompatibility report: Future breakage diagnostic: error: derive helper attribute is used before it is introduced - --> $DIR/derive-helper-shadowing.rs:22:3 + --> $DIR/derive-helper-shadowing.rs:21:3 | LL | #[empty_helper] | ^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/derive-helper-shadowing.rs b/tests/ui/proc-macro/derive-helper-shadowing.rs index 324d2477869e2..6a6a5760c45a6 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.rs +++ b/tests/ui/proc-macro/derive-helper-shadowing.rs @@ -3,7 +3,6 @@ //@[edition2018] edition:2018 //@ proc-macro: test-macros.rs //@ proc-macro: derive-helper-shadowing.rs -//@ ignore-backends: gcc #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-same-struct.rs b/tests/ui/proc-macro/derive-same-struct.rs index 04ab08dc76e5b..f7669ba1480b2 100644 --- a/tests/ui/proc-macro/derive-same-struct.rs +++ b/tests/ui/proc-macro/derive-same-struct.rs @@ -3,7 +3,6 @@ #![allow(path_statements)] #![allow(dead_code)] //@ proc-macro: derive-same-struct.rs -//@ ignore-backends: gcc #[macro_use] extern crate derive_same_struct; diff --git a/tests/ui/proc-macro/edition-imports-2018.rs b/tests/ui/proc-macro/edition-imports-2018.rs index af9eed74adb9b..a3808d9dce823 100644 --- a/tests/ui/proc-macro/edition-imports-2018.rs +++ b/tests/ui/proc-macro/edition-imports-2018.rs @@ -1,7 +1,6 @@ //@ check-pass //@ edition:2018 //@ proc-macro: edition-imports-2015.rs -//@ ignore-backends: gcc #[macro_use] extern crate edition_imports_2015; diff --git a/tests/ui/proc-macro/env.rs b/tests/ui/proc-macro/env.rs index ef3d8b5a898cb..c6923898d6ab2 100644 --- a/tests/ui/proc-macro/env.rs +++ b/tests/ui/proc-macro/env.rs @@ -1,7 +1,6 @@ //@ proc-macro: env.rs //@ run-pass //@ rustc-env: THE_CONST=1 -//@ ignore-backends: gcc #![crate_name = "foo"] diff --git a/tests/ui/proc-macro/expand-to-unstable.rs b/tests/ui/proc-macro/expand-to-unstable.rs index 37bfeab1fe71e..8968471ebd872 100644 --- a/tests/ui/proc-macro/expand-to-unstable.rs +++ b/tests/ui/proc-macro/expand-to-unstable.rs @@ -1,5 +1,4 @@ //@ proc-macro: derive-unstable.rs -//@ ignore-backends: gcc #![allow(warnings)] diff --git a/tests/ui/proc-macro/expand-to-unstable.stderr b/tests/ui/proc-macro/expand-to-unstable.stderr index 255f80501ea73..563c7ae8f9561 100644 --- a/tests/ui/proc-macro/expand-to-unstable.stderr +++ b/tests/ui/proc-macro/expand-to-unstable.stderr @@ -1,5 +1,5 @@ error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library - --> $DIR/expand-to-unstable.rs:9:10 + --> $DIR/expand-to-unstable.rs:8:10 | LL | #[derive(Unstable)] | ^^^^^^^^ diff --git a/tests/ui/proc-macro/expand-with-a-macro.rs b/tests/ui/proc-macro/expand-with-a-macro.rs index aa02cefbec684..e5baf3601db0a 100644 --- a/tests/ui/proc-macro/expand-with-a-macro.rs +++ b/tests/ui/proc-macro/expand-with-a-macro.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ proc-macro: expand-with-a-macro.rs -//@ ignore-backends: gcc #![deny(warnings)] diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs index fb7c830c2edf4..3deec94fa3411 100644 --- a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs +++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs @@ -3,7 +3,6 @@ // `$crate` refers to the crate that defines `macro_rules` and not the outer transparent macro. //@ proc-macro: gen-macro-rules-hygiene.rs -//@ ignore-backends: gcc #[macro_use] extern crate gen_macro_rules_hygiene; diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr b/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr index 5238b26a6a74a..c39dc3d8de208 100644 --- a/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr +++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr @@ -1,5 +1,5 @@ error[E0426]: use of undeclared label `'label_use` - --> $DIR/gen-macro-rules-hygiene.rs:13:1 + --> $DIR/gen-macro-rules-hygiene.rs:12:1 | LL | gen_macro_rules!(); | ^^^^^^^^^^^^^^^^^^ undeclared label `'label_use` @@ -8,7 +8,7 @@ LL | generated!(); | ------------ in this macro invocation error[E0425]: cannot find value `local_use` in this scope - --> $DIR/gen-macro-rules-hygiene.rs:13:1 + --> $DIR/gen-macro-rules-hygiene.rs:12:1 | LL | gen_macro_rules!(); | ^^^^^^^^^^^^^^^^^^ not found in this scope @@ -17,7 +17,7 @@ LL | generated!(); | ------------ in this macro invocation | help: an identifier with the same name exists, but is not accessible due to macro hygiene - --> $DIR/gen-macro-rules-hygiene.rs:19:13 + --> $DIR/gen-macro-rules-hygiene.rs:18:13 | LL | let local_use = 1; | ^^^^^^^^^ @@ -28,7 +28,7 @@ LL + local_def; | error[E0425]: cannot find value `local_def` in this scope - --> $DIR/gen-macro-rules-hygiene.rs:22:9 + --> $DIR/gen-macro-rules-hygiene.rs:21:9 | LL | gen_macro_rules!(); ... @@ -36,7 +36,7 @@ LL | local_def; | ^^^^^^^^^ not found in this scope | help: an identifier with the same name is defined here, but is not accessible due to macro hygiene - --> $DIR/gen-macro-rules-hygiene.rs:13:1 + --> $DIR/gen-macro-rules-hygiene.rs:12:1 | LL | gen_macro_rules!(); | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/gen-macro-rules.rs b/tests/ui/proc-macro/gen-macro-rules.rs index 8ee38b2cc2795..121d029e2e346 100644 --- a/tests/ui/proc-macro/gen-macro-rules.rs +++ b/tests/ui/proc-macro/gen-macro-rules.rs @@ -2,7 +2,6 @@ //@ check-pass //@ proc-macro: gen-macro-rules.rs -//@ ignore-backends: gcc extern crate gen_macro_rules as repro; diff --git a/tests/ui/proc-macro/generate-mod.rs b/tests/ui/proc-macro/generate-mod.rs index 23f231047e7fd..2f24b27509ab9 100644 --- a/tests/ui/proc-macro/generate-mod.rs +++ b/tests/ui/proc-macro/generate-mod.rs @@ -2,7 +2,6 @@ // Modules generated by transparent proc macros still acts as barriers for names (issue #50504). //@ proc-macro: generate-mod.rs -//@ ignore-backends: gcc extern crate generate_mod; diff --git a/tests/ui/proc-macro/generate-mod.stderr b/tests/ui/proc-macro/generate-mod.stderr index af90df2c3dc3b..821a91aa19617 100644 --- a/tests/ui/proc-macro/generate-mod.stderr +++ b/tests/ui/proc-macro/generate-mod.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `FromOutside` in this scope - --> $DIR/generate-mod.rs:11:1 + --> $DIR/generate-mod.rs:10:1 | LL | generate_mod::check!(); | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope @@ -9,7 +9,7 @@ LL | generate_mod::check!(); = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find type `Outer` in this scope - --> $DIR/generate-mod.rs:11:1 + --> $DIR/generate-mod.rs:10:1 | LL | generate_mod::check!(); | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope @@ -19,7 +19,7 @@ LL | generate_mod::check!(); = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find type `FromOutside` in this scope - --> $DIR/generate-mod.rs:14:1 + --> $DIR/generate-mod.rs:13:1 | LL | #[generate_mod::check_attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope @@ -29,7 +29,7 @@ LL | #[generate_mod::check_attr] = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find type `OuterAttr` in this scope - --> $DIR/generate-mod.rs:14:1 + --> $DIR/generate-mod.rs:13:1 | LL | #[generate_mod::check_attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope @@ -39,7 +39,7 @@ LL | #[generate_mod::check_attr] = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find type `FromOutside` in this scope - --> $DIR/generate-mod.rs:18:10 + --> $DIR/generate-mod.rs:17:10 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -50,7 +50,7 @@ LL | #[derive(generate_mod::CheckDerive)] = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find type `OuterDerive` in this scope - --> $DIR/generate-mod.rs:18:10 + --> $DIR/generate-mod.rs:17:10 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -60,7 +60,7 @@ LL | #[derive(generate_mod::CheckDerive)] = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find type `FromOutside` in this scope - --> $DIR/generate-mod.rs:25:14 + --> $DIR/generate-mod.rs:24:14 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -70,7 +70,7 @@ LL | #[derive(generate_mod::CheckDerive)] = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find type `OuterDerive` in this scope - --> $DIR/generate-mod.rs:25:14 + --> $DIR/generate-mod.rs:24:14 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -84,7 +84,7 @@ error: aborting due to 8 previous errors For more information about this error, try `rustc --explain E0425`. Future incompatibility report: Future breakage diagnostic: error: cannot find type `FromOutside` in this scope - --> $DIR/generate-mod.rs:18:10 + --> $DIR/generate-mod.rs:17:10 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -96,7 +96,7 @@ LL | #[derive(generate_mod::CheckDerive)] Future breakage diagnostic: error: cannot find type `OuterDerive` in this scope - --> $DIR/generate-mod.rs:18:10 + --> $DIR/generate-mod.rs:17:10 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -108,7 +108,7 @@ LL | #[derive(generate_mod::CheckDerive)] Future breakage diagnostic: error: cannot find type `FromOutside` in this scope - --> $DIR/generate-mod.rs:25:14 + --> $DIR/generate-mod.rs:24:14 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -120,7 +120,7 @@ LL | #[derive(generate_mod::CheckDerive)] Future breakage diagnostic: error: cannot find type `OuterDerive` in this scope - --> $DIR/generate-mod.rs:25:14 + --> $DIR/generate-mod.rs:24:14 | LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -132,7 +132,7 @@ LL | #[derive(generate_mod::CheckDerive)] Future breakage diagnostic: warning: cannot find type `FromOutside` in this scope - --> $DIR/generate-mod.rs:32:10 + --> $DIR/generate-mod.rs:31:10 | LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import @@ -143,7 +143,7 @@ LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed Future breakage diagnostic: warning: cannot find type `OuterDeriveLint` in this scope - --> $DIR/generate-mod.rs:32:10 + --> $DIR/generate-mod.rs:31:10 | LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import diff --git a/tests/ui/proc-macro/hygiene_example.rs b/tests/ui/proc-macro/hygiene_example.rs index f74f22fb3b0e0..84b5e345608aa 100644 --- a/tests/ui/proc-macro/hygiene_example.rs +++ b/tests/ui/proc-macro/hygiene_example.rs @@ -1,6 +1,5 @@ //@ check-pass //@ aux-build:hygiene_example.rs -//@ ignore-backends: gcc extern crate hygiene_example; use hygiene_example::hello; diff --git a/tests/ui/proc-macro/is-available.rs b/tests/ui/proc-macro/is-available.rs index 9e9cf5d11b661..faee560d7a975 100644 --- a/tests/ui/proc-macro/is-available.rs +++ b/tests/ui/proc-macro/is-available.rs @@ -3,7 +3,6 @@ extern crate proc_macro; //@ proc-macro: is-available.rs -//@ ignore-backends: gcc extern crate is_available; fn main() { diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs index 0c66b47b39418..8ff046e9b2d59 100644 --- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs +++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs @@ -1,5 +1,4 @@ //@ proc-macro: issue-104884.rs -//@ ignore-backends: gcc use std::collections::BinaryHeap; diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr index 0390295a66a42..2f2181be49855 100644 --- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr +++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr @@ -1,5 +1,5 @@ error[E0277]: can't compare `PriorityQueue` with `PriorityQueue` - --> $DIR/issue-104884-trait-impl-sugg-err.rs:19:8 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:18:8 | LL | #[derive(PartialOrd, AddImpl)] | ---------- in this derive macro expansion @@ -8,7 +8,7 @@ LL | struct PriorityQueue(BinaryHeap>); | ^^^^^^^^^^^^^ no implementation for `PriorityQueue == PriorityQueue` | help: the trait `PartialEq` is not implemented for `PriorityQueue` - --> $DIR/issue-104884-trait-impl-sugg-err.rs:19:1 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:18:1 | LL | struct PriorityQueue(BinaryHeap>); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -16,13 +16,13 @@ note: required by a bound in `PartialOrd` --> $SRC_DIR/core/src/cmp.rs:LL:COL error[E0277]: the trait bound `PriorityQueue: Eq` is not satisfied - --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22 | LL | #[derive(PartialOrd, AddImpl)] | ^^^^^^^ unsatisfied trait bound | help: the trait `Eq` is not implemented for `PriorityQueue` - --> $DIR/issue-104884-trait-impl-sugg-err.rs:19:1 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:18:1 | LL | struct PriorityQueue(BinaryHeap>); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -31,13 +31,13 @@ note: required by a bound in `Ord` = note: this error originates in the derive macro `AddImpl` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `T` with `T` - --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22 | LL | #[derive(PartialOrd, AddImpl)] | ^^^^^^^ no implementation for `T < T` and `T > T` | note: required for `PriorityQueue` to implement `PartialOrd` - --> $DIR/issue-104884-trait-impl-sugg-err.rs:19:8 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:18:8 | LL | #[derive(PartialOrd, AddImpl)] | ---------- in this derive macro expansion @@ -48,7 +48,7 @@ note: required by a bound in `Ord` --> $SRC_DIR/core/src/cmp.rs:LL:COL error[E0277]: can't compare `BinaryHeap>` with `_` - --> $DIR/issue-104884-trait-impl-sugg-err.rs:19:25 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:18:25 | LL | #[derive(PartialOrd, AddImpl)] | ---------- in this derive macro expansion @@ -59,7 +59,7 @@ LL | struct PriorityQueue(BinaryHeap>); = help: the trait `PartialOrd<_>` is not implemented for `BinaryHeap>` error[E0599]: no method named `cmp` found for struct `BinaryHeap>` in the current scope - --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22 | LL | #[derive(PartialOrd, AddImpl)] | ^^^^^^^ `BinaryHeap>` is not an iterator @@ -67,7 +67,7 @@ LL | #[derive(PartialOrd, AddImpl)] = note: this error originates in the derive macro `AddImpl` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0609]: no field `height` on type `&PriorityQueue` - --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22 + --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22 | LL | #[derive(PartialOrd, AddImpl)] | ^^^^^^^ unknown field diff --git a/tests/ui/proc-macro/issue-107113-wrap.rs b/tests/ui/proc-macro/issue-107113-wrap.rs index a46cf893d90e8..2799e79bb1cb4 100644 --- a/tests/ui/proc-macro/issue-107113-wrap.rs +++ b/tests/ui/proc-macro/issue-107113-wrap.rs @@ -1,6 +1,5 @@ //@ edition:2021 //@ proc-macro: issue-107113.rs -//@ ignore-backends: gcc #[macro_use] extern crate issue_107113; diff --git a/tests/ui/proc-macro/issue-107113-wrap.stderr b/tests/ui/proc-macro/issue-107113-wrap.stderr index 9b5b0333256e6..b541051147d53 100644 --- a/tests/ui/proc-macro/issue-107113-wrap.stderr +++ b/tests/ui/proc-macro/issue-107113-wrap.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-107113-wrap.rs:8:1 + --> $DIR/issue-107113-wrap.rs:7:1 | LL | #[issue_107113::main] | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/issue-118809.rs b/tests/ui/proc-macro/issue-118809.rs index 3ceede7e885cf..a6a3956981a78 100644 --- a/tests/ui/proc-macro/issue-118809.rs +++ b/tests/ui/proc-macro/issue-118809.rs @@ -1,5 +1,4 @@ //@ proc-macro: issue-118809.rs -//@ ignore-backends: gcc #[macro_use] extern crate issue_118809; diff --git a/tests/ui/proc-macro/issue-118809.stderr b/tests/ui/proc-macro/issue-118809.stderr index 98329fea11940..30b09fd4006bf 100644 --- a/tests/ui/proc-macro/issue-118809.stderr +++ b/tests/ui/proc-macro/issue-118809.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-118809.rs:7:10 + --> $DIR/issue-118809.rs:6:10 | LL | #[derive(Deserialize)] | ^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | #[derive(Deserialize)] | arguments to this enum variant are incorrect | help: the type constructed contains `u32` due to the type of the argument passed - --> $DIR/issue-118809.rs:7:10 + --> $DIR/issue-118809.rs:6:10 | LL | #[derive(Deserialize)] | ^^^^^^^^^^^ this argument influences the type of `Some` diff --git a/tests/ui/proc-macro/issue-38586.rs b/tests/ui/proc-macro/issue-38586.rs index c9623fd383b1a..88dbb8037bebd 100644 --- a/tests/ui/proc-macro/issue-38586.rs +++ b/tests/ui/proc-macro/issue-38586.rs @@ -1,5 +1,4 @@ //@ proc-macro: issue-38586.rs -//@ ignore-backends: gcc #[macro_use] extern crate issue_38586; diff --git a/tests/ui/proc-macro/issue-38586.stderr b/tests/ui/proc-macro/issue-38586.stderr index e49d4c83e2734..0049155645078 100644 --- a/tests/ui/proc-macro/issue-38586.stderr +++ b/tests/ui/proc-macro/issue-38586.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `foo` in this scope - --> $DIR/issue-38586.rs:7:10 + --> $DIR/issue-38586.rs:6:10 | LL | #[derive(A)] | ^ not found in this scope diff --git a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs index 988641b2b9c48..df236cce6d2a8 100644 --- a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs +++ b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs @@ -4,7 +4,6 @@ //@ edition:2018 //@ proc-macro: issue-59191.rs //@ needs-unwind (affects error output) -//@ ignore-backends: gcc #![feature(custom_inner_attributes)] #![issue_59191::no_main] diff --git a/tests/ui/proc-macro/issue-79148.rs b/tests/ui/proc-macro/issue-79148.rs index 7ce6216c842a6..b2248759b5f8e 100644 --- a/tests/ui/proc-macro/issue-79148.rs +++ b/tests/ui/proc-macro/issue-79148.rs @@ -1,6 +1,5 @@ //@ proc-macro: re-export.rs //@ edition:2018 -//@ ignore-backends: gcc extern crate re_export; diff --git a/tests/ui/proc-macro/issue-79148.stderr b/tests/ui/proc-macro/issue-79148.stderr index 80a5b1a0855f7..8adc4c6e0dbe4 100644 --- a/tests/ui/proc-macro/issue-79148.stderr +++ b/tests/ui/proc-macro/issue-79148.stderr @@ -1,11 +1,11 @@ error[E0364]: `Variant` is only public within the crate, and cannot be re-exported outside - --> $DIR/issue-79148.rs:9:1 + --> $DIR/issue-79148.rs:8:1 | LL | cause_ice!(); | ^^^^^^^^^^^^ | note: consider marking `Variant` as `pub` in the imported module - --> $DIR/issue-79148.rs:9:1 + --> $DIR/issue-79148.rs:8:1 | LL | cause_ice!(); | ^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/issue-83510.rs b/tests/ui/proc-macro/issue-83510.rs index 7f90906f4138e..595ce4f6c3080 100644 --- a/tests/ui/proc-macro/issue-83510.rs +++ b/tests/ui/proc-macro/issue-83510.rs @@ -1,6 +1,5 @@ //@ edition:2015..2021 //@ proc-macro: issue-83510.rs -//@ ignore-backends: gcc extern crate issue_83510; diff --git a/tests/ui/proc-macro/issue-83510.stderr b/tests/ui/proc-macro/issue-83510.stderr index 755d6e3a03ee5..f03e01f39c427 100644 --- a/tests/ui/proc-macro/issue-83510.stderr +++ b/tests/ui/proc-macro/issue-83510.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `Foo` in this scope - --> $DIR/issue-83510.rs:7:1 + --> $DIR/issue-83510.rs:6:1 | LL | issue_83510::dance_like_you_want_to_ice!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope @@ -7,7 +7,7 @@ LL | issue_83510::dance_like_you_want_to_ice!(); = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0404]: expected trait, found struct `Box` - --> $DIR/issue-83510.rs:7:1 + --> $DIR/issue-83510.rs:6:1 | LL | issue_83510::dance_like_you_want_to_ice!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a trait @@ -15,7 +15,7 @@ LL | issue_83510::dance_like_you_want_to_ice!(); = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0405]: cannot find trait `Baz` in this scope - --> $DIR/issue-83510.rs:7:1 + --> $DIR/issue-83510.rs:6:1 | LL | issue_83510::dance_like_you_want_to_ice!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope @@ -23,7 +23,7 @@ LL | issue_83510::dance_like_you_want_to_ice!(); = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: inherent associated types are unstable - --> $DIR/issue-83510.rs:7:1 + --> $DIR/issue-83510.rs:6:1 | LL | issue_83510::dance_like_you_want_to_ice!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/issue-91800.rs b/tests/ui/proc-macro/issue-91800.rs index 79cbf8632f009..8cecfad32b55b 100644 --- a/tests/ui/proc-macro/issue-91800.rs +++ b/tests/ui/proc-macro/issue-91800.rs @@ -1,5 +1,4 @@ //@ proc-macro: issue-91800-macro.rs -//@ ignore-backends: gcc #[macro_use] extern crate issue_91800_macro; diff --git a/tests/ui/proc-macro/issue-91800.stderr b/tests/ui/proc-macro/issue-91800.stderr index be5a8ece38404..63ebc0a552e33 100644 --- a/tests/ui/proc-macro/issue-91800.stderr +++ b/tests/ui/proc-macro/issue-91800.stderr @@ -1,5 +1,5 @@ error: macros that expand to items must be delimited with braces or followed by a semicolon - --> $DIR/issue-91800.rs:7:10 + --> $DIR/issue-91800.rs:6:10 | LL | #[derive(MyTrait)] | ^^^^^^^ @@ -7,13 +7,13 @@ LL | #[derive(MyTrait)] = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info) error: proc-macro derive produced unparsable tokens - --> $DIR/issue-91800.rs:7:10 + --> $DIR/issue-91800.rs:6:10 | LL | #[derive(MyTrait)] | ^^^^^^^ error: - --> $DIR/issue-91800.rs:7:10 + --> $DIR/issue-91800.rs:6:10 | LL | #[derive(MyTrait)] | ^^^^^^^ @@ -21,7 +21,7 @@ LL | #[derive(MyTrait)] = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info) error: macros that expand to items must be delimited with braces or followed by a semicolon - --> $DIR/issue-91800.rs:11:1 + --> $DIR/issue-91800.rs:10:1 | LL | #[attribute_macro] | ^^^^^^^^^^^^^^^^^^ @@ -29,7 +29,7 @@ LL | #[attribute_macro] = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info) error: - --> $DIR/issue-91800.rs:11:1 + --> $DIR/issue-91800.rs:10:1 | LL | #[attribute_macro] | ^^^^^^^^^^^^^^^^^^ @@ -37,7 +37,7 @@ LL | #[attribute_macro] = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info) error: macros that expand to items must be delimited with braces or followed by a semicolon - --> $DIR/issue-91800.rs:16:1 + --> $DIR/issue-91800.rs:15:1 | LL | fn_macro! {} | ^^^^^^^^^^^^ @@ -45,7 +45,7 @@ LL | fn_macro! {} = note: this error originates in the macro `fn_macro` (in Nightly builds, run with -Z macro-backtrace for more info) error: - --> $DIR/issue-91800.rs:16:1 + --> $DIR/issue-91800.rs:15:1 | LL | fn_macro! {} | ^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/lifetimes-rpass.rs b/tests/ui/proc-macro/lifetimes-rpass.rs index 9b794e695cd1c..c462b27722f7e 100644 --- a/tests/ui/proc-macro/lifetimes-rpass.rs +++ b/tests/ui/proc-macro/lifetimes-rpass.rs @@ -2,7 +2,6 @@ #![allow(unused_variables)] //@ proc-macro: lifetimes-rpass.rs -//@ ignore-backends: gcc extern crate lifetimes_rpass as lifetimes; use lifetimes::*; diff --git a/tests/ui/proc-macro/lifetimes.stderr b/tests/ui/proc-macro/lifetimes.stderr index 315b4c5917243..aa5ef8559ced3 100644 --- a/tests/ui/proc-macro/lifetimes.stderr +++ b/tests/ui/proc-macro/lifetimes.stderr @@ -2,10 +2,7 @@ error: expected type, found `'` --> $DIR/lifetimes.rs:7:10 | LL | type A = single_quote_alone!(); - | ^^^^^^^^^^^^^^^^^^^^^ - | | - | expected type - | this macro call doesn't expand to a type + | ^^^^^^^^^^^^^^^^^^^^^ expected type | = note: this error originates in the macro `single_quote_alone` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/proc-macro/lints_in_proc_macros.rs b/tests/ui/proc-macro/lints_in_proc_macros.rs index 2c22c787982eb..6714b8b6e1d5f 100644 --- a/tests/ui/proc-macro/lints_in_proc_macros.rs +++ b/tests/ui/proc-macro/lints_in_proc_macros.rs @@ -1,5 +1,4 @@ //@ proc-macro: bang_proc_macro2.rs -//@ ignore-backends: gcc extern crate bang_proc_macro2; diff --git a/tests/ui/proc-macro/lints_in_proc_macros.stderr b/tests/ui/proc-macro/lints_in_proc_macros.stderr index a845a73b45fe3..75e4a82914577 100644 --- a/tests/ui/proc-macro/lints_in_proc_macros.stderr +++ b/tests/ui/proc-macro/lints_in_proc_macros.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `foobar2` in this scope - --> $DIR/lints_in_proc_macros.rs:10:5 + --> $DIR/lints_in_proc_macros.rs:9:5 | LL | bang_proc_macro2!(); | ^^^^^^^^^^^^^^^^^^^ not found in this scope diff --git a/tests/ui/proc-macro/load-two.rs b/tests/ui/proc-macro/load-two.rs index 197e7845db33b..608379949e665 100644 --- a/tests/ui/proc-macro/load-two.rs +++ b/tests/ui/proc-macro/load-two.rs @@ -4,7 +4,6 @@ #![allow(dead_code)] //@ proc-macro: derive-atob.rs //@ proc-macro: derive-ctod.rs -//@ ignore-backends: gcc #[macro_use] extern crate derive_atob; diff --git a/tests/ui/proc-macro/macro-crate-multi-decorator.rs b/tests/ui/proc-macro/macro-crate-multi-decorator.rs index 68d4c8369382f..c89fcea2c63ea 100644 --- a/tests/ui/proc-macro/macro-crate-multi-decorator.rs +++ b/tests/ui/proc-macro/macro-crate-multi-decorator.rs @@ -3,7 +3,6 @@ //@ check-pass //@ proc-macro: duplicate.rs -//@ ignore-backends: gcc #[macro_use] extern crate duplicate; diff --git a/tests/ui/proc-macro/macro_rules_edition_from_pm.rs b/tests/ui/proc-macro/macro_rules_edition_from_pm.rs index fc3ae3ef2c814..8fc7d9097493d 100644 --- a/tests/ui/proc-macro/macro_rules_edition_from_pm.rs +++ b/tests/ui/proc-macro/macro_rules_edition_from_pm.rs @@ -7,7 +7,6 @@ //@[edition2021] edition:2021 //@[edition2024] edition:2024 //@ check-pass -//@ ignore-backends: gcc // This checks how the expr fragment specifier works. macro_rules_edition_pm::make_edition_macro!{} diff --git a/tests/ui/proc-macro/match-expander.rs b/tests/ui/proc-macro/match-expander.rs index b7245c7e682c1..23e5746c540f7 100644 --- a/tests/ui/proc-macro/match-expander.rs +++ b/tests/ui/proc-macro/match-expander.rs @@ -1,5 +1,4 @@ //@ proc-macro: match-expander.rs -//@ ignore-backends: gcc // Ensure that we don't point at macro invocation when providing inference contexts. #[macro_use] diff --git a/tests/ui/proc-macro/match-expander.stderr b/tests/ui/proc-macro/match-expander.stderr index d2423336b1d22..b77468ec60a5e 100644 --- a/tests/ui/proc-macro/match-expander.stderr +++ b/tests/ui/proc-macro/match-expander.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/match-expander.rs:9:5 + --> $DIR/match-expander.rs:8:5 | LL | match_expander::matcher!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `S`, found `bool` diff --git a/tests/ui/proc-macro/mixed-site-span.rs b/tests/ui/proc-macro/mixed-site-span.rs index 23f90ce67b6ef..9310fb5aafa87 100644 --- a/tests/ui/proc-macro/mixed-site-span.rs +++ b/tests/ui/proc-macro/mixed-site-span.rs @@ -3,7 +3,6 @@ //@ aux-build: token-site-span.rs //@ proc-macro: mixed-site-span.rs -//@ ignore-backends: gcc extern crate mixed_site_span; extern crate token_site_span; diff --git a/tests/ui/proc-macro/mixed-site-span.stderr b/tests/ui/proc-macro/mixed-site-span.stderr index 0c1aaaebba581..d47f06ce1e22c 100644 --- a/tests/ui/proc-macro/mixed-site-span.stderr +++ b/tests/ui/proc-macro/mixed-site-span.stderr @@ -1,5 +1,5 @@ error[E0432]: unresolved import `$crate::proc_macro_item` - --> $DIR/mixed-site-span.rs:49:5 + --> $DIR/mixed-site-span.rs:48:5 | LL | invoke_with_crate!{input proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -9,7 +9,7 @@ LL | invoke_with_crate!{input proc_macro_item} = note: this error originates in the macro `invoke_with_crate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate::proc_macro_item` - --> $DIR/mixed-site-span.rs:50:5 + --> $DIR/mixed-site-span.rs:49:5 | LL | invoke_with_ident!{input proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -19,7 +19,7 @@ LL | invoke_with_ident!{input proc_macro_item} = note: this error originates in the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:51:5 + --> $DIR/mixed-site-span.rs:50:5 | LL | invoke_with_crate!{call proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -29,7 +29,7 @@ LL | invoke_with_crate!{call proc_macro_item} = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_crate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:52:5 + --> $DIR/mixed-site-span.rs:51:5 | LL | invoke_with_ident!{call proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -39,7 +39,7 @@ LL | invoke_with_ident!{call proc_macro_item} = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:53:5 + --> $DIR/mixed-site-span.rs:52:5 | LL | invoke_with_ident!{hello call proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -49,7 +49,7 @@ LL | invoke_with_ident!{hello call proc_macro_item} = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate::proc_macro_item` - --> $DIR/mixed-site-span.rs:56:5 + --> $DIR/mixed-site-span.rs:55:5 | LL | invoke_with_ident!{krate input proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -64,7 +64,7 @@ LL + invoke_with_ident!{krate input proc_macro_rules} | error[E0432]: unresolved import `$crate::proc_macro_item` - --> $DIR/mixed-site-span.rs:57:5 + --> $DIR/mixed-site-span.rs:56:5 | LL | with_crate!{krate input proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -79,7 +79,7 @@ LL + with_crate!{krate input proc_macro_rules} | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:58:5 + --> $DIR/mixed-site-span.rs:57:5 | LL | with_crate!{krate call proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -94,7 +94,7 @@ LL + with_crate!{krate call proc_macro_rules} | error[E0432]: unresolved import `$crate::proc_macro_item` - --> $DIR/mixed-site-span.rs:62:28 + --> $DIR/mixed-site-span.rs:61:28 | LL | macro_rules! test {() => { LL | // crate::proc_macro_item @@ -113,7 +113,7 @@ LL + invoke_with_ident!{$crate input proc_macro_rules} | error[E0432]: unresolved import `$crate::proc_macro_item` - --> $DIR/mixed-site-span.rs:63:21 + --> $DIR/mixed-site-span.rs:62:21 | LL | macro_rules! test {() => { ... @@ -132,7 +132,7 @@ LL + with_crate!{$crate input proc_macro_rules} | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:64:9 + --> $DIR/mixed-site-span.rs:63:9 | LL | with_crate!{$crate call proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -150,7 +150,7 @@ LL + with_crate!{$crate call proc_macro_rules} | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:67:9 + --> $DIR/mixed-site-span.rs:66:9 | LL | invoke_with_ident!{$crate call proc_macro_item} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------^ @@ -163,7 +163,7 @@ LL | test!(); = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate::TokenItem` - --> $DIR/mixed-site-span.rs:89:5 + --> $DIR/mixed-site-span.rs:88:5 | LL | invoke_with_ident!{krate input TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -178,7 +178,7 @@ LL | quote!(use $krate::$ident as token_site_span::TokenItem as _;) | +++++++++++++++++++++++++++++ error[E0432]: unresolved import `$crate::TokenItem` - --> $DIR/mixed-site-span.rs:90:5 + --> $DIR/mixed-site-span.rs:89:5 | LL | with_crate!{krate input TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -193,7 +193,7 @@ LL | quote!(use $krate::$ident as token_site_span::TokenItem as _;) | +++++++++++++++++++++++++++++ error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:91:5 + --> $DIR/mixed-site-span.rs:90:5 | LL | with_crate!{krate call TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -208,7 +208,7 @@ LL + token_site_span::TokenItem as _ | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:94:5 + --> $DIR/mixed-site-span.rs:93:5 | LL | invoke_with_crate!{mixed TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -224,7 +224,7 @@ LL + ($s:ident $i:ident) => { token_site_span::TokenItem as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:95:5 + --> $DIR/mixed-site-span.rs:94:5 | LL | invoke_with_ident!{mixed TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -240,7 +240,7 @@ LL + ($s:ident $i:ident) => { token_site_span::TokenItem as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:96:5 + --> $DIR/mixed-site-span.rs:95:5 | LL | invoke_with_ident!{krate mixed TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -256,7 +256,7 @@ LL + ($m:ident $s:ident $i:ident) => { token_site_span::TokenItem as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:97:5 + --> $DIR/mixed-site-span.rs:96:5 | LL | with_crate!{krate mixed TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -271,7 +271,7 @@ LL + token_site_span::TokenItem as _ | error[E0432]: unresolved import `$crate::TokenItem` - --> $DIR/mixed-site-span.rs:101:28 + --> $DIR/mixed-site-span.rs:100:28 | LL | macro_rules! test {() => { LL | // crate::TokenItem @@ -290,7 +290,7 @@ LL + invoke_with_ident!{token_site_span::TokenItem as _} | error[E0432]: unresolved import `$crate::TokenItem` - --> $DIR/mixed-site-span.rs:102:21 + --> $DIR/mixed-site-span.rs:101:21 | LL | macro_rules! test {() => { ... @@ -309,7 +309,7 @@ LL + with_crate!{token_site_span::TokenItem as _} | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:103:9 + --> $DIR/mixed-site-span.rs:102:9 | LL | with_crate!{$crate call TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -327,7 +327,7 @@ LL + token_site_span::TokenItem as _ | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:106:9 + --> $DIR/mixed-site-span.rs:105:9 | LL | invoke_with_ident!{$crate mixed TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -346,7 +346,7 @@ LL + ($m:ident $s:ident $i:ident) => { token_site_span::TokenItem as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:107:9 + --> $DIR/mixed-site-span.rs:106:9 | LL | with_crate!{$crate mixed TokenItem} | ^^^^^^^^^^^^^^^^^^^^^^^^^---------^ @@ -364,7 +364,7 @@ LL + token_site_span::TokenItem as _ | error[E0432]: unresolved import `$crate::ItemUse` - --> $DIR/mixed-site-span.rs:131:5 + --> $DIR/mixed-site-span.rs:130:5 | LL | invoke_with_crate!{input ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -380,7 +380,7 @@ LL + ($s:ident $i:ident) => { with_crate!{ItemUse as _} }; | error[E0432]: unresolved import `$crate::ItemUse` - --> $DIR/mixed-site-span.rs:132:5 + --> $DIR/mixed-site-span.rs:131:5 | LL | invoke_with_ident!{input ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -396,7 +396,7 @@ LL + ($s:ident $i:ident) => { with_crate!{ItemUse as _} }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:135:5 + --> $DIR/mixed-site-span.rs:134:5 | LL | invoke_with_crate!{mixed ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -412,7 +412,7 @@ LL + ($s:ident $i:ident) => { ItemUse as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:136:5 + --> $DIR/mixed-site-span.rs:135:5 | LL | invoke_with_ident!{mixed ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -428,7 +428,7 @@ LL + ($s:ident $i:ident) => { ItemUse as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:137:5 + --> $DIR/mixed-site-span.rs:136:5 | LL | invoke_with_ident!{krate mixed ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -444,7 +444,7 @@ LL + ($m:ident $s:ident $i:ident) => { ItemUse as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:138:5 + --> $DIR/mixed-site-span.rs:137:5 | LL | with_crate!{krate mixed ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -459,7 +459,7 @@ LL + ItemUse as _ | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:140:5 + --> $DIR/mixed-site-span.rs:139:5 | LL | invoke_with_crate!{call ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -475,7 +475,7 @@ LL + ($s:ident $i:ident) => { ItemUse as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:141:5 + --> $DIR/mixed-site-span.rs:140:5 | LL | invoke_with_ident!{call ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -491,7 +491,7 @@ LL + ($s:ident $i:ident) => { ItemUse as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:142:5 + --> $DIR/mixed-site-span.rs:141:5 | LL | invoke_with_ident!{hello call ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -507,7 +507,7 @@ LL + ($m:ident $s:ident $i:ident) => { ItemUse as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:145:9 + --> $DIR/mixed-site-span.rs:144:9 | LL | invoke_with_ident!{$crate mixed ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -526,7 +526,7 @@ LL + ($m:ident $s:ident $i:ident) => { ItemUse as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:146:9 + --> $DIR/mixed-site-span.rs:145:9 | LL | with_crate!{$crate mixed ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -544,7 +544,7 @@ LL + ItemUse as _ | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:148:9 + --> $DIR/mixed-site-span.rs:147:9 | LL | invoke_with_ident!{$crate call ItemUse} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^ @@ -563,7 +563,7 @@ LL + ($m:ident $s:ident $i:ident) => { ItemUse as _ }; | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:155:1 + --> $DIR/mixed-site-span.rs:154:1 | LL | use_input_crate!{proc_macro_item} | ^^^^^^^^^^^^^^^^^---------------^ @@ -573,7 +573,7 @@ LL | use_input_crate!{proc_macro_item} = note: this error originates in the macro `use_input_crate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:156:1 + --> $DIR/mixed-site-span.rs:155:1 | LL | use_input_krate!{proc_macro_item} | ^^^^^^^^^^^^^^^^^---------------^ @@ -583,7 +583,7 @@ LL | use_input_krate!{proc_macro_item} = note: this error originates in the macro `use_input_krate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:159:1 + --> $DIR/mixed-site-span.rs:158:1 | LL | use_call_crate!{proc_macro_item} | ^^^^^^^^^^^^^^^^---------------^ @@ -593,7 +593,7 @@ LL | use_call_crate!{proc_macro_item} = note: this error originates in the macro `use_call_crate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:160:1 + --> $DIR/mixed-site-span.rs:159:1 | LL | use_call_krate!{proc_macro_item} | ^^^^^^^^^^^^^^^^---------------^ @@ -603,7 +603,7 @@ LL | use_call_krate!{proc_macro_item} = note: this error originates in the macro `use_call_krate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:165:1 + --> $DIR/mixed-site-span.rs:164:1 | LL | use_mixed_crate!{TokenItem} | ^^^^^^^^^^^^^^^^^---------^ @@ -619,7 +619,7 @@ LL + token_site_span::TokenItem as _ | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:166:1 + --> $DIR/mixed-site-span.rs:165:1 | LL | use_mixed_krate!{TokenItem} | ^^^^^^^^^^^^^^^^^---------^ @@ -635,7 +635,7 @@ LL + token_site_span::TokenItem as _ | error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:171:1 + --> $DIR/mixed-site-span.rs:170:1 | LL | use_input_crate!{ItemUse} | ^^^^^^^^^^^^^^^^^-------^ @@ -645,7 +645,7 @@ LL | use_input_crate!{ItemUse} = note: this error originates in the macro `use_input_crate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:172:1 + --> $DIR/mixed-site-span.rs:171:1 | LL | use_input_krate!{ItemUse} | ^^^^^^^^^^^^^^^^^-------^ @@ -655,7 +655,7 @@ LL | use_input_krate!{ItemUse} = note: this error originates in the macro `use_input_krate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:173:1 + --> $DIR/mixed-site-span.rs:172:1 | LL | use_mixed_crate!{ItemUse} | ^^^^^^^^^^^^^^^^^-------^ @@ -665,7 +665,7 @@ LL | use_mixed_crate!{ItemUse} = note: this error originates in the macro `use_mixed_crate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:174:1 + --> $DIR/mixed-site-span.rs:173:1 | LL | use_mixed_krate!{ItemUse} | ^^^^^^^^^^^^^^^^^-------^ @@ -675,7 +675,7 @@ LL | use_mixed_krate!{ItemUse} = note: this error originates in the macro `use_mixed_krate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:175:1 + --> $DIR/mixed-site-span.rs:174:1 | LL | use_call_crate!{ItemUse} | ^^^^^^^^^^^^^^^^-------^ @@ -685,7 +685,7 @@ LL | use_call_crate!{ItemUse} = note: this error originates in the macro `use_call_crate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `$crate` - --> $DIR/mixed-site-span.rs:176:1 + --> $DIR/mixed-site-span.rs:175:1 | LL | use_call_krate!{ItemUse} | ^^^^^^^^^^^^^^^^-------^ @@ -695,7 +695,7 @@ LL | use_call_krate!{ItemUse} = note: this error originates in the macro `use_call_krate` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0426]: use of undeclared label `'label_use` - --> $DIR/mixed-site-span.rs:23:9 + --> $DIR/mixed-site-span.rs:22:9 | LL | proc_macro_rules!(); | ^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use` @@ -703,7 +703,7 @@ LL | proc_macro_rules!(); = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find type `ItemUse` in crate `$crate` - --> $DIR/mixed-site-span.rs:23:9 + --> $DIR/mixed-site-span.rs:22:9 | LL | proc_macro_rules!(); | ^^^^^^^^^^^^^^^^^^^ not found in `$crate` @@ -715,13 +715,13 @@ LL + use ItemUse; | error[E0425]: cannot find value `local_use` in this scope - --> $DIR/mixed-site-span.rs:23:9 + --> $DIR/mixed-site-span.rs:22:9 | LL | proc_macro_rules!(); | ^^^^^^^^^^^^^^^^^^^ not found in this scope | help: an identifier with the same name exists, but is not accessible due to macro hygiene - --> $DIR/mixed-site-span.rs:22:13 + --> $DIR/mixed-site-span.rs:21:13 | LL | let local_use = 1; | ^^^^^^^^^ @@ -733,13 +733,13 @@ LL + local_def; | error[E0425]: cannot find value `local_def` in this scope - --> $DIR/mixed-site-span.rs:28:9 + --> $DIR/mixed-site-span.rs:27:9 | LL | local_def; | ^^^^^^^^^ not found in this scope | help: an identifier with the same name is defined here, but is not accessible due to macro hygiene - --> $DIR/mixed-site-span.rs:23:9 + --> $DIR/mixed-site-span.rs:22:9 | LL | proc_macro_rules!(); | ^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/modify-ast.rs b/tests/ui/proc-macro/modify-ast.rs index 75aea597ed576..9e890f3ebaad9 100644 --- a/tests/ui/proc-macro/modify-ast.rs +++ b/tests/ui/proc-macro/modify-ast.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: modify-ast.rs -//@ ignore-backends: gcc extern crate modify_ast; diff --git a/tests/ui/proc-macro/nonfatal-parsing.rs b/tests/ui/proc-macro/nonfatal-parsing.rs index 853cbfd075e7b..207f5316ef4d9 100644 --- a/tests/ui/proc-macro/nonfatal-parsing.rs +++ b/tests/ui/proc-macro/nonfatal-parsing.rs @@ -2,7 +2,6 @@ //@ needs-unwind //@ edition: 2024 //@ dont-require-annotations: ERROR -//@ ignore-backends: gcc // FIXME: should be a run-pass test once invalidly parsed tokens no longer result in diagnostics extern crate proc_macro; diff --git a/tests/ui/proc-macro/nonfatal-parsing.stderr b/tests/ui/proc-macro/nonfatal-parsing.stderr index f015794e2ce67..8b1f63b512578 100644 --- a/tests/ui/proc-macro/nonfatal-parsing.stderr +++ b/tests/ui/proc-macro/nonfatal-parsing.stderr @@ -34,7 +34,7 @@ LL | | error: prefix `r` is unknown - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ unknown prefix @@ -43,7 +43,7 @@ LL | nonfatal_parsing::run!(); = note: this error originates in the macro `nonfatal_parsing::run` (in Nightly builds, run with -Z macro-backtrace for more info) error: prefix `c` is unknown - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ unknown prefix @@ -52,7 +52,7 @@ LL | nonfatal_parsing::run!(); = note: this error originates in the macro `nonfatal_parsing::run` (in Nightly builds, run with -Z macro-backtrace for more info) error: unknown start of token: \u{2000} - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -65,7 +65,7 @@ LL | | error: found invalid character; only `#` is allowed in raw string delimitation: \u{0} - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -73,7 +73,7 @@ LL | nonfatal_parsing::run!(); = note: this error originates in the macro `nonfatal_parsing::run` (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid digit for a base 2 literal - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ LL | nonfatal_parsing::run!(); = note: this error originates in the macro `nonfatal_parsing::run` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0768]: no valid digits found for number - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -89,7 +89,7 @@ LL | nonfatal_parsing::run!(); = note: this error originates in the macro `nonfatal_parsing::run` (in Nightly builds, run with -Z macro-backtrace for more info) error: binary float literal is not supported - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -97,7 +97,7 @@ LL | nonfatal_parsing::run!(); = note: this error originates in the macro `nonfatal_parsing::run` (in Nightly builds, run with -Z macro-backtrace for more info) error: character constant must be escaped: `'` - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -110,7 +110,7 @@ LL + nonfatal_parsing::run!(\'; | error: character constant must be escaped: `\n` - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -123,7 +123,7 @@ LL + nonfatal_parsing::run!(\n; | error: too many `#` symbols: raw strings may be delimited by up to 255 `#` symbols, but found 256 - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -191,7 +191,7 @@ LL | /*a*/ 0b2 // | ^ error: invalid digit for a base 2 literal - --> $DIR/nonfatal-parsing.rs:15:5 + --> $DIR/nonfatal-parsing.rs:14:5 | LL | nonfatal_parsing::run!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/proc-macro/parent-source-spans.rs b/tests/ui/proc-macro/parent-source-spans.rs index f675f6fb6f7da..cc3ac795f7f17 100644 --- a/tests/ui/proc-macro/parent-source-spans.rs +++ b/tests/ui/proc-macro/parent-source-spans.rs @@ -1,5 +1,4 @@ //@ proc-macro: parent-source-spans.rs -//@ ignore-backends: gcc #![feature(decl_macro)] diff --git a/tests/ui/proc-macro/parent-source-spans.stderr b/tests/ui/proc-macro/parent-source-spans.stderr index 5d496ab9136a6..e865eb09ad437 100644 --- a/tests/ui/proc-macro/parent-source-spans.stderr +++ b/tests/ui/proc-macro/parent-source-spans.stderr @@ -1,5 +1,5 @@ error: first final: "hello" - --> $DIR/parent-source-spans.rs:17:12 + --> $DIR/parent-source-spans.rs:16:12 | LL | / macro two($a:expr, $b:expr) { LL | | three!($a, $b); @@ -12,7 +12,7 @@ LL | one!("hello", "world"); | ---------------------- in this macro invocation error: second final: "world" - --> $DIR/parent-source-spans.rs:17:16 + --> $DIR/parent-source-spans.rs:16:16 | LL | / macro two($a:expr, $b:expr) { LL | | three!($a, $b); @@ -25,7 +25,7 @@ LL | one!("hello", "world"); | ---------------------- in this macro invocation error: first parent: "hello" - --> $DIR/parent-source-spans.rs:11:5 + --> $DIR/parent-source-spans.rs:10:5 | LL | macro one($a:expr, $b:expr) { LL | two!($a, $b); @@ -35,7 +35,7 @@ LL | one!("hello", "world"); | ---------------------- in this macro invocation error: second parent: "world" - --> $DIR/parent-source-spans.rs:11:5 + --> $DIR/parent-source-spans.rs:10:5 | LL | macro one($a:expr, $b:expr) { LL | two!($a, $b); @@ -45,31 +45,31 @@ LL | one!("hello", "world"); | ---------------------- in this macro invocation error: first grandparent: "hello" - --> $DIR/parent-source-spans.rs:37:5 + --> $DIR/parent-source-spans.rs:36:5 | LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^ error: second grandparent: "world" - --> $DIR/parent-source-spans.rs:37:5 + --> $DIR/parent-source-spans.rs:36:5 | LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^ error: first source: "hello" - --> $DIR/parent-source-spans.rs:37:5 + --> $DIR/parent-source-spans.rs:36:5 | LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^ error: second source: "world" - --> $DIR/parent-source-spans.rs:37:5 + --> $DIR/parent-source-spans.rs:36:5 | LL | one!("hello", "world"); | ^^^^^^^^^^^^^^^^^^^^^^ error: first final: "yay" - --> $DIR/parent-source-spans.rs:17:12 + --> $DIR/parent-source-spans.rs:16:12 | LL | macro two($a:expr, $b:expr) { LL | three!($a, $b); @@ -79,7 +79,7 @@ LL | two!("yay", "rust"); | ------------------- in this macro invocation error: second final: "rust" - --> $DIR/parent-source-spans.rs:17:16 + --> $DIR/parent-source-spans.rs:16:16 | LL | macro two($a:expr, $b:expr) { LL | three!($a, $b); @@ -89,55 +89,55 @@ LL | two!("yay", "rust"); | ------------------- in this macro invocation error: first parent: "yay" - --> $DIR/parent-source-spans.rs:43:5 + --> $DIR/parent-source-spans.rs:42:5 | LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^ error: second parent: "rust" - --> $DIR/parent-source-spans.rs:43:5 + --> $DIR/parent-source-spans.rs:42:5 | LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^ error: first source: "yay" - --> $DIR/parent-source-spans.rs:43:5 + --> $DIR/parent-source-spans.rs:42:5 | LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^ error: second source: "rust" - --> $DIR/parent-source-spans.rs:43:5 + --> $DIR/parent-source-spans.rs:42:5 | LL | two!("yay", "rust"); | ^^^^^^^^^^^^^^^^^^^ error: first final: "hip" - --> $DIR/parent-source-spans.rs:49:12 + --> $DIR/parent-source-spans.rs:48:12 | LL | three!("hip", "hop"); | ^^^^^ error: second final: "hop" - --> $DIR/parent-source-spans.rs:49:19 + --> $DIR/parent-source-spans.rs:48:19 | LL | three!("hip", "hop"); | ^^^^^ error: first source: "hip" - --> $DIR/parent-source-spans.rs:49:12 + --> $DIR/parent-source-spans.rs:48:12 | LL | three!("hip", "hop"); | ^^^^^ error: second source: "hop" - --> $DIR/parent-source-spans.rs:49:19 + --> $DIR/parent-source-spans.rs:48:19 | LL | three!("hip", "hop"); | ^^^^^ error[E0425]: cannot find value `ok` in this scope - --> $DIR/parent-source-spans.rs:30:5 + --> $DIR/parent-source-spans.rs:29:5 | LL | parent_source_spans!($($tokens)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope @@ -155,7 +155,7 @@ LL + Ok; | error[E0425]: cannot find value `ok` in this scope - --> $DIR/parent-source-spans.rs:30:5 + --> $DIR/parent-source-spans.rs:29:5 | LL | parent_source_spans!($($tokens)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope @@ -173,7 +173,7 @@ LL + Ok; | error[E0425]: cannot find value `ok` in this scope - --> $DIR/parent-source-spans.rs:30:5 + --> $DIR/parent-source-spans.rs:29:5 | LL | parent_source_spans!($($tokens)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope diff --git a/tests/ui/proc-macro/quote/basic.rs b/tests/ui/proc-macro/quote/basic.rs index 4c6fb2408fb49..0336dbb785623 100644 --- a/tests/ui/proc-macro/quote/basic.rs +++ b/tests/ui/proc-macro/quote/basic.rs @@ -1,6 +1,5 @@ //@ run-pass //@ proc-macro: basic.rs -//@ ignore-backends: gcc extern crate basic; diff --git a/tests/ui/proc-macro/span-api-tests.rs b/tests/ui/proc-macro/span-api-tests.rs index 12832ba116397..792859ed05b16 100644 --- a/tests/ui/proc-macro/span-api-tests.rs +++ b/tests/ui/proc-macro/span-api-tests.rs @@ -2,7 +2,6 @@ //@ proc-macro: span-api-tests.rs //@ aux-build:span-test-macros.rs //@ compile-flags: -Ztranslate-remapped-path-to-local-path=yes -//@ ignore-backends: gcc #[macro_use] extern crate span_test_macros; diff --git a/tests/ui/proc-macro/span-from-proc-macro.rs b/tests/ui/proc-macro/span-from-proc-macro.rs index 24a28d53476c1..4e12a695a5c09 100644 --- a/tests/ui/proc-macro/span-from-proc-macro.rs +++ b/tests/ui/proc-macro/span-from-proc-macro.rs @@ -1,7 +1,6 @@ //@ proc-macro: custom-quote.rs //@ proc-macro: span-from-proc-macro.rs //@ compile-flags: -Z macro-backtrace -//@ ignore-backends: gcc #[macro_use] extern crate span_from_proc_macro; diff --git a/tests/ui/proc-macro/span-from-proc-macro.stderr b/tests/ui/proc-macro/span-from-proc-macro.stderr index 0605c727733b2..0b840a6728061 100644 --- a/tests/ui/proc-macro/span-from-proc-macro.stderr +++ b/tests/ui/proc-macro/span-from-proc-macro.stderr @@ -7,7 +7,7 @@ LL | pub fn error_from_attribute(_args: TokenStream, _input: TokenStream) -> Tok LL | field: MissingType | ^^^^^^^^^^^ not found in this scope | - ::: $DIR/span-from-proc-macro.rs:9:1 + ::: $DIR/span-from-proc-macro.rs:8:1 | LL | #[error_from_attribute] | ----------------------- in this attribute macro expansion @@ -21,7 +21,7 @@ LL | pub fn error_from_derive(_input: TokenStream) -> TokenStream { LL | Variant(OtherMissingType) | ^^^^^^^^^^^^^^^^ not found in this scope | - ::: $DIR/span-from-proc-macro.rs:12:10 + ::: $DIR/span-from-proc-macro.rs:11:10 | LL | #[derive(ErrorFromDerive)] | --------------- in this derive macro expansion @@ -35,7 +35,7 @@ LL | custom_quote::custom_quote! { LL | my_ident | ^^^^^^^^ not found in this scope | - ::: $DIR/span-from-proc-macro.rs:17:5 + ::: $DIR/span-from-proc-macro.rs:16:5 | LL | other_error_from_bang!(); | ------------------------ in this macro invocation @@ -51,7 +51,7 @@ LL | let bang_error: bool = 25; LL | pub fn error_from_bang(_input: TokenStream) -> TokenStream { | ---------------------------------------------------------- in this expansion of `error_from_bang!` | - ::: $DIR/span-from-proc-macro.rs:16:5 + ::: $DIR/span-from-proc-macro.rs:15:5 | LL | error_from_bang!(); | ------------------ in this macro invocation diff --git a/tests/ui/proc-macro/test.rs b/tests/ui/proc-macro/test.rs index d935dbe8ad3fb..e657d564b86fe 100644 --- a/tests/ui/proc-macro/test.rs +++ b/tests/ui/proc-macro/test.rs @@ -3,7 +3,6 @@ //@ edition: 2021 // Because of a (known) proc-macro ABI issue with GCC backend, this test // fails because of it. -//@ ignore-backends: gcc //! This is for everything that *would* be a #[test] inside of libproc_macro, //! except for the fact that proc_macro objects are not capable of existing diff --git a/tests/ui/proc-macro/weird-hygiene.rs b/tests/ui/proc-macro/weird-hygiene.rs index 8d8427d0e417e..de55484109ae3 100644 --- a/tests/ui/proc-macro/weird-hygiene.rs +++ b/tests/ui/proc-macro/weird-hygiene.rs @@ -1,5 +1,4 @@ //@ proc-macro: weird-hygiene.rs -//@ ignore-backends: gcc #![feature(stmt_expr_attributes)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/weird-hygiene.stderr b/tests/ui/proc-macro/weird-hygiene.stderr index a3c1e7b7671e6..2b2e705d9724d 100644 --- a/tests/ui/proc-macro/weird-hygiene.stderr +++ b/tests/ui/proc-macro/weird-hygiene.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `hidden_ident` in this scope - --> $DIR/weird-hygiene.rs:24:43 + --> $DIR/weird-hygiene.rs:23:43 | LL | Value = (stringify!($tokens + hidden_ident), 1).1 | ^^^^^^^^^^^^ not found in this scope @@ -8,14 +8,14 @@ LL | other!(50); | ---------- in this macro invocation | help: an identifier with the same name exists, but is not accessible due to macro hygiene - --> $DIR/weird-hygiene.rs:44:9 + --> $DIR/weird-hygiene.rs:43:9 | LL | let hidden_ident = "Hello1"; | ^^^^^^^^^^^^ = note: this error originates in the macro `inner` which comes from the expansion of the macro `other` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `hidden_ident` in this scope - --> $DIR/weird-hygiene.rs:35:13 + --> $DIR/weird-hygiene.rs:34:13 | LL | macro_rules! invoke_it { ... @@ -26,7 +26,7 @@ LL | invoke_it!(25); | -------------- in this macro invocation | help: an identifier with the same name exists, but is not accessible due to macro hygiene - --> $DIR/weird-hygiene.rs:44:9 + --> $DIR/weird-hygiene.rs:43:9 | LL | let hidden_ident = "Hello1"; | ^^^^^^^^^^^^ diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs index 67bbd16fba75e..1fddffeb770a3 100644 --- a/tests/ui/process/multi-panic.rs +++ b/tests/ui/process/multi-panic.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-subprocess //@ needs-unwind -//@ ignore-backends: gcc fn check_for_no_backtrace(test: std::process::Output) { assert!(!test.status.success()); diff --git a/tests/ui/process/println-with-broken-pipe.rs b/tests/ui/process/println-with-broken-pipe.rs index 51521f1dcf42a..a56cc6aa7039b 100644 --- a/tests/ui/process/println-with-broken-pipe.rs +++ b/tests/ui/process/println-with-broken-pipe.rs @@ -9,7 +9,6 @@ //@ ignore-tvos no 'head' //@ ignore-watchos no 'head' //@ ignore-visionos no 'head' -//@ ignore-backends: gcc //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC" //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> "" //@ compile-flags: -Zon-broken-pipe=error diff --git a/tests/ui/process/process-panic-after-fork.rs b/tests/ui/process/process-panic-after-fork.rs index f3b56721419cd..a4c20ea6d7900 100644 --- a/tests/ui/process/process-panic-after-fork.rs +++ b/tests/ui/process/process-panic-after-fork.rs @@ -5,7 +5,6 @@ //@ ignore-fuchsia no fork //@ ignore-tvos fork is prohibited //@ ignore-watchos fork is prohibited -//@ ignore-backends: gcc #![feature(rustc_private)] #![feature(panic_always_abort)] diff --git a/tests/ui/repr/16-bit-repr-c-enum.rs b/tests/ui/repr/16-bit-repr-c-enum.rs index f981ea23ee24e..3c3948de9dcc3 100644 --- a/tests/ui/repr/16-bit-repr-c-enum.rs +++ b/tests/ui/repr/16-bit-repr-c-enum.rs @@ -6,7 +6,6 @@ //@ [avr] compile-flags: --target=avr-none -C target-cpu=atmega328p --crate-type=rlib //@ [msp430] needs-llvm-components: msp430 //@ [msp430] compile-flags: --target=msp430-none-elf --crate-type=rlib -//@ ignore-backends: gcc #![feature(no_core, intrinsics, staged_api, rustc_attrs)] #![no_core] #![crate_type = "lib"] diff --git a/tests/ui/resolve/prelude-order.rs b/tests/ui/resolve/prelude-order.rs index 9bc3793dbf20c..cb5b82f8285f6 100644 --- a/tests/ui/resolve/prelude-order.rs +++ b/tests/ui/resolve/prelude-order.rs @@ -1,6 +1,5 @@ //@ proc-macro:macro_helpers.rs //@ compile-flags: --crate-type=lib -//@ ignore-backends: gcc /* There are 5 preludes and 3 namespaces. Test the order in which they are resolved. * See https://doc.rust-lang.org/nightly/reference/names/preludes.html. diff --git a/tests/ui/resolve/prelude-order.stderr b/tests/ui/resolve/prelude-order.stderr index c7929bf74d51e..c3d2d7072da37 100644 --- a/tests/ui/resolve/prelude-order.stderr +++ b/tests/ui/resolve/prelude-order.stderr @@ -1,17 +1,17 @@ error[E0433]: cannot find `inner` in `type_ns` - --> $DIR/prelude-order.rs:62:12 + --> $DIR/prelude-order.rs:61:12 | LL | #[type_ns::inner] | ^^^^^ could not find `inner` in `type_ns` error[E0433]: cannot find `inner` in `usize` - --> $DIR/prelude-order.rs:74:10 + --> $DIR/prelude-order.rs:73:10 | LL | #[usize::inner] | ^^^^^ could not find `inner` in `usize` error[E0573]: expected type, found crate `Option` - --> $DIR/prelude-order.rs:80:12 + --> $DIR/prelude-order.rs:79:12 | LL | fn e2() -> Option { None } | ^^^^^^^^^^^ not a type @@ -22,7 +22,7 @@ LL + use std::option::Option; | error[E0308]: mismatched types - --> $DIR/prelude-order.rs:83:1 + --> $DIR/prelude-order.rs:82:1 | LL | #[test] | ^^^^^^^- help: try adding a return type: `-> &'static str` @@ -32,7 +32,7 @@ LL | #[test] = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types - --> $DIR/prelude-order.rs:87:1 + --> $DIR/prelude-order.rs:86:1 | LL | #[global_allocator] | ^^^^^^^^^^^^^^^^^^^- help: try adding a return type: `-> &'static str` diff --git a/tests/ui/resolve/suggestions/dont-suggest-unstable-type.nightly.stderr b/tests/ui/resolve/suggestions/dont-suggest-unstable-type.nightly.stderr index 580b870d880cd..fea67c46d1dfb 100644 --- a/tests/ui/resolve/suggestions/dont-suggest-unstable-type.nightly.stderr +++ b/tests/ui/resolve/suggestions/dont-suggest-unstable-type.nightly.stderr @@ -1,5 +1,5 @@ error[E0433]: cannot find type `Complete` in this scope - --> $DIR/dont-suggest-unstable-type.rs:14:12 + --> $DIR/dont-suggest-unstable-type.rs:13:12 | LL | x.push(Complete::Item { name: "hello" }); | ^^^^^^^^ use of undeclared type `Complete` diff --git a/tests/ui/resolve/suggestions/dont-suggest-unstable-type.rs b/tests/ui/resolve/suggestions/dont-suggest-unstable-type.rs index c647df2420681..83390f894b87e 100644 --- a/tests/ui/resolve/suggestions/dont-suggest-unstable-type.rs +++ b/tests/ui/resolve/suggestions/dont-suggest-unstable-type.rs @@ -3,7 +3,6 @@ //! Regression test for . //! //@ needs-target-std -//@ ignore-backends: gcc //@ revisions: stable nightly //@[stable] act-as-stable diff --git a/tests/ui/resolve/suggestions/dont-suggest-unstable-type.stable.stderr b/tests/ui/resolve/suggestions/dont-suggest-unstable-type.stable.stderr index ca3a399d9d765..526bccb2671d2 100644 --- a/tests/ui/resolve/suggestions/dont-suggest-unstable-type.stable.stderr +++ b/tests/ui/resolve/suggestions/dont-suggest-unstable-type.stable.stderr @@ -1,5 +1,5 @@ error[E0433]: cannot find type `Complete` in this scope - --> $DIR/dont-suggest-unstable-type.rs:14:12 + --> $DIR/dont-suggest-unstable-type.rs:13:12 | LL | x.push(Complete::Item { name: "hello" }); | ^^^^^^^^ use of undeclared type `Complete` diff --git a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.default.stderr b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.default.stderr index 259a2e2c5e73b..e2616fb502e8d 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.default.stderr +++ b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.default.stderr @@ -1,5 +1,5 @@ warning: value assigned to `small` is never read - --> $DIR/std-panic-locations.rs:47:31 + --> $DIR/std-panic-locations.rs:46:31 | LL | assert_panicked(move || { small[1] += 1; }); | ^^^^^^^^^^^^^ diff --git a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.mir-opt.stderr b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.mir-opt.stderr index 259a2e2c5e73b..e2616fb502e8d 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.mir-opt.stderr +++ b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.mir-opt.stderr @@ -1,5 +1,5 @@ warning: value assigned to `small` is never read - --> $DIR/std-panic-locations.rs:47:31 + --> $DIR/std-panic-locations.rs:46:31 | LL | assert_panicked(move || { small[1] += 1; }); | ^^^^^^^^^^^^^ diff --git a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs index b365e786fd050..62338819625d4 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc //@ revisions: default mir-opt //@[mir-opt] compile-flags: -Zmir-opt-level=4 diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs index 2387dfb2bc575..414d5518e1fb0 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs @@ -7,7 +7,6 @@ //@ check-pass //@ proc-macro: count.rs -//@ ignore-backends: gcc extern crate count; const _: () = { diff --git a/tests/ui/runtime/on-broken-pipe/child-processes.rs b/tests/ui/runtime/on-broken-pipe/child-processes.rs index b7022e1b09d90..05b5a8c29ffe4 100644 --- a/tests/ui/runtime/on-broken-pipe/child-processes.rs +++ b/tests/ui/runtime/on-broken-pipe/child-processes.rs @@ -2,7 +2,6 @@ //@ ignore-cross-compile because aux-bin does not yet support it //@ ignore-remote because aux-bin does not yet support it //@ only-unix because SIGPIPE is a unix thing -//@ ignore-backends: gcc //@ run-pass //@ aux-bin:assert-sigpipe-disposition.rs //@ aux-crate:sigpipe_utils=sigpipe-utils.rs diff --git a/tests/ui/runtime/out-of-stack.rs b/tests/ui/runtime/out-of-stack.rs index 2e140bc9277a2..9038d7d291bea 100644 --- a/tests/ui/runtime/out-of-stack.rs +++ b/tests/ui/runtime/out-of-stack.rs @@ -12,7 +12,6 @@ //@ ignore-tvos stack overflow handlers aren't enabled //@ ignore-watchos stack overflow handlers aren't enabled //@ ignore-visionos stack overflow handlers aren't enabled -//@ ignore-backends: gcc #![feature(rustc_private)] diff --git a/tests/ui/runtime/rt-explody-panic-payloads.rs b/tests/ui/runtime/rt-explody-panic-payloads.rs index 1d5795f8e8652..d564a26ca7374 100644 --- a/tests/ui/runtime/rt-explody-panic-payloads.rs +++ b/tests/ui/runtime/rt-explody-panic-payloads.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-subprocess -//@ ignore-backends: gcc use std::env; use std::process::Command; diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed index 3a42434494d84..e3070ba150b6d 100644 --- a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed +++ b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed @@ -3,7 +3,6 @@ //@ run-rustfix //@ rustfix-only-machine-applicable //@ check-pass -//@ ignore-backends: gcc #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.rs b/tests/ui/rust-2018/suggestions-not-always-applicable.rs index 3a42434494d84..e3070ba150b6d 100644 --- a/tests/ui/rust-2018/suggestions-not-always-applicable.rs +++ b/tests/ui/rust-2018/suggestions-not-always-applicable.rs @@ -3,7 +3,6 @@ //@ run-rustfix //@ rustfix-only-machine-applicable //@ check-pass -//@ ignore-backends: gcc #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs index 456649f23ca67..eec1b859c2033 100644 --- a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs +++ b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs @@ -1,7 +1,6 @@ //@ run-pass //@ edition:2021 //@ proc-macro: reserved-prefixes-macro-2018.rs -//@ ignore-backends: gcc extern crate reserved_prefixes_macro_2018 as m2018; diff --git a/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs b/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs index ddb32c2671739..ead2ab40b77ac 100644 --- a/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs +++ b/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs @@ -1,7 +1,6 @@ //@ run-pass //@ edition:2024 //@ proc-macro: reserved-guarded-strings-macro-2021.rs -//@ ignore-backends: gcc extern crate reserved_guarded_strings_macro_2021 as m2021; diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm-in-2024.rs b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm-in-2024.rs index dca05cc27f6e1..20f7af8c1196e 100644 --- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm-in-2024.rs +++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm-in-2024.rs @@ -1,7 +1,6 @@ // Test for unsafe attributes generated by a proc-macro. //@ proc-macro: unsafe-attributes-pm-in-2024.rs -//@ ignore-backends: gcc unsafe_attributes_pm_in_2024::missing_unsafe!(); //~ ERROR unsafe attribute used without unsafe diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm-in-2024.stderr b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm-in-2024.stderr index a65ccd29afe5a..4f1201dae2987 100644 --- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm-in-2024.stderr +++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm-in-2024.stderr @@ -1,5 +1,5 @@ error: unsafe attribute used without unsafe - --> $DIR/unsafe-attributes-from-pm-in-2024.rs:6:1 + --> $DIR/unsafe-attributes-from-pm-in-2024.rs:5:1 | LL | unsafe_attributes_pm_in_2024::missing_unsafe!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute @@ -7,7 +7,7 @@ LL | unsafe_attributes_pm_in_2024::missing_unsafe!(); = note: this error originates in the macro `unsafe_attributes_pm_in_2024::missing_unsafe` (in Nightly builds, run with -Z macro-backtrace for more info) error: unsafe attribute used without unsafe - --> $DIR/unsafe-attributes-from-pm-in-2024.rs:8:1 + --> $DIR/unsafe-attributes-from-pm-in-2024.rs:7:1 | LL | #[unsafe_attributes_pm_in_2024::attr_missing_unsafe] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute @@ -15,7 +15,7 @@ LL | #[unsafe_attributes_pm_in_2024::attr_missing_unsafe] = note: this error originates in the attribute macro `unsafe_attributes_pm_in_2024::attr_missing_unsafe` (in Nightly builds, run with -Z macro-backtrace for more info) error: unsafe attribute used without unsafe - --> $DIR/unsafe-attributes-from-pm-in-2024.rs:11:10 + --> $DIR/unsafe-attributes-from-pm-in-2024.rs:10:10 | LL | #[derive(unsafe_attributes_pm_in_2024::AttrMissingUnsafe)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute @@ -23,7 +23,7 @@ LL | #[derive(unsafe_attributes_pm_in_2024::AttrMissingUnsafe)] = note: this error originates in the derive macro `unsafe_attributes_pm_in_2024::AttrMissingUnsafe` (in Nightly builds, run with -Z macro-backtrace for more info) error: unsafe attribute used without unsafe - --> $DIR/unsafe-attributes-from-pm-in-2024.rs:14:1 + --> $DIR/unsafe-attributes-from-pm-in-2024.rs:13:1 | LL | unsafe_attributes_pm_in_2024::macro_rules_missing_unsafe!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ usage of unsafe attribute diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs index 8b7073649b7a2..e2c504e708c55 100644 --- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs +++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs @@ -6,7 +6,6 @@ //@[edition2021] edition:2021 //@[edition2024] edition:2024 //@ proc-macro: unsafe-attributes-pm.rs -//@ ignore-backends: gcc unsafe_attributes_pm::missing_unsafe!(); diff --git a/tests/ui/scalable-vectors/project-into-field.rs b/tests/ui/scalable-vectors/project-into-field.rs index 4b829de8f2280..9d989190421c4 100644 --- a/tests/ui/scalable-vectors/project-into-field.rs +++ b/tests/ui/scalable-vectors/project-into-field.rs @@ -3,7 +3,6 @@ //@ compile-flags: -Copt-level=0 --target=aarch64-unknown-linux-gnu //@ dont-check-compiler-stderr //@ failure-status: 101 -//@ ignore-backends: gcc //@ needs-llvm-components: aarch64 #![feature(no_core, rustc_attrs)] #![no_std] diff --git a/tests/ui/sepcomp/sepcomp-unwind.rs b/tests/ui/sepcomp/sepcomp-unwind.rs index 0038e887c4ee6..95591676b5eed 100644 --- a/tests/ui/sepcomp/sepcomp-unwind.rs +++ b/tests/ui/sepcomp/sepcomp-unwind.rs @@ -3,7 +3,6 @@ #![allow(dead_code)] //@ compile-flags: -C codegen-units=3 //@ needs-threads -//@ ignore-backends: gcc // Test unwinding through multiple compilation units. diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs b/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs index 62782db37ed4c..3b96fe3f3ba7f 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc //@ compile-flags: --cfg minisimd_const #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/intrinsic/generic-as.rs b/tests/ui/simd/intrinsic/generic-as.rs index b81402e9dca4d..41366957d1f63 100644 --- a/tests/ui/simd/intrinsic/generic-as.rs +++ b/tests/ui/simd/intrinsic/generic-as.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc //@ compile-flags: --cfg minisimd_const #![feature(repr_simd, core_intrinsics, const_trait_impl, const_cmp, const_index)] diff --git a/tests/ui/simd/issue-17170.rs b/tests/ui/simd/issue-17170.rs index 508f480a58db3..6e5b4c413b03b 100644 --- a/tests/ui/simd/issue-17170.rs +++ b/tests/ui/simd/issue-17170.rs @@ -1,5 +1,4 @@ //@ run-pass -//@ ignore-backends: gcc #![feature(repr_simd)] diff --git a/tests/ui/simd/masked-load-store.rs b/tests/ui/simd/masked-load-store.rs index 7098a4405c7fb..bae79ad28dbca 100644 --- a/tests/ui/simd/masked-load-store.rs +++ b/tests/ui/simd/masked-load-store.rs @@ -1,4 +1,3 @@ -//@ ignore-backends: gcc //@ compile-flags: --cfg minisimd_const //@ run-pass #![feature(repr_simd, core_intrinsics, const_trait_impl, const_cmp, const_index)] diff --git a/tests/ui/simd/target-feature-mixup.rs b/tests/ui/simd/target-feature-mixup.rs index 5f599f38fb92f..bf7c2c5731a36 100644 --- a/tests/ui/simd/target-feature-mixup.rs +++ b/tests/ui/simd/target-feature-mixup.rs @@ -4,7 +4,6 @@ //@ needs-subprocess //@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590) -//@ ignore-backends: gcc #![feature(repr_simd)] diff --git a/tests/ui/stack-protector/warn-stack-protector-unsupported.rs b/tests/ui/stack-protector/warn-stack-protector-unsupported.rs index 9e0e126dabe66..a635976c8427b 100644 --- a/tests/ui/stack-protector/warn-stack-protector-unsupported.rs +++ b/tests/ui/stack-protector/warn-stack-protector-unsupported.rs @@ -5,7 +5,6 @@ //@ [all] compile-flags: -Z stack-protector=all //@ [strong] compile-flags: -Z stack-protector=strong //@ [basic] compile-flags: -Z stack-protector=basic -//@ ignore-backends: gcc #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/ui/structs/unit-like-struct-drop-run.rs b/tests/ui/structs/unit-like-struct-drop-run.rs index 5e3fc5931bdc5..3d00871837cf8 100644 --- a/tests/ui/structs/unit-like-struct-drop-run.rs +++ b/tests/ui/structs/unit-like-struct-drop-run.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-unwind //@ needs-threads -//@ ignore-backends: gcc // Make sure the destructor is run for unit-like structs. diff --git a/tests/ui/suggestions/issue-61963.rs b/tests/ui/suggestions/issue-61963.rs index bf0680b986038..77e4b21f5dbd5 100644 --- a/tests/ui/suggestions/issue-61963.rs +++ b/tests/ui/suggestions/issue-61963.rs @@ -1,7 +1,6 @@ //@ edition: 2015 //@ proc-macro: issue-61963.rs //@ proc-macro: issue-61963-1.rs -//@ ignore-backends: gcc #![deny(bare_trait_objects)] #[macro_use] diff --git a/tests/ui/suggestions/issue-61963.stderr b/tests/ui/suggestions/issue-61963.stderr index f9146a619ec45..ffdeef12bb7f1 100644 --- a/tests/ui/suggestions/issue-61963.stderr +++ b/tests/ui/suggestions/issue-61963.stderr @@ -1,5 +1,5 @@ error: trait objects without an explicit `dyn` are deprecated - --> $DIR/issue-61963.rs:24:14 + --> $DIR/issue-61963.rs:23:14 | LL | bar: Box, | ^^^ @@ -7,7 +7,7 @@ LL | bar: Box, = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see note: the lint level is defined here - --> $DIR/issue-61963.rs:5:9 + --> $DIR/issue-61963.rs:4:9 | LL | #![deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | bar: Box, | +++ error: trait objects without an explicit `dyn` are deprecated - --> $DIR/issue-61963.rs:20:1 + --> $DIR/issue-61963.rs:19:1 | LL | pub struct Foo { | ^^^ diff --git a/tests/ui/suggestions/suggest-ref-macro.rs b/tests/ui/suggestions/suggest-ref-macro.rs index 41a2acf90628a..2f31af33782cb 100644 --- a/tests/ui/suggestions/suggest-ref-macro.rs +++ b/tests/ui/suggestions/suggest-ref-macro.rs @@ -1,6 +1,5 @@ // run-check //@ proc-macro: proc-macro-type-error.rs -//@ ignore-backends: gcc extern crate proc_macro_type_error; diff --git a/tests/ui/suggestions/suggest-ref-macro.stderr b/tests/ui/suggestions/suggest-ref-macro.stderr index 9bb26f7f5ab3a..2dc46a0eb98ad 100644 --- a/tests/ui/suggestions/suggest-ref-macro.stderr +++ b/tests/ui/suggestions/suggest-ref-macro.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/suggest-ref-macro.rs:9:1 + --> $DIR/suggest-ref-macro.rs:8:1 | LL | #[hello] | ^^^^^^^^ @@ -8,14 +8,14 @@ LL | #[hello] | arguments to this function are incorrect | note: function defined here - --> $DIR/suggest-ref-macro.rs:9:1 + --> $DIR/suggest-ref-macro.rs:8:1 | LL | #[hello] | ^^^^^^^^ = note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types - --> $DIR/suggest-ref-macro.rs:16:11 + --> $DIR/suggest-ref-macro.rs:15:11 | LL | macro_rules! bla { LL | () => { @@ -28,7 +28,7 @@ LL | bla!(); | ------ in this macro invocation | note: function defined here - --> $DIR/suggest-ref-macro.rs:12:4 + --> $DIR/suggest-ref-macro.rs:11:4 | LL | fn x(_: &mut i32) {} | ^ ----------- @@ -38,7 +38,7 @@ LL | x(&mut 123); | ++++ error[E0308]: mismatched types - --> $DIR/suggest-ref-macro.rs:27:10 + --> $DIR/suggest-ref-macro.rs:26:10 | LL | x($v) | - arguments to this function are incorrect @@ -47,7 +47,7 @@ LL | bla!(456); | ^^^ expected `&mut i32`, found integer | note: function defined here - --> $DIR/suggest-ref-macro.rs:12:4 + --> $DIR/suggest-ref-macro.rs:11:4 | LL | fn x(_: &mut i32) {} | ^ ----------- diff --git a/tests/ui/target-cpu/explicit-target-cpu.rs b/tests/ui/target-cpu/explicit-target-cpu.rs index 29f8e9de1f6ea..d39c4f47036f2 100644 --- a/tests/ui/target-cpu/explicit-target-cpu.rs +++ b/tests/ui/target-cpu/explicit-target-cpu.rs @@ -22,7 +22,6 @@ //@[avr_cpu] compile-flags: -Ctarget-cpu=atmega328p //@[avr_cpu] build-pass -//@ ignore-backends: gcc #![crate_type = "rlib"] // We don't want to link in any other crate as this would make it necessary to specify diff --git a/tests/ui/target-cpu/unsupported-target-cpu.rs b/tests/ui/target-cpu/unsupported-target-cpu.rs index dafbfbc015ec1..2fccc16d37da5 100644 --- a/tests/ui/target-cpu/unsupported-target-cpu.rs +++ b/tests/ui/target-cpu/unsupported-target-cpu.rs @@ -5,7 +5,6 @@ //@[nvptx-sm60] compile-flags: --target=nvptx64-nvidia-cuda --crate-type=rlib -Ctarget-cpu=sm_60 //@[nvptx-sm60] needs-llvm-components: nvptx //@[nvptx-sm60] build-fail -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs b/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs index c6b5e15599d8e..c6d9ac419abae 100644 --- a/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs +++ b/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs @@ -9,7 +9,6 @@ // FIXME(#147881): *disable* the feature again for minicore as otherwise that will fail to build. //@[riscv] minicore-compile-flags: -Ctarget-feature=-d //@[riscv] needs-llvm-components: riscv -//@ ignore-backends: gcc //@ add-minicore #![feature(no_core, riscv_target_feature)] diff --git a/tests/ui/target-feature/abi-irrelevant-target-feature-flag-disable.rs b/tests/ui/target-feature/abi-irrelevant-target-feature-flag-disable.rs index 38b35c67ba6ff..10c33816b37fa 100644 --- a/tests/ui/target-feature/abi-irrelevant-target-feature-flag-disable.rs +++ b/tests/ui/target-feature/abi-irrelevant-target-feature-flag-disable.rs @@ -5,7 +5,6 @@ //@ needs-llvm-components: x86 //@ compile-flags: -Ctarget-feature=-x87 //@ build-pass -//@ ignore-backends: gcc //@ add-minicore #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/abi-relevant-target-modifier.rs b/tests/ui/target-feature/abi-relevant-target-modifier.rs index cb09064903ba2..ba647ffeb3af4 100644 --- a/tests/ui/target-feature/abi-relevant-target-modifier.rs +++ b/tests/ui/target-feature/abi-relevant-target-modifier.rs @@ -5,7 +5,6 @@ //@ needs-llvm-components: arm //@[allowed] compile-flags: -Cunsafe-allow-abi-mismatch=target-feature //@ aux-build: using-atomics-32.rs -//@ ignore-backends: gcc #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/abi-required-target-feature-attribute.rs b/tests/ui/target-feature/abi-required-target-feature-attribute.rs index b2d2c95313d2b..e9a9ad86f90ac 100644 --- a/tests/ui/target-feature/abi-required-target-feature-attribute.rs +++ b/tests/ui/target-feature/abi-required-target-feature-attribute.rs @@ -3,7 +3,6 @@ //@ compile-flags: --target=x86_64-unknown-none --crate-type=lib //@ needs-llvm-components: x86 //@ build-pass -//@ ignore-backends: gcc //@ add-minicore #![feature(no_core, x87_target_feature)] #![no_core] diff --git a/tests/ui/target-feature/abi-required-target-feature-flag-disable.rs b/tests/ui/target-feature/abi-required-target-feature-flag-disable.rs index 489dcb4f16813..b6c0481e41553 100644 --- a/tests/ui/target-feature/abi-required-target-feature-flag-disable.rs +++ b/tests/ui/target-feature/abi-required-target-feature-flag-disable.rs @@ -23,7 +23,6 @@ // Remove some LLVM warnings that only show up sometimes. //@ normalize-stderr: "\n[^\n]*(target-abi|lp64f)[^\n]*" -> "" -//@ ignore-backends: gcc //@ add-minicore #![feature(no_core)] diff --git a/tests/ui/target-feature/abi-required-target-feature-missing-in-target-cpu.rs b/tests/ui/target-feature/abi-required-target-feature-missing-in-target-cpu.rs index 1a0b26cadd4e3..8567b5cd8522a 100644 --- a/tests/ui/target-feature/abi-required-target-feature-missing-in-target-cpu.rs +++ b/tests/ui/target-feature/abi-required-target-feature-missing-in-target-cpu.rs @@ -11,7 +11,6 @@ // check-fail -//@ ignore-backends: gcc //@ add-minicore // Don't inherit the target-cpu above for minicore, to avoid errors when building that. //@ minicore-compile-flags: -Ctarget-cpu=generic diff --git a/tests/ui/target-feature/feature-hierarchy.rs b/tests/ui/target-feature/feature-hierarchy.rs index 2629f5b000f80..b9da6072aa518 100644 --- a/tests/ui/target-feature/feature-hierarchy.rs +++ b/tests/ui/target-feature/feature-hierarchy.rs @@ -12,7 +12,6 @@ //@ [hexagon-hvxv66] needs-llvm-components: hexagon //@ build-pass //@ add-minicore -//@ ignore-backends: gcc #![no_core] #![crate_type = "rlib"] #![feature(intrinsics, rustc_attrs, no_core, staged_api)] diff --git a/tests/ui/target-feature/forbidden-target-feature-cfg.rs b/tests/ui/target-feature/forbidden-target-feature-cfg.rs index db1a7b817bb8a..4bffb0122b00e 100644 --- a/tests/ui/target-feature/forbidden-target-feature-cfg.rs +++ b/tests/ui/target-feature/forbidden-target-feature-cfg.rs @@ -2,7 +2,6 @@ //@ compile-flags: --target=riscv32e-unknown-none-elf --crate-type=lib //@ needs-llvm-components: riscv //@ check-pass -//@ ignore-backends: gcc //@ add-minicore #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs b/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs index e1f576bb6d89e..93130c32b4c13 100644 --- a/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs +++ b/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs @@ -4,7 +4,6 @@ //@ compile-flags: -Ctarget-feature=-forced-atomics // For now this is just a warning. //@ build-pass -//@ ignore-backends: gcc //@ add-minicore #![feature(no_core)] diff --git a/tests/ui/target-feature/forbidden-target-feature-flag.rs b/tests/ui/target-feature/forbidden-target-feature-flag.rs index ad6d3ee6dfa9d..ea7aed374a893 100644 --- a/tests/ui/target-feature/forbidden-target-feature-flag.rs +++ b/tests/ui/target-feature/forbidden-target-feature-flag.rs @@ -4,7 +4,6 @@ //@ compile-flags: -Ctarget-feature=+forced-atomics // For now this is just a warning. //@ build-pass -//@ ignore-backends: gcc //@ add-minicore #![feature(no_core)] diff --git a/tests/ui/target-feature/packedstack-combinations.rs b/tests/ui/target-feature/packedstack-combinations.rs index dc45ac1ff5e83..fab2820169d3f 100644 --- a/tests/ui/target-feature/packedstack-combinations.rs +++ b/tests/ui/target-feature/packedstack-combinations.rs @@ -1,7 +1,6 @@ //@ add-minicore //@ revisions: wrong_arch only_packedstack backchain_attr backchain_cli with_softfloat //@ compile-flags: -Zpacked-stack --crate-type=rlib -//@ ignore-backends: gcc //@ [wrong_arch] compile-flags: --target=x86_64-unknown-linux-gnu //@ [wrong_arch] should-fail diff --git a/tests/ui/target-feature/tied-features-cli.rs b/tests/ui/target-feature/tied-features-cli.rs index ffa38721c7da2..b7815a9c44d53 100644 --- a/tests/ui/target-feature/tied-features-cli.rs +++ b/tests/ui/target-feature/tied-features-cli.rs @@ -11,7 +11,6 @@ //@ [three] compile-flags: -C target-feature=+paca,+pacg,-paca //@ [four] build-pass //@ [four] compile-flags: -C target-feature=-paca,+pacg -C target-feature=+paca -//@ ignore-backends: gcc //@ add-minicore // FIXME(#147881): *disable* the features again for minicore as otherwise that will fail to build. //@ minicore-compile-flags: -C target-feature=-pacg,-paca diff --git a/tests/ui/target-feature/tied-features-no-implication-1.rs b/tests/ui/target-feature/tied-features-no-implication-1.rs index 326da8b8dcf30..3ead2185c27ab 100644 --- a/tests/ui/target-feature/tied-features-no-implication-1.rs +++ b/tests/ui/target-feature/tied-features-no-implication-1.rs @@ -3,7 +3,6 @@ //@ needs-llvm-components: aarch64 //@[paca] compile-flags: -Ctarget-feature=+paca //@[pacg] compile-flags: -Ctarget-feature=+pacg -//@ ignore-backends: gcc //@ add-minicore // FIXME(#147881): *disable* the features again for minicore as otherwise that will fail to build. //@ minicore-compile-flags: -C target-feature=-pacg,-paca diff --git a/tests/ui/target-feature/unstable-target-feature-on-nightly.rs b/tests/ui/target-feature/unstable-target-feature-on-nightly.rs index 76b01ef42d8fa..e9cbb8e115397 100644 --- a/tests/ui/target-feature/unstable-target-feature-on-nightly.rs +++ b/tests/ui/target-feature/unstable-target-feature-on-nightly.rs @@ -1,8 +1,6 @@ //! Ensure that on nightly we don't warn about using unstable target features. //@ only-x86_64 -// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. -//@ ignore-backends: gcc //@ compile-flags: -Ctarget-feature=+x87 --crate-type=rlib //@ check-pass diff --git a/tests/ui/target-feature/x86-soft-float-cfg.rs b/tests/ui/target-feature/x86-soft-float-cfg.rs index 8718338ca105d..01d1cdc9e404d 100644 --- a/tests/ui/target-feature/x86-soft-float-cfg.rs +++ b/tests/ui/target-feature/x86-soft-float-cfg.rs @@ -5,7 +5,6 @@ //@[soft] compile-flags: --target=x86_64-unknown-none --crate-type=lib //@[soft] needs-llvm-components: x86 //@ check-pass -//@ ignore-backends: gcc //@ add-minicore #![feature(no_core)] #![no_core] diff --git a/tests/ui/target_modifiers/auxiliary/pauth.rs b/tests/ui/target_modifiers/auxiliary/pauth.rs index 32bd7651c0b44..9230ab460b09e 100644 --- a/tests/ui/target_modifiers/auxiliary/pauth.rs +++ b/tests/ui/target_modifiers/auxiliary/pauth.rs @@ -1,7 +1,6 @@ //@ compile-flags: --target aarch64-unknown-linux-pauthtest -Zpointer-authentication=+calls,+init-fini //@ needs-llvm-components: aarch64 //@ no-prefer-dynamic -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/auxiliary/sanitizer_default_explicit.rs b/tests/ui/target_modifiers/auxiliary/sanitizer_default_explicit.rs index 831c681179b9a..160aaf7490c25 100644 --- a/tests/ui/target_modifiers/auxiliary/sanitizer_default_explicit.rs +++ b/tests/ui/target_modifiers/auxiliary/sanitizer_default_explicit.rs @@ -3,7 +3,6 @@ //@ no-prefer-dynamic //@ compile-flags: --target riscv64gc-unknown-fuchsia -Zsanitizer=shadow-call-stack //@ needs-llvm-components: riscv -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/auxiliary/sanitizer_default_implicit.rs b/tests/ui/target_modifiers/auxiliary/sanitizer_default_implicit.rs index 6aac2294283f8..701aa6e835e7e 100644 --- a/tests/ui/target_modifiers/auxiliary/sanitizer_default_implicit.rs +++ b/tests/ui/target_modifiers/auxiliary/sanitizer_default_implicit.rs @@ -4,7 +4,6 @@ //@ no-prefer-dynamic //@ compile-flags: --target riscv64gc-unknown-fuchsia //@ needs-llvm-components: riscv -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/auxiliary/sanitizer_non_default.rs b/tests/ui/target_modifiers/auxiliary/sanitizer_non_default.rs index c04ab13b310ff..2745f347fa7c5 100644 --- a/tests/ui/target_modifiers/auxiliary/sanitizer_non_default.rs +++ b/tests/ui/target_modifiers/auxiliary/sanitizer_non_default.rs @@ -4,7 +4,6 @@ //@ no-prefer-dynamic //@ compile-flags: --target riscv64gc-unknown-fuchsia -Zsanitizer=cfi -Clinker-plugin-lto //@ needs-llvm-components: riscv -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/auxiliary/target_cpu_default_explicit.rs b/tests/ui/target_modifiers/auxiliary/target_cpu_default_explicit.rs index 3c56f64dfdb3a..81606c66c9955 100644 --- a/tests/ui/target_modifiers/auxiliary/target_cpu_default_explicit.rs +++ b/tests/ui/target_modifiers/auxiliary/target_cpu_default_explicit.rs @@ -1,7 +1,6 @@ //@ no-prefer-dynamic //@ compile-flags: --target nvptx64-nvidia-cuda -Ctarget-cpu=sm_70 //@ needs-llvm-components: nvptx -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/auxiliary/target_cpu_default_implicit.rs b/tests/ui/target_modifiers/auxiliary/target_cpu_default_implicit.rs index 6b71ca5eb034d..5603c94eaec19 100644 --- a/tests/ui/target_modifiers/auxiliary/target_cpu_default_implicit.rs +++ b/tests/ui/target_modifiers/auxiliary/target_cpu_default_implicit.rs @@ -1,7 +1,6 @@ //@ no-prefer-dynamic //@ compile-flags: --target nvptx64-nvidia-cuda //@ needs-llvm-components: nvptx -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/auxiliary/target_cpu_non_default.rs b/tests/ui/target_modifiers/auxiliary/target_cpu_non_default.rs index a4fa7e2a33af6..25b59059db0af 100644 --- a/tests/ui/target_modifiers/auxiliary/target_cpu_non_default.rs +++ b/tests/ui/target_modifiers/auxiliary/target_cpu_non_default.rs @@ -1,7 +1,6 @@ //@ no-prefer-dynamic //@ compile-flags: --target nvptx64-nvidia-cuda -Ctarget-cpu=sm_80 //@ needs-llvm-components: nvptx -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/defaults_check.rs b/tests/ui/target_modifiers/defaults_check.rs index c86b5a12fc8a7..f7b80807ed050 100644 --- a/tests/ui/target_modifiers/defaults_check.rs +++ b/tests/ui/target_modifiers/defaults_check.rs @@ -11,7 +11,6 @@ //@[error] compile-flags: -Zreg-struct-return=true //@[ok] check-pass //@[ok_explicit] check-pass -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/incompatible_fixedx18.rs b/tests/ui/target_modifiers/incompatible_fixedx18.rs index 1cf1d2fc18ff3..d6028bdc0bf27 100644 --- a/tests/ui/target_modifiers/incompatible_fixedx18.rs +++ b/tests/ui/target_modifiers/incompatible_fixedx18.rs @@ -8,7 +8,6 @@ // [error_generated] no extra compile-flags //@[allow_mismatch] check-pass //@[allow_match] check-pass -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/incompatible_pauth.rs b/tests/ui/target_modifiers/incompatible_pauth.rs index 302e845e8bd4f..c096f848737bb 100644 --- a/tests/ui/target_modifiers/incompatible_pauth.rs +++ b/tests/ui/target_modifiers/incompatible_pauth.rs @@ -9,7 +9,6 @@ //@ [ok_reverse_order] check-pass //@ [error_generated] compile-flags: -Zpointer-authentication=+calls,-init-fini //@ needs-llvm-components: aarch64 -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/incompatible_regparm.rs b/tests/ui/target_modifiers/incompatible_regparm.rs index 07018a6d6e948..6fea34cca7789 100644 --- a/tests/ui/target_modifiers/incompatible_regparm.rs +++ b/tests/ui/target_modifiers/incompatible_regparm.rs @@ -7,7 +7,6 @@ //@[allow_no_value] compile-flags: -Cunsafe-allow-abi-mismatch // [error_generated] no extra compile-flags //@[allow_regparm_mismatch] check-pass -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/no_value_bool.rs b/tests/ui/target_modifiers/no_value_bool.rs index 054d27b323949..df0d57d556f32 100644 --- a/tests/ui/target_modifiers/no_value_bool.rs +++ b/tests/ui/target_modifiers/no_value_bool.rs @@ -12,7 +12,6 @@ //@[error_explicit] compile-flags: -Zreg-struct-return=false //@[ok] check-pass //@[ok_explicit] check-pass -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/target_modifiers/sanitizer_default.rs b/tests/ui/target_modifiers/sanitizer_default.rs index 5b3b1f4d7b6e5..3e00412a77de6 100644 --- a/tests/ui/target_modifiers/sanitizer_default.rs +++ b/tests/ui/target_modifiers/sanitizer_default.rs @@ -11,7 +11,6 @@ //@ aux-build:sanitizer_non_default.rs //@ compile-flags: --target riscv64gc-unknown-fuchsia //@ needs-llvm-components: riscv -//@ ignore-backends: gcc //@ revisions: implicit_default explicit_default implicit_mismatch explicit_mismatch //@[implicit_default] check-pass diff --git a/tests/ui/target_modifiers/target_cpu_default.rs b/tests/ui/target_modifiers/target_cpu_default.rs index db24989fd130e..6089283bdc8bc 100644 --- a/tests/ui/target_modifiers/target_cpu_default.rs +++ b/tests/ui/target_modifiers/target_cpu_default.rs @@ -14,7 +14,6 @@ //@ aux-build:target_cpu_non_default.rs //@ compile-flags: --target nvptx64-nvidia-cuda //@ needs-llvm-components: nvptx -//@ ignore-backends: gcc //@ revisions: implicit_default explicit_default implicit_mismatch explicit_mismatch //@[implicit_default] check-pass diff --git a/tests/ui/target_modifiers/two_flags.rs b/tests/ui/target_modifiers/two_flags.rs index c9ae341ce8c6c..e86cda43c1dc8 100644 --- a/tests/ui/target_modifiers/two_flags.rs +++ b/tests/ui/target_modifiers/two_flags.rs @@ -6,7 +6,6 @@ //@[two_allowed] compile-flags: -Cunsafe-allow-abi-mismatch=regparm,reg-struct-return //@[unknown_allowed] compile-flags: -Cunsafe-allow-abi-mismatch=unknown_flag -Zregparm=2 -Zreg-struct-return=true //@[two_allowed] check-pass -//@ ignore-backends: gcc #![feature(no_core)] #![crate_type = "rlib"] diff --git a/tests/ui/test-attrs/test-panic-while-printing.rs b/tests/ui/test-attrs/test-panic-while-printing.rs index 49e8d9c7afdf1..a50a15fbe5af5 100644 --- a/tests/ui/test-attrs/test-panic-while-printing.rs +++ b/tests/ui/test-attrs/test-panic-while-printing.rs @@ -1,7 +1,6 @@ //@ compile-flags:--test //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc use std::fmt; use std::fmt::{Display, Formatter}; diff --git a/tests/ui/threads-sendsync/task-stderr.rs b/tests/ui/threads-sendsync/task-stderr.rs index f54b5a5cc5f68..3934084e02a0a 100644 --- a/tests/ui/threads-sendsync/task-stderr.rs +++ b/tests/ui/threads-sendsync/task-stderr.rs @@ -1,7 +1,6 @@ //@ run-pass //@ needs-threads //@ needs-unwind -//@ ignore-backends: gcc #![feature(internal_output_capture)] diff --git a/tests/ui/threads-sendsync/unwind-resource.rs b/tests/ui/threads-sendsync/unwind-resource.rs index c5fbfc5bf5b03..ec27a1846fef2 100644 --- a/tests/ui/threads-sendsync/unwind-resource.rs +++ b/tests/ui/threads-sendsync/unwind-resource.rs @@ -3,7 +3,6 @@ #![allow(non_camel_case_types)] //@ needs-threads -//@ ignore-backends: gcc use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/trait-bounds/missing-unstable-trait-bound.nightly.stderr b/tests/ui/trait-bounds/missing-unstable-trait-bound.nightly.stderr index 75381e75bf558..47e9cdebb36d5 100644 --- a/tests/ui/trait-bounds/missing-unstable-trait-bound.nightly.stderr +++ b/tests/ui/trait-bounds/missing-unstable-trait-bound.nightly.stderr @@ -1,5 +1,5 @@ error[E0277]: `std::ops::Range` is not an iterator - --> $DIR/missing-unstable-trait-bound.rs:13:14 + --> $DIR/missing-unstable-trait-bound.rs:12:14 | LL | for _ in t {} | ^ `Range` is not an iterator diff --git a/tests/ui/trait-bounds/missing-unstable-trait-bound.rs b/tests/ui/trait-bounds/missing-unstable-trait-bound.rs index ab77ffce3d768..1b563bb803a3e 100644 --- a/tests/ui/trait-bounds/missing-unstable-trait-bound.rs +++ b/tests/ui/trait-bounds/missing-unstable-trait-bound.rs @@ -3,7 +3,6 @@ //@ ignore-wasm32 //@ ignore-wasm64 -//@ ignore-backends: gcc // //@ revisions: stable nightly //@[stable] act-as-stable diff --git a/tests/ui/trait-bounds/missing-unstable-trait-bound.stable.stderr b/tests/ui/trait-bounds/missing-unstable-trait-bound.stable.stderr index f647267ac2e07..e34826eb4984b 100644 --- a/tests/ui/trait-bounds/missing-unstable-trait-bound.stable.stderr +++ b/tests/ui/trait-bounds/missing-unstable-trait-bound.stable.stderr @@ -1,5 +1,5 @@ error[E0277]: `std::ops::Range` is not an iterator - --> $DIR/missing-unstable-trait-bound.rs:13:14 + --> $DIR/missing-unstable-trait-bound.rs:12:14 | LL | for _ in t {} | ^ `Range` is not an iterator diff --git a/tests/ui/traits/clone-unwind-rc-cleanup.rs b/tests/ui/traits/clone-unwind-rc-cleanup.rs index dab48a1b4c6cf..cd02050ea2746 100644 --- a/tests/ui/traits/clone-unwind-rc-cleanup.rs +++ b/tests/ui/traits/clone-unwind-rc-cleanup.rs @@ -2,7 +2,6 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc #![allow(unused_variables)] #![allow(unused_imports)] diff --git a/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr b/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr index 9d7d1a154ec78..33289d9ed3386 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr @@ -1,17 +1,17 @@ error[E0367]: `NonTrivialDrop` does not implement `[const] Destruct` - --> $DIR/const-drop-fail.rs:20:30 + --> $DIR/const-drop-fail.rs:19:30 | LL | struct ConstImplWithDropGlue(NonTrivialDrop); | ^^^^^^^^^^^^^^ | note: required for this `Drop` impl - --> $DIR/const-drop-fail.rs:23:1 + --> $DIR/const-drop-fail.rs:22:1 | LL | const impl Drop for ConstImplWithDropGlue { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied - --> $DIR/const-drop-fail.rs:36:5 + --> $DIR/const-drop-fail.rs:35:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call @@ -20,13 +20,13 @@ LL | NonTrivialDrop, | ^^^^^^^^^^^^^^ | note: required by a bound in `check` - --> $DIR/const-drop-fail.rs:27:19 + --> $DIR/const-drop-fail.rs:26:19 | LL | const fn check(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `check` error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied - --> $DIR/const-drop-fail.rs:38:5 + --> $DIR/const-drop-fail.rs:37:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call @@ -35,7 +35,7 @@ LL | ConstImplWithDropGlue(NonTrivialDrop), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by a bound in `check` - --> $DIR/const-drop-fail.rs:27:19 + --> $DIR/const-drop-fail.rs:26:19 | LL | const fn check(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `check` diff --git a/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr b/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr index 9d7d1a154ec78..33289d9ed3386 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr @@ -1,17 +1,17 @@ error[E0367]: `NonTrivialDrop` does not implement `[const] Destruct` - --> $DIR/const-drop-fail.rs:20:30 + --> $DIR/const-drop-fail.rs:19:30 | LL | struct ConstImplWithDropGlue(NonTrivialDrop); | ^^^^^^^^^^^^^^ | note: required for this `Drop` impl - --> $DIR/const-drop-fail.rs:23:1 + --> $DIR/const-drop-fail.rs:22:1 | LL | const impl Drop for ConstImplWithDropGlue { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied - --> $DIR/const-drop-fail.rs:36:5 + --> $DIR/const-drop-fail.rs:35:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call @@ -20,13 +20,13 @@ LL | NonTrivialDrop, | ^^^^^^^^^^^^^^ | note: required by a bound in `check` - --> $DIR/const-drop-fail.rs:27:19 + --> $DIR/const-drop-fail.rs:26:19 | LL | const fn check(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `check` error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied - --> $DIR/const-drop-fail.rs:38:5 + --> $DIR/const-drop-fail.rs:37:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call @@ -35,7 +35,7 @@ LL | ConstImplWithDropGlue(NonTrivialDrop), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by a bound in `check` - --> $DIR/const-drop-fail.rs:27:19 + --> $DIR/const-drop-fail.rs:26:19 | LL | const fn check(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `check` diff --git a/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr b/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr index 9d7d1a154ec78..33289d9ed3386 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr @@ -1,17 +1,17 @@ error[E0367]: `NonTrivialDrop` does not implement `[const] Destruct` - --> $DIR/const-drop-fail.rs:20:30 + --> $DIR/const-drop-fail.rs:19:30 | LL | struct ConstImplWithDropGlue(NonTrivialDrop); | ^^^^^^^^^^^^^^ | note: required for this `Drop` impl - --> $DIR/const-drop-fail.rs:23:1 + --> $DIR/const-drop-fail.rs:22:1 | LL | const impl Drop for ConstImplWithDropGlue { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied - --> $DIR/const-drop-fail.rs:36:5 + --> $DIR/const-drop-fail.rs:35:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call @@ -20,13 +20,13 @@ LL | NonTrivialDrop, | ^^^^^^^^^^^^^^ | note: required by a bound in `check` - --> $DIR/const-drop-fail.rs:27:19 + --> $DIR/const-drop-fail.rs:26:19 | LL | const fn check(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `check` error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied - --> $DIR/const-drop-fail.rs:38:5 + --> $DIR/const-drop-fail.rs:37:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call @@ -35,7 +35,7 @@ LL | ConstImplWithDropGlue(NonTrivialDrop), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by a bound in `check` - --> $DIR/const-drop-fail.rs:27:19 + --> $DIR/const-drop-fail.rs:26:19 | LL | const fn check(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `check` diff --git a/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr b/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr index 9d7d1a154ec78..33289d9ed3386 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr +++ b/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr @@ -1,17 +1,17 @@ error[E0367]: `NonTrivialDrop` does not implement `[const] Destruct` - --> $DIR/const-drop-fail.rs:20:30 + --> $DIR/const-drop-fail.rs:19:30 | LL | struct ConstImplWithDropGlue(NonTrivialDrop); | ^^^^^^^^^^^^^^ | note: required for this `Drop` impl - --> $DIR/const-drop-fail.rs:23:1 + --> $DIR/const-drop-fail.rs:22:1 | LL | const impl Drop for ConstImplWithDropGlue { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied - --> $DIR/const-drop-fail.rs:36:5 + --> $DIR/const-drop-fail.rs:35:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call @@ -20,13 +20,13 @@ LL | NonTrivialDrop, | ^^^^^^^^^^^^^^ | note: required by a bound in `check` - --> $DIR/const-drop-fail.rs:27:19 + --> $DIR/const-drop-fail.rs:26:19 | LL | const fn check(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `check` error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied - --> $DIR/const-drop-fail.rs:38:5 + --> $DIR/const-drop-fail.rs:37:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call @@ -35,7 +35,7 @@ LL | ConstImplWithDropGlue(NonTrivialDrop), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by a bound in `check` - --> $DIR/const-drop-fail.rs:27:19 + --> $DIR/const-drop-fail.rs:26:19 | LL | const fn check(_: T) {} | ^^^^^^^^^^^^^^^^ required by this bound in `check` diff --git a/tests/ui/traits/const-traits/const-drop-fail.rs b/tests/ui/traits/const-traits/const-drop-fail.rs index 5a3894ed4dfe2..721b1d077f7c9 100644 --- a/tests/ui/traits/const-traits/const-drop-fail.rs +++ b/tests/ui/traits/const-traits/const-drop-fail.rs @@ -2,7 +2,6 @@ //@[new_stock] compile-flags: -Znext-solver //@ revisions: new_stock old_stock new_precise old_precise //@ ignore-compare-mode-next-solver (explicit revisions) -//@ ignore-backends: gcc #![feature(const_trait_impl, const_destruct)] #![cfg_attr(any(new_precise, old_precise), feature(const_precise_live_drops))] diff --git a/tests/ui/traits/const-traits/const-supertrait-unstable.nightly-enabled.stderr b/tests/ui/traits/const-traits/const-supertrait-unstable.nightly-enabled.stderr index ae38e9799981f..43ac8df50d8f1 100644 --- a/tests/ui/traits/const-traits/const-supertrait-unstable.nightly-enabled.stderr +++ b/tests/ui/traits/const-traits/const-supertrait-unstable.nightly-enabled.stderr @@ -1,17 +1,17 @@ error: `[const]` is not allowed here - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ | note: this trait is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/const-supertrait-unstable.rs:26:1 + --> $DIR/const-supertrait-unstable.rs:25:1 | LL | trait Bar: [const] Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` @@ -22,7 +22,7 @@ LL | const trait Foo { | +++++ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` @@ -34,7 +34,7 @@ LL | const trait Foo { | +++++ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` @@ -46,7 +46,7 @@ LL | const trait Foo { | +++++ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ can't be applied to `Bar` @@ -57,7 +57,7 @@ LL | const trait Bar: [const] Foo {} | +++++ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ can't be applied to `Bar` @@ -69,13 +69,13 @@ LL | const trait Bar: [const] Foo {} | +++++ error[E0015]: cannot call non-const method `::a` in constant functions - --> $DIR/const-supertrait-unstable.rs:37:7 + --> $DIR/const-supertrait-unstable.rs:36:7 | LL | x.a(); | ^^^ | note: method `a` is not const because trait `Foo` is not const - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ this trait is not const diff --git a/tests/ui/traits/const-traits/const-supertrait-unstable.nightly.stderr b/tests/ui/traits/const-traits/const-supertrait-unstable.nightly.stderr index ba0c399c0d27b..ed1fa6bf261a9 100644 --- a/tests/ui/traits/const-traits/const-supertrait-unstable.nightly.stderr +++ b/tests/ui/traits/const-traits/const-supertrait-unstable.nightly.stderr @@ -1,17 +1,17 @@ error: `[const]` is not allowed here - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ | note: this trait is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/const-supertrait-unstable.rs:26:1 + --> $DIR/const-supertrait-unstable.rs:25:1 | LL | trait Bar: [const] Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0658]: const trait impls are experimental - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ @@ -21,7 +21,7 @@ LL | trait Bar: [const] Foo {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const trait impls are experimental - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ @@ -31,7 +31,7 @@ LL | const fn foo(x: &T) { = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` @@ -42,7 +42,7 @@ LL | const trait Foo { | +++++ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` @@ -54,7 +54,7 @@ LL | const trait Foo { | +++++ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` @@ -66,7 +66,7 @@ LL | const trait Foo { | +++++ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ can't be applied to `Bar` @@ -77,7 +77,7 @@ LL | const trait Bar: [const] Foo {} | +++++ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ can't be applied to `Bar` @@ -89,13 +89,13 @@ LL | const trait Bar: [const] Foo {} | +++++ error[E0015]: cannot call non-const method `::a` in constant functions - --> $DIR/const-supertrait-unstable.rs:37:7 + --> $DIR/const-supertrait-unstable.rs:36:7 | LL | x.a(); | ^^^ | note: method `a` is not const because trait `Foo` is not const - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ this trait is not const diff --git a/tests/ui/traits/const-traits/const-supertrait-unstable.rs b/tests/ui/traits/const-traits/const-supertrait-unstable.rs index 0d70a4b876d9b..04e49b4109f32 100644 --- a/tests/ui/traits/const-traits/const-supertrait-unstable.rs +++ b/tests/ui/traits/const-traits/const-supertrait-unstable.rs @@ -2,7 +2,6 @@ //! We don't want to provide suggestions on stable that only make sense in nightly. //@ needs-target-std -//@ ignore-backends: gcc //@ normalize-stderr: "dev release channel" -> "nightly release channel" //@ normalize-stderr: "stable release channel" -> "nightly release channel" diff --git a/tests/ui/traits/const-traits/const-supertrait-unstable.stable-enabled.stderr b/tests/ui/traits/const-traits/const-supertrait-unstable.stable-enabled.stderr index 196f3dc2724ba..dbcc8d46d3fc7 100644 --- a/tests/ui/traits/const-traits/const-supertrait-unstable.stable-enabled.stderr +++ b/tests/ui/traits/const-traits/const-supertrait-unstable.stable-enabled.stderr @@ -1,92 +1,92 @@ error: `[const]` is not allowed here - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ | note: this trait is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/const-supertrait-unstable.rs:26:1 + --> $DIR/const-supertrait-unstable.rs:25:1 | LL | trait Bar: [const] Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the nightly release channel - --> $DIR/const-supertrait-unstable.rs:19:30 + --> $DIR/const-supertrait-unstable.rs:18:30 | LL | #![cfg_attr(feature_enabled, feature(const_trait_impl))] | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` | note: `Foo` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` | note: `Foo` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` | note: `Foo` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ can't be applied to `Bar` | note: `Bar` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:26:1 + --> $DIR/const-supertrait-unstable.rs:25:1 | LL | trait Bar: [const] Foo {} | ^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ can't be applied to `Bar` | note: `Bar` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:26:1 + --> $DIR/const-supertrait-unstable.rs:25:1 | LL | trait Bar: [const] Foo {} | ^^^^^^^^^^^^^^^^^^^^^^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const method `::a` in constant functions - --> $DIR/const-supertrait-unstable.rs:37:7 + --> $DIR/const-supertrait-unstable.rs:36:7 | LL | x.a(); | ^^^ | note: method `a` is not const because trait `Foo` is not const - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ this trait is not const diff --git a/tests/ui/traits/const-traits/const-supertrait-unstable.stable.stderr b/tests/ui/traits/const-traits/const-supertrait-unstable.stable.stderr index 50ceda54258c1..ee1c731e604a6 100644 --- a/tests/ui/traits/const-traits/const-supertrait-unstable.stable.stderr +++ b/tests/ui/traits/const-traits/const-supertrait-unstable.stable.stderr @@ -1,17 +1,17 @@ error: `[const]` is not allowed here - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ | note: this trait is not `const`, so it cannot have `[const]` trait bounds - --> $DIR/const-supertrait-unstable.rs:26:1 + --> $DIR/const-supertrait-unstable.rs:25:1 | LL | trait Bar: [const] Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0658]: const trait impls are experimental - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ @@ -19,7 +19,7 @@ LL | trait Bar: [const] Foo {} = note: see issue #143874 for more information error[E0658]: const trait impls are experimental - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ @@ -27,76 +27,76 @@ LL | const fn foo(x: &T) { = note: see issue #143874 for more information error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` | note: `Foo` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` | note: `Foo` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:26:12 + --> $DIR/const-supertrait-unstable.rs:25:12 | LL | trait Bar: [const] Foo {} | ^^^^^^^ can't be applied to `Foo` | note: `Foo` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ can't be applied to `Bar` | note: `Bar` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:26:1 + --> $DIR/const-supertrait-unstable.rs:25:1 | LL | trait Bar: [const] Foo {} | ^^^^^^^^^^^^^^^^^^^^^^ error: `[const]` can only be applied to `const` traits - --> $DIR/const-supertrait-unstable.rs:33:17 + --> $DIR/const-supertrait-unstable.rs:32:17 | LL | const fn foo(x: &T) { | ^^^^^^^ can't be applied to `Bar` | note: `Bar` can't be used with `[const]` because it isn't `const` - --> $DIR/const-supertrait-unstable.rs:26:1 + --> $DIR/const-supertrait-unstable.rs:25:1 | LL | trait Bar: [const] Foo {} | ^^^^^^^^^^^^^^^^^^^^^^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0015]: cannot call non-const method `::a` in constant functions - --> $DIR/const-supertrait-unstable.rs:37:7 + --> $DIR/const-supertrait-unstable.rs:36:7 | LL | x.a(); | ^^^ | note: method `a` is not const because trait `Foo` is not const - --> $DIR/const-supertrait-unstable.rs:22:1 + --> $DIR/const-supertrait-unstable.rs:21:1 | LL | trait Foo { | ^^^^^^^^^ this trait is not const diff --git a/tests/ui/type/pattern_types/assoc_const.default.stderr b/tests/ui/type/pattern_types/assoc_const.default.stderr index 8b1184877af83..db79eaff48753 100644 --- a/tests/ui/type/pattern_types/assoc_const.default.stderr +++ b/tests/ui/type/pattern_types/assoc_const.default.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/assoc_const.rs:17:41 + --> $DIR/assoc_const.rs:15:41 | LL | fn foo(_: pattern_type!(u32 is ::START..=::END)) {} | ^ cannot perform const operation using `T` @@ -9,7 +9,7 @@ LL | fn foo(_: pattern_type!(u32 is ::START..=::END) = help: alternatively, you can use `#![feature(gca_const_items)]` and wrap the expression in the `gca!` macro error: generic parameters may not be used in const operations - --> $DIR/assoc_const.rs:17:61 + --> $DIR/assoc_const.rs:15:61 | LL | fn foo(_: pattern_type!(u32 is ::START..=::END)) {} | ^ cannot perform const operation using `T` @@ -19,7 +19,7 @@ LL | fn foo(_: pattern_type!(u32 is ::START..=::END) = help: alternatively, you can use `#![feature(gca_const_items)]` and wrap the expression in the `gca!` macro error: generic parameters may not be used in const operations - --> $DIR/assoc_const.rs:20:40 + --> $DIR/assoc_const.rs:18:40 | LL | fn bar(_: pattern_type!(u32 is T::START..=T::END)) {} | ^ cannot perform const operation using `T` @@ -29,7 +29,7 @@ LL | fn bar(_: pattern_type!(u32 is T::START..=T::END)) {} = help: alternatively, you can use `#![feature(gca_const_items)]` and wrap the expression in the `gca!` macro error: generic parameters may not be used in const operations - --> $DIR/assoc_const.rs:20:51 + --> $DIR/assoc_const.rs:18:51 | LL | fn bar(_: pattern_type!(u32 is T::START..=T::END)) {} | ^ cannot perform const operation using `T` diff --git a/tests/ui/type/pattern_types/assoc_const.rs b/tests/ui/type/pattern_types/assoc_const.rs index 90508801990e8..6b5de2042f5d0 100644 --- a/tests/ui/type/pattern_types/assoc_const.rs +++ b/tests/ui/type/pattern_types/assoc_const.rs @@ -1,7 +1,5 @@ #![feature(pattern_types)] -#![feature(pattern_type_macro)] #![cfg_attr(const_arg, feature(generic_const_exprs, generic_pattern_types))] -#![expect(incomplete_features)] // gate-test-generic_pattern_types line to the test file. //@ revisions: default const_arg diff --git a/tests/ui/type/pattern_types/bad_pat.rs b/tests/ui/type/pattern_types/bad_pat.rs index 7e2b4cb996f27..75c8169188011 100644 --- a/tests/ui/type/pattern_types/bad_pat.rs +++ b/tests/ui/type/pattern_types/bad_pat.rs @@ -1,5 +1,4 @@ #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; @@ -12,7 +11,7 @@ type Wild = pattern_type!(() is _); // FIXME: confusing diagnostic because `not` can be a binding type NonNull = pattern_type!(*const () is not null); -//~^ ERROR: expected one of `@` or `|`, found `null` +//~^ ERROR: expected one of //~| ERROR: pattern not supported in pattern types type NonNull2 = pattern_type!(*const () is !nil); diff --git a/tests/ui/type/pattern_types/bad_pat.stderr b/tests/ui/type/pattern_types/bad_pat.stderr index e72279542280c..07ced579c6512 100644 --- a/tests/ui/type/pattern_types/bad_pat.stderr +++ b/tests/ui/type/pattern_types/bad_pat.stderr @@ -1,5 +1,5 @@ error[E0586]: inclusive range with no end - --> $DIR/bad_pat.rs:6:43 + --> $DIR/bad_pat.rs:5:43 | LL | type NonNullU32_2 = pattern_type!(u32 is 1..=); | ^^^ @@ -12,7 +12,7 @@ LL + type NonNullU32_2 = pattern_type!(u32 is 1..); | error[E0586]: inclusive range with no end - --> $DIR/bad_pat.rs:8:40 + --> $DIR/bad_pat.rs:7:40 | LL | type Positive2 = pattern_type!(i32 is 0..=); | ^^^ @@ -25,25 +25,25 @@ LL + type Positive2 = pattern_type!(i32 is 0..); | error: pattern not supported in pattern types - --> $DIR/bad_pat.rs:10:33 + --> $DIR/bad_pat.rs:9:33 | LL | type Wild = pattern_type!(() is _); | ^ error: pattern not supported in pattern types - --> $DIR/bad_pat.rs:14:43 + --> $DIR/bad_pat.rs:13:43 | LL | type NonNull = pattern_type!(*const () is not null); | ^^^ -error: expected one of `@` or `|`, found `null` - --> $DIR/bad_pat.rs:14:47 +error: expected one of `)`, `@`, or `|`, found `null` + --> $DIR/bad_pat.rs:13:47 | LL | type NonNull = pattern_type!(*const () is not null); - | ^^^^ expected one of `@` or `|` + | ^^^^ expected one of `)`, `@`, or `|` error: expected `null`, found `nil` - --> $DIR/bad_pat.rs:18:45 + --> $DIR/bad_pat.rs:17:45 | LL | type NonNull2 = pattern_type!(*const () is !nil); | ^^^ expected `null` diff --git a/tests/ui/type/pattern_types/chars.rs b/tests/ui/type/pattern_types/chars.rs index 9073998b387b7..285c4f3abdf75 100644 --- a/tests/ui/type/pattern_types/chars.rs +++ b/tests/ui/type/pattern_types/chars.rs @@ -3,7 +3,6 @@ //@ check-pass #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/const_generics.rs b/tests/ui/type/pattern_types/const_generics.rs index f5eb90e94d4fd..aff5e72f2c9e8 100644 --- a/tests/ui/type/pattern_types/const_generics.rs +++ b/tests/ui/type/pattern_types/const_generics.rs @@ -3,7 +3,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver -#![feature(pattern_types, generic_pattern_types, pattern_type_macro)] +#![feature(pattern_types, generic_pattern_types)] #![expect(incomplete_features)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/derives.rs b/tests/ui/type/pattern_types/derives.rs index 12af19e5f7ea6..2a3d1164c9772 100644 --- a/tests/ui/type/pattern_types/derives.rs +++ b/tests/ui/type/pattern_types/derives.rs @@ -2,7 +2,6 @@ //! Exceptions are `Clone` and `Copy`, which have builtin impls for pattern types. #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; @@ -11,7 +10,7 @@ use std::pat::pattern_type; struct Nanoseconds(NanoI32); //~^ ERROR: binary operation `==` cannot be applied to type `pattern_type!(i32 is 0..=999999999)` -type NanoI32 = crate::pattern_type!(i32 is 0..=999_999_999); +type NanoI32 = pattern_type!(i32 is 0..=999_999_999); fn main() { let x = Nanoseconds(unsafe { std::mem::transmute(42) }); diff --git a/tests/ui/type/pattern_types/derives.stderr b/tests/ui/type/pattern_types/derives.stderr index 6fb0c0994082a..f196cec5a1dc5 100644 --- a/tests/ui/type/pattern_types/derives.stderr +++ b/tests/ui/type/pattern_types/derives.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `==` cannot be applied to type `pattern_type!(i32 is 0..=999999999)` - --> $DIR/derives.rs:11:20 + --> $DIR/derives.rs:10:20 | LL | #[derive(Clone, Copy, PartialEq)] | --------- in this derive macro expansion diff --git a/tests/ui/type/pattern_types/derives_fail.rs b/tests/ui/type/pattern_types/derives_fail.rs index 8251fa9f38c0b..60b4eb06db901 100644 --- a/tests/ui/type/pattern_types/derives_fail.rs +++ b/tests/ui/type/pattern_types/derives_fail.rs @@ -2,7 +2,6 @@ //! Exceptions are `Clone` and `Copy`, which have bultin impls for pattern types. #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; @@ -16,7 +15,7 @@ struct Nanoseconds(NanoI32); //~| ERROR: the trait bound `pattern_type!(i32 is 0..=999999999): Default` is not satisfied //~| ERROR: `==` cannot be applied -type NanoI32 = crate::pattern_type!(i32 is 0..=999_999_999); +type NanoI32 = pattern_type!(i32 is 0..=999_999_999); fn main() { let x = Nanoseconds(unsafe { std::mem::transmute(42) }); diff --git a/tests/ui/type/pattern_types/derives_fail.stderr b/tests/ui/type/pattern_types/derives_fail.stderr index a6814d8cba2a0..ac194b9be8990 100644 --- a/tests/ui/type/pattern_types/derives_fail.stderr +++ b/tests/ui/type/pattern_types/derives_fail.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `==` cannot be applied to type `pattern_type!(i32 is 0..=999999999)` - --> $DIR/derives_fail.rs:11:20 + --> $DIR/derives_fail.rs:10:20 | LL | #[derive(Clone, Copy, PartialEq, Eq, Debug, Ord, PartialOrd, Hash, Default)] | --------- in this derive macro expansion @@ -8,7 +8,7 @@ LL | struct Nanoseconds(NanoI32); | ^^^^^^^ error[E0277]: the trait bound `pattern_type!(i32 is 0..=999999999): Eq` is not satisfied - --> $DIR/derives_fail.rs:11:20 + --> $DIR/derives_fail.rs:10:20 | LL | #[derive(Clone, Copy, PartialEq, Eq, Debug, Ord, PartialOrd, Hash, Default)] | -- in this derive macro expansion @@ -20,7 +20,7 @@ note: required by a bound in `std::cmp::AssertParamIsEq` --> $SRC_DIR/core/src/cmp.rs:LL:COL error[E0277]: `pattern_type!(i32 is 0..=999999999)` doesn't implement `Debug` - --> $DIR/derives_fail.rs:11:20 + --> $DIR/derives_fail.rs:10:20 | LL | #[derive(Clone, Copy, PartialEq, Eq, Debug, Ord, PartialOrd, Hash, Default)] | ----- in this derive macro expansion @@ -29,7 +29,7 @@ LL | struct Nanoseconds(NanoI32); | ^^^^^^^ the trait `Debug` is not implemented for `pattern_type!(i32 is 0..=999999999)` error[E0277]: the trait bound `pattern_type!(i32 is 0..=999999999): Ord` is not satisfied - --> $DIR/derives_fail.rs:11:20 + --> $DIR/derives_fail.rs:10:20 | LL | #[derive(Clone, Copy, PartialEq, Eq, Debug, Ord, PartialOrd, Hash, Default)] | --- in this derive macro expansion @@ -38,7 +38,7 @@ LL | struct Nanoseconds(NanoI32); | ^^^^^^^ the trait `Ord` is not implemented for `pattern_type!(i32 is 0..=999999999)` error[E0277]: the trait bound `pattern_type!(i32 is 0..=999999999): Hash` is not satisfied - --> $DIR/derives_fail.rs:11:20 + --> $DIR/derives_fail.rs:10:20 | LL | #[derive(Clone, Copy, PartialEq, Eq, Debug, Ord, PartialOrd, Hash, Default)] | ---- in this derive macro expansion @@ -47,7 +47,7 @@ LL | struct Nanoseconds(NanoI32); | ^^^^^^^ the trait `Hash` is not implemented for `pattern_type!(i32 is 0..=999999999)` error[E0277]: the trait bound `pattern_type!(i32 is 0..=999999999): Default` is not satisfied - --> $DIR/derives_fail.rs:11:20 + --> $DIR/derives_fail.rs:10:20 | LL | #[derive(Clone, Copy, PartialEq, Eq, Debug, Ord, PartialOrd, Hash, Default)] | ------- in this derive macro expansion diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr b/tests/ui/type/pattern_types/feature-gate-pattern_types.disabled.stderr similarity index 64% rename from tests/ui/type/pattern_types/feature-gate-pattern_types.stderr rename to tests/ui/type/pattern_types/feature-gate-pattern_types.disabled.stderr index 12508bcb54a34..b03af26289efc 100644 --- a/tests/ui/type/pattern_types/feature-gate-pattern_types.stderr +++ b/tests/ui/type/pattern_types/feature-gate-pattern_types.disabled.stderr @@ -1,55 +1,55 @@ -error[E0658]: use of unstable library feature `pattern_type_macro` - --> $DIR/feature-gate-pattern_types.rs:5:19 +error[E0658]: use of unstable library feature `pattern_types` + --> $DIR/feature-gate-pattern_types.rs:7:19 | LL | type NonNullU32 = pattern_type!(u32 is 1..); | ^^^^^^^^^^^^ | = note: see issue #123646 for more information - = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable + = help: add `#![feature(pattern_types)]` 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]: use of unstable library feature `pattern_type_macro` - --> $DIR/feature-gate-pattern_types.rs:7:16 +error[E0658]: use of unstable library feature `pattern_types` + --> $DIR/feature-gate-pattern_types.rs:9:16 | LL | type Percent = pattern_type!(u32 is 0..=100); | ^^^^^^^^^^^^ | = note: see issue #123646 for more information - = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable + = help: add `#![feature(pattern_types)]` 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]: use of unstable library feature `pattern_type_macro` - --> $DIR/feature-gate-pattern_types.rs:9:17 +error[E0658]: use of unstable library feature `pattern_types` + --> $DIR/feature-gate-pattern_types.rs:11:17 | LL | type Negative = pattern_type!(i32 is ..=0); | ^^^^^^^^^^^^ | = note: see issue #123646 for more information - = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable + = help: add `#![feature(pattern_types)]` 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]: use of unstable library feature `pattern_type_macro` - --> $DIR/feature-gate-pattern_types.rs:11:17 +error[E0658]: use of unstable library feature `pattern_types` + --> $DIR/feature-gate-pattern_types.rs:13:17 | LL | type Positive = pattern_type!(i32 is 0..); | ^^^^^^^^^^^^ | = note: see issue #123646 for more information - = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable + = help: add `#![feature(pattern_types)]` 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]: use of unstable library feature `pattern_type_macro` - --> $DIR/feature-gate-pattern_types.rs:13:15 +error[E0658]: use of unstable library feature `pattern_types` + --> $DIR/feature-gate-pattern_types.rs:15:15 | LL | type Always = pattern_type!(Option is Some(_)); | ^^^^^^^^^^^^ | = note: see issue #123646 for more information - = help: add `#![feature(pattern_type_macro)]` to the crate attributes to enable + = help: add `#![feature(pattern_types)]` 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: pattern not supported in pattern types - --> $DIR/feature-gate-pattern_types.rs:13:44 + --> $DIR/feature-gate-pattern_types.rs:15:44 | LL | type Always = pattern_type!(Option is Some(_)); | ^^^^^^^ diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types2.stderr b/tests/ui/type/pattern_types/feature-gate-pattern_types.enabled.stderr similarity index 81% rename from tests/ui/type/pattern_types/feature-gate-pattern_types2.stderr rename to tests/ui/type/pattern_types/feature-gate-pattern_types.enabled.stderr index 81bf9dea0e2fd..c77bbd2756bf0 100644 --- a/tests/ui/type/pattern_types/feature-gate-pattern_types2.stderr +++ b/tests/ui/type/pattern_types/feature-gate-pattern_types.enabled.stderr @@ -1,5 +1,5 @@ error: pattern not supported in pattern types - --> $DIR/feature-gate-pattern_types2.rs:11:44 + --> $DIR/feature-gate-pattern_types.rs:15:44 | LL | type Always = pattern_type!(Option is Some(_)); | ^^^^^^^ diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types.rs b/tests/ui/type/pattern_types/feature-gate-pattern_types.rs index a51741675bbd6..91241c00d56c9 100644 --- a/tests/ui/type/pattern_types/feature-gate-pattern_types.rs +++ b/tests/ui/type/pattern_types/feature-gate-pattern_types.rs @@ -1,15 +1,17 @@ +//@ revisions: disabled enabled //@ compile-flags: -Zno-analysis +#![cfg_attr(enabled, feature(pattern_types))] use std::pat::pattern_type; type NonNullU32 = pattern_type!(u32 is 1..); -//~^ ERROR use of unstable library feature `pattern_type_macro` +//[disabled]~^ ERROR use of unstable library feature `pattern_types` type Percent = pattern_type!(u32 is 0..=100); -//~^ ERROR use of unstable library feature `pattern_type_macro` +//[disabled]~^ ERROR use of unstable library feature `pattern_types` type Negative = pattern_type!(i32 is ..=0); -//~^ ERROR use of unstable library feature `pattern_type_macro` +//[disabled]~^ ERROR use of unstable library feature `pattern_types` type Positive = pattern_type!(i32 is 0..); -//~^ ERROR use of unstable library feature `pattern_type_macro` +//[disabled]~^ ERROR use of unstable library feature `pattern_types` type Always = pattern_type!(Option is Some(_)); -//~^ ERROR use of unstable library feature `pattern_type_macro` -//~| ERROR pattern not supported in pattern types +//[disabled]~^ ERROR use of unstable library feature `pattern_types` +//~^^ ERROR pattern not supported in pattern types diff --git a/tests/ui/type/pattern_types/feature-gate-pattern_types2.rs b/tests/ui/type/pattern_types/feature-gate-pattern_types2.rs deleted file mode 100644 index c6b4b325fa35a..0000000000000 --- a/tests/ui/type/pattern_types/feature-gate-pattern_types2.rs +++ /dev/null @@ -1,12 +0,0 @@ -//@ compile-flags: -Zno-analysis - -#![feature(pattern_type_macro)] - -use std::pat::pattern_type; - -type NonNullU32 = pattern_type!(u32 is 1..); -type Percent = pattern_type!(u32 is 0..=100); -type Negative = pattern_type!(i32 is ..=0); -type Positive = pattern_type!(i32 is 0..); -type Always = pattern_type!(Option is Some(_)); -//~^ ERROR: pattern not supported in pattern types diff --git a/tests/ui/type/pattern_types/free_const.rs b/tests/ui/type/pattern_types/free_const.rs index 2e29fce237970..96601622a352f 100644 --- a/tests/ui/type/pattern_types/free_const.rs +++ b/tests/ui/type/pattern_types/free_const.rs @@ -1,7 +1,6 @@ //@ check-pass #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/literals.rs b/tests/ui/type/pattern_types/literals.rs index 5ec15d1b6bd8e..407123ca8f7ef 100644 --- a/tests/ui/type/pattern_types/literals.rs +++ b/tests/ui/type/pattern_types/literals.rs @@ -1,7 +1,6 @@ //! Check where literals can be used to initialize pattern types and where not. #![feature(pattern_types, const_trait_impl, pattern_type_range_trait)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/literals.stderr b/tests/ui/type/pattern_types/literals.stderr index caf5667c8f314..f36c477126020 100644 --- a/tests/ui/type/pattern_types/literals.stderr +++ b/tests/ui/type/pattern_types/literals.stderr @@ -1,35 +1,35 @@ error[E0080]: evaluation panicked: exclusive range end at minimum value of type - --> $DIR/literals.rs:86:62 + --> $DIR/literals.rs:85:62 | LL | fn empty_range_at_base_type_min() -> pattern_type!(u32 is 0..0) { | ^ evaluation of `empty_range_at_base_type_min::{constant#1}` failed here error[E0080]: evaluation panicked: exclusive range end at minimum value of type - --> $DIR/literals.rs:91:63 + --> $DIR/literals.rs:90:63 | LL | fn empty_range_at_base_type_min2() -> pattern_type!(u32 is 0..0) { | ^ evaluation of `empty_range_at_base_type_min2::{constant#1}` failed here error[E0080]: evaluation panicked: exclusive range end at minimum value of type - --> $DIR/literals.rs:106:65 + --> $DIR/literals.rs:105:65 | LL | fn wraparound_range_at_base_ty_end() -> pattern_type!(u32 is 1..0) { | ^ evaluation of `wraparound_range_at_base_ty_end::{constant#1}` failed here error[E0080]: evaluation panicked: exclusive range end at minimum value of type - --> $DIR/literals.rs:111:66 + --> $DIR/literals.rs:110:66 | LL | fn wraparound_range_at_base_ty_end2() -> pattern_type!(u32 is 1..0) { | ^ evaluation of `wraparound_range_at_base_ty_end2::{constant#1}` failed here error[E0080]: evaluation panicked: exclusive range end at minimum value of type - --> $DIR/literals.rs:116:66 + --> $DIR/literals.rs:115:66 | LL | fn wraparound_range_at_base_ty_end3() -> pattern_type!(u32 is 1..0) { | ^ evaluation of `wraparound_range_at_base_ty_end3::{constant#1}` failed here error[E0308]: mismatched types - --> $DIR/literals.rs:9:5 + --> $DIR/literals.rs:8:5 | LL | fn out_of_range() -> pattern_type!(u32 is 1..) { | ------------------------- expected `pattern_type!(u32 is 1..)` because of return type @@ -40,19 +40,19 @@ LL | 0 found type `{integer}` error[E0600]: cannot apply unary operator `-` to type `pattern_type!(u32 is 1..)` - --> $DIR/literals.rs:22:5 + --> $DIR/literals.rs:21:5 | LL | -3 | ^^ cannot apply unary operator `-` error[E0600]: cannot apply unary operator `-` to type `pattern_type!(i8 is -5..=4)` - --> $DIR/literals.rs:27:5 + --> $DIR/literals.rs:26:5 | LL | -2 | ^^ cannot apply unary operator `-` error[E0308]: mismatched types - --> $DIR/literals.rs:36:5 + --> $DIR/literals.rs:35:5 | LL | fn negative_lit_at_range_start() -> pattern_type!(i8 is -5..5) { | -------------------------- expected `pattern_type!(i8 is -5..=4)` because of return type @@ -63,7 +63,7 @@ LL | -5 found type `{integer}` error[E0308]: mismatched types - --> $DIR/literals.rs:45:5 + --> $DIR/literals.rs:44:5 | LL | fn lit_one_beyond_range_end() -> pattern_type!(i8 is -5..5) { | -------------------------- expected `pattern_type!(i8 is -5..=4)` because of return type @@ -74,7 +74,7 @@ LL | 5 found type `{integer}` error[E0308]: mismatched types - --> $DIR/literals.rs:50:5 + --> $DIR/literals.rs:49:5 | LL | fn wrong_lit_kind() -> pattern_type!(u32 is 1..) { | ------------------------- expected `pattern_type!(u32 is 1..)` because of return type @@ -85,7 +85,7 @@ LL | '3' found type `char` error[E0308]: mismatched types - --> $DIR/literals.rs:55:5 + --> $DIR/literals.rs:54:5 | LL | fn char_lit_in_range() -> pattern_type!(char is 'a'..'z') { | ------------------------------- expected `pattern_type!(char is 'a'..='y')` because of return type @@ -96,7 +96,7 @@ LL | 'b' found type `char` error[E0308]: mismatched types - --> $DIR/literals.rs:60:5 + --> $DIR/literals.rs:59:5 | LL | fn char_lit_out_of_range() -> pattern_type!(char is 'a'..'z') { | ------------------------------- expected `pattern_type!(char is 'a'..='y')` because of return type @@ -107,7 +107,7 @@ LL | 'A' found type `char` error[E0308]: mismatched types - --> $DIR/literals.rs:73:5 + --> $DIR/literals.rs:72:5 | LL | fn lit_oob_single_element_range() -> pattern_type!(u32 is 0..=0) { | --------------------------- expected `pattern_type!(u32 is 0..=0)` because of return type @@ -118,7 +118,7 @@ LL | 1 found type `{integer}` error[E0308]: mismatched types - --> $DIR/literals.rs:78:5 + --> $DIR/literals.rs:77:5 | LL | fn lit_oob_single_element_range_exclusive() -> pattern_type!(u32 is 0..1) { | -------------------------- expected `pattern_type!(u32 is 0..=0)` because of return type @@ -131,7 +131,7 @@ LL | 1 error: pattern type ranges cannot wrap: 1..=0 error[E0308]: mismatched types - --> $DIR/literals.rs:97:5 + --> $DIR/literals.rs:96:5 | LL | fn empty_range() -> pattern_type!(u32 is 1..1) { | -------------------------- expected `pattern_type!(u32 is 1..=0)` because of return type @@ -142,7 +142,7 @@ LL | 0 found type `{integer}` error[E0308]: mismatched types - --> $DIR/literals.rs:102:5 + --> $DIR/literals.rs:101:5 | LL | fn empty_range2() -> pattern_type!(u32 is 1..1) { | -------------------------- expected `pattern_type!(u32 is 1..=0)` because of return type @@ -155,7 +155,7 @@ LL | 1 error: pattern type ranges cannot wrap: 2..=0 error[E0308]: mismatched types - --> $DIR/literals.rs:122:5 + --> $DIR/literals.rs:121:5 | LL | fn wraparound_range() -> pattern_type!(u32 is 2..1) { | -------------------------- expected `pattern_type!(u32 is 2..=0)` because of return type @@ -166,7 +166,7 @@ LL | 1 found type `{integer}` error[E0308]: mismatched types - --> $DIR/literals.rs:127:5 + --> $DIR/literals.rs:126:5 | LL | fn lit_in_wraparound_range() -> pattern_type!(u32 is 2..1) { | -------------------------- expected `pattern_type!(u32 is 2..=0)` because of return type @@ -177,7 +177,7 @@ LL | 0 found type `{integer}` error[E0308]: mismatched types - --> $DIR/literals.rs:132:5 + --> $DIR/literals.rs:131:5 | LL | fn lit_at_wraparound_range_start() -> pattern_type!(u32 is 2..1) { | -------------------------- expected `pattern_type!(u32 is 2..=0)` because of return type diff --git a/tests/ui/type/pattern_types/matching.rs b/tests/ui/type/pattern_types/matching.rs index 21f89b3b673be..1086baab876c1 100644 --- a/tests/ui/type/pattern_types/matching.rs +++ b/tests/ui/type/pattern_types/matching.rs @@ -1,4 +1,4 @@ -#![feature(pattern_types, pattern_type_macro, structural_match)] +#![feature(pattern_types, structural_match)] //@ check-pass //@ compile-flags: -Zvalidate-mir diff --git a/tests/ui/type/pattern_types/matching_fail.rs b/tests/ui/type/pattern_types/matching_fail.rs index 8e2c741e3e0ab..2a345635378a6 100644 --- a/tests/ui/type/pattern_types/matching_fail.rs +++ b/tests/ui/type/pattern_types/matching_fail.rs @@ -1,4 +1,4 @@ -#![feature(pattern_types, pattern_type_macro, structural_match)] +#![feature(pattern_types, structural_match)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/missing-is.rs b/tests/ui/type/pattern_types/missing-is.rs index 564b41649d899..619f37eb007e0 100644 --- a/tests/ui/type/pattern_types/missing-is.rs +++ b/tests/ui/type/pattern_types/missing-is.rs @@ -1,4 +1,4 @@ -#![feature(pattern_type_macro)] +#![feature(pattern_types)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/nested.rs b/tests/ui/type/pattern_types/nested.rs index bff83dd43902b..96fbfea9e5e6f 100644 --- a/tests/ui/type/pattern_types/nested.rs +++ b/tests/ui/type/pattern_types/nested.rs @@ -1,7 +1,6 @@ //! Check that pattern types can only have specific base types #![feature(pattern_types, const_trait_impl, pattern_type_range_trait)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/nested.stderr b/tests/ui/type/pattern_types/nested.stderr index 72f0ccc1bfb9f..f75405241ae9e 100644 --- a/tests/ui/type/pattern_types/nested.stderr +++ b/tests/ui/type/pattern_types/nested.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/nested.rs:10:63 + --> $DIR/nested.rs:9:63 | LL | const BAD_NESTING: pattern_type!(pattern_type!(u32 is 1..) is 0..) = todo!(); | ------------------------- ^ expected `pattern_type!(u32 is 1..)`, found integer @@ -10,7 +10,7 @@ LL | const BAD_NESTING: pattern_type!(pattern_type!(u32 is 1..) is 0..) = todo!( found type `{integer}` error[E0277]: `pattern_type!(u32 is 1..)` is not a valid base type for range patterns - --> $DIR/nested.rs:10:34 + --> $DIR/nested.rs:9:34 | LL | const BAD_NESTING: pattern_type!(pattern_type!(u32 is 1..) is 0..) = todo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ only integer types and `char` are supported @@ -28,7 +28,7 @@ LL | const BAD_NESTING: pattern_type!(pattern_type!(u32 is 1..) is 0..) = todo!( and 5 others error[E0277]: `pattern_type!(i32 is 1..)` is not a valid base type for range patterns - --> $DIR/nested.rs:15:35 + --> $DIR/nested.rs:14:35 | LL | const BAD_NESTING2: pattern_type!(pattern_type!(i32 is 1..) is ..=-1) = todo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ only integer types and `char` are supported @@ -46,13 +46,13 @@ LL | const BAD_NESTING2: pattern_type!(pattern_type!(i32 is 1..) is ..=-1) = tod and 5 others error[E0600]: cannot apply unary operator `-` to type `pattern_type!(i32 is 1..)` - --> $DIR/nested.rs:15:67 + --> $DIR/nested.rs:14:67 | LL | const BAD_NESTING2: pattern_type!(pattern_type!(i32 is 1..) is ..=-1) = todo!(); | ^^ cannot apply unary operator `-` error[E0277]: `pattern_type!(i32 is 1..)` is not a valid base type for range patterns - --> $DIR/nested.rs:19:35 + --> $DIR/nested.rs:18:35 | LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ only integer types and `char` are supported @@ -70,7 +70,7 @@ LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo! and 5 others error[E0308]: mismatched types - --> $DIR/nested.rs:19:66 + --> $DIR/nested.rs:18:66 | LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo!(); | ^ @@ -81,7 +81,7 @@ LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo! = note: expected pattern type `pattern_type!(i32 is 1..)` found type `{integer}` help: the return type of this call is `{integer}` due to the type of the argument passed - --> $DIR/nested.rs:19:66 + --> $DIR/nested.rs:18:66 | LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo!(); | ^ this argument influences the return type of `RangeSub` @@ -89,7 +89,7 @@ note: method defined here --> $SRC_DIR/core/src/pat.rs:LL:COL error[E0277]: `pattern_type!(i32 is 1..)` is not a valid base type for range patterns - --> $DIR/nested.rs:19:66 + --> $DIR/nested.rs:18:66 | LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo!(); | ^ only integer types and `char` are supported @@ -107,7 +107,7 @@ LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo! and 5 others error[E0277]: `()` is not a valid base type for range patterns - --> $DIR/nested.rs:24:35 + --> $DIR/nested.rs:23:35 | LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | ^^ only integer types and `char` are supported @@ -125,7 +125,7 @@ LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); and 5 others error[E0308]: mismatched types - --> $DIR/nested.rs:24:43 + --> $DIR/nested.rs:23:43 | LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | ^ @@ -134,7 +134,7 @@ LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | arguments to this function are incorrect | help: the return type of this call is `{integer}` due to the type of the argument passed - --> $DIR/nested.rs:24:43 + --> $DIR/nested.rs:23:43 | LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | ^ this argument influences the return type of `RangeSub` @@ -142,7 +142,7 @@ note: method defined here --> $SRC_DIR/core/src/pat.rs:LL:COL error[E0277]: `()` is not a valid base type for range patterns - --> $DIR/nested.rs:24:43 + --> $DIR/nested.rs:23:43 | LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | ^ only integer types and `char` are supported @@ -160,7 +160,7 @@ LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); and 5 others error[E0277]: `f32` is not a valid base type for range patterns - --> $DIR/nested.rs:29:49 + --> $DIR/nested.rs:28:49 | LL | const BAD_NESTING5: pattern_type!(f32 is 1.0 .. 2.0) = todo!(); | ^^^ only integer types and `char` are supported diff --git a/tests/ui/type/pattern_types/non_null.rs b/tests/ui/type/pattern_types/non_null.rs index e3c634da48b8e..5ce15eb5da319 100644 --- a/tests/ui/type/pattern_types/non_null.rs +++ b/tests/ui/type/pattern_types/non_null.rs @@ -3,7 +3,7 @@ //@ normalize-stderr: "randomization_seed: \d+" -> "randomization_seed: $$SEED" //@ only-64bit -#![feature(pattern_type_macro, pattern_types, rustc_attrs)] +#![feature(pattern_types, rustc_attrs)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/or_patterns.rs b/tests/ui/type/pattern_types/or_patterns.rs index d90f36983d0a0..e744025ddd673 100644 --- a/tests/ui/type/pattern_types/or_patterns.rs +++ b/tests/ui/type/pattern_types/or_patterns.rs @@ -2,13 +2,7 @@ //@ normalize-stderr: "randomization_seed: \d+" -> "randomization_seed: $$SEED" -#![feature( - pattern_type_macro, - pattern_types, - rustc_attrs, - const_trait_impl, - pattern_type_range_trait -)] +#![feature(pattern_types, rustc_attrs, const_trait_impl, pattern_type_range_trait)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/or_patterns.stderr b/tests/ui/type/pattern_types/or_patterns.stderr index ab757f7405eba..bda319b4be19b 100644 --- a/tests/ui/type/pattern_types/or_patterns.stderr +++ b/tests/ui/type/pattern_types/or_patterns.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/or_patterns.rs:26:24 + --> $DIR/or_patterns.rs:20:24 | LL | let _: NonNullI8 = 0; | --------- ^ expected `pattern_type!(i8 is (i8::MIN..=-1 | 1..))`, found integer @@ -10,31 +10,31 @@ LL | let _: NonNullI8 = 0; found type `{integer}` error[E0600]: cannot apply unary operator `-` to type `pattern_type!(i8 is (i8::MIN..=-1 | 1..))` - --> $DIR/or_patterns.rs:28:24 + --> $DIR/or_patterns.rs:22:24 | LL | let _: NonNullI8 = -1; | ^^ cannot apply unary operator `-` error[E0600]: cannot apply unary operator `-` to type `pattern_type!(i8 is (i8::MIN..=-1 | 1..))` - --> $DIR/or_patterns.rs:30:24 + --> $DIR/or_patterns.rs:24:24 | LL | let _: NonNullI8 = -128; | ^^^^ cannot apply unary operator `-` error[E0600]: cannot apply unary operator `-` to type `pattern_type!(i8 is (i8::MIN..=-2 | 0..))` - --> $DIR/or_patterns.rs:37:26 + --> $DIR/or_patterns.rs:31:26 | LL | let _: NonNegOneI8 = -1; | ^^ cannot apply unary operator `-` error[E0600]: cannot apply unary operator `-` to type `pattern_type!(i8 is (i8::MIN..=-2 | 0..))` - --> $DIR/or_patterns.rs:39:26 + --> $DIR/or_patterns.rs:33:26 | LL | let _: NonNegOneI8 = -2; | ^^ cannot apply unary operator `-` error[E0600]: cannot apply unary operator `-` to type `pattern_type!(i8 is (i8::MIN..=-2 | 0..))` - --> $DIR/or_patterns.rs:41:26 + --> $DIR/or_patterns.rs:35:26 | LL | let _: NonNegOneI8 = -128; | ^^^^ cannot apply unary operator `-` @@ -69,7 +69,7 @@ error: layout_of(pattern_type!(i8 is (i8::MIN..=-1 | 1..))) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/or_patterns.rs:16:1 + --> $DIR/or_patterns.rs:10:1 | LL | type NonNullI8 = pattern_type!(i8 is ..0 | 1..); | ^^^^^^^^^^^^^^ @@ -104,7 +104,7 @@ error: layout_of(pattern_type!(i8 is (i8::MIN..=-2 | 0..))) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/or_patterns.rs:20:1 + --> $DIR/or_patterns.rs:14:1 | LL | type NonNegOneI8 = pattern_type!(i8 is ..-1 | 0..); | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/type/pattern_types/or_patterns_invalid.rs b/tests/ui/type/pattern_types/or_patterns_invalid.rs index a99667c5412ce..e416d5d8ae45d 100644 --- a/tests/ui/type/pattern_types/or_patterns_invalid.rs +++ b/tests/ui/type/pattern_types/or_patterns_invalid.rs @@ -1,12 +1,6 @@ //! Demonstrate some use cases of or patterns -#![feature( - pattern_type_macro, - pattern_types, - rustc_attrs, - const_trait_impl, - pattern_type_range_trait -)] +#![feature(pattern_types, rustc_attrs, const_trait_impl, pattern_type_range_trait)] use std::pat::pattern_type; @@ -26,5 +20,5 @@ fn main() { //~? ERROR: allowed are two range patterns that are directly connected let not_simple_enough_for_mvp: pattern_type!(i8 is ..0 | 1..10 | 10..) = unsafe { std::mem::transmute(0) }; - //~^ ERROR: cannot transmute between types of different sizes, or dependently-sized types + //~^ ERROR: cannot transmute between types of different sizes, or dependently-sized types } diff --git a/tests/ui/type/pattern_types/or_patterns_invalid.stderr b/tests/ui/type/pattern_types/or_patterns_invalid.stderr index a931b76b0d0be..669721dd0bab7 100644 --- a/tests/ui/type/pattern_types/or_patterns_invalid.stderr +++ b/tests/ui/type/pattern_types/or_patterns_invalid.stderr @@ -1,7 +1,7 @@ error: only non-overlapping pattern type ranges are allowed at present error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/or_patterns_invalid.rs:15:69 + --> $DIR/or_patterns_invalid.rs:9:69 | LL | let not_adjacent: pattern_type!(i8 is -127..0 | 1..) = unsafe { std::mem::transmute(0) }; | ^^^^^^^^^^^^^^^^^^^ @@ -12,7 +12,7 @@ LL | let not_adjacent: pattern_type!(i8 is -127..0 | 1..) = unsafe { std::me error: one pattern needs to end at `i8::MAX`, but was 29 instead error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/or_patterns_invalid.rs:19:71 + --> $DIR/or_patterns_invalid.rs:13:71 | LL | let not_wrapping: pattern_type!(i8 is 10..20 | 20..30) = unsafe { std::mem::transmute(0) }; | ^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ LL | let not_wrapping: pattern_type!(i8 is 10..20 | 20..30) = unsafe { std:: error: only signed integer base types are allowed for or-pattern pattern types at present error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/or_patterns_invalid.rs:23:65 + --> $DIR/or_patterns_invalid.rs:17:65 | LL | let not_signed: pattern_type!(u8 is 10.. | 0..5) = unsafe { std::mem::transmute(0) }; | ^^^^^^^^^^^^^^^^^^^ @@ -34,7 +34,7 @@ LL | let not_signed: pattern_type!(u8 is 10.. | 0..5) = unsafe { std::mem::t error: the only or-pattern types allowed are two range patterns that are directly connected at their overflow site error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/or_patterns_invalid.rs:28:18 + --> $DIR/or_patterns_invalid.rs:22:18 | LL | unsafe { std::mem::transmute(0) }; | ^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/type/pattern_types/pattern_type_mismatch.rs b/tests/ui/type/pattern_types/pattern_type_mismatch.rs index 0c88f27d83686..30c368033b099 100644 --- a/tests/ui/type/pattern_types/pattern_type_mismatch.rs +++ b/tests/ui/type/pattern_types/pattern_type_mismatch.rs @@ -1,7 +1,6 @@ //! Check that pattern types patterns must be of the type of the base type #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/pattern_type_mismatch.stderr b/tests/ui/type/pattern_types/pattern_type_mismatch.stderr index 129e4b5cdc7be..bfbee74897a1b 100644 --- a/tests/ui/type/pattern_types/pattern_type_mismatch.stderr +++ b/tests/ui/type/pattern_types/pattern_type_mismatch.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/pattern_type_mismatch.rs:8:41 + --> $DIR/pattern_type_mismatch.rs:7:41 | LL | const BAD_NESTING4: pattern_type!(u8 is 'a'..='a') = todo!(); | -- ^^^ expected `u8`, found `char` @@ -12,7 +12,7 @@ LL | const BAD_NESTING4: pattern_type!(u8 is b'a'..='a') = todo!(); | + error[E0308]: mismatched types - --> $DIR/pattern_type_mismatch.rs:8:47 + --> $DIR/pattern_type_mismatch.rs:7:47 | LL | const BAD_NESTING4: pattern_type!(u8 is 'a'..='a') = todo!(); | -- ^^^ expected `u8`, found `char` @@ -25,7 +25,7 @@ LL | const BAD_NESTING4: pattern_type!(u8 is 'a'..=b'a') = todo!(); | + error[E0308]: mismatched types - --> $DIR/pattern_type_mismatch.rs:12:43 + --> $DIR/pattern_type_mismatch.rs:11:43 | LL | const BAD_NESTING5: pattern_type!(char is 1..=1) = todo!(); | ---- ^ expected `char`, found `u8` @@ -33,7 +33,7 @@ LL | const BAD_NESTING5: pattern_type!(char is 1..=1) = todo!(); | the pattern must match the type error[E0308]: mismatched types - --> $DIR/pattern_type_mismatch.rs:12:47 + --> $DIR/pattern_type_mismatch.rs:11:47 | LL | const BAD_NESTING5: pattern_type!(char is 1..=1) = todo!(); | ---- ^ expected `char`, found `u8` diff --git a/tests/ui/type/pattern_types/range_patterns.rs b/tests/ui/type/pattern_types/range_patterns.rs index 1ad6469967cbc..5edf357299c98 100644 --- a/tests/ui/type/pattern_types/range_patterns.rs +++ b/tests/ui/type/pattern_types/range_patterns.rs @@ -1,6 +1,4 @@ #![feature(pattern_types, rustc_attrs, const_trait_impl, pattern_type_range_trait)] -#![feature(pattern_type_macro)] -#![allow(incomplete_features)] //@ normalize-stderr: "randomization_seed: \d+" -> "randomization_seed: $$SEED" diff --git a/tests/ui/type/pattern_types/range_patterns.stderr b/tests/ui/type/pattern_types/range_patterns.stderr index a1e085ffe44ff..5ed826fa66331 100644 --- a/tests/ui/type/pattern_types/range_patterns.stderr +++ b/tests/ui/type/pattern_types/range_patterns.stderr @@ -28,7 +28,7 @@ error: layout_of(NonZero) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/range_patterns.rs:10:1 + --> $DIR/range_patterns.rs:8:1 | LL | type X = std::num::NonZeroU32; | ^^^^^^ @@ -63,7 +63,7 @@ error: layout_of(pattern_type!(u32 is 1..)) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/range_patterns.rs:12:1 + --> $DIR/range_patterns.rs:10:1 | LL | type Y = pattern_type!(u32 is 1..); | ^^^^^^ @@ -130,7 +130,7 @@ error: layout_of(Option) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/range_patterns.rs:14:1 + --> $DIR/range_patterns.rs:12:1 | LL | type Z = Option; | ^^^^^^ @@ -197,7 +197,7 @@ error: layout_of(Option>) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/range_patterns.rs:16:1 + --> $DIR/range_patterns.rs:14:1 | LL | type A = Option; | ^^^^^^ @@ -232,7 +232,7 @@ error: layout_of(NonZeroU32New) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/range_patterns.rs:18:1 + --> $DIR/range_patterns.rs:16:1 | LL | struct NonZeroU32New(pattern_type!(u32 is 1..)); | ^^^^^^^^^^^^^^^^^^^^ @@ -240,19 +240,19 @@ LL | struct NonZeroU32New(pattern_type!(u32 is 1..)); error: pattern type ranges cannot wrap: 1..=0 error: the type has an unknown layout - --> $DIR/range_patterns.rs:21:1 + --> $DIR/range_patterns.rs:19:1 | LL | type EMPTY = pattern_type!(u32 is 1..1); | ^^^^^^^^^^ error[E0080]: evaluation panicked: exclusive range end at minimum value of type - --> $DIR/range_patterns.rs:24:37 + --> $DIR/range_patterns.rs:22:37 | LL | type WRAP = pattern_type!(u32 is 1..0); | ^ evaluation of `WRAP::{constant#1}` failed here error: the type has an unknown layout - --> $DIR/range_patterns.rs:24:1 + --> $DIR/range_patterns.rs:22:1 | LL | type WRAP = pattern_type!(u32 is 1..0); | ^^^^^^^^^ @@ -260,7 +260,7 @@ LL | type WRAP = pattern_type!(u32 is 1..0); error: pattern type ranges cannot wrap: 5..=1 error: the type has an unknown layout - --> $DIR/range_patterns.rs:28:1 + --> $DIR/range_patterns.rs:26:1 | LL | type WRAP2 = pattern_type!(u32 is 5..2); | ^^^^^^^^^^ @@ -295,7 +295,7 @@ error: layout_of(pattern_type!(i8 is -10..=10)) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/range_patterns.rs:31:1 + --> $DIR/range_patterns.rs:29:1 | LL | type SIGN = pattern_type!(i8 is -10..=10); | ^^^^^^^^^ @@ -330,7 +330,7 @@ error: layout_of(pattern_type!(i8 is i8::MIN..=0)) = Layout { repr_c: false, randomization_seed: $SEED, } - --> $DIR/range_patterns.rs:34:1 + --> $DIR/range_patterns.rs:32:1 | LL | type MIN = pattern_type!(i8 is -128..=0); | ^^^^^^^^ @@ -338,7 +338,7 @@ LL | type MIN = pattern_type!(i8 is -128..=0); error: pattern type ranges cannot wrap: 120..=-120 error: the type has an unknown layout - --> $DIR/range_patterns.rs:37:1 + --> $DIR/range_patterns.rs:35:1 | LL | type SignedWrap = pattern_type!(i8 is 120..=-120); | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/type/pattern_types/range_patterns_inherent_impls.rs b/tests/ui/type/pattern_types/range_patterns_inherent_impls.rs index fe8feda0934e2..14107463511f3 100644 --- a/tests/ui/type/pattern_types/range_patterns_inherent_impls.rs +++ b/tests/ui/type/pattern_types/range_patterns_inherent_impls.rs @@ -1,6 +1,4 @@ #![feature(pattern_types, rustc_attrs)] -#![feature(pattern_type_macro)] -#![allow(incomplete_features)] //! check that pattern types can have traits implemented for them if //! their base type is a local type. diff --git a/tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr b/tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr index ed2e4c0bd5f8c..f01510557588c 100644 --- a/tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr +++ b/tests/ui/type/pattern_types/range_patterns_inherent_impls.stderr @@ -1,12 +1,12 @@ error[E0390]: cannot define inherent `impl` for primitive types outside of `core` - --> $DIR/range_patterns_inherent_impls.rs:12:1 + --> $DIR/range_patterns_inherent_impls.rs:10:1 | LL | impl Y { | ^^^^^^ | = help: consider moving this inherent impl into `core` if possible help: alternatively add `#[rustc_allow_incoherent_impl]` to the relevant impl items - --> $DIR/range_patterns_inherent_impls.rs:14:5 + --> $DIR/range_patterns_inherent_impls.rs:12:5 | LL | fn foo() {} | ^^^^^^^^ diff --git a/tests/ui/type/pattern_types/range_patterns_trait_impls.rs b/tests/ui/type/pattern_types/range_patterns_trait_impls.rs index 1731cd470fe2c..e7c5479e43d0c 100644 --- a/tests/ui/type/pattern_types/range_patterns_trait_impls.rs +++ b/tests/ui/type/pattern_types/range_patterns_trait_impls.rs @@ -1,6 +1,4 @@ #![feature(pattern_types, rustc_attrs)] -#![feature(pattern_type_macro)] -#![allow(incomplete_features)] //! check that pattern types can have local traits //! implemented for them. diff --git a/tests/ui/type/pattern_types/range_patterns_trait_impls2.rs b/tests/ui/type/pattern_types/range_patterns_trait_impls2.rs index 90f80a2f34645..d367bd174f3ef 100644 --- a/tests/ui/type/pattern_types/range_patterns_trait_impls2.rs +++ b/tests/ui/type/pattern_types/range_patterns_trait_impls2.rs @@ -1,6 +1,4 @@ #![feature(pattern_types, rustc_attrs)] -#![feature(pattern_type_macro)] -#![allow(incomplete_features)] //! check that pattern types can have local traits //! implemented for them. diff --git a/tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr b/tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr index 4517c7e910f4e..2f372751277a2 100644 --- a/tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr +++ b/tests/ui/type/pattern_types/range_patterns_trait_impls2.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/range_patterns_trait_impls2.rs:12:1 + --> $DIR/range_patterns_trait_impls2.rs:10:1 | LL | impl Eq for Y {} | ^^^^^^^^^^^^- diff --git a/tests/ui/type/pattern_types/range_patterns_unusable.rs b/tests/ui/type/pattern_types/range_patterns_unusable.rs index 98f13ca0bc0bb..d023541d12e48 100644 --- a/tests/ui/type/pattern_types/range_patterns_unusable.rs +++ b/tests/ui/type/pattern_types/range_patterns_unusable.rs @@ -1,6 +1,4 @@ #![feature(pattern_types, rustc_attrs)] -#![feature(pattern_type_macro)] -#![allow(incomplete_features)] //! Some practical niche checks. diff --git a/tests/ui/type/pattern_types/range_patterns_unusable.stderr b/tests/ui/type/pattern_types/range_patterns_unusable.stderr index 5c61f6347bbfc..15e83bfad5228 100644 --- a/tests/ui/type/pattern_types/range_patterns_unusable.stderr +++ b/tests/ui/type/pattern_types/range_patterns_unusable.stderr @@ -1,5 +1,5 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/range_patterns_unusable.rs:13:35 + --> $DIR/range_patterns_unusable.rs:11:35 | LL | let _: Option = unsafe { std::mem::transmute(z) }; | ^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/type/pattern_types/range_patterns_unusable_math.rs b/tests/ui/type/pattern_types/range_patterns_unusable_math.rs index 71becd28d1cac..f44ac1e7be392 100644 --- a/tests/ui/type/pattern_types/range_patterns_unusable_math.rs +++ b/tests/ui/type/pattern_types/range_patterns_unusable_math.rs @@ -1,6 +1,4 @@ #![feature(pattern_types, rustc_attrs)] -#![feature(pattern_type_macro)] -#![allow(incomplete_features)] //! check that pattern types don't have an `Add` impl. diff --git a/tests/ui/type/pattern_types/range_patterns_unusable_math.stderr b/tests/ui/type/pattern_types/range_patterns_unusable_math.stderr index b55031dc3cf8b..5dab944cfe2de 100644 --- a/tests/ui/type/pattern_types/range_patterns_unusable_math.stderr +++ b/tests/ui/type/pattern_types/range_patterns_unusable_math.stderr @@ -1,5 +1,5 @@ error[E0369]: cannot add `u32` to `pattern_type!(u32 is 1..)` - --> $DIR/range_patterns_unusable_math.rs:14:15 + --> $DIR/range_patterns_unusable_math.rs:12:15 | LL | let x = x + 1_u32; | - ^ ----- u32 diff --git a/tests/ui/type/pattern_types/range_patterns_usage.rs b/tests/ui/type/pattern_types/range_patterns_usage.rs index 0ecbdcaa0f7a3..5d09785e8faa8 100644 --- a/tests/ui/type/pattern_types/range_patterns_usage.rs +++ b/tests/ui/type/pattern_types/range_patterns_usage.rs @@ -1,6 +1,4 @@ #![feature(pattern_types, rustc_attrs)] -#![feature(pattern_type_macro)] -#![allow(incomplete_features)] //@ check-pass //! check that pattern types can actually be part of code that compiles successfully. diff --git a/tests/ui/type/pattern_types/reverse_range.rs b/tests/ui/type/pattern_types/reverse_range.rs index 34c931e4e965a..8d0fd8ca1b628 100644 --- a/tests/ui/type/pattern_types/reverse_range.rs +++ b/tests/ui/type/pattern_types/reverse_range.rs @@ -1,6 +1,5 @@ //! Check that the range start must be smaller than the range end #![feature(pattern_types, const_trait_impl, pattern_type_range_trait)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/reverse_range.stderr b/tests/ui/type/pattern_types/reverse_range.stderr index 6e6e34409a39e..bcaf19790ba38 100644 --- a/tests/ui/type/pattern_types/reverse_range.stderr +++ b/tests/ui/type/pattern_types/reverse_range.stderr @@ -1,5 +1,5 @@ error[E0080]: evaluation panicked: exclusive range end at minimum value of type - --> $DIR/reverse_range.rs:7:36 + --> $DIR/reverse_range.rs:6:36 | LL | const NONE: pattern_type!(u8 is 1..0) = unsafe { std::mem::transmute(3_u8) }; | ^ evaluation of `NONE::{constant#1}` failed here diff --git a/tests/ui/type/pattern_types/signed_ranges.rs b/tests/ui/type/pattern_types/signed_ranges.rs index 3725fbda7292a..e18c0299cbba6 100644 --- a/tests/ui/type/pattern_types/signed_ranges.rs +++ b/tests/ui/type/pattern_types/signed_ranges.rs @@ -1,5 +1,4 @@ #![feature(pattern_types)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/signed_ranges.stderr b/tests/ui/type/pattern_types/signed_ranges.stderr index 79bf8501b639f..66df48363af65 100644 --- a/tests/ui/type/pattern_types/signed_ranges.stderr +++ b/tests/ui/type/pattern_types/signed_ranges.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `u8: Neg` is not satisfied - --> $DIR/signed_ranges.rs:14:9 + --> $DIR/signed_ranges.rs:13:9 | LL | -10..253 => {} | ^^^ the trait `Neg` is not implemented for `u8` @@ -16,13 +16,13 @@ LL | -10..253 => {} and 12 others error[E0277]: the trait bound `char: Neg` is not satisfied - --> $DIR/signed_ranges.rs:20:9 + --> $DIR/signed_ranges.rs:19:9 | LL | -'\0'..'a' => {} | ^^^^^ the trait `Neg` is not implemented for `char` error[E0600]: cannot apply unary operator `-` to type `u32` - --> $DIR/signed_ranges.rs:6:34 + --> $DIR/signed_ranges.rs:5:34 | LL | type Sign = pattern_type!(u32 is -10..); | ^^^ cannot apply unary operator `-` @@ -30,7 +30,7 @@ LL | type Sign = pattern_type!(u32 is -10..); = note: unsigned values cannot be negated error[E0600]: cannot apply unary operator `-` to type `char` - --> $DIR/signed_ranges.rs:9:41 + --> $DIR/signed_ranges.rs:8:41 | LL | type SignedChar = pattern_type!(char is -'A'..); | ^^^^ cannot apply unary operator `-` diff --git a/tests/ui/type/pattern_types/transmute.rs b/tests/ui/type/pattern_types/transmute.rs index 4e686245f9375..77f99253543ca 100644 --- a/tests/ui/type/pattern_types/transmute.rs +++ b/tests/ui/type/pattern_types/transmute.rs @@ -1,7 +1,7 @@ //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver -#![feature(pattern_types, pattern_type_macro, generic_pattern_types)] +#![feature(pattern_types, generic_pattern_types)] #![expect(incomplete_features)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/unimplemented_pat.rs b/tests/ui/type/pattern_types/unimplemented_pat.rs index 44851ec1a1049..7e57e1f7ff8d6 100644 --- a/tests/ui/type/pattern_types/unimplemented_pat.rs +++ b/tests/ui/type/pattern_types/unimplemented_pat.rs @@ -1,7 +1,7 @@ //! This test ensures we do not ICE for unimplemented //! patterns even if the feature gate is enabled. -#![feature(pattern_type_macro, pattern_types)] +#![feature(pattern_types)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/unsize.rs b/tests/ui/type/pattern_types/unsize.rs index 1020dd8c21544..18d9a52a9195e 100644 --- a/tests/ui/type/pattern_types/unsize.rs +++ b/tests/ui/type/pattern_types/unsize.rs @@ -2,7 +2,7 @@ //@ check-pass -#![feature(pattern_type_macro, pattern_types)] +#![feature(pattern_types)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/validity.rs b/tests/ui/type/pattern_types/validity.rs index f4c62dc6712e9..cbabe06c312ce 100644 --- a/tests/ui/type/pattern_types/validity.rs +++ b/tests/ui/type/pattern_types/validity.rs @@ -3,7 +3,6 @@ //@ normalize-stderr: "([[:xdigit:]]{2}\s){4,8}\s+│\s.{4,8}" -> "HEX_DUMP" #![feature(pattern_types, const_trait_impl, pattern_type_range_trait)] -#![feature(pattern_type_macro)] use std::pat::pattern_type; diff --git a/tests/ui/type/pattern_types/validity.stderr b/tests/ui/type/pattern_types/validity.stderr index 7cfa6b3400a41..9ddc07ce89cee 100644 --- a/tests/ui/type/pattern_types/validity.stderr +++ b/tests/ui/type/pattern_types/validity.stderr @@ -1,5 +1,5 @@ error[E0080]: constructing invalid value of type pattern_type!(u32 is 1..): encountered 0, but expected something greater or equal to 1 - --> $DIR/validity.rs:10:1 + --> $DIR/validity.rs:9:1 | LL | const BAD: pattern_type!(u32 is 1..) = unsafe { std::mem::transmute(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value @@ -10,7 +10,7 @@ LL | const BAD: pattern_type!(u32 is 1..) = unsafe { std::mem::transmute(0) }; } error[E0080]: reading memory at ALLOC$ID[0x0..0x4], but memory is uninitialized at [0x0..0x4], and this operation requires initialized memory - --> $DIR/validity.rs:13:1 + --> $DIR/validity.rs:12:1 | LL | const BAD_UNINIT: pattern_type!(u32 is 1..) = | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `BAD_UNINIT` failed here @@ -20,7 +20,7 @@ LL | const BAD_UNINIT: pattern_type!(u32 is 1..) = } error[E0080]: unable to turn pointer into integer - --> $DIR/validity.rs:17:1 + --> $DIR/validity.rs:16:1 | LL | const BAD_PTR: pattern_type!(usize is 1..) = unsafe { std::mem::transmute(&42) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `BAD_PTR` failed here @@ -29,7 +29,7 @@ LL | const BAD_PTR: pattern_type!(usize is 1..) = unsafe { std::mem::transmute(& = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported error[E0080]: constructing invalid value of type (pattern_type!(u32 is 1..), u32): at .0, encountered 0, but expected something greater or equal to 1 - --> $DIR/validity.rs:20:1 + --> $DIR/validity.rs:19:1 | LL | const BAD_AGGREGATE: (pattern_type!(u32 is 1..), u32) = (unsafe { std::mem::transmute(0) }, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value @@ -40,7 +40,7 @@ LL | const BAD_AGGREGATE: (pattern_type!(u32 is 1..), u32) = (unsafe { std::mem: } error[E0080]: constructing invalid value of type Foo: at .0.0, encountered 0, but expected something greater or equal to 1 - --> $DIR/validity.rs:26:1 + --> $DIR/validity.rs:25:1 | LL | const BAD_FOO: Foo = Foo(Bar(unsafe { std::mem::transmute(0) })); | ^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value @@ -51,7 +51,7 @@ LL | const BAD_FOO: Foo = Foo(Bar(unsafe { std::mem::transmute(0) })); } error[E0080]: reading memory at ALLOC$ID[0x0..0x4], but memory is uninitialized at [0x0..0x4], and this operation requires initialized memory - --> $DIR/validity.rs:29:1 + --> $DIR/validity.rs:28:1 | LL | const CHAR_UNINIT: pattern_type!(char is 'A'..'Z') = | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `CHAR_UNINIT` failed here @@ -61,7 +61,7 @@ LL | const CHAR_UNINIT: pattern_type!(char is 'A'..'Z') = } error[E0080]: constructing invalid value of type pattern_type!(char is 'A'..='Y'): encountered 97, but expected something in the range 65..=89 - --> $DIR/validity.rs:33:1 + --> $DIR/validity.rs:32:1 | LL | const CHAR_OOB_PAT: pattern_type!(char is 'A'..'Z') = unsafe { std::mem::transmute('a') }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value @@ -72,7 +72,7 @@ LL | const CHAR_OOB_PAT: pattern_type!(char is 'A'..'Z') = unsafe { std::mem::tr } error[E0080]: constructing invalid value of type pattern_type!(char is 'A'..='Y'): encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`) - --> $DIR/validity.rs:36:1 + --> $DIR/validity.rs:35:1 | LL | const CHAR_OOB: pattern_type!(char is 'A'..'Z') = unsafe { std::mem::transmute(u32::MAX) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value diff --git a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs index 81c2d778b057f..c08030fc5c150 100644 --- a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs +++ b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs @@ -1,5 +1,4 @@ //@ proc-macro: derive-demo-issue-136343.rs -//@ ignore-backends: gcc #[macro_use] extern crate derive_demo_issue_136343; diff --git a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr index d69eaae533551..0b9c1d9123aab 100644 --- a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr +++ b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/invalid-sugg-for-derive-macro-issue-136343.rs:7:10 + --> $DIR/invalid-sugg-for-derive-macro-issue-136343.rs:6:10 | LL | #[derive(Sample)] | ^^^^^^ diff --git a/tests/ui/uninhabited/uninhabited-transparent-return-abi.rs b/tests/ui/uninhabited/uninhabited-transparent-return-abi.rs index e439a82be5abb..2c2788a3e5642 100644 --- a/tests/ui/uninhabited/uninhabited-transparent-return-abi.rs +++ b/tests/ui/uninhabited/uninhabited-transparent-return-abi.rs @@ -1,6 +1,5 @@ //@ run-pass //@ needs-unwind -//@ ignore-backends: gcc // See https://github.com/rust-lang/rust/issues/135802 enum Void {} diff --git a/tests/ui/unpretty/exhaustive.expanded.stdout b/tests/ui/unpretty/exhaustive.expanded.stdout index 3551d40dffbfc..0bd7aca6a007b 100644 --- a/tests/ui/unpretty/exhaustive.expanded.stdout +++ b/tests/ui/unpretty/exhaustive.expanded.stdout @@ -21,7 +21,6 @@ #![feature(more_qualified_paths)] #![feature(never_patterns)] #![feature(pattern_types)] -#![feature(pattern_type_macro)] #![feature(prelude_import)] #![feature(specialization)] #![feature(trace_macros)] @@ -632,7 +631,7 @@ mod types { /*! FIXME: todo */ } /// TyKind::Pat - fn ty_pat() { let _: u32 is const 1..; } + fn ty_pat() { let _: k#pattern_type(u32 is const 1..); } } mod visibilities { /// VisibilityKind::Public diff --git a/tests/ui/unpretty/exhaustive.hir.stderr b/tests/ui/unpretty/exhaustive.hir.stderr index 276bc5b5d2573..5ca4b080a95e5 100644 --- a/tests/ui/unpretty/exhaustive.hir.stderr +++ b/tests/ui/unpretty/exhaustive.hir.stderr @@ -1,17 +1,17 @@ error[E0697]: closures cannot be static - --> $DIR/exhaustive.rs:210:9 + --> $DIR/exhaustive.rs:209:9 | LL | static || value; | ^^^^^^^^^ error[E0697]: closures cannot be static - --> $DIR/exhaustive.rs:211:9 + --> $DIR/exhaustive.rs:210:9 | LL | static move || value; | ^^^^^^^^^^^^^^ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/exhaustive.rs:240:13 + --> $DIR/exhaustive.rs:239:13 | LL | fn expr_await() { | --------------- this is not `async` @@ -20,19 +20,19 @@ LL | fut.await; | ^^^^^ only allowed inside `async` functions and blocks error: in expressions, `_` can only be used on the left-hand side of an assignment - --> $DIR/exhaustive.rs:291:9 + --> $DIR/exhaustive.rs:290:9 | LL | _; | ^ `_` not allowed here error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/exhaustive.rs:301:9 + --> $DIR/exhaustive.rs:300:9 | LL | x::(); | ^^^^^ only `Fn` traits may use parentheses error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/exhaustive.rs:302:9 + --> $DIR/exhaustive.rs:301:9 | LL | x::(T, T) -> T; | ^^^^^^^^^^^^^^ only `Fn` traits may use parentheses @@ -44,31 +44,31 @@ LL + x:: -> T; | error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/exhaustive.rs:303:9 + --> $DIR/exhaustive.rs:302:9 | LL | crate::() -> ()::expressions::() -> ()::expr_path; | ^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/exhaustive.rs:303:26 + --> $DIR/exhaustive.rs:302:26 | LL | crate::() -> ()::expressions::() -> ()::expr_path; | ^^^^^^^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/exhaustive.rs:306:9 + --> $DIR/exhaustive.rs:305:9 | LL | core::()::marker::()::PhantomData; | ^^^^^^^^ only `Fn` traits may use parentheses error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/exhaustive.rs:306:19 + --> $DIR/exhaustive.rs:305:19 | LL | core::()::marker::()::PhantomData; | ^^^^^^^^^^ only `Fn` traits may use parentheses error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks - --> $DIR/exhaustive.rs:393:9 + --> $DIR/exhaustive.rs:392:9 | LL | yield; | ^^^^^ @@ -79,7 +79,7 @@ LL | #[coroutine] fn expr_yield() { | ++++++++++++ error[E0703]: invalid ABI: found `C++` - --> $DIR/exhaustive.rs:473:23 + --> $DIR/exhaustive.rs:472:23 | LL | unsafe extern "C++" {} | ^^^^^ invalid ABI @@ -87,7 +87,7 @@ LL | unsafe extern "C++" {} = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions error: `..` patterns are not allowed here - --> $DIR/exhaustive.rs:675:13 + --> $DIR/exhaustive.rs:674:13 | LL | let ..; | ^^ @@ -95,13 +95,13 @@ LL | let ..; = note: only allowed in tuple, tuple struct, and slice patterns error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/exhaustive.rs:790:16 + --> $DIR/exhaustive.rs:789:16 | LL | let _: T() -> !; | ^^^^^^^^ only `Fn` traits may use parentheses error[E0562]: `impl Trait` is not allowed in the type of variable bindings - --> $DIR/exhaustive.rs:804:16 + --> $DIR/exhaustive.rs:803:16 | LL | let _: impl Send; | ^^^^^^^^^ @@ -112,7 +112,7 @@ LL | let _: impl Send; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in the type of variable bindings - --> $DIR/exhaustive.rs:805:16 + --> $DIR/exhaustive.rs:804:16 | LL | let _: impl Send + 'static; | ^^^^^^^^^^^^^^^^^^^ @@ -123,7 +123,7 @@ LL | let _: impl Send + 'static; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in the type of variable bindings - --> $DIR/exhaustive.rs:806:16 + --> $DIR/exhaustive.rs:805:16 | LL | let _: impl 'static + Send; | ^^^^^^^^^^^^^^^^^^^ @@ -134,7 +134,7 @@ LL | let _: impl 'static + Send; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in the type of variable bindings - --> $DIR/exhaustive.rs:807:16 + --> $DIR/exhaustive.rs:806:16 | LL | let _: impl ?Sized; | ^^^^^^^^^^^ @@ -145,7 +145,7 @@ LL | let _: impl ?Sized; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in the type of variable bindings - --> $DIR/exhaustive.rs:808:16 + --> $DIR/exhaustive.rs:807:16 | LL | let _: impl [const] Clone; | ^^^^^^^^^^^^^^^^^^ @@ -156,7 +156,7 @@ LL | let _: impl [const] Clone; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in the type of variable bindings - --> $DIR/exhaustive.rs:809:16 + --> $DIR/exhaustive.rs:808:16 | LL | let _: impl for<'a> Send; | ^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/unpretty/exhaustive.hir.stdout b/tests/ui/unpretty/exhaustive.hir.stdout index 6af4d3b5b81de..4726e9aa762e7 100644 --- a/tests/ui/unpretty/exhaustive.hir.stdout +++ b/tests/ui/unpretty/exhaustive.hir.stdout @@ -1,9 +1,8 @@ #![attr = Feature([auto_traits#0, internal_syntax#0, const_trait_impl#0, coroutines#0, decl_macro#0, deref_patterns#0, explicit_tail_calls#0, forced_keywords#0, gen_blocks#0, more_qualified_paths#0, never_patterns#0, -pattern_types#0, pattern_type_macro#0, prelude_import#0, specialization#0, -trace_macros#0, trait_alias#0, try_blocks#0, try_blocks_heterogeneous#0, -yeet_expr#0])] +pattern_types#0, prelude_import#0, specialization#0, trace_macros#0, +trait_alias#0, try_blocks#0, try_blocks_heterogeneous#0, yeet_expr#0])] #![attr = LintCheck([LintCheck {lint_name: LintName { tool: None, name: "incomplete_features" }, kind: Allow}, LintCheck {lint_name: LintName { tool: None, name: "unused_attributes" }, diff --git a/tests/ui/unpretty/exhaustive.rs b/tests/ui/unpretty/exhaustive.rs index 15f684fc3dd72..36cc724351a64 100644 --- a/tests/ui/unpretty/exhaustive.rs +++ b/tests/ui/unpretty/exhaustive.rs @@ -20,7 +20,6 @@ #![feature(more_qualified_paths)] #![feature(never_patterns)] #![feature(pattern_types)] -#![feature(pattern_type_macro)] #![feature(prelude_import)] #![feature(specialization)] #![feature(trace_macros)] @@ -846,7 +845,7 @@ mod types { /// TyKind::Pat fn ty_pat() { - let _: core::pattern_type!(u32 is 1..); + let _: pattern_type!(u32 is 1..); } } diff --git a/tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs b/tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs index 21f8fe7fdf8fd..f0f1a6f99b9e9 100644 --- a/tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs +++ b/tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs @@ -1,7 +1,6 @@ // This is a regression test for . //@ check-pass //@ compile-flags: -Cdebuginfo=2 -//@ ignore-backends: gcc #![feature(unsafe_binders)] use std::unsafe_binder::wrap_binder; diff --git a/tests/ui/view-types/auxiliary/hygiene.rs b/tests/ui/view-types/auxiliary/hygiene.rs index cf842b56e6970..3b022299733c9 100644 --- a/tests/ui/view-types/auxiliary/hygiene.rs +++ b/tests/ui/view-types/auxiliary/hygiene.rs @@ -1,6 +1,6 @@ //@ edition:2015 -#![feature(view_types, view_type_macro)] +#![feature(view_types)] pub use std::view::view_type; diff --git a/tests/ui/view-types/duplicate_field.rs b/tests/ui/view-types/duplicate_field.rs index b45580510b6cb..4b3e0ca0850e0 100644 --- a/tests/ui/view-types/duplicate_field.rs +++ b/tests/ui/view-types/duplicate_field.rs @@ -1,5 +1,4 @@ -#![feature(view_types, view_type_macro)] -#![allow(unused)] +#![feature(view_types)] use std::view::view_type; diff --git a/tests/ui/view-types/duplicate_field.stderr b/tests/ui/view-types/duplicate_field.stderr index f0162f6e0a67d..c974b0ead238a 100644 --- a/tests/ui/view-types/duplicate_field.stderr +++ b/tests/ui/view-types/duplicate_field.stderr @@ -1,5 +1,5 @@ error: field `bar` is already part of the view - --> $DIR/duplicate_field.rs:13:38 + --> $DIR/duplicate_field.rs:12:38 | LL | _foo: &mut view_type!(Foo.{ bar, bar }), | --- ^^^ @@ -7,7 +7,7 @@ LL | _foo: &mut view_type!(Foo.{ bar, bar }), | field `bar` is declared as viewed here error: field `0` is already part of the view - --> $DIR/duplicate_field.rs:15:38 + --> $DIR/duplicate_field.rs:14:38 | LL | _pair: &mut view_type!(Pair.{ 0, 0 }), | - ^ @@ -15,7 +15,7 @@ LL | _pair: &mut view_type!(Pair.{ 0, 0 }), | field `0` is declared as viewed here error: field `bar` is already part of the view - --> $DIR/duplicate_field.rs:21:44 + --> $DIR/duplicate_field.rs:20:44 | LL | fn f(self: &mut view_type!(Self.{ bar, bar })) {} | --- ^^^ @@ -23,7 +23,7 @@ LL | fn f(self: &mut view_type!(Self.{ bar, bar })) {} | field `bar` is declared as viewed here error: field `0` is already part of the view - --> $DIR/duplicate_field.rs:26:42 + --> $DIR/duplicate_field.rs:25:42 | LL | fn f(self: &mut view_type!(Self.{ 0, 0 })) {} | - ^ diff --git a/tests/ui/view-types/feature-gate-view-types.rs b/tests/ui/view-types/feature-gate-view-types.rs index 961f96e18bb99..d30c737c130c7 100644 --- a/tests/ui/view-types/feature-gate-view-types.rs +++ b/tests/ui/view-types/feature-gate-view-types.rs @@ -8,6 +8,6 @@ struct Foo { } type FooBar = view_type!(Foo.{ bar }); -//~^ ERROR use of unstable library feature `view_type_macro` +//~^ ERROR use of unstable library feature `view_types` type FooBaz = view_type!(Foo.{ baz }); -//~^ ERROR use of unstable library feature `view_type_macro` +//~^ ERROR use of unstable library feature `view_types` diff --git a/tests/ui/view-types/feature-gate-view-types.stderr b/tests/ui/view-types/feature-gate-view-types.stderr index 407bf343ca13b..bda3aebf2b744 100644 --- a/tests/ui/view-types/feature-gate-view-types.stderr +++ b/tests/ui/view-types/feature-gate-view-types.stderr @@ -1,21 +1,21 @@ -error[E0658]: use of unstable library feature `view_type_macro` +error[E0658]: use of unstable library feature `view_types` --> $DIR/feature-gate-view-types.rs:10:15 | LL | type FooBar = view_type!(Foo.{ bar }); | ^^^^^^^^^ | = note: see issue #155938 for more information - = help: add `#![feature(view_type_macro)]` to the crate attributes to enable + = help: add `#![feature(view_types)]` 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]: use of unstable library feature `view_type_macro` +error[E0658]: use of unstable library feature `view_types` --> $DIR/feature-gate-view-types.rs:12:15 | LL | type FooBaz = view_type!(Foo.{ baz }); | ^^^^^^^^^ | = note: see issue #155938 for more information - = help: add `#![feature(view_type_macro)]` to the crate attributes to enable + = help: add `#![feature(view_types)]` 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 2 previous errors diff --git a/tests/ui/view-types/hygiene.rs b/tests/ui/view-types/hygiene.rs index 15a9f7f228f90..20d184e184697 100644 --- a/tests/ui/view-types/hygiene.rs +++ b/tests/ui/view-types/hygiene.rs @@ -1,7 +1,7 @@ //@ run-pass //@ aux-build: hygiene.rs -#![feature(view_types, view_type_macro, decl_macro)] +#![feature(view_types, decl_macro)] #![allow(unused)] extern crate hygiene; diff --git a/tests/ui/view-types/must-be-struct.rs b/tests/ui/view-types/must-be-struct.rs index fb30ef1234cc5..2ee8fb6430f13 100644 --- a/tests/ui/view-types/must-be-struct.rs +++ b/tests/ui/view-types/must-be-struct.rs @@ -1,5 +1,4 @@ -#![feature(view_types, view_type_macro)] -#![allow(unused)] +#![feature(view_types)] use std::view::view_type; diff --git a/tests/ui/view-types/must-be-struct.stderr b/tests/ui/view-types/must-be-struct.stderr index 3d47e4903af6c..51b6f0bec8ebe 100644 --- a/tests/ui/view-types/must-be-struct.stderr +++ b/tests/ui/view-types/must-be-struct.stderr @@ -1,17 +1,17 @@ error: only structs can be viewed - --> $DIR/must-be-struct.rs:11:9 + --> $DIR/must-be-struct.rs:10:9 | LL | fn f(_: view_type!(Foo.{})) {} | ^^^^^^^^^^^^^^^^^^ `Foo` is an enum, it cannot be viewed error: only structs can be viewed - --> $DIR/must-be-struct.rs:13:9 + --> $DIR/must-be-struct.rs:12:9 | LL | fn g(_: view_type!(u8.{})) {} | ^^^^^^^^^^^^^^^^^ type `u8` cannot be viewed error: only structs can be viewed - --> $DIR/must-be-struct.rs:15:9 + --> $DIR/must-be-struct.rs:14:9 | LL | fn h(_: view_type!(char.{})) {} | ^^^^^^^^^^^^^^^^^^^ type `char` cannot be viewed diff --git a/tests/ui/view-types/must-exist.rs b/tests/ui/view-types/must-exist.rs index efb43eb509e9c..da912c1ee9749 100644 --- a/tests/ui/view-types/must-exist.rs +++ b/tests/ui/view-types/must-exist.rs @@ -1,5 +1,4 @@ -#![feature(view_types, view_type_macro)] -#![allow(unused)] +#![feature(view_types)] use std::view::view_type; diff --git a/tests/ui/view-types/must-exist.stderr b/tests/ui/view-types/must-exist.stderr index a775ad84a7edf..d977f060754d2 100644 --- a/tests/ui/view-types/must-exist.stderr +++ b/tests/ui/view-types/must-exist.stderr @@ -1,11 +1,11 @@ error[E0609]: no field `bar` on type `S` - --> $DIR/must-exist.rs:10:24 + --> $DIR/must-exist.rs:9:24 | LL | fn f(_: view_type!(S.{ bar })) {} | ^^^ error[E0609]: no field `bar` on type `S` - --> $DIR/must-exist.rs:12:29 + --> $DIR/must-exist.rs:11:29 | LL | fn g(_: view_type!(S.{ foo, bar })) {} | ^^^ diff --git a/tests/ui/view-types/must-restrict.rs b/tests/ui/view-types/must-restrict.rs index c0e1f5115d27c..a523f07e9aadd 100644 --- a/tests/ui/view-types/must-restrict.rs +++ b/tests/ui/view-types/must-restrict.rs @@ -1,7 +1,7 @@ //@ known-bug: unknown //@ run-pass -#![feature(view_types, view_type_macro)] +#![feature(view_types)] #![allow(unused)] use std::view::view_type; diff --git a/tests/ui/view-types/syntax-errors.rs b/tests/ui/view-types/syntax-errors.rs index 18ccb859d549e..84bcb977827e0 100644 --- a/tests/ui/view-types/syntax-errors.rs +++ b/tests/ui/view-types/syntax-errors.rs @@ -1,5 +1,4 @@ -#![feature(view_types, view_type_macro)] -#![allow(unused)] +#![feature(view_types)] use std::view::view_type; diff --git a/tests/ui/view-types/syntax-errors.stderr b/tests/ui/view-types/syntax-errors.stderr index 1c1e5fdafae1a..479151b267e2e 100644 --- a/tests/ui/view-types/syntax-errors.stderr +++ b/tests/ui/view-types/syntax-errors.stderr @@ -1,17 +1,17 @@ error: expected identifier, found reserved identifier `_` - --> $DIR/syntax-errors.rs:12:49 + --> $DIR/syntax-errors.rs:11:49 | LL | fn not_a_field(self: &mut view_type!(Self.{ _ }), _: &mut view_type!(Foo.{ _ })) {} | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/syntax-errors.rs:12:80 + --> $DIR/syntax-errors.rs:11:80 | LL | fn not_a_field(self: &mut view_type!(Self.{ _ }), _: &mut view_type!(Foo.{ _ })) {} | ^ expected identifier, found reserved identifier error: expected identifier, found keyword `where` - --> $DIR/syntax-errors.rs:18:44 + --> $DIR/syntax-errors.rs:17:44 | LL | fn keyword(self: &mut view_type!(Foo.{ where }), _: &mut view_type!(Foo.{ for })) {} | ^^^^^ expected identifier, found keyword @@ -22,7 +22,7 @@ LL | fn keyword(self: &mut view_type!(Foo.{ r#where }), _: &mut view_type!(F | ++ error: expected identifier, found keyword `for` - --> $DIR/syntax-errors.rs:18:79 + --> $DIR/syntax-errors.rs:17:79 | LL | fn keyword(self: &mut view_type!(Foo.{ where }), _: &mut view_type!(Foo.{ for })) {} | ^^^ expected identifier, found keyword @@ -33,7 +33,7 @@ LL | fn keyword(self: &mut view_type!(Foo.{ where }), _: &mut view_type!(Foo | ++ error: expected one of `,` or `}`, found `baz` - --> $DIR/syntax-errors.rs:24:49 + --> $DIR/syntax-errors.rs:23:49 | LL | fn no_comma(self: &mut view_type!(Foo.{ bar baz }), _: &mut view_type!(Foo.{ bar baz })) {} | -^^^ expected one of `,` or `}` @@ -41,7 +41,7 @@ LL | fn no_comma(self: &mut view_type!(Foo.{ bar baz }), _: &mut view_type!( | help: missing `,` error: expected one of `,` or `}`, found `baz` - --> $DIR/syntax-errors.rs:24:86 + --> $DIR/syntax-errors.rs:23:86 | LL | fn no_comma(self: &mut view_type!(Foo.{ bar baz }), _: &mut view_type!(Foo.{ bar baz })) {} | -^^^ expected one of `,` or `}` @@ -49,25 +49,25 @@ LL | fn no_comma(self: &mut view_type!(Foo.{ bar baz }), _: &mut view_type!( | help: missing `,` error[E0609]: no field `_` on type `Foo` - --> $DIR/syntax-errors.rs:12:49 + --> $DIR/syntax-errors.rs:11:49 | LL | fn not_a_field(self: &mut view_type!(Self.{ _ }), _: &mut view_type!(Foo.{ _ })) {} | ^ error[E0609]: no field `_` on type `Foo` - --> $DIR/syntax-errors.rs:12:80 + --> $DIR/syntax-errors.rs:11:80 | LL | fn not_a_field(self: &mut view_type!(Self.{ _ }), _: &mut view_type!(Foo.{ _ })) {} | ^ error[E0609]: no field `r#where` on type `Foo` - --> $DIR/syntax-errors.rs:18:44 + --> $DIR/syntax-errors.rs:17:44 | LL | fn keyword(self: &mut view_type!(Foo.{ where }), _: &mut view_type!(Foo.{ for })) {} | ^^^^^ error[E0609]: no field `r#for` on type `Foo` - --> $DIR/syntax-errors.rs:18:79 + --> $DIR/syntax-errors.rs:17:79 | LL | fn keyword(self: &mut view_type!(Foo.{ where }), _: &mut view_type!(Foo.{ for })) {} | ^^^ diff --git a/tests/ui/view-types/tuple-structs.rs b/tests/ui/view-types/tuple-structs.rs index f0442d4e308fb..04dd222cef98d 100644 --- a/tests/ui/view-types/tuple-structs.rs +++ b/tests/ui/view-types/tuple-structs.rs @@ -1,6 +1,6 @@ //@ run-pass -#![feature(view_types, view_type_macro)] +#![feature(view_types)] #![allow(unused)] use std::view::view_type;