diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-31 14:56:49 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-08-01 20:04:59 +0000 |
| commit | ae2f8d921654f01e008824385fb1e1d7b36ce705 (patch) | |
| tree | 18a6f6f1074a9700ce81596ac3544f5bee8581aa | |
| parent | 6c02dd4eae83befde07dc4782395e2005055e9fa (diff) | |
| download | rust-ae2f8d921654f01e008824385fb1e1d7b36ce705.tar.gz rust-ae2f8d921654f01e008824385fb1e1d7b36ce705.zip | |
Remove the omit_gdb_pretty_printer_section attribute
Disabling loading of pretty printers in the debugger itself is more reliable. Before this commit the .gdb_debug_scripts section couldn't be included in dylibs or rlibs as otherwise there is no way to disable the section anymore without recompiling the entire standard library.
120 files changed, 209 insertions, 387 deletions
diff --git a/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs b/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs index 7c8ef90ed7f..c5fb11dbf6a 100644 --- a/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs +++ b/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs @@ -374,11 +374,3 @@ impl<S: Stage> CombineAttributeParser<S> for TargetFeatureParser { features } } - -pub(crate) struct OmitGdbPrettyPrinterSectionParser; - -impl<S: Stage> NoArgsAttributeParser<S> for OmitGdbPrettyPrinterSectionParser { - const PATH: &[Symbol] = &[sym::omit_gdb_pretty_printer_section]; - const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error; - const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::OmitGdbPrettyPrinterSection; -} diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs index 54c0fbcd062..0fccaf94e27 100644 --- a/compiler/rustc_attr_parsing/src/context.rs +++ b/compiler/rustc_attr_parsing/src/context.rs @@ -17,9 +17,8 @@ use crate::attributes::allow_unstable::{ AllowConstFnUnstableParser, AllowInternalUnstableParser, UnstableFeatureBoundParser, }; use crate::attributes::codegen_attrs::{ - ColdParser, CoverageParser, ExportNameParser, NakedParser, NoMangleParser, - OmitGdbPrettyPrinterSectionParser, OptimizeParser, TargetFeatureParser, TrackCallerParser, - UsedParser, + ColdParser, CoverageParser, ExportNameParser, NakedParser, NoMangleParser, OptimizeParser, + TargetFeatureParser, TrackCallerParser, UsedParser, }; use crate::attributes::confusables::ConfusablesParser; use crate::attributes::deprecation::DeprecationParser; @@ -187,7 +186,6 @@ attribute_parsers!( Single<WithoutArgs<NoImplicitPreludeParser>>, Single<WithoutArgs<NoMangleParser>>, Single<WithoutArgs<NonExhaustiveParser>>, - Single<WithoutArgs<OmitGdbPrettyPrinterSectionParser>>, Single<WithoutArgs<ParenSugarParser>>, Single<WithoutArgs<PassByValueParser>>, Single<WithoutArgs<PointeeParser>>, diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs index bcfa0381cc1..6eb7042da61 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs @@ -2,9 +2,7 @@ use rustc_codegen_ssa::base::collect_debugger_visualizers_transitive; use rustc_codegen_ssa::traits::*; -use rustc_hir::attrs::AttributeKind; use rustc_hir::def_id::LOCAL_CRATE; -use rustc_hir::find_attr; use rustc_middle::bug; use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerType; use rustc_session::config::{CrateType, DebugInfo}; @@ -86,9 +84,6 @@ pub(crate) fn get_or_insert_gdb_debug_scripts_section_global<'ll>( } pub(crate) fn needs_gdb_debug_scripts_section(cx: &CodegenCx<'_, '_>) -> bool { - let omit_gdb_pretty_printer_section = - find_attr!(cx.tcx.hir_krate_attrs(), AttributeKind::OmitGdbPrettyPrinterSection); - // To ensure the section `__rustc_debug_gdb_scripts_section__` will not create // ODR violations at link time, this section will not be emitted for rlibs since // each rlib could produce a different set of visualizers that would be embedded @@ -117,8 +112,7 @@ pub(crate) fn needs_gdb_debug_scripts_section(cx: &CodegenCx<'_, '_>) -> bool { } }); - !omit_gdb_pretty_printer_section - && cx.sess().opts.debuginfo != DebugInfo::None + cx.sess().opts.debuginfo != DebugInfo::None && cx.sess().target.emit_debug_gdb_scripts && embed_visualizers } diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index ceb7fc5bf6f..5c63d4808db 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -1257,11 +1257,6 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ TEST, rustc_dummy, Normal, template!(Word /* doesn't matter*/), DuplicatesOk, EncodeCrossCrate::No ), - gated!( - omit_gdb_pretty_printer_section, Normal, template!(Word), - WarnFollowing, EncodeCrossCrate::No, - "the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite", - ), rustc_attr!( TEST, pattern_complexity_limit, CrateLevel, template!(NameValueStr: "N"), ErrorFollowing, EncodeCrossCrate::No, diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 7e174c465d5..4eee79a2a71 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -199,6 +199,8 @@ declare_features! ( /// Renamed to `dyn_compatible_for_dispatch`. (removed, object_safe_for_dispatch, "1.83.0", Some(43561), Some("renamed to `dyn_compatible_for_dispatch`"), 131511), + /// Allows using `#[omit_gdb_pretty_printer_section]`. + (removed, omit_gdb_pretty_printer_section, "CURRENT_RUSTC_VERSION", None, None, 144738), /// Allows using `#[on_unimplemented(..)]` on traits. /// (Moved to `rustc_attrs`.) (removed, on_unimplemented, "1.40.0", None, None, 65794), diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index e985e04ba33..1303b3317e0 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -225,8 +225,6 @@ declare_features! ( (unstable, multiple_supertrait_upcastable, "1.69.0", None), /// Allow negative trait bounds. This is an internal-only feature for testing the trait solver! (internal, negative_bounds, "1.71.0", None), - /// Allows using `#[omit_gdb_pretty_printer_section]`. - (internal, omit_gdb_pretty_printer_section, "1.5.0", None), /// Set the maximum pattern complexity allowed (not limited by default). (internal, pattern_complexity_limit, "1.78.0", None), /// Allows using pattern types. diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs index 80f5e6177f7..80618422b56 100644 --- a/compiler/rustc_hir/src/attrs/data_structures.rs +++ b/compiler/rustc_hir/src/attrs/data_structures.rs @@ -391,9 +391,6 @@ pub enum AttributeKind { /// Represents `#[non_exhaustive]` NonExhaustive(Span), - /// Represents `#[omit_gdb_pretty_printer_section]` - OmitGdbPrettyPrinterSection, - /// Represents `#[optimize(size|speed)]` Optimize(OptimizeAttr, Span), diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs index bbdecb2986e..9644a597a31 100644 --- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs +++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs @@ -55,7 +55,6 @@ impl AttributeKind { NoImplicitPrelude(..) => No, NoMangle(..) => Yes, // Needed for rustdoc NonExhaustive(..) => Yes, // Needed for rustdoc - OmitGdbPrettyPrinterSection => No, Optimize(..) => No, ParenSugar(..) => No, PassByValue(..) => Yes, diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index ede74bdc0df..2663d5fe99c 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -289,8 +289,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { | AttributeKind::MacroTransparency(_) | AttributeKind::Pointee(..) | AttributeKind::Dummy - | AttributeKind::RustcBuiltinMacro { .. } - | AttributeKind::OmitGdbPrettyPrinterSection, + | AttributeKind::RustcBuiltinMacro { .. }, ) => { /* do nothing */ } Attribute::Parsed(AttributeKind::AsPtr(attr_span)) => { self.check_applied_to_fn_or_method(hir_id, *attr_span, span, target) diff --git a/src/doc/rustc-dev-guide/src/tests/directives.md b/src/doc/rustc-dev-guide/src/tests/directives.md index 89e4d3e9b58..08975777210 100644 --- a/src/doc/rustc-dev-guide/src/tests/directives.md +++ b/src/doc/rustc-dev-guide/src/tests/directives.md @@ -298,6 +298,7 @@ See [Pretty-printer](compiletest.md#pretty-printer-tests). - [`should-ice`](compiletest.md#incremental-tests) — incremental cfail should ICE - [`reference`] — an annotation linking to a rule in the reference +- `disable-gdb-pretty-printers` — disable gdb pretty printers for debuginfo tests [`reference`]: https://github.com/rust-lang/reference/blob/master/docs/authoring.md#test-rule-annotations diff --git a/src/tools/compiletest/src/directives.rs b/src/tools/compiletest/src/directives.rs index 54511f4fd08..13e694b7f03 100644 --- a/src/tools/compiletest/src/directives.rs +++ b/src/tools/compiletest/src/directives.rs @@ -203,6 +203,8 @@ pub struct TestProps { pub add_core_stubs: bool, /// Whether line annotatins are required for the given error kind. pub dont_require_annotations: HashSet<ErrorKind>, + /// Whether pretty printers should be disabled in gdb. + pub disable_gdb_pretty_printers: bool, } mod directives { @@ -251,6 +253,7 @@ mod directives { pub const ADD_CORE_STUBS: &'static str = "add-core-stubs"; // This isn't a real directive, just one that is probably mistyped often pub const INCORRECT_COMPILER_FLAGS: &'static str = "compiler-flags"; + pub const DISABLE_GDB_PRETTY_PRINTERS: &'static str = "disable-gdb-pretty-printers"; } impl TestProps { @@ -306,6 +309,7 @@ impl TestProps { has_enzyme: false, add_core_stubs: false, dont_require_annotations: Default::default(), + disable_gdb_pretty_printers: false, } } @@ -654,6 +658,12 @@ impl TestProps { self.dont_require_annotations .insert(ErrorKind::expect_from_user_str(err_kind.trim())); } + + config.set_name_directive( + ln, + DISABLE_GDB_PRETTY_PRINTERS, + &mut self.disable_gdb_pretty_printers, + ); }, ); diff --git a/src/tools/compiletest/src/directives/directive_names.rs b/src/tools/compiletest/src/directives/directive_names.rs index 7fc76a42e0c..f7955429d83 100644 --- a/src/tools/compiletest/src/directives/directive_names.rs +++ b/src/tools/compiletest/src/directives/directive_names.rs @@ -18,6 +18,7 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "check-stdout", "check-test-line-numbers-match", "compile-flags", + "disable-gdb-pretty-printers", "doc-flags", "dont-check-compiler-stderr", "dont-check-compiler-stdout", diff --git a/src/tools/compiletest/src/runtest/debuginfo.rs b/src/tools/compiletest/src/runtest/debuginfo.rs index 471e4a4c819..6114afdc9df 100644 --- a/src/tools/compiletest/src/runtest/debuginfo.rs +++ b/src/tools/compiletest/src/runtest/debuginfo.rs @@ -259,7 +259,9 @@ impl TestCx<'_> { Some(version) => { println!("NOTE: compiletest thinks it is using GDB version {}", version); - if version > extract_gdb_version("7.4").unwrap() { + if !self.props.disable_gdb_pretty_printers + && version > extract_gdb_version("7.4").unwrap() + { // Add the directory containing the pretty printers to // GDB's script auto loading safe path script_str.push_str(&format!( diff --git a/tests/debuginfo/associated-types.rs b/tests/debuginfo/associated-types.rs index b20bd520936..7c2a793c8cd 100644 --- a/tests/debuginfo/associated-types.rs +++ b/tests/debuginfo/associated-types.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== // gdb-command:run @@ -68,8 +69,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] trait TraitWithAssocType { type Type; diff --git a/tests/debuginfo/auxiliary/cross_crate_spans.rs b/tests/debuginfo/auxiliary/cross_crate_spans.rs index af853ee0b00..d0d32c2cbe3 100644 --- a/tests/debuginfo/auxiliary/cross_crate_spans.rs +++ b/tests/debuginfo/auxiliary/cross_crate_spans.rs @@ -1,8 +1,6 @@ #![crate_type = "rlib"] #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] //@ no-prefer-dynamic //@ compile-flags:-g diff --git a/tests/debuginfo/basic-types-globals-metadata.rs b/tests/debuginfo/basic-types-globals-metadata.rs index aec8ff183ad..fc8f6dc173f 100644 --- a/tests/debuginfo/basic-types-globals-metadata.rs +++ b/tests/debuginfo/basic-types-globals-metadata.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run // gdb-command:whatis basic_types_globals_metadata::B @@ -35,8 +36,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(f16)] // N.B. These are `mut` only so they don't constant fold away. diff --git a/tests/debuginfo/basic-types-globals.rs b/tests/debuginfo/basic-types-globals.rs index 15a0deb64c1..9d28820ce68 100644 --- a/tests/debuginfo/basic-types-globals.rs +++ b/tests/debuginfo/basic-types-globals.rs @@ -1,6 +1,7 @@ //@ revisions: lto no-lto //@ compile-flags:-g +//@ disable-gdb-pretty-printers //@ [lto] compile-flags:-C lto //@ [lto] no-prefer-dynamic @@ -39,8 +40,6 @@ // gdb-command:continue #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(f16)] // N.B. These are `mut` only so they don't constant fold away. diff --git a/tests/debuginfo/basic-types-metadata.rs b/tests/debuginfo/basic-types-metadata.rs index 6b7cfbdebca..941db81a4de 100644 --- a/tests/debuginfo/basic-types-metadata.rs +++ b/tests/debuginfo/basic-types-metadata.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run // gdb-command:whatis unit @@ -53,8 +54,6 @@ // gdb-command:continue #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(f16)] fn main() { diff --git a/tests/debuginfo/basic-types-mut-globals.rs b/tests/debuginfo/basic-types-mut-globals.rs index f6a2399d230..e979d82b55c 100644 --- a/tests/debuginfo/basic-types-mut-globals.rs +++ b/tests/debuginfo/basic-types-mut-globals.rs @@ -5,6 +5,7 @@ // its numerical value. //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run @@ -74,8 +75,6 @@ // gdb-check:$30 = 9.25 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(f16)] static mut B: bool = false; diff --git a/tests/debuginfo/basic-types.rs b/tests/debuginfo/basic-types.rs index fea5262bc41..7862f45b3c4 100644 --- a/tests/debuginfo/basic-types.rs +++ b/tests/debuginfo/basic-types.rs @@ -5,6 +5,7 @@ // its numerical value. //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -112,8 +113,6 @@ // cdb-check:s : [...] [Type: ref$<str$>] #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(f16)] fn main() { diff --git a/tests/debuginfo/borrowed-basic.rs b/tests/debuginfo/borrowed-basic.rs index 91de691e78e..334eae38318 100644 --- a/tests/debuginfo/borrowed-basic.rs +++ b/tests/debuginfo/borrowed-basic.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -96,8 +97,6 @@ // lldb-check:[...] 3.5 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(f16)] fn main() { diff --git a/tests/debuginfo/borrowed-c-style-enum.rs b/tests/debuginfo/borrowed-c-style-enum.rs index 6a91d4f9650..d382a389fe4 100644 --- a/tests/debuginfo/borrowed-c-style-enum.rs +++ b/tests/debuginfo/borrowed-c-style-enum.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -28,8 +29,6 @@ // lldb-check:[...] TheC #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] enum ABC { TheA, TheB, TheC } diff --git a/tests/debuginfo/borrowed-enum.rs b/tests/debuginfo/borrowed-enum.rs index c5a795fdede..517b439ff15 100644 --- a/tests/debuginfo/borrowed-enum.rs +++ b/tests/debuginfo/borrowed-enum.rs @@ -1,6 +1,7 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -28,8 +29,6 @@ // lldb-check:(borrowed_enum::Univariant) *univariant_ref = { value = { 0 = 4820353753753434 } } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // The first element is to ensure proper alignment, irrespective of the machines word size. Since // the size of the discriminant value is machine dependent, this has be taken into account when diff --git a/tests/debuginfo/borrowed-struct.rs b/tests/debuginfo/borrowed-struct.rs index 245af35f505..5d64ba3cbef 100644 --- a/tests/debuginfo/borrowed-struct.rs +++ b/tests/debuginfo/borrowed-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -52,8 +53,6 @@ // lldb-check:[...] 26.5 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct SomeStruct { x: isize, diff --git a/tests/debuginfo/borrowed-tuple.rs b/tests/debuginfo/borrowed-tuple.rs index 9e4ceec033e..fd4e22feb06 100644 --- a/tests/debuginfo/borrowed-tuple.rs +++ b/tests/debuginfo/borrowed-tuple.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -29,8 +30,6 @@ #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] fn main() { let stack_val: (i16, f32) = (-14, -19f32); diff --git a/tests/debuginfo/borrowed-unique-basic.rs b/tests/debuginfo/borrowed-unique-basic.rs index 7a9b4d1df82..54d7f27bb0c 100644 --- a/tests/debuginfo/borrowed-unique-basic.rs +++ b/tests/debuginfo/borrowed-unique-basic.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -100,8 +101,6 @@ // lldb-check:[...] 3.5 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(f16)] fn main() { diff --git a/tests/debuginfo/box.rs b/tests/debuginfo/box.rs index d22566c0b17..d4612f98a5f 100644 --- a/tests/debuginfo/box.rs +++ b/tests/debuginfo/box.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -19,8 +20,6 @@ // lldb-check:[...] { 0 = 2 1 = 3.5 } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] fn main() { let a = Box::new(1); diff --git a/tests/debuginfo/boxed-struct.rs b/tests/debuginfo/boxed-struct.rs index 158609fb2ed..ca072693cdc 100644 --- a/tests/debuginfo/boxed-struct.rs +++ b/tests/debuginfo/boxed-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -22,8 +23,6 @@ // lldb-check:[...] { x = 77 y = 777 z = 7777 w = 77777 } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct StructWithSomePadding { x: i16, diff --git a/tests/debuginfo/by-value-non-immediate-argument.rs b/tests/debuginfo/by-value-non-immediate-argument.rs index deacea5f6cc..b5b0df73a68 100644 --- a/tests/debuginfo/by-value-non-immediate-argument.rs +++ b/tests/debuginfo/by-value-non-immediate-argument.rs @@ -1,6 +1,7 @@ //@ min-lldb-version: 1800 //@ min-gdb-version: 13.0 //@ compile-flags:-g +//@ disable-gdb-pretty-printers //@ ignore-windows-gnu: #128973 //@ ignore-aarch64-unknown-linux-gnu (gdb tries to read from 0x0; FIXME: #128973) //@ ignore-powerpc64: #128973 on both -gnu and -musl @@ -62,9 +63,6 @@ // lldb-check:[...] Case1 { x: 0, y: 8970181431921507452 } // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Clone)] struct Struct { a: isize, diff --git a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs index 6981fdfc9e1..a49a375569b 100644 --- a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs +++ b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -33,9 +34,6 @@ // lldb-check:[...] { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 } // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - trait Trait { fn method(self) -> Self; } diff --git a/tests/debuginfo/c-style-enum-in-composite.rs b/tests/debuginfo/c-style-enum-in-composite.rs index 642879cf3b6..47b4b980f9c 100644 --- a/tests/debuginfo/c-style-enum-in-composite.rs +++ b/tests/debuginfo/c-style-enum-in-composite.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -51,8 +52,6 @@ // lldb-check:[...] { 0 = { a = OneHundred b = Vienna } 1 = 9 } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::AnEnum::{OneHundred, OneThousand, OneMillion}; use self::AnotherEnum::{MountainView, Toronto, Vienna}; diff --git a/tests/debuginfo/c-style-enum.rs b/tests/debuginfo/c-style-enum.rs index 08378f7af18..d5455be0cb5 100644 --- a/tests/debuginfo/c-style-enum.rs +++ b/tests/debuginfo/c-style-enum.rs @@ -1,6 +1,7 @@ //@ ignore-aarch64 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -88,8 +89,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::AutoDiscriminant::{One, Two, Three}; use self::ManualDiscriminant::{OneHundred, OneThousand, OneMillion}; diff --git a/tests/debuginfo/closure-in-generic-function.rs b/tests/debuginfo/closure-in-generic-function.rs index 0c6a6fdfca1..0bb72209cc8 100644 --- a/tests/debuginfo/closure-in-generic-function.rs +++ b/tests/debuginfo/closure-in-generic-function.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -33,9 +34,6 @@ // lldb-check:[...] 110 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) { let closure = |x, y| { diff --git a/tests/debuginfo/constant-debug-locs.rs b/tests/debuginfo/constant-debug-locs.rs index 81115fc3c38..d13b8648b18 100644 --- a/tests/debuginfo/constant-debug-locs.rs +++ b/tests/debuginfo/constant-debug-locs.rs @@ -1,8 +1,7 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers #![allow(dead_code, unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // This test makes sure that the compiler doesn't crash when trying to assign // debug locations to const-expressions. diff --git a/tests/debuginfo/constant-in-match-pattern.rs b/tests/debuginfo/constant-in-match-pattern.rs index 952db216deb..922e0a5d8da 100644 --- a/tests/debuginfo/constant-in-match-pattern.rs +++ b/tests/debuginfo/constant-in-match-pattern.rs @@ -1,8 +1,7 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers #![allow(dead_code, unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // This test makes sure that the compiler doesn't crash when trying to assign // debug locations to 'constant' patterns in match expressions. diff --git a/tests/debuginfo/coroutine-locals.rs b/tests/debuginfo/coroutine-locals.rs index f3593adc945..c2b8aef8a67 100644 --- a/tests/debuginfo/coroutine-locals.rs +++ b/tests/debuginfo/coroutine-locals.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -44,8 +45,7 @@ // lldb-command:v c // lldb-check:(int) c = 6 -#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait, stmt_expr_attributes)] -#![omit_gdb_pretty_printer_section] +#![feature(coroutines, coroutine_trait, stmt_expr_attributes)] use std::ops::Coroutine; use std::pin::Pin; diff --git a/tests/debuginfo/coroutine-objects.rs b/tests/debuginfo/coroutine-objects.rs index 242c76c2989..7ead154cbdb 100644 --- a/tests/debuginfo/coroutine-objects.rs +++ b/tests/debuginfo/coroutine-objects.rs @@ -5,6 +5,7 @@ // ensure that LLDB won't crash at least (like #57822). //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -53,8 +54,7 @@ // cdb-check: b : Returned [Type: enum2$<coroutine_objects::main::coroutine_env$0>] // cdb-check: [+0x[...]] _ref__a : 0x[...] : 6 [Type: int *] -#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait, stmt_expr_attributes)] -#![omit_gdb_pretty_printer_section] +#![feature(coroutines, coroutine_trait, stmt_expr_attributes)] use std::ops::Coroutine; use std::pin::Pin; diff --git a/tests/debuginfo/cross-crate-spans.rs b/tests/debuginfo/cross-crate-spans.rs index e337aaf5a6c..38176e46909 100644 --- a/tests/debuginfo/cross-crate-spans.rs +++ b/tests/debuginfo/cross-crate-spans.rs @@ -1,15 +1,13 @@ -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - //@ aux-build:cross_crate_spans.rs extern crate cross_crate_spans; //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== -// gdb-command:break cross_crate_spans.rs:14 +// gdb-command:break cross_crate_spans.rs:12 // gdb-command:run // gdb-command:print result @@ -32,7 +30,7 @@ extern crate cross_crate_spans; // === LLDB TESTS ================================================================================== -// lldb-command:b cross_crate_spans.rs:14 +// lldb-command:b cross_crate_spans.rs:12 // lldb-command:run // lldb-command:v result diff --git a/tests/debuginfo/destructured-fn-argument.rs b/tests/debuginfo/destructured-fn-argument.rs index 37a7bb2b778..fe8f91588e0 100644 --- a/tests/debuginfo/destructured-fn-argument.rs +++ b/tests/debuginfo/destructured-fn-argument.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -299,8 +300,6 @@ #![allow(unused_variables)] #![feature(box_patterns)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::Univariant::Unit; diff --git a/tests/debuginfo/destructured-for-loop-variable.rs b/tests/debuginfo/destructured-for-loop-variable.rs index cc16be1268a..01c524083da 100644 --- a/tests/debuginfo/destructured-for-loop-variable.rs +++ b/tests/debuginfo/destructured-for-loop-variable.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -141,8 +142,6 @@ #![allow(unused_variables)] #![feature(box_patterns)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct Struct { x: i16, diff --git a/tests/debuginfo/destructured-local.rs b/tests/debuginfo/destructured-local.rs index fad96ca7d4b..ff24c924aad 100644 --- a/tests/debuginfo/destructured-local.rs +++ b/tests/debuginfo/destructured-local.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -232,8 +233,6 @@ #![allow(unused_variables)] #![feature(box_patterns)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::Univariant::Unit; diff --git a/tests/debuginfo/enum-thinlto.rs b/tests/debuginfo/enum-thinlto.rs index af77145c312..6eb33b2ef46 100644 --- a/tests/debuginfo/enum-thinlto.rs +++ b/tests/debuginfo/enum-thinlto.rs @@ -1,5 +1,6 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g -Z thinlto +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -16,8 +17,6 @@ // lldb-check:(enum_thinlto::ABC) *abc = { value = { x = 0 y = 8970181431921507452 } $discr$ = 0 } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // The first element is to ensure proper alignment, irrespective of the machines word size. Since // the size of the discriminant value is machine dependent, this has be taken into account when diff --git a/tests/debuginfo/evec-in-struct.rs b/tests/debuginfo/evec-in-struct.rs index 303669cf06c..f08c436bbe3 100644 --- a/tests/debuginfo/evec-in-struct.rs +++ b/tests/debuginfo/evec-in-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -38,8 +39,6 @@ // lldb-check:[...] { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct NoPadding1 { x: [u32; 3], diff --git a/tests/debuginfo/extern-c-fn.rs b/tests/debuginfo/extern-c-fn.rs index 4642073faab..7130658f2d8 100644 --- a/tests/debuginfo/extern-c-fn.rs +++ b/tests/debuginfo/extern-c-fn.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== // gdb-command:run @@ -32,9 +33,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[no_mangle] pub unsafe extern "C" fn fn_with_c_abi(s: *const u8, len: i32) -> i32 { diff --git a/tests/debuginfo/function-arg-initialization.rs b/tests/debuginfo/function-arg-initialization.rs index ae54d56623c..03fb1e2d062 100644 --- a/tests/debuginfo/function-arg-initialization.rs +++ b/tests/debuginfo/function-arg-initialization.rs @@ -8,6 +8,7 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g -Zmir-enable-passes=-SingleUseConsts // SingleUseConsts shouldn't need to be disabled, see #128945 +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -214,8 +215,6 @@ #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] fn immediate_args(a: isize, b: bool, c: f64) { zzz(); // #break diff --git a/tests/debuginfo/function-arguments.rs b/tests/debuginfo/function-arguments.rs index 21c0c7d859c..64d026a705b 100644 --- a/tests/debuginfo/function-arguments.rs +++ b/tests/debuginfo/function-arguments.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -32,10 +33,6 @@ // lldb-check:[...] 3000 // lldb-command:continue - -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { fun(111102, true); diff --git a/tests/debuginfo/function-names.rs b/tests/debuginfo/function-names.rs index c51884451e5..b5aec5c595e 100644 --- a/tests/debuginfo/function-names.rs +++ b/tests/debuginfo/function-names.rs @@ -2,6 +2,7 @@ //@ min-gdb-version: 10.1 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -78,8 +79,6 @@ // cdb-check:[...] a!function_names::const_generic_fn_bool<false> (void) #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(adt_const_params, coroutines, coroutine_trait, stmt_expr_attributes)] #![allow(incomplete_features)] diff --git a/tests/debuginfo/function-prologue-stepping-regular.rs b/tests/debuginfo/function-prologue-stepping-regular.rs index 07b9356fb50..f61128ca2df 100644 --- a/tests/debuginfo/function-prologue-stepping-regular.rs +++ b/tests/debuginfo/function-prologue-stepping-regular.rs @@ -4,6 +4,7 @@ //@ min-lldb-version: 1800 //@ ignore-gdb //@ compile-flags:-g +//@ disable-gdb-pretty-printers // lldb-command:breakpoint set --name immediate_args // lldb-command:breakpoint set --name non_immediate_args @@ -116,8 +117,6 @@ // lldb-command:continue #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] fn immediate_args(a: isize, b: bool, c: f64) { () diff --git a/tests/debuginfo/gdb-char.rs b/tests/debuginfo/gdb-char.rs index 7d8608d4f51..d296e675fa3 100644 --- a/tests/debuginfo/gdb-char.rs +++ b/tests/debuginfo/gdb-char.rs @@ -3,6 +3,7 @@ //@ min-gdb-version: 11.2 //@ compile-flags: -g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -11,8 +12,6 @@ // gdb-check:$1 = 97 'a' #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] fn main() { let ch: char = 'a'; diff --git a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs index e723543a37b..5c5f05d9c4b 100644 --- a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs +++ b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs @@ -1,6 +1,7 @@ //@ ignore-lldb: FIXME(#27089) //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== // gdb-command:run @@ -57,8 +58,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // This test case makes sure that we get correct type descriptions for the enum // discriminant of different instantiations of the same generic enum type where, diff --git a/tests/debuginfo/generic-function.rs b/tests/debuginfo/generic-function.rs index 4be8d5ad45a..ab3cb6953ac 100644 --- a/tests/debuginfo/generic-function.rs +++ b/tests/debuginfo/generic-function.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -44,9 +45,6 @@ // lldb-check:[...] { a = 6 b = 7.5 } // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Clone)] struct Struct { a: isize, diff --git a/tests/debuginfo/generic-functions-nested.rs b/tests/debuginfo/generic-functions-nested.rs index 7e0c20f8903..8ac2b8b9d7a 100644 --- a/tests/debuginfo/generic-functions-nested.rs +++ b/tests/debuginfo/generic-functions-nested.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -57,10 +58,6 @@ // lldb-check:[...] 2.5 // lldb-command:continue - -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn outer<TA: Clone>(a: TA) { inner(a.clone(), 1); inner(a.clone(), 2.5f64); diff --git a/tests/debuginfo/generic-method-on-generic-struct.rs b/tests/debuginfo/generic-method-on-generic-struct.rs index 9c587ca2839..36a94f2999d 100644 --- a/tests/debuginfo/generic-method-on-generic-struct.rs +++ b/tests/debuginfo/generic-method-on-generic-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -99,9 +100,6 @@ // lldb-check:[...] -10.5 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Copy, Clone)] struct Struct<T> { x: T diff --git a/tests/debuginfo/generic-static-method-on-struct-and-enum.rs b/tests/debuginfo/generic-static-method-on-struct-and-enum.rs index 79fe2144cf4..09b515d69e4 100644 --- a/tests/debuginfo/generic-static-method-on-struct-and-enum.rs +++ b/tests/debuginfo/generic-static-method-on-struct-and-enum.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run @@ -19,9 +20,6 @@ // gdb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - struct Struct { x: isize } diff --git a/tests/debuginfo/generic-struct-style-enum.rs b/tests/debuginfo/generic-struct-style-enum.rs index a5529ab8027..4f580f8c515 100644 --- a/tests/debuginfo/generic-struct-style-enum.rs +++ b/tests/debuginfo/generic-struct-style-enum.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:set print union on // gdb-command:run @@ -16,9 +17,6 @@ // gdb-check:$4 = generic_struct_style_enum::Univariant<i32>::TheOnlyCase{a: -1} -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - use self::Regular::{Case1, Case2, Case3}; use self::Univariant::TheOnlyCase; diff --git a/tests/debuginfo/generic-struct.rs b/tests/debuginfo/generic-struct.rs index f26d823d4f2..0196ca43544 100644 --- a/tests/debuginfo/generic-struct.rs +++ b/tests/debuginfo/generic-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -49,9 +50,6 @@ // cdb-check:[...]value [Type: generic_struct::AGenericStruct<i32,f64>] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - struct AGenericStruct<TKey, TValue> { key: TKey, value: TValue diff --git a/tests/debuginfo/generic-tuple-style-enum.rs b/tests/debuginfo/generic-tuple-style-enum.rs index 4a5996645cb..719b5c6161f 100644 --- a/tests/debuginfo/generic-tuple-style-enum.rs +++ b/tests/debuginfo/generic-tuple-style-enum.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -30,8 +31,6 @@ // lldb-command:v univariant -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::Regular::{Case1, Case2, Case3}; use self::Univariant::TheOnlyCase; diff --git a/tests/debuginfo/include_string.rs b/tests/debuginfo/include_string.rs index 704b85e1ac2..4ec23b68262 100644 --- a/tests/debuginfo/include_string.rs +++ b/tests/debuginfo/include_string.rs @@ -2,6 +2,7 @@ // ^ test temporarily disabled as it fails under gdb 15 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run // gdb-command:print string1.length // gdb-check:$1 = 48 @@ -26,8 +27,6 @@ // lldb-command:continue #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // This test case makes sure that debug info does not ICE when include_str is // used multiple times (see issue #11322). diff --git a/tests/debuginfo/issue-12886.rs b/tests/debuginfo/issue-12886.rs index 48250e88537..5574294cd57 100644 --- a/tests/debuginfo/issue-12886.rs +++ b/tests/debuginfo/issue-12886.rs @@ -2,14 +2,13 @@ //@ ignore-aarch64 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run // gdb-command:next -// gdb-check:[...]23[...]let s = Some(5).unwrap(); // #break +// gdb-check:[...]22[...]let s = Some(5).unwrap(); // #break // gdb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // IF YOU MODIFY THIS FILE, BE CAREFUL TO ADAPT THE LINE NUMBERS IN THE DEBUGGER COMMANDS diff --git a/tests/debuginfo/issue-22656.rs b/tests/debuginfo/issue-22656.rs index eb0b38cfa4d..3407c0524eb 100644 --- a/tests/debuginfo/issue-22656.rs +++ b/tests/debuginfo/issue-22656.rs @@ -5,6 +5,7 @@ //@ ignore-gdb //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === LLDB TESTS ================================================================================== // lldb-command:run @@ -16,8 +17,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct ZeroSizedStruct; diff --git a/tests/debuginfo/issue-57822.rs b/tests/debuginfo/issue-57822.rs index 7abac1c14d3..ba4e01196a4 100644 --- a/tests/debuginfo/issue-57822.rs +++ b/tests/debuginfo/issue-57822.rs @@ -3,6 +3,7 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -24,8 +25,7 @@ // lldb-command:v b // lldb-check:(issue_57822::main::{coroutine_env#3}) b = { value = { a = { value = { y = 2 } $discr$ = '\x02' } } $discr$ = '\x02' } -#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait, stmt_expr_attributes)] -#![omit_gdb_pretty_printer_section] +#![feature(coroutines, coroutine_trait, stmt_expr_attributes)] use std::ops::Coroutine; use std::pin::Pin; diff --git a/tests/debuginfo/lexical-scope-in-for-loop.rs b/tests/debuginfo/lexical-scope-in-for-loop.rs index 08f244f89a0..f591f48ad59 100644 --- a/tests/debuginfo/lexical-scope-in-for-loop.rs +++ b/tests/debuginfo/lexical-scope-in-for-loop.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -73,9 +74,6 @@ // lldb-check:[...] 1000000 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let range = [1, 2, 3]; diff --git a/tests/debuginfo/lexical-scope-in-if.rs b/tests/debuginfo/lexical-scope-in-if.rs index c0e1f2f3e05..2b3a4ee5fc4 100644 --- a/tests/debuginfo/lexical-scope-in-if.rs +++ b/tests/debuginfo/lexical-scope-in-if.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -121,9 +122,6 @@ // lldb-check:[...] -1 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let x = 999; diff --git a/tests/debuginfo/lexical-scope-in-match.rs b/tests/debuginfo/lexical-scope-in-match.rs index 9169c19c6a3..0e369c6ca16 100644 --- a/tests/debuginfo/lexical-scope-in-match.rs +++ b/tests/debuginfo/lexical-scope-in-match.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -113,9 +114,6 @@ // lldb-check:[...] 232 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - struct Struct { x: isize, y: isize diff --git a/tests/debuginfo/lexical-scope-in-stack-closure.rs b/tests/debuginfo/lexical-scope-in-stack-closure.rs index d01162c39d6..483d5dda86c 100644 --- a/tests/debuginfo/lexical-scope-in-stack-closure.rs +++ b/tests/debuginfo/lexical-scope-in-stack-closure.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -57,9 +58,6 @@ // lldb-check:[...] false // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let x = false; diff --git a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs index dfec570218f..129d0b8c83d 100644 --- a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs +++ b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -119,9 +120,6 @@ // lldb-check:[...] 2 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let mut x = 0; diff --git a/tests/debuginfo/lexical-scope-in-unique-closure.rs b/tests/debuginfo/lexical-scope-in-unique-closure.rs index db84005121a..93bea18d7cd 100644 --- a/tests/debuginfo/lexical-scope-in-unique-closure.rs +++ b/tests/debuginfo/lexical-scope-in-unique-closure.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -58,9 +59,6 @@ // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let x = false; diff --git a/tests/debuginfo/lexical-scope-in-while.rs b/tests/debuginfo/lexical-scope-in-while.rs index d6536d77545..5fe76851bd7 100644 --- a/tests/debuginfo/lexical-scope-in-while.rs +++ b/tests/debuginfo/lexical-scope-in-while.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -119,9 +120,6 @@ // lldb-check:[...] 2 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let mut x = 0; diff --git a/tests/debuginfo/lexical-scope-with-macro.rs b/tests/debuginfo/lexical-scope-with-macro.rs index 6e8fef201ea..efec9a3b1ce 100644 --- a/tests/debuginfo/lexical-scope-with-macro.rs +++ b/tests/debuginfo/lexical-scope-with-macro.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -97,9 +98,6 @@ // lldb-check:[...] 400 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - macro_rules! trivial { ($e1:expr) => ($e1) } diff --git a/tests/debuginfo/lexical-scopes-in-block-expression.rs b/tests/debuginfo/lexical-scopes-in-block-expression.rs index cd27c88db58..bec69ec87e8 100644 --- a/tests/debuginfo/lexical-scopes-in-block-expression.rs +++ b/tests/debuginfo/lexical-scopes-in-block-expression.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -336,8 +337,6 @@ #![allow(unused_variables)] #![allow(unused_assignments)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] static mut MUT_INT: isize = 0; diff --git a/tests/debuginfo/limited-debuginfo.rs b/tests/debuginfo/limited-debuginfo.rs index fb453d8078c..c3b516460aa 100644 --- a/tests/debuginfo/limited-debuginfo.rs +++ b/tests/debuginfo/limited-debuginfo.rs @@ -1,6 +1,7 @@ //@ ignore-lldb //@ compile-flags:-C debuginfo=1 +//@ disable-gdb-pretty-printers // Make sure functions have proper names // gdb-command:info functions @@ -18,8 +19,6 @@ #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct Struct { a: i64, diff --git a/tests/debuginfo/method-on-enum.rs b/tests/debuginfo/method-on-enum.rs index 754b4a2dc26..f86cf8ccfdf 100644 --- a/tests/debuginfo/method-on-enum.rs +++ b/tests/debuginfo/method-on-enum.rs @@ -2,6 +2,7 @@ //@ min-gdb-version: 13.0 //@ compile-flags:-g +//@ disable-gdb-pretty-printers //@ ignore-windows-gnu: #128973 @@ -104,9 +105,6 @@ // lldb-check:[...] -10 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Copy, Clone)] enum Enum { Variant1 { x: u16, y: u16 }, diff --git a/tests/debuginfo/method-on-generic-struct.rs b/tests/debuginfo/method-on-generic-struct.rs index 1e6c9d66178..5da952fa4e1 100644 --- a/tests/debuginfo/method-on-generic-struct.rs +++ b/tests/debuginfo/method-on-generic-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -99,9 +100,6 @@ // lldb-check:[...] -10 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Copy, Clone)] struct Struct<T> { x: T diff --git a/tests/debuginfo/method-on-struct.rs b/tests/debuginfo/method-on-struct.rs index 91f609365e9..83badd8dbf0 100644 --- a/tests/debuginfo/method-on-struct.rs +++ b/tests/debuginfo/method-on-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -99,9 +100,6 @@ // lldb-check:[...] -10 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Copy, Clone)] struct Struct { x: isize diff --git a/tests/debuginfo/method-on-trait.rs b/tests/debuginfo/method-on-trait.rs index 7b95e1f81c7..c91b255bd6a 100644 --- a/tests/debuginfo/method-on-trait.rs +++ b/tests/debuginfo/method-on-trait.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -99,9 +100,6 @@ // lldb-check:[...] -10 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Copy, Clone)] struct Struct { x: isize diff --git a/tests/debuginfo/method-on-tuple-struct.rs b/tests/debuginfo/method-on-tuple-struct.rs index 04c00d88302..7e6e724d42e 100644 --- a/tests/debuginfo/method-on-tuple-struct.rs +++ b/tests/debuginfo/method-on-tuple-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -99,9 +100,6 @@ // lldb-check:[...] -10 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Copy, Clone)] struct TupleStruct(isize, f64); diff --git a/tests/debuginfo/multi-cgu.rs b/tests/debuginfo/multi-cgu.rs index 3bb5269adea..ca4146da405 100644 --- a/tests/debuginfo/multi-cgu.rs +++ b/tests/debuginfo/multi-cgu.rs @@ -2,6 +2,7 @@ // compiled with multiple codegen units. (see #39160) //@ compile-flags:-g -Ccodegen-units=2 +//@ disable-gdb-pretty-printers // === GDB TESTS =============================================================== @@ -29,9 +30,6 @@ // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - mod a { pub fn foo(xxx: u32) { super::_zzz(); // #break diff --git a/tests/debuginfo/multiple-functions-equal-var-names.rs b/tests/debuginfo/multiple-functions-equal-var-names.rs index 6ae9225d55c..2bc40b87e6f 100644 --- a/tests/debuginfo/multiple-functions-equal-var-names.rs +++ b/tests/debuginfo/multiple-functions-equal-var-names.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -32,8 +33,6 @@ // lldb-check:[...] 30303 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] fn function_one() { let abc = 10101; diff --git a/tests/debuginfo/multiple-functions.rs b/tests/debuginfo/multiple-functions.rs index 3f7a0ded91b..5469408c78f 100644 --- a/tests/debuginfo/multiple-functions.rs +++ b/tests/debuginfo/multiple-functions.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -32,8 +33,6 @@ // lldb-check:[...] 30303 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] fn function_one() { let a = 10101; diff --git a/tests/debuginfo/name-shadowing-and-scope-nesting.rs b/tests/debuginfo/name-shadowing-and-scope-nesting.rs index d3829b60713..e8d85473d86 100644 --- a/tests/debuginfo/name-shadowing-and-scope-nesting.rs +++ b/tests/debuginfo/name-shadowing-and-scope-nesting.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -81,9 +82,6 @@ // lldb-check:[...] 20 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let x = false; let y = true; diff --git a/tests/debuginfo/option-like-enum.rs b/tests/debuginfo/option-like-enum.rs index 72a41986dce..5a55b143fbb 100644 --- a/tests/debuginfo/option-like-enum.rs +++ b/tests/debuginfo/option-like-enum.rs @@ -2,6 +2,7 @@ //@ min-gdb-version: 13.0 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -69,9 +70,6 @@ // lldb-check:[...] Nope -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - // If a struct has exactly two variants, one of them is empty, and the other one // contains a non-nullable pointer, then this value is used as the discriminator. // The test cases in this file make sure that something readable is generated for diff --git a/tests/debuginfo/packed-struct-with-destructor.rs b/tests/debuginfo/packed-struct-with-destructor.rs index f923d36953c..0c5725ca25c 100644 --- a/tests/debuginfo/packed-struct-with-destructor.rs +++ b/tests/debuginfo/packed-struct-with-destructor.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -60,8 +61,6 @@ #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #[repr(packed)] struct Packed { diff --git a/tests/debuginfo/packed-struct.rs b/tests/debuginfo/packed-struct.rs index 2b3652fe861..3bc39adee83 100644 --- a/tests/debuginfo/packed-struct.rs +++ b/tests/debuginfo/packed-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -46,8 +47,6 @@ // lldb-check:[...] 40 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #[repr(packed)] struct Packed { diff --git a/tests/debuginfo/recursive-enum.rs b/tests/debuginfo/recursive-enum.rs index b861e6d617c..5fb339f54f3 100644 --- a/tests/debuginfo/recursive-enum.rs +++ b/tests/debuginfo/recursive-enum.rs @@ -1,14 +1,13 @@ //@ ignore-lldb //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run // Test whether compiling a recursive enum definition crashes debug info generation. The test case // is taken from issue #11083 and #135093. #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] pub struct Window<'a> { callbacks: WindowCallbacks<'a> diff --git a/tests/debuginfo/recursive-struct.rs b/tests/debuginfo/recursive-struct.rs index a97eb295eb4..5be90992848 100644 --- a/tests/debuginfo/recursive-struct.rs +++ b/tests/debuginfo/recursive-struct.rs @@ -1,6 +1,7 @@ //@ ignore-lldb //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run @@ -58,8 +59,6 @@ // gdb-command:continue #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::Opt::{Empty, Val}; use std::boxed::Box as B; diff --git a/tests/debuginfo/reference-debuginfo.rs b/tests/debuginfo/reference-debuginfo.rs index 773c3ae4bc3..242da1dd654 100644 --- a/tests/debuginfo/reference-debuginfo.rs +++ b/tests/debuginfo/reference-debuginfo.rs @@ -3,6 +3,7 @@ // and leaves codegen to create a ladder of allocations so as `*a == b`. // //@ compile-flags:-g -Zmir-enable-passes=+ReferencePropagation,-ConstDebugInfo +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -106,8 +107,6 @@ // lldb-check:[...] 3.5 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(f16)] fn main() { diff --git a/tests/debuginfo/self-in-default-method.rs b/tests/debuginfo/self-in-default-method.rs index 02fc01d96eb..4297129e0cf 100644 --- a/tests/debuginfo/self-in-default-method.rs +++ b/tests/debuginfo/self-in-default-method.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -99,9 +100,6 @@ // lldb-check:[...] -10 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Copy, Clone)] struct Struct { x: isize diff --git a/tests/debuginfo/self-in-generic-default-method.rs b/tests/debuginfo/self-in-generic-default-method.rs index 65018e549ee..e7ffa05f418 100644 --- a/tests/debuginfo/self-in-generic-default-method.rs +++ b/tests/debuginfo/self-in-generic-default-method.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -99,9 +100,6 @@ // lldb-check:[...] -10.5 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - #[derive(Copy, Clone)] struct Struct { x: isize diff --git a/tests/debuginfo/shadowed-argument.rs b/tests/debuginfo/shadowed-argument.rs index 3a575b4addf..3a0f0ad17a8 100644 --- a/tests/debuginfo/shadowed-argument.rs +++ b/tests/debuginfo/shadowed-argument.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -46,9 +47,6 @@ // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn a_function(x: bool, y: bool) { zzz(); // #break sentinel(); diff --git a/tests/debuginfo/shadowed-variable.rs b/tests/debuginfo/shadowed-variable.rs index 752e4c233f1..6a658a7c494 100644 --- a/tests/debuginfo/shadowed-variable.rs +++ b/tests/debuginfo/shadowed-variable.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -68,9 +69,6 @@ // lldb-check:[...] 20 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let x = false; let y = true; diff --git a/tests/debuginfo/simd.rs b/tests/debuginfo/simd.rs index 12675a71a57..43cd7130b25 100644 --- a/tests/debuginfo/simd.rs +++ b/tests/debuginfo/simd.rs @@ -7,6 +7,7 @@ //@ ignore-s390x //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run // gdb-command:print vi8x16 @@ -35,8 +36,6 @@ // gdb-command:continue #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(repr_simd)] #[repr(simd)] diff --git a/tests/debuginfo/simple-lexical-scope.rs b/tests/debuginfo/simple-lexical-scope.rs index 6008489bd65..64afcf8d61d 100644 --- a/tests/debuginfo/simple-lexical-scope.rs +++ b/tests/debuginfo/simple-lexical-scope.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -66,9 +67,6 @@ // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - fn main() { let x = false; diff --git a/tests/debuginfo/simple-struct.rs b/tests/debuginfo/simple-struct.rs index bb6b2b79810..da09a8a3ce0 100644 --- a/tests/debuginfo/simple-struct.rs +++ b/tests/debuginfo/simple-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags: -g -Zmir-enable-passes=-CheckAlignment +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -84,8 +85,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct NoPadding16 { x: u16, diff --git a/tests/debuginfo/simple-tuple.rs b/tests/debuginfo/simple-tuple.rs index 82467ef3bcf..f086472d725 100644 --- a/tests/debuginfo/simple-tuple.rs +++ b/tests/debuginfo/simple-tuple.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -121,8 +122,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] static mut NO_PADDING_8: (i8, u8) = (-50, 50); static mut NO_PADDING_16: (i16, i16, u16) = (-1, 2, 3); diff --git a/tests/debuginfo/static-method-on-struct-and-enum.rs b/tests/debuginfo/static-method-on-struct-and-enum.rs index b487512a52f..2a3502712de 100644 --- a/tests/debuginfo/static-method-on-struct-and-enum.rs +++ b/tests/debuginfo/static-method-on-struct-and-enum.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -41,9 +42,6 @@ // lldb-check:[...] 5 // lldb-command:continue -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - struct Struct { x: isize } diff --git a/tests/debuginfo/strings-and-strs.rs b/tests/debuginfo/strings-and-strs.rs index 7d550408bec..392cf697e11 100644 --- a/tests/debuginfo/strings-and-strs.rs +++ b/tests/debuginfo/strings-and-strs.rs @@ -2,6 +2,7 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== // gdb-command:run @@ -40,8 +41,6 @@ #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] pub struct Foo<'a> { inner: &'a str, diff --git a/tests/debuginfo/struct-in-enum.rs b/tests/debuginfo/struct-in-enum.rs index bc2c59fe4aa..c5a7fb95e1e 100644 --- a/tests/debuginfo/struct-in-enum.rs +++ b/tests/debuginfo/struct-in-enum.rs @@ -1,6 +1,7 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -30,8 +31,6 @@ // lldb-check:[...] TheOnlyCase(Struct { x: 123, y: 456, z: 789 }) #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::Regular::{Case1, Case2}; use self::Univariant::TheOnlyCase; diff --git a/tests/debuginfo/struct-in-struct.rs b/tests/debuginfo/struct-in-struct.rs index 3cf48470391..c818df31b4b 100644 --- a/tests/debuginfo/struct-in-struct.rs +++ b/tests/debuginfo/struct-in-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -43,8 +44,6 @@ // lldb-check:[...] { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct Simple { x: i32 diff --git a/tests/debuginfo/struct-namespace.rs b/tests/debuginfo/struct-namespace.rs index 95788419100..d56c84c4f13 100644 --- a/tests/debuginfo/struct-namespace.rs +++ b/tests/debuginfo/struct-namespace.rs @@ -1,5 +1,6 @@ //@ ignore-gdb //@ compile-flags:-g +//@ disable-gdb-pretty-printers // Check that structs get placed in the correct namespace @@ -16,8 +17,6 @@ #![allow(unused_variables)] #![allow(dead_code)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct Struct1 { a: u32, diff --git a/tests/debuginfo/struct-style-enum.rs b/tests/debuginfo/struct-style-enum.rs index cea9f3def8b..1f28fe4fea1 100644 --- a/tests/debuginfo/struct-style-enum.rs +++ b/tests/debuginfo/struct-style-enum.rs @@ -1,5 +1,6 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -36,8 +37,6 @@ // lldb-check:(struct_style_enum::Univariant) univariant = { value = { a = -1 } } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::Regular::{Case1, Case2, Case3}; use self::Univariant::TheOnlyCase; diff --git a/tests/debuginfo/struct-with-destructor.rs b/tests/debuginfo/struct-with-destructor.rs index c159824980a..4d2ce8ff79d 100644 --- a/tests/debuginfo/struct-with-destructor.rs +++ b/tests/debuginfo/struct-with-destructor.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -32,8 +33,6 @@ // lldb-check:[...] { a = { a = { x = 7890 y = 9870 } } } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct NoDestructor { x: i32, diff --git a/tests/debuginfo/trait-pointers.rs b/tests/debuginfo/trait-pointers.rs index 71da71b897a..5cdefe94e50 100644 --- a/tests/debuginfo/trait-pointers.rs +++ b/tests/debuginfo/trait-pointers.rs @@ -1,10 +1,9 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run // lldb-command:run #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] trait Trait { fn method(&self) -> isize { 0 } diff --git a/tests/debuginfo/tuple-in-struct.rs b/tests/debuginfo/tuple-in-struct.rs index a74d6203f5f..bef96fad50c 100644 --- a/tests/debuginfo/tuple-in-struct.rs +++ b/tests/debuginfo/tuple-in-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // gdb-command:run @@ -28,8 +29,6 @@ // gdb-check:$10 = tuple_in_struct::MixedPadding {x: ((40, 41, 42), (43, 44)), y: (45, 46, 47, 48)} #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct NoPadding1 { x: (i32, i32), diff --git a/tests/debuginfo/tuple-in-tuple.rs b/tests/debuginfo/tuple-in-tuple.rs index d4388095ad7..7bf97764c5c 100644 --- a/tests/debuginfo/tuple-in-tuple.rs +++ b/tests/debuginfo/tuple-in-tuple.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -111,8 +112,6 @@ // cdb-check:[...][1] : 22 [Type: [...]] #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] fn main() { let no_padding1: ((u32, u32), u32, u32) = ((0, 1), 2, 3); diff --git a/tests/debuginfo/tuple-struct.rs b/tests/debuginfo/tuple-struct.rs index 0110203a7c7..a1bdaf1f3bb 100644 --- a/tests/debuginfo/tuple-struct.rs +++ b/tests/debuginfo/tuple-struct.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -50,9 +51,6 @@ // structs. -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - struct NoPadding16(u16, i16); struct NoPadding32(i32, f32, u32); struct NoPadding64(f64, i64, u64); diff --git a/tests/debuginfo/tuple-style-enum.rs b/tests/debuginfo/tuple-style-enum.rs index a759ad61c05..6113ccc10a1 100644 --- a/tests/debuginfo/tuple-style-enum.rs +++ b/tests/debuginfo/tuple-style-enum.rs @@ -1,6 +1,7 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -37,8 +38,6 @@ // lldb-check:(tuple_style_enum::Univariant) univariant = { value = { 0 = -1 } } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] use self::Regular::{Case1, Case2, Case3}; use self::Univariant::TheOnlyCase; diff --git a/tests/debuginfo/type-names.rs b/tests/debuginfo/type-names.rs index ac61fef48fe..ecf7c597c0c 100644 --- a/tests/debuginfo/type-names.rs +++ b/tests/debuginfo/type-names.rs @@ -6,6 +6,7 @@ //@ min-gdb-version: 9.2 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS ================================================================================== @@ -271,8 +272,6 @@ // cdb-check:struct type_names::mod1::extern$0::ForeignType2 * foreign2 = [...] #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] #![feature(extern_types)] use std::marker::PhantomData; diff --git a/tests/debuginfo/union-smoke.rs b/tests/debuginfo/union-smoke.rs index 6043240069e..bd253794bd8 100644 --- a/tests/debuginfo/union-smoke.rs +++ b/tests/debuginfo/union-smoke.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -18,8 +19,6 @@ // lldb-check:[...] { a = { 0 = '\x01' 1 = '\x01' } b = 257 } #![allow(unused)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] union U { a: (u8, u8), diff --git a/tests/debuginfo/unique-enum.rs b/tests/debuginfo/unique-enum.rs index 230429278aa..e5a9c550135 100644 --- a/tests/debuginfo/unique-enum.rs +++ b/tests/debuginfo/unique-enum.rs @@ -1,6 +1,7 @@ //@ min-lldb-version: 1800 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -30,8 +31,6 @@ // lldb-check:(unique_enum::Univariant) *univariant = { value = { 0 = 123234 } } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // The first element is to ensure proper alignment, irrespective of the machines word size. Since // the size of the discriminant value is machine dependent, this has be taken into account when diff --git a/tests/debuginfo/unreachable-locals.rs b/tests/debuginfo/unreachable-locals.rs index d4416387e0b..4d3f01fe423 100644 --- a/tests/debuginfo/unreachable-locals.rs +++ b/tests/debuginfo/unreachable-locals.rs @@ -1,8 +1,7 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] // No need to actually run the debugger, just make sure that the compiler can // handle locals in unreachable code. diff --git a/tests/debuginfo/unsized.rs b/tests/debuginfo/unsized.rs index edd9f5af557..e34eaaaacb9 100644 --- a/tests/debuginfo/unsized.rs +++ b/tests/debuginfo/unsized.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers //@ ignore-gdb-version: 13.1 - 99.0 // ^ https://sourceware.org/bugzilla/show_bug.cgi?id=30330 @@ -41,9 +42,6 @@ // cdb-check:[+0x000] pointer : 0x[...] [Type: unsized::Foo<dyn$<core::fmt::Debug> > *] // cdb-check:[...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[4]] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] - struct Foo<T: ?Sized> { value: T, } diff --git a/tests/debuginfo/var-captured-in-nested-closure.rs b/tests/debuginfo/var-captured-in-nested-closure.rs index 4e8700015ba..1795a352802 100644 --- a/tests/debuginfo/var-captured-in-nested-closure.rs +++ b/tests/debuginfo/var-captured-in-nested-closure.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -115,8 +116,6 @@ // cdb-check:closure_local : 8 [Type: [...]] #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct Struct { a: isize, diff --git a/tests/debuginfo/var-captured-in-sendable-closure.rs b/tests/debuginfo/var-captured-in-sendable-closure.rs index cbb09daeb5f..2b0d4bb430a 100644 --- a/tests/debuginfo/var-captured-in-sendable-closure.rs +++ b/tests/debuginfo/var-captured-in-sendable-closure.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -28,8 +29,6 @@ // lldb-check:[...] 5 #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct Struct { a: isize, diff --git a/tests/debuginfo/var-captured-in-stack-closure.rs b/tests/debuginfo/var-captured-in-stack-closure.rs index 0f84ea57b00..7fda71c2297 100644 --- a/tests/debuginfo/var-captured-in-stack-closure.rs +++ b/tests/debuginfo/var-captured-in-stack-closure.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -100,8 +101,6 @@ // cdb-check:owned : 0x[...] : 6 [Type: [...] *] #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct Struct { a: isize, diff --git a/tests/debuginfo/vec-slices.rs b/tests/debuginfo/vec-slices.rs index 2b4d624976a..2a4e413612f 100644 --- a/tests/debuginfo/vec-slices.rs +++ b/tests/debuginfo/vec-slices.rs @@ -2,6 +2,7 @@ // ^ test temporarily disabled as it fails under gdb 15 //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -71,8 +72,6 @@ // lldb-check:[...] size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } } #![allow(dead_code, unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] struct AStruct { x: i16, diff --git a/tests/debuginfo/vec.rs b/tests/debuginfo/vec.rs index 1093e38d878..fd75e7005af 100644 --- a/tests/debuginfo/vec.rs +++ b/tests/debuginfo/vec.rs @@ -1,4 +1,5 @@ //@ compile-flags:-g +//@ disable-gdb-pretty-printers // === GDB TESTS =================================================================================== @@ -16,8 +17,6 @@ // lldb-check:[...] { [0] = 1 [1] = 2 [2] = 3 } #![allow(unused_variables)] -#![feature(omit_gdb_pretty_printer_section)] -#![omit_gdb_pretty_printer_section] static mut VECT: [i32; 3] = [1, 2, 3]; diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs index 2a8b7b41e58..0d5bf69d548 100644 --- a/tests/ui/attributes/malformed-attrs.rs +++ b/tests/ui/attributes/malformed-attrs.rs @@ -20,13 +20,9 @@ #![feature(linkage)] #![feature(cfi_encoding, extern_types)] #![feature(patchable_function_entry)] -#![feature(omit_gdb_pretty_printer_section)] #![feature(fundamental)] -#![omit_gdb_pretty_printer_section = 1] -//~^ ERROR malformed `omit_gdb_pretty_printer_section` attribute input - #![windows_subsystem] //~^ ERROR malformed diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr index 814a1e5f691..1b51075b4e8 100644 --- a/tests/ui/attributes/malformed-attrs.stderr +++ b/tests/ui/attributes/malformed-attrs.stderr @@ -1,5 +1,5 @@ error[E0539]: malformed `cfg` attribute input - --> $DIR/malformed-attrs.rs:103:1 + --> $DIR/malformed-attrs.rs:99:1 | LL | #[cfg] | ^^^^^^ @@ -8,7 +8,7 @@ LL | #[cfg] | help: must be of the form: `#[cfg(predicate)]` error: malformed `cfg_attr` attribute input - --> $DIR/malformed-attrs.rs:105:1 + --> $DIR/malformed-attrs.rs:101:1 | LL | #[cfg_attr] | ^^^^^^^^^^^ @@ -20,49 +20,49 @@ LL | #[cfg_attr(condition, attribute, other_attribute, ...)] | ++++++++++++++++++++++++++++++++++++++++++++ error[E0463]: can't find crate for `wloop` - --> $DIR/malformed-attrs.rs:212:1 + --> $DIR/malformed-attrs.rs:208:1 | LL | extern crate wloop; | ^^^^^^^^^^^^^^^^^^^ can't find crate error: malformed `windows_subsystem` attribute input - --> $DIR/malformed-attrs.rs:30:1 + --> $DIR/malformed-attrs.rs:26:1 | LL | #![windows_subsystem] | ^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![windows_subsystem = "windows|console"]` error: malformed `crate_name` attribute input - --> $DIR/malformed-attrs.rs:75:1 + --> $DIR/malformed-attrs.rs:71:1 | LL | #[crate_name] | ^^^^^^^^^^^^^ help: must be of the form: `#[crate_name = "name"]` error: malformed `no_sanitize` attribute input - --> $DIR/malformed-attrs.rs:93:1 + --> $DIR/malformed-attrs.rs:89:1 | LL | #[no_sanitize] | ^^^^^^^^^^^^^^ help: must be of the form: `#[no_sanitize(address, kcfi, memory, thread)]` error: malformed `instruction_set` attribute input - --> $DIR/malformed-attrs.rs:107:1 + --> $DIR/malformed-attrs.rs:103:1 | LL | #[instruction_set] | ^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[instruction_set(set)]` error: malformed `patchable_function_entry` attribute input - --> $DIR/malformed-attrs.rs:109:1 + --> $DIR/malformed-attrs.rs:105:1 | LL | #[patchable_function_entry] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[patchable_function_entry(prefix_nops = m, entry_nops = n)]` error: malformed `coroutine` attribute input - --> $DIR/malformed-attrs.rs:112:5 + --> $DIR/malformed-attrs.rs:108:5 | LL | #[coroutine = 63] || {} | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[coroutine]` error: malformed `must_not_suspend` attribute input - --> $DIR/malformed-attrs.rs:133:1 + --> $DIR/malformed-attrs.rs:129:1 | LL | #[must_not_suspend()] | ^^^^^^^^^^^^^^^^^^^^^ @@ -77,67 +77,67 @@ LL + #[must_not_suspend] | error: malformed `cfi_encoding` attribute input - --> $DIR/malformed-attrs.rs:135:1 + --> $DIR/malformed-attrs.rs:131:1 | LL | #[cfi_encoding] | ^^^^^^^^^^^^^^^ help: must be of the form: `#[cfi_encoding = "encoding"]` error: malformed `linkage` attribute input - --> $DIR/malformed-attrs.rs:174:5 + --> $DIR/malformed-attrs.rs:170:5 | LL | #[linkage] | ^^^^^^^^^^ help: must be of the form: `#[linkage = "external|internal|..."]` error: malformed `allow` attribute input - --> $DIR/malformed-attrs.rs:179:1 + --> $DIR/malformed-attrs.rs:175:1 | LL | #[allow] | ^^^^^^^^ help: must be of the form: `#[allow(lint1, lint2, ..., /*opt*/ reason = "...")]` error: malformed `expect` attribute input - --> $DIR/malformed-attrs.rs:181:1 + --> $DIR/malformed-attrs.rs:177:1 | LL | #[expect] | ^^^^^^^^^ help: must be of the form: `#[expect(lint1, lint2, ..., /*opt*/ reason = "...")]` error: malformed `warn` attribute input - --> $DIR/malformed-attrs.rs:183:1 + --> $DIR/malformed-attrs.rs:179:1 | LL | #[warn] | ^^^^^^^ help: must be of the form: `#[warn(lint1, lint2, ..., /*opt*/ reason = "...")]` error: malformed `deny` attribute input - --> $DIR/malformed-attrs.rs:185:1 + --> $DIR/malformed-attrs.rs:181:1 | LL | #[deny] | ^^^^^^^ help: must be of the form: `#[deny(lint1, lint2, ..., /*opt*/ reason = "...")]` error: malformed `forbid` attribute input - --> $DIR/malformed-attrs.rs:187:1 + --> $DIR/malformed-attrs.rs:183:1 | LL | #[forbid] | ^^^^^^^^^ help: must be of the form: `#[forbid(lint1, lint2, ..., /*opt*/ reason = "...")]` error: malformed `debugger_visualizer` attribute input - --> $DIR/malformed-attrs.rs:189:1 + --> $DIR/malformed-attrs.rs:185:1 | LL | #[debugger_visualizer] | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]` error: malformed `thread_local` attribute input - --> $DIR/malformed-attrs.rs:204:1 + --> $DIR/malformed-attrs.rs:200:1 | LL | #[thread_local()] | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[thread_local]` error: malformed `no_link` attribute input - --> $DIR/malformed-attrs.rs:208:1 + --> $DIR/malformed-attrs.rs:204:1 | LL | #[no_link()] | ^^^^^^^^^^^^ help: must be of the form: `#[no_link]` error: malformed `macro_export` attribute input - --> $DIR/malformed-attrs.rs:215:1 + --> $DIR/malformed-attrs.rs:211:1 | LL | #[macro_export = 18] | ^^^^^^^^^^^^^^^^^^^^ @@ -152,31 +152,31 @@ LL + #[macro_export] | error: malformed `allow_internal_unsafe` attribute input - --> $DIR/malformed-attrs.rs:217:1 + --> $DIR/malformed-attrs.rs:213:1 | LL | #[allow_internal_unsafe = 1] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[allow_internal_unsafe]` error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type - --> $DIR/malformed-attrs.rs:100:1 + --> $DIR/malformed-attrs.rs:96:1 | LL | #[proc_macro = 18] | ^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_attribute]` attribute is only usable with crates of the `proc-macro` crate type - --> $DIR/malformed-attrs.rs:117:1 + --> $DIR/malformed-attrs.rs:113:1 | LL | #[proc_macro_attribute = 19] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type - --> $DIR/malformed-attrs.rs:124:1 + --> $DIR/malformed-attrs.rs:120:1 | LL | #[proc_macro_derive] | ^^^^^^^^^^^^^^^^^^^^ error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint - --> $DIR/malformed-attrs.rs:217:1 + --> $DIR/malformed-attrs.rs:213:1 | LL | #[allow_internal_unsafe = 1] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -185,7 +185,7 @@ LL | #[allow_internal_unsafe = 1] = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: valid forms for the attribute are `#[doc(hidden|inline|...)]` and `#[doc = "string"]` - --> $DIR/malformed-attrs.rs:44:1 + --> $DIR/malformed-attrs.rs:40:1 | LL | #[doc] | ^^^^^^ @@ -195,7 +195,7 @@ LL | #[doc] = note: `#[deny(ill_formed_attribute_input)]` on by default error: valid forms for the attribute are `#[doc(hidden|inline|...)]` and `#[doc = "string"]` - --> $DIR/malformed-attrs.rs:77:1 + --> $DIR/malformed-attrs.rs:73:1 | LL | #[doc] | ^^^^^^ @@ -204,7 +204,7 @@ LL | #[doc] = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]` - --> $DIR/malformed-attrs.rs:84:1 + --> $DIR/malformed-attrs.rs:80:1 | LL | #[link] | ^^^^^^^ @@ -213,7 +213,7 @@ LL | #[link] = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> error: invalid argument - --> $DIR/malformed-attrs.rs:189:1 + --> $DIR/malformed-attrs.rs:185:1 | LL | #[debugger_visualizer] | ^^^^^^^^^^^^^^^^^^^^^^ @@ -222,35 +222,26 @@ LL | #[debugger_visualizer] = note: OR = note: expected: `gdb_script_file = "..."` -error[E0565]: malformed `omit_gdb_pretty_printer_section` attribute input - --> $DIR/malformed-attrs.rs:27:1 - | -LL | #![omit_gdb_pretty_printer_section = 1] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^ - | | | - | | didn't expect any arguments here - | help: must be of the form: `#[omit_gdb_pretty_printer_section]` - error[E0539]: malformed `export_name` attribute input - --> $DIR/malformed-attrs.rs:33:1 + --> $DIR/malformed-attrs.rs:29:1 | LL | #[unsafe(export_name)] | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_name = "name"]` error: `rustc_allow_const_fn_unstable` expects a list of feature names - --> $DIR/malformed-attrs.rs:35:1 + --> $DIR/malformed-attrs.rs:31:1 | LL | #[rustc_allow_const_fn_unstable] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `allow_internal_unstable` expects a list of feature names - --> $DIR/malformed-attrs.rs:38:1 + --> $DIR/malformed-attrs.rs:34:1 | LL | #[allow_internal_unstable] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0539]: malformed `rustc_confusables` attribute input - --> $DIR/malformed-attrs.rs:40:1 + --> $DIR/malformed-attrs.rs:36:1 | LL | #[rustc_confusables] | ^^^^^^^^^^^^^^^^^^^^ @@ -259,7 +250,7 @@ LL | #[rustc_confusables] | help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]` error[E0539]: malformed `deprecated` attribute input - --> $DIR/malformed-attrs.rs:42:1 + --> $DIR/malformed-attrs.rs:38:1 | LL | #[deprecated = 5] | ^^^^^^^^^^^^^^^-^ @@ -279,13 +270,13 @@ LL + #[deprecated] | error[E0539]: malformed `rustc_macro_transparency` attribute input - --> $DIR/malformed-attrs.rs:47:1 + --> $DIR/malformed-attrs.rs:43:1 | LL | #[rustc_macro_transparency] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_macro_transparency = "transparent|semitransparent|opaque"]` error[E0539]: malformed `repr` attribute input - --> $DIR/malformed-attrs.rs:49:1 + --> $DIR/malformed-attrs.rs:45:1 | LL | #[repr] | ^^^^^^^ @@ -294,7 +285,7 @@ LL | #[repr] | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]` error[E0565]: malformed `rustc_as_ptr` attribute input - --> $DIR/malformed-attrs.rs:52:1 + --> $DIR/malformed-attrs.rs:48:1 | LL | #[rustc_as_ptr = 5] | ^^^^^^^^^^^^^^^---^ @@ -303,7 +294,7 @@ LL | #[rustc_as_ptr = 5] | help: must be of the form: `#[rustc_as_ptr]` error[E0539]: malformed `rustc_align` attribute input - --> $DIR/malformed-attrs.rs:57:1 + --> $DIR/malformed-attrs.rs:53:1 | LL | #[rustc_align] | ^^^^^^^^^^^^^^ @@ -312,7 +303,7 @@ LL | #[rustc_align] | help: must be of the form: `#[rustc_align(<alignment in bytes>)]` error[E0539]: malformed `optimize` attribute input - --> $DIR/malformed-attrs.rs:59:1 + --> $DIR/malformed-attrs.rs:55:1 | LL | #[optimize] | ^^^^^^^^^^^ @@ -321,7 +312,7 @@ LL | #[optimize] | help: must be of the form: `#[optimize(size|speed|none)]` error[E0565]: malformed `cold` attribute input - --> $DIR/malformed-attrs.rs:61:1 + --> $DIR/malformed-attrs.rs:57:1 | LL | #[cold = 1] | ^^^^^^^---^ @@ -330,13 +321,13 @@ LL | #[cold = 1] | help: must be of the form: `#[cold]` error: valid forms for the attribute are `#[must_use = "reason"]` and `#[must_use]` - --> $DIR/malformed-attrs.rs:63:1 + --> $DIR/malformed-attrs.rs:59:1 | LL | #[must_use()] | ^^^^^^^^^^^^^ error[E0565]: malformed `no_mangle` attribute input - --> $DIR/malformed-attrs.rs:65:1 + --> $DIR/malformed-attrs.rs:61:1 | LL | #[no_mangle = 1] | ^^^^^^^^^^^^---^ @@ -345,7 +336,7 @@ LL | #[no_mangle = 1] | help: must be of the form: `#[no_mangle]` error[E0565]: malformed `naked` attribute input - --> $DIR/malformed-attrs.rs:67:1 + --> $DIR/malformed-attrs.rs:63:1 | LL | #[unsafe(naked())] | ^^^^^^^^^^^^^^--^^ @@ -354,7 +345,7 @@ LL | #[unsafe(naked())] | help: must be of the form: `#[naked]` error[E0565]: malformed `track_caller` attribute input - --> $DIR/malformed-attrs.rs:69:1 + --> $DIR/malformed-attrs.rs:65:1 | LL | #[track_caller()] | ^^^^^^^^^^^^^^--^ @@ -363,13 +354,13 @@ LL | #[track_caller()] | help: must be of the form: `#[track_caller]` error[E0539]: malformed `export_name` attribute input - --> $DIR/malformed-attrs.rs:71:1 + --> $DIR/malformed-attrs.rs:67:1 | LL | #[export_name()] | ^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_name = "name"]` error[E0805]: malformed `used` attribute input - --> $DIR/malformed-attrs.rs:73:1 + --> $DIR/malformed-attrs.rs:69:1 | LL | #[used()] | ^^^^^^--^ @@ -385,7 +376,7 @@ LL + #[used] | error[E0539]: malformed `target_feature` attribute input - --> $DIR/malformed-attrs.rs:80:1 + --> $DIR/malformed-attrs.rs:76:1 | LL | #[target_feature] | ^^^^^^^^^^^^^^^^^ @@ -394,7 +385,7 @@ LL | #[target_feature] | help: must be of the form: `#[target_feature(enable = "feat1, feat2")]` error[E0565]: malformed `export_stable` attribute input - --> $DIR/malformed-attrs.rs:82:1 + --> $DIR/malformed-attrs.rs:78:1 | LL | #[export_stable = 1] | ^^^^^^^^^^^^^^^^---^ @@ -403,19 +394,19 @@ LL | #[export_stable = 1] | help: must be of the form: `#[export_stable]` error[E0539]: malformed `link_name` attribute input - --> $DIR/malformed-attrs.rs:87:1 + --> $DIR/malformed-attrs.rs:83:1 | LL | #[link_name] | ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]` error[E0539]: malformed `link_section` attribute input - --> $DIR/malformed-attrs.rs:89:1 + --> $DIR/malformed-attrs.rs:85:1 | LL | #[link_section] | ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_section = "name"]` error[E0539]: malformed `coverage` attribute input - --> $DIR/malformed-attrs.rs:91:1 + --> $DIR/malformed-attrs.rs:87:1 | LL | #[coverage] | ^^^^^^^^^^^ this attribute is only valid with either `on` or `off` as an argument @@ -428,7 +419,7 @@ LL | #[coverage(on)] | ++++ error[E0565]: malformed `no_implicit_prelude` attribute input - --> $DIR/malformed-attrs.rs:98:1 + --> $DIR/malformed-attrs.rs:94:1 | LL | #[no_implicit_prelude = 23] | ^^^^^^^^^^^^^^^^^^^^^^----^ @@ -437,7 +428,7 @@ LL | #[no_implicit_prelude = 23] | help: must be of the form: `#[no_implicit_prelude]` error[E0565]: malformed `proc_macro` attribute input - --> $DIR/malformed-attrs.rs:100:1 + --> $DIR/malformed-attrs.rs:96:1 | LL | #[proc_macro = 18] | ^^^^^^^^^^^^^----^ @@ -446,7 +437,7 @@ LL | #[proc_macro = 18] | help: must be of the form: `#[proc_macro]` error[E0565]: malformed `proc_macro_attribute` attribute input - --> $DIR/malformed-attrs.rs:117:1 + --> $DIR/malformed-attrs.rs:113:1 | LL | #[proc_macro_attribute = 19] | ^^^^^^^^^^^^^^^^^^^^^^^----^ @@ -455,7 +446,7 @@ LL | #[proc_macro_attribute = 19] | help: must be of the form: `#[proc_macro_attribute]` error[E0539]: malformed `must_use` attribute input - --> $DIR/malformed-attrs.rs:120:1 + --> $DIR/malformed-attrs.rs:116:1 | LL | #[must_use = 1] | ^^^^^^^^^^^^^-^ @@ -472,7 +463,7 @@ LL + #[must_use] | error[E0539]: malformed `proc_macro_derive` attribute input - --> $DIR/malformed-attrs.rs:124:1 + --> $DIR/malformed-attrs.rs:120:1 | LL | #[proc_macro_derive] | ^^^^^^^^^^^^^^^^^^^^ @@ -481,7 +472,7 @@ LL | #[proc_macro_derive] | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]` error[E0539]: malformed `rustc_layout_scalar_valid_range_start` attribute input - --> $DIR/malformed-attrs.rs:129:1 + --> $DIR/malformed-attrs.rs:125:1 | LL | #[rustc_layout_scalar_valid_range_start] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -490,7 +481,7 @@ LL | #[rustc_layout_scalar_valid_range_start] | help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]` error[E0539]: malformed `rustc_layout_scalar_valid_range_end` attribute input - --> $DIR/malformed-attrs.rs:131:1 + --> $DIR/malformed-attrs.rs:127:1 | LL | #[rustc_layout_scalar_valid_range_end] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -499,7 +490,7 @@ LL | #[rustc_layout_scalar_valid_range_end] | help: must be of the form: `#[rustc_layout_scalar_valid_range_end(end)]` error[E0565]: malformed `marker` attribute input - --> $DIR/malformed-attrs.rs:156:1 + --> $DIR/malformed-attrs.rs:152:1 | LL | #[marker = 3] | ^^^^^^^^^---^ @@ -508,7 +499,7 @@ LL | #[marker = 3] | help: must be of the form: `#[marker]` error[E0565]: malformed `fundamental` attribute input - --> $DIR/malformed-attrs.rs:158:1 + --> $DIR/malformed-attrs.rs:154:1 | LL | #[fundamental()] | ^^^^^^^^^^^^^--^ @@ -517,7 +508,7 @@ LL | #[fundamental()] | help: must be of the form: `#[fundamental]` error[E0565]: malformed `ffi_pure` attribute input - --> $DIR/malformed-attrs.rs:166:5 + --> $DIR/malformed-attrs.rs:162:5 | LL | #[unsafe(ffi_pure = 1)] | ^^^^^^^^^^^^^^^^^^---^^ @@ -526,7 +517,7 @@ LL | #[unsafe(ffi_pure = 1)] | help: must be of the form: `#[ffi_pure]` error[E0539]: malformed `link_ordinal` attribute input - --> $DIR/malformed-attrs.rs:168:5 + --> $DIR/malformed-attrs.rs:164:5 | LL | #[link_ordinal] | ^^^^^^^^^^^^^^^ @@ -535,7 +526,7 @@ LL | #[link_ordinal] | help: must be of the form: `#[link_ordinal(ordinal)]` error[E0565]: malformed `ffi_const` attribute input - --> $DIR/malformed-attrs.rs:172:5 + --> $DIR/malformed-attrs.rs:168:5 | LL | #[unsafe(ffi_const = 1)] | ^^^^^^^^^^^^^^^^^^^---^^ @@ -544,7 +535,7 @@ LL | #[unsafe(ffi_const = 1)] | help: must be of the form: `#[ffi_const]` error[E0565]: malformed `automatically_derived` attribute input - --> $DIR/malformed-attrs.rs:192:1 + --> $DIR/malformed-attrs.rs:188:1 | LL | #[automatically_derived = 18] | ^^^^^^^^^^^^^^^^^^^^^^^^----^ @@ -553,7 +544,7 @@ LL | #[automatically_derived = 18] | help: must be of the form: `#[automatically_derived]` error[E0565]: malformed `non_exhaustive` attribute input - --> $DIR/malformed-attrs.rs:198:1 + --> $DIR/malformed-attrs.rs:194:1 | LL | #[non_exhaustive = 1] | ^^^^^^^^^^^^^^^^^---^ @@ -562,13 +553,13 @@ LL | #[non_exhaustive = 1] | help: must be of the form: `#[non_exhaustive]` error: valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]` - --> $DIR/malformed-attrs.rs:210:1 + --> $DIR/malformed-attrs.rs:206:1 | LL | #[macro_use = 1] | ^^^^^^^^^^^^^^^^ error[E0565]: malformed `type_const` attribute input - --> $DIR/malformed-attrs.rs:144:5 + --> $DIR/malformed-attrs.rs:140:5 | LL | #[type_const = 1] | ^^^^^^^^^^^^^---^ @@ -577,7 +568,7 @@ LL | #[type_const = 1] | help: must be of the form: `#[type_const]` error: attribute should be applied to `const fn` - --> $DIR/malformed-attrs.rs:35:1 + --> $DIR/malformed-attrs.rs:31:1 | LL | #[rustc_allow_const_fn_unstable] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -589,19 +580,19 @@ LL | | } | |_- not a `const fn` error: `#[repr(align(...))]` is not supported on function items - --> $DIR/malformed-attrs.rs:49:1 + --> $DIR/malformed-attrs.rs:45:1 | LL | #[repr] | ^^^^^^^ | help: use `#[rustc_align(...)]` instead - --> $DIR/malformed-attrs.rs:49:1 + --> $DIR/malformed-attrs.rs:45:1 | LL | #[repr] | ^^^^^^^ warning: `#[diagnostic::do_not_recommend]` does not expect any arguments - --> $DIR/malformed-attrs.rs:150:1 + --> $DIR/malformed-attrs.rs:146:1 | LL | #[diagnostic::do_not_recommend()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -609,7 +600,7 @@ LL | #[diagnostic::do_not_recommend()] = note: `#[warn(malformed_diagnostic_attributes)]` on by default warning: missing options for `on_unimplemented` attribute - --> $DIR/malformed-attrs.rs:139:1 + --> $DIR/malformed-attrs.rs:135:1 | LL | #[diagnostic::on_unimplemented] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -617,7 +608,7 @@ LL | #[diagnostic::on_unimplemented] = help: at least one of the `message`, `note` and `label` options are expected warning: malformed `on_unimplemented` attribute - --> $DIR/malformed-attrs.rs:141:1 + --> $DIR/malformed-attrs.rs:137:1 | LL | #[diagnostic::on_unimplemented = 1] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here @@ -625,7 +616,7 @@ LL | #[diagnostic::on_unimplemented = 1] = help: only `message`, `note` and `label` are allowed as options error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]` - --> $DIR/malformed-attrs.rs:54:1 + --> $DIR/malformed-attrs.rs:50:1 | LL | #[inline = 5] | ^^^^^^^^^^^^^ @@ -634,7 +625,7 @@ LL | #[inline = 5] = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` - --> $DIR/malformed-attrs.rs:95:1 + --> $DIR/malformed-attrs.rs:91:1 | LL | #[ignore()] | ^^^^^^^^^^^ @@ -643,7 +634,7 @@ LL | #[ignore()] = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` - --> $DIR/malformed-attrs.rs:224:1 + --> $DIR/malformed-attrs.rs:220:1 | LL | #[ignore = 1] | ^^^^^^^^^^^^^ @@ -652,7 +643,7 @@ LL | #[ignore = 1] = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> error[E0308]: mismatched types - --> $DIR/malformed-attrs.rs:112:23 + --> $DIR/malformed-attrs.rs:108:23 | LL | fn test() { | - help: a return type might be missing here: `-> _` @@ -660,9 +651,9 @@ LL | #[coroutine = 63] || {} | ^^^^^ expected `()`, found coroutine | = note: expected unit type `()` - found coroutine `{coroutine@$DIR/malformed-attrs.rs:112:23: 112:25}` + found coroutine `{coroutine@$DIR/malformed-attrs.rs:108:23: 108:25}` -error: aborting due to 75 previous errors; 3 warnings emitted +error: aborting due to 74 previous errors; 3 warnings emitted Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.rs b/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.rs deleted file mode 100644 index 66bf7973832..00000000000 --- a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is -fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr b/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr deleted file mode 100644 index 2e1d27fb776..00000000000 --- a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite - --> $DIR/feature-gate-omit-gdb-pretty-printer-section.rs:1:1 - | -LL | #[omit_gdb_pretty_printer_section] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: add `#![feature(omit_gdb_pretty_printer_section)]` 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 1 previous error - -For more information about this error, try `rustc --explain E0658`. |
