about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/trpl/choosing-your-guarantees.md2
-rw-r--r--src/doc/trpl/concurrency.md59
-rw-r--r--src/librustc/diagnostics.rs12
-rw-r--r--src/librustc/middle/check_const.rs20
-rw-r--r--src/libsyntax/ext/expand.rs49
-rw-r--r--src/libsyntax/feature_gate.rs15
-rw-r--r--src/test/auxiliary/cross_crate_spans.rs1
-rw-r--r--src/test/compile-fail/feature-gate-no-debug.rs12
-rw-r--r--src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs12
-rw-r--r--src/test/debuginfo/associated-types.rs1
-rw-r--r--src/test/debuginfo/basic-types-globals-metadata.rs1
-rw-r--r--src/test/debuginfo/basic-types-globals.rs1
-rw-r--r--src/test/debuginfo/basic-types-metadata.rs1
-rw-r--r--src/test/debuginfo/basic-types-mut-globals.rs1
-rw-r--r--src/test/debuginfo/basic-types.rs1
-rw-r--r--src/test/debuginfo/borrowed-basic.rs1
-rw-r--r--src/test/debuginfo/borrowed-c-style-enum.rs1
-rw-r--r--src/test/debuginfo/borrowed-enum.rs1
-rw-r--r--src/test/debuginfo/borrowed-struct.rs1
-rw-r--r--src/test/debuginfo/borrowed-tuple.rs1
-rw-r--r--src/test/debuginfo/borrowed-unique-basic.rs1
-rw-r--r--src/test/debuginfo/box.rs1
-rw-r--r--src/test/debuginfo/boxed-struct.rs1
-rw-r--r--src/test/debuginfo/by-value-non-immediate-argument.rs1
-rw-r--r--src/test/debuginfo/by-value-self-argument-in-trait-impl.rs1
-rw-r--r--src/test/debuginfo/c-style-enum-in-composite.rs1
-rw-r--r--src/test/debuginfo/c-style-enum.rs1
-rw-r--r--src/test/debuginfo/closure-in-generic-function.rs1
-rw-r--r--src/test/debuginfo/constant-debug-locs.rs1
-rw-r--r--src/test/debuginfo/constant-in-match-pattern.rs1
-rw-r--r--src/test/debuginfo/cross-crate-spans.rs5
-rw-r--r--src/test/debuginfo/destructured-fn-argument.rs1
-rw-r--r--src/test/debuginfo/destructured-for-loop-variable.rs1
-rw-r--r--src/test/debuginfo/destructured-local.rs1
-rw-r--r--src/test/debuginfo/evec-in-struct.rs1
-rw-r--r--src/test/debuginfo/extern-c-fn.rs1
-rw-r--r--src/test/debuginfo/function-arg-initialization.rs1
-rw-r--r--src/test/debuginfo/function-arguments.rs1
-rw-r--r--src/test/debuginfo/function-prologue-stepping-no-stack-check.rs1
-rw-r--r--src/test/debuginfo/function-prologue-stepping-regular.rs1
-rw-r--r--src/test/debuginfo/generic-enum-with-different-disr-sizes.rs1
-rw-r--r--src/test/debuginfo/generic-function.rs1
-rw-r--r--src/test/debuginfo/generic-functions-nested.rs1
-rw-r--r--src/test/debuginfo/generic-method-on-generic-struct.rs1
-rw-r--r--src/test/debuginfo/generic-static-method-on-struct-and-enum.rs1
-rw-r--r--src/test/debuginfo/generic-struct-style-enum.rs1
-rw-r--r--src/test/debuginfo/generic-struct.rs1
-rw-r--r--src/test/debuginfo/generic-tuple-style-enum.rs1
-rw-r--r--src/test/debuginfo/include_string.rs1
-rw-r--r--src/test/debuginfo/issue12886.rs3
-rw-r--r--src/test/debuginfo/issue22656.rs1
-rw-r--r--src/test/debuginfo/lexical-scope-in-for-loop.rs1
-rw-r--r--src/test/debuginfo/lexical-scope-in-if.rs1
-rw-r--r--src/test/debuginfo/lexical-scope-in-match.rs1
-rw-r--r--src/test/debuginfo/lexical-scope-in-stack-closure.rs1
-rw-r--r--src/test/debuginfo/lexical-scope-in-unconditional-loop.rs1
-rw-r--r--src/test/debuginfo/lexical-scope-in-unique-closure.rs1
-rw-r--r--src/test/debuginfo/lexical-scope-in-while.rs1
-rw-r--r--src/test/debuginfo/lexical-scope-with-macro.rs1
-rw-r--r--src/test/debuginfo/lexical-scopes-in-block-expression.rs1
-rw-r--r--src/test/debuginfo/limited-debuginfo.rs1
-rw-r--r--src/test/debuginfo/method-on-enum.rs1
-rw-r--r--src/test/debuginfo/method-on-generic-struct.rs1
-rw-r--r--src/test/debuginfo/method-on-struct.rs1
-rw-r--r--src/test/debuginfo/method-on-trait.rs1
-rw-r--r--src/test/debuginfo/method-on-tuple-struct.rs1
-rw-r--r--src/test/debuginfo/multiple-functions-equal-var-names.rs1
-rw-r--r--src/test/debuginfo/multiple-functions.rs1
-rw-r--r--src/test/debuginfo/name-shadowing-and-scope-nesting.rs1
-rw-r--r--src/test/debuginfo/nil-enum.rs1
-rw-r--r--src/test/debuginfo/no-debug-attribute.rs2
-rw-r--r--src/test/debuginfo/option-like-enum.rs1
-rw-r--r--src/test/debuginfo/packed-struct-with-destructor.rs1
-rw-r--r--src/test/debuginfo/packed-struct.rs1
-rw-r--r--src/test/debuginfo/recursive-enum.rs1
-rw-r--r--src/test/debuginfo/recursive-struct.rs1
-rw-r--r--src/test/debuginfo/self-in-default-method.rs1
-rw-r--r--src/test/debuginfo/self-in-generic-default-method.rs1
-rw-r--r--src/test/debuginfo/shadowed-argument.rs1
-rw-r--r--src/test/debuginfo/shadowed-variable.rs1
-rw-r--r--src/test/debuginfo/simd.rs1
-rw-r--r--src/test/debuginfo/simple-lexical-scope.rs1
-rw-r--r--src/test/debuginfo/simple-struct.rs1
-rw-r--r--src/test/debuginfo/simple-tuple.rs1
-rw-r--r--src/test/debuginfo/static-method-on-struct-and-enum.rs1
-rw-r--r--src/test/debuginfo/struct-in-enum.rs1
-rw-r--r--src/test/debuginfo/struct-in-struct.rs1
-rw-r--r--src/test/debuginfo/struct-style-enum.rs1
-rw-r--r--src/test/debuginfo/struct-with-destructor.rs1
-rw-r--r--src/test/debuginfo/trait-pointers.rs1
-rw-r--r--src/test/debuginfo/tuple-in-struct.rs1
-rw-r--r--src/test/debuginfo/tuple-in-tuple.rs1
-rw-r--r--src/test/debuginfo/tuple-struct.rs1
-rw-r--r--src/test/debuginfo/tuple-style-enum.rs1
-rw-r--r--src/test/debuginfo/type-names.rs1
-rw-r--r--src/test/debuginfo/unique-enum.rs1
-rw-r--r--src/test/debuginfo/unreachable-locals.rs1
-rw-r--r--src/test/debuginfo/var-captured-in-nested-closure.rs1
-rw-r--r--src/test/debuginfo/var-captured-in-sendable-closure.rs1
-rw-r--r--src/test/debuginfo/var-captured-in-stack-closure.rs1
-rw-r--r--src/test/debuginfo/vec-slices.rs1
-rw-r--r--src/test/debuginfo/vec.rs1
102 files changed, 215 insertions, 67 deletions
diff --git a/src/doc/trpl/choosing-your-guarantees.md b/src/doc/trpl/choosing-your-guarantees.md
index b86ad47feb2..f53ece1f2a7 100644
--- a/src/doc/trpl/choosing-your-guarantees.md
+++ b/src/doc/trpl/choosing-your-guarantees.md
@@ -321,7 +321,7 @@ there's a lot of concurrent access happening.
 
 # Composition
 
-A common gripe when reading Rust code is with types like `Rc<RefCell<Vec<T>>>` (or even more more
+A common gripe when reading Rust code is with types like `Rc<RefCell<Vec<T>>>` (or even more
 complicated compositions of such types). It's not always clear what the composition does, or why the
 author chose one like this (and when one should be using such a composition in one's own code)
 
diff --git a/src/doc/trpl/concurrency.md b/src/doc/trpl/concurrency.md
index e00fe75013e..7028bade6de 100644
--- a/src/doc/trpl/concurrency.md
+++ b/src/doc/trpl/concurrency.md
@@ -26,8 +26,8 @@ to help us make sense of code that can possibly be concurrent.
 ### `Send`
 
 The first trait we're going to talk about is
-[`Send`](../std/marker/trait.Send.html). When a type `T` implements `Send`, it indicates
-to the compiler that something of this type is able to have ownership transferred
+[`Send`](../std/marker/trait.Send.html). When a type `T` implements `Send`, it
+indicates that something of this type is able to have ownership transferred
 safely between threads.
 
 This is important to enforce certain restrictions. For example, if we have a
@@ -42,13 +42,19 @@ us enforce that it can't leave the current thread.
 ### `Sync`
 
 The second of these traits is called [`Sync`](../std/marker/trait.Sync.html).
-When a type `T` implements `Sync`, it indicates to the compiler that something
+When a type `T` implements `Sync`, it indicates that something
 of this type has no possibility of introducing memory unsafety when used from
-multiple threads concurrently.
-
-For example, sharing immutable data with an atomic reference count is
-threadsafe. Rust provides a type like this, `Arc<T>`, and it implements `Sync`,
-so it is safe to share between threads.
+multiple threads concurrently through shared references. This implies that
+types which don't have [interior mutability](mutability.html) are inherently
+`Sync`, which includes simple primitive types (like `u8`) and aggregate types
+containing them.
+
+For sharing references across threads, Rust provides a wrapper type called
+`Arc<T>`. `Arc<T>` implements `Send` and `Sync` if and only if `T` implements
+both `Send` and `Sync`. For example, an object of type `Arc<RefCell<U>>` cannot
+be transferred across threads because
+[`RefCell`](choosing-your-guarantees.html#refcell%3Ct%3E) does not implement
+`Sync`, consequently `Arc<RefCell<U>>` would not implement `Send`.
 
 These two traits allow you to use the type system to make strong guarantees
 about the properties of your code under concurrency. Before we demonstrate
@@ -70,7 +76,7 @@ fn main() {
 }
 ```
 
-The `thread::spawn()` method accepts a closure, which is executed in a
+The `thread::spawn()` method accepts a [closure](closures.html), which is executed in a
 new thread. It returns a handle to the thread, that can be used to
 wait for the child thread to finish and extract its result:
 
@@ -215,29 +221,18 @@ fn main() {
 }
 ```
 
+Note that the value of `i` is bound (copied) to the closure and not shared
+among the threads.
 
-If we'd tried to use `Mutex<T>` without wrapping it in an `Arc<T>` we would have
-seen another error like:
-
-```text
-error: the trait `core::marker::Send` is not implemented for the type `std::sync::mutex::MutexGuard<'_, collections::vec::Vec<u32>>` [E0277]
- thread::spawn(move || {
-                  ^~~~~~~~~~~~~
-note: `std::sync::mutex::MutexGuard<'_, collections::vec::Vec<u32>>` cannot be sent between threads safely
- thread::spawn(move || {
-                  ^~~~~~~~~~~~~
-```
-
-You see, [`Mutex`](../std/sync/struct.Mutex.html) has a
-[`lock`](../std/sync/struct.Mutex.html#method.lock)
-method which has this signature:
+Also note that [`lock`](../std/sync/struct.Mutex.html#method.lock) method of
+[`Mutex`](../std/sync/struct.Mutex.html) has this signature:
 
 ```ignore
 fn lock(&self) -> LockResult<MutexGuard<T>>
 ```
 
-and because `Send` is not implemented for `MutexGuard<T>`, we couldn't have
-transferred the guard across thread boundaries on it's own.
+and because `Send` is not implemented for `MutexGuard<T>`, the guard cannot
+cross thread boundaries, ensuring thread-locality of lock acquire and release.
 
 Let's examine the body of the thread more closely:
 
@@ -317,22 +312,24 @@ use std::sync::mpsc;
 fn main() {
     let (tx, rx) = mpsc::channel();
 
-    for _ in 0..10 {
+    for i in 0..10 {
         let tx = tx.clone();
 
         thread::spawn(move || {
-            let answer = 42;
+            let answer = i * i;
 
             tx.send(answer);
         });
     }
 
-   rx.recv().ok().expect("Could not receive answer");
+    for _ in 0..10 {
+        println!("{}", rx.recv().unwrap());
+    }
 }
 ```
 
-A `u32` is `Send` because we can make a copy. So we create a thread, ask it to calculate
-the answer, and then it `send()`s us the answer over the channel.
+Here we create 10 threads, asking each to calculate the square of a number (`i`
+at the time of `spawn()`), and then `send()` back the answer over the channel.
 
 
 ## Panics
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs
index 19c880905ae..93c8b2ab0f1 100644
--- a/src/librustc/diagnostics.rs
+++ b/src/librustc/diagnostics.rs
@@ -298,10 +298,18 @@ const FOO: i32 = { 0 }; // but brackets are useless here
 ```
 "##,
 
+// FIXME(#24111) Change the language here when const fn stabilizes
 E0015: r##"
 The only functions that can be called in static or constant expressions are
-`const` functions. Rust currently does not support more general compile-time
-function execution.
+`const` functions, and struct/enum constructors. `const` functions are only
+available on a nightly compiler. Rust currently does not support more general
+compile-time function execution.
+
+```
+const FOO: Option<u8> = Some(1); // enum constructor
+struct Bar {x: u8}
+const BAR: Bar = Bar {x: 1}; // struct constructor
+```
 
 See [RFC 911] for more details on the design of `const fn`s.
 
diff --git a/src/librustc/middle/check_const.rs b/src/librustc/middle/check_const.rs
index 7da2c8f1492..f7bfb6e8a40 100644
--- a/src/librustc/middle/check_const.rs
+++ b/src/librustc/middle/check_const.rs
@@ -39,6 +39,7 @@ use util::nodemap::NodeMap;
 use rustc_front::hir;
 use syntax::ast;
 use syntax::codemap::Span;
+use syntax::feature_gate::UnstableFeatures;
 use rustc_front::visit::{self, FnKind, Visitor};
 
 use std::collections::hash_map::Entry;
@@ -709,10 +710,21 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
             if !is_const {
                 v.add_qualif(ConstQualif::NOT_CONST);
                 if v.mode != Mode::Var {
-                    span_err!(v.tcx.sess, e.span, E0015,
-                              "function calls in {}s are limited to \
-                               constant functions, \
-                               struct and enum constructors", v.msg());
+                    // FIXME(#24111) Remove this check when const fn stabilizes
+                    if let UnstableFeatures::Disallow = v.tcx.sess.opts.unstable_features {
+                        span_err!(v.tcx.sess, e.span, E0015,
+                                  "function calls in {}s are limited to \
+                                   struct and enum constructors", v.msg());
+                        v.tcx.sess.span_note(e.span,
+                                             "a limited form of compile-time function \
+                                              evaluation is available on a nightly \
+                                              compiler via `const fn`");
+                    } else {
+                        span_err!(v.tcx.sess, e.span, E0015,
+                                  "function calls in {}s are limited to \
+                                   constant functions, \
+                                   struct and enum constructors", v.msg());
+                    }
                 }
             }
         }
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 1991124ae26..ffbb7edd385 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -684,15 +684,15 @@ fn contains_macro_use(fld: &mut MacroExpander, attrs: &[ast::Attribute]) -> bool
 // logic as for expression-position macro invocations.
 pub fn expand_item_mac(it: P<ast::Item>,
                        fld: &mut MacroExpander) -> SmallVector<P<ast::Item>> {
-    let (extname, path_span, tts) = match it.node {
+    let (extname, path_span, tts, span, attrs, ident) = it.and_then(|it| { match it.node {
         ItemMac(codemap::Spanned {
-            node: MacInvocTT(ref pth, ref tts, _),
+            node: MacInvocTT(pth, tts, _),
             ..
         }) => {
-            (pth.segments[0].identifier.name, pth.span, (*tts).clone())
+            (pth.segments[0].identifier.name, pth.span, tts, it.span, it.attrs, it.ident)
         }
         _ => fld.cx.span_bug(it.span, "invalid item macro invocation")
-    };
+    }});
 
     let fm = fresh_mark();
     let items = {
@@ -706,48 +706,48 @@ pub fn expand_item_mac(it: P<ast::Item>,
             }
 
             Some(rc) => match *rc {
-                NormalTT(ref expander, span, allow_internal_unstable) => {
-                    if it.ident.name != parse::token::special_idents::invalid.name {
+                NormalTT(ref expander, tt_span, allow_internal_unstable) => {
+                    if ident.name != parse::token::special_idents::invalid.name {
                         fld.cx
                             .span_err(path_span,
                                       &format!("macro {}! expects no ident argument, given '{}'",
                                                extname,
-                                               it.ident));
+                                               ident));
                         return SmallVector::zero();
                     }
                     fld.cx.bt_push(ExpnInfo {
-                        call_site: it.span,
+                        call_site: span,
                         callee: NameAndSpan {
                             format: MacroBang(extname),
-                            span: span,
+                            span: tt_span,
                             allow_internal_unstable: allow_internal_unstable,
                         }
                     });
                     // mark before expansion:
                     let marked_before = mark_tts(&tts[..], fm);
-                    expander.expand(fld.cx, it.span, &marked_before[..])
+                    expander.expand(fld.cx, span, &marked_before[..])
                 }
-                IdentTT(ref expander, span, allow_internal_unstable) => {
-                    if it.ident.name == parse::token::special_idents::invalid.name {
+                IdentTT(ref expander, tt_span, allow_internal_unstable) => {
+                    if ident.name == parse::token::special_idents::invalid.name {
                         fld.cx.span_err(path_span,
                                         &format!("macro {}! expects an ident argument",
                                                 extname));
                         return SmallVector::zero();
                     }
                     fld.cx.bt_push(ExpnInfo {
-                        call_site: it.span,
+                        call_site: span,
                         callee: NameAndSpan {
                             format: MacroBang(extname),
-                            span: span,
+                            span: tt_span,
                             allow_internal_unstable: allow_internal_unstable,
                         }
                     });
                     // mark before expansion:
                     let marked_tts = mark_tts(&tts[..], fm);
-                    expander.expand(fld.cx, it.span, it.ident, marked_tts)
+                    expander.expand(fld.cx, span, ident, marked_tts)
                 }
                 MacroRulesTT => {
-                    if it.ident.name == parse::token::special_idents::invalid.name {
+                    if ident.name == parse::token::special_idents::invalid.name {
                         fld.cx.span_err(path_span,
                                         &format!("macro_rules! expects an ident argument")
                                         );
@@ -755,7 +755,7 @@ pub fn expand_item_mac(it: P<ast::Item>,
                     }
 
                     fld.cx.bt_push(ExpnInfo {
-                        call_site: it.span,
+                        call_site: span,
                         callee: NameAndSpan {
                             format: MacroBang(extname),
                             span: None,
@@ -767,7 +767,7 @@ pub fn expand_item_mac(it: P<ast::Item>,
                     });
                     // DON'T mark before expansion.
 
-                    let allow_internal_unstable = attr::contains_name(&it.attrs,
+                    let allow_internal_unstable = attr::contains_name(&attrs,
                                                                       "allow_internal_unstable");
 
                     // ensure any #[allow_internal_unstable]s are
@@ -777,18 +777,19 @@ pub fn expand_item_mac(it: P<ast::Item>,
                         feature_gate::emit_feature_err(
                             &fld.cx.parse_sess.span_diagnostic,
                             "allow_internal_unstable",
-                            it.span,
+                            span,
                             feature_gate::GateIssue::Language,
                             feature_gate::EXPLAIN_ALLOW_INTERNAL_UNSTABLE)
                     }
 
+                    let export = attr::contains_name(&attrs, "macro_export");
                     let def = ast::MacroDef {
-                        ident: it.ident,
-                        attrs: it.attrs.clone(),
+                        ident: ident,
+                        attrs: attrs,
                         id: ast::DUMMY_NODE_ID,
-                        span: it.span,
+                        span: span,
                         imported_from: None,
-                        export: attr::contains_name(&it.attrs, "macro_export"),
+                        export: export,
                         use_locally: true,
                         allow_internal_unstable: allow_internal_unstable,
                         body: tts,
@@ -800,7 +801,7 @@ pub fn expand_item_mac(it: P<ast::Item>,
                     return SmallVector::zero();
                 }
                 _ => {
-                    fld.cx.span_err(it.span,
+                    fld.cx.span_err(span,
                                     &format!("{}! is not legal in item position",
                                             extname));
                     return SmallVector::zero();
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 1e9b244c57c..16d44e5046c 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -197,6 +197,12 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status
 
     // allow overloading augmented assignment operations like `a += b`
     ("augmented_assignments", "1.5.0", None, Active),
+
+    // allow `#[no_debug]`
+    ("no_debug", "1.5.0", None, Active),
+
+    // allow `#[omit_gdb_pretty_printer_section]`
+    ("omit_gdb_pretty_printer_section", "1.5.0", None, Active),
 ];
 // (changing above list without updating src/doc/reference.md makes @cmr sad)
 
@@ -320,8 +326,13 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat
     ("link_section", Whitelisted, Ungated),
     ("no_builtins", Whitelisted, Ungated),
     ("no_mangle", Whitelisted, Ungated),
-    ("no_debug", Whitelisted, Ungated),
-    ("omit_gdb_pretty_printer_section", Whitelisted, Ungated),
+    ("no_debug", Whitelisted, Gated("no_debug",
+                                    "the `#[no_debug]` attribute \
+                                     is an experimental feature")),
+    ("omit_gdb_pretty_printer_section", Whitelisted, Gated("omit_gdb_pretty_printer_section",
+                                                       "the `#[omit_gdb_pretty_printer_section]` \
+                                                        attribute is just used for the Rust test \
+                                                        suite")),
     ("unsafe_no_drop_flag", Whitelisted, Gated("unsafe_no_drop_flag",
                                                "unsafe_no_drop_flag has unstable semantics \
                                                 and may be removed in the future")),
diff --git a/src/test/auxiliary/cross_crate_spans.rs b/src/test/auxiliary/cross_crate_spans.rs
index d9be03c094c..9b6b6221bda 100644
--- a/src/test/auxiliary/cross_crate_spans.rs
+++ b/src/test/auxiliary/cross_crate_spans.rs
@@ -11,6 +11,7 @@
 #![crate_type = "rlib"]
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 // no-prefer-dynamic
diff --git a/src/test/compile-fail/feature-gate-no-debug.rs b/src/test/compile-fail/feature-gate-no-debug.rs
new file mode 100644
index 00000000000..e185056026c
--- /dev/null
+++ b/src/test/compile-fail/feature-gate-no-debug.rs
@@ -0,0 +1,12 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[no_debug] //~ ERROR the `#[no_debug]` attribute is
+fn main() {}
diff --git a/src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs b/src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs
new file mode 100644
index 00000000000..a837a7f213e
--- /dev/null
+++ b/src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs
@@ -0,0 +1,12 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is
+fn main() {}
diff --git a/src/test/debuginfo/associated-types.rs b/src/test/debuginfo/associated-types.rs
index d203806c08d..ebaad663bb4 100644
--- a/src/test/debuginfo/associated-types.rs
+++ b/src/test/debuginfo/associated-types.rs
@@ -80,6 +80,7 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 trait TraitWithAssocType {
diff --git a/src/test/debuginfo/basic-types-globals-metadata.rs b/src/test/debuginfo/basic-types-globals-metadata.rs
index 1aabd549ca5..8818063ddf4 100644
--- a/src/test/debuginfo/basic-types-globals-metadata.rs
+++ b/src/test/debuginfo/basic-types-globals-metadata.rs
@@ -44,6 +44,7 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 // N.B. These are `mut` only so they don't constant fold away.
diff --git a/src/test/debuginfo/basic-types-globals.rs b/src/test/debuginfo/basic-types-globals.rs
index f0c187fd223..ccf9508a385 100644
--- a/src/test/debuginfo/basic-types-globals.rs
+++ b/src/test/debuginfo/basic-types-globals.rs
@@ -49,6 +49,7 @@
 // gdb-command:continue
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 // N.B. These are `mut` only so they don't constant fold away.
diff --git a/src/test/debuginfo/basic-types-metadata.rs b/src/test/debuginfo/basic-types-metadata.rs
index 3b662ae0264..1a6b605d9d0 100644
--- a/src/test/debuginfo/basic-types-metadata.rs
+++ b/src/test/debuginfo/basic-types-metadata.rs
@@ -64,6 +64,7 @@
 // gdb-command:continue
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/basic-types-mut-globals.rs b/src/test/debuginfo/basic-types-mut-globals.rs
index 4094c2e9b13..4ebd0c95770 100644
--- a/src/test/debuginfo/basic-types-mut-globals.rs
+++ b/src/test/debuginfo/basic-types-mut-globals.rs
@@ -82,6 +82,7 @@
 // gdb-check:$28 = 9.25
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 static mut B: bool = false;
diff --git a/src/test/debuginfo/basic-types.rs b/src/test/debuginfo/basic-types.rs
index c9144b18b2f..99801083288 100644
--- a/src/test/debuginfo/basic-types.rs
+++ b/src/test/debuginfo/basic-types.rs
@@ -87,6 +87,7 @@
 // lldb-check:[...]$12 = 3.5
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/borrowed-basic.rs b/src/test/debuginfo/borrowed-basic.rs
index b0f06bb8a75..bada77b6629 100644
--- a/src/test/debuginfo/borrowed-basic.rs
+++ b/src/test/debuginfo/borrowed-basic.rs
@@ -108,6 +108,7 @@
 // lldb-check:[...]$12 = 3.5
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/borrowed-c-style-enum.rs b/src/test/debuginfo/borrowed-c-style-enum.rs
index ecc70f4d77e..c80783ef310 100644
--- a/src/test/debuginfo/borrowed-c-style-enum.rs
+++ b/src/test/debuginfo/borrowed-c-style-enum.rs
@@ -40,6 +40,7 @@
 // lldb-check:[...]$2 = TheC
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 enum ABC { TheA, TheB, TheC }
diff --git a/src/test/debuginfo/borrowed-enum.rs b/src/test/debuginfo/borrowed-enum.rs
index 732383b5e40..b21574e3286 100644
--- a/src/test/debuginfo/borrowed-enum.rs
+++ b/src/test/debuginfo/borrowed-enum.rs
@@ -39,6 +39,7 @@
 // lldb-check:[...]$2 = TheOnlyCase(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
diff --git a/src/test/debuginfo/borrowed-struct.rs b/src/test/debuginfo/borrowed-struct.rs
index 70c24fc2ab0..ab41185cb73 100644
--- a/src/test/debuginfo/borrowed-struct.rs
+++ b/src/test/debuginfo/borrowed-struct.rs
@@ -64,6 +64,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct SomeStruct {
diff --git a/src/test/debuginfo/borrowed-tuple.rs b/src/test/debuginfo/borrowed-tuple.rs
index add9bdceada..2438879dfb6 100644
--- a/src/test/debuginfo/borrowed-tuple.rs
+++ b/src/test/debuginfo/borrowed-tuple.rs
@@ -42,6 +42,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/borrowed-unique-basic.rs b/src/test/debuginfo/borrowed-unique-basic.rs
index d8ce3af4789..88af94c5362 100644
--- a/src/test/debuginfo/borrowed-unique-basic.rs
+++ b/src/test/debuginfo/borrowed-unique-basic.rs
@@ -112,6 +112,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/box.rs b/src/test/debuginfo/box.rs
index e5f4306b24b..a731e041d79 100644
--- a/src/test/debuginfo/box.rs
+++ b/src/test/debuginfo/box.rs
@@ -32,6 +32,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/boxed-struct.rs b/src/test/debuginfo/boxed-struct.rs
index 9c6e197e65e..dd543405e4c 100644
--- a/src/test/debuginfo/boxed-struct.rs
+++ b/src/test/debuginfo/boxed-struct.rs
@@ -35,6 +35,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct StructWithSomePadding {
diff --git a/src/test/debuginfo/by-value-non-immediate-argument.rs b/src/test/debuginfo/by-value-non-immediate-argument.rs
index 1e89d0e31b8..a329ef6d0e0 100644
--- a/src/test/debuginfo/by-value-non-immediate-argument.rs
+++ b/src/test/debuginfo/by-value-non-immediate-argument.rs
@@ -70,6 +70,7 @@
 // lldb-check:[...]$6 = Case1 { x: 0, y: 8970181431921507452 }
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Clone)]
diff --git a/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs b/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs
index 39da48f9e7a..a768bfdd167 100644
--- a/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs
+++ b/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs
@@ -45,6 +45,7 @@
 // lldb-check:[...]$2 = (4444.5, 5555, 6666, 7777.5)
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 trait Trait {
diff --git a/src/test/debuginfo/c-style-enum-in-composite.rs b/src/test/debuginfo/c-style-enum-in-composite.rs
index 562b0d588f5..83a22edc96f 100644
--- a/src/test/debuginfo/c-style-enum-in-composite.rs
+++ b/src/test/debuginfo/c-style-enum-in-composite.rs
@@ -64,6 +64,7 @@
 // lldb-check:[...]$6 = (StructWithDrop { a: OneHundred, b: Vienna }, 9)
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::AnEnum::{OneHundred, OneThousand, OneMillion};
diff --git a/src/test/debuginfo/c-style-enum.rs b/src/test/debuginfo/c-style-enum.rs
index 3024ca0fe69..4eec26d335c 100644
--- a/src/test/debuginfo/c-style-enum.rs
+++ b/src/test/debuginfo/c-style-enum.rs
@@ -99,6 +99,7 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::AutoDiscriminant::{One, Two, Three};
diff --git a/src/test/debuginfo/closure-in-generic-function.rs b/src/test/debuginfo/closure-in-generic-function.rs
index 448e157a251..5335e0bfa4a 100644
--- a/src/test/debuginfo/closure-in-generic-function.rs
+++ b/src/test/debuginfo/closure-in-generic-function.rs
@@ -46,6 +46,7 @@
 // lldb-command:continue
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) {
diff --git a/src/test/debuginfo/constant-debug-locs.rs b/src/test/debuginfo/constant-debug-locs.rs
index ec5a6fa3d3f..04e19b30fd4 100644
--- a/src/test/debuginfo/constant-debug-locs.rs
+++ b/src/test/debuginfo/constant-debug-locs.rs
@@ -13,6 +13,7 @@
 // compile-flags:-g
 
 #![allow(dead_code, unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 #![feature(const_fn)]
 #![feature(static_mutex)]
diff --git a/src/test/debuginfo/constant-in-match-pattern.rs b/src/test/debuginfo/constant-in-match-pattern.rs
index 785778e62f6..fb40400a442 100644
--- a/src/test/debuginfo/constant-in-match-pattern.rs
+++ b/src/test/debuginfo/constant-in-match-pattern.rs
@@ -13,6 +13,7 @@
 // compile-flags:-g
 
 #![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
diff --git a/src/test/debuginfo/cross-crate-spans.rs b/src/test/debuginfo/cross-crate-spans.rs
index ce6ef080c1f..544fe2c66d5 100644
--- a/src/test/debuginfo/cross-crate-spans.rs
+++ b/src/test/debuginfo/cross-crate-spans.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 // min-lldb-version: 310
@@ -20,7 +21,7 @@ extern crate cross_crate_spans;
 
 // === GDB TESTS ===================================================================================
 
-// gdb-command:break cross_crate_spans.rs:23
+// gdb-command:break cross_crate_spans.rs:24
 // gdb-command:run
 
 // gdb-command:print result
@@ -43,7 +44,7 @@ extern crate cross_crate_spans;
 
 // === LLDB TESTS ==================================================================================
 
-// lldb-command:b cross_crate_spans.rs:23
+// lldb-command:b cross_crate_spans.rs:24
 // lldb-command:run
 
 // lldb-command:print result
diff --git a/src/test/debuginfo/destructured-fn-argument.rs b/src/test/debuginfo/destructured-fn-argument.rs
index 5d330e16a13..a3a48b78616 100644
--- a/src/test/debuginfo/destructured-fn-argument.rs
+++ b/src/test/debuginfo/destructured-fn-argument.rs
@@ -312,6 +312,7 @@
 #![allow(unused_variables)]
 #![feature(box_patterns)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::Univariant::Unit;
diff --git a/src/test/debuginfo/destructured-for-loop-variable.rs b/src/test/debuginfo/destructured-for-loop-variable.rs
index ad04f97fb08..a34d5d6adbf 100644
--- a/src/test/debuginfo/destructured-for-loop-variable.rs
+++ b/src/test/debuginfo/destructured-for-loop-variable.rs
@@ -154,6 +154,7 @@
 #![allow(unused_variables)]
 #![feature(box_patterns)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Struct {
diff --git a/src/test/debuginfo/destructured-local.rs b/src/test/debuginfo/destructured-local.rs
index 632f17bd200..a73b5c8de11 100644
--- a/src/test/debuginfo/destructured-local.rs
+++ b/src/test/debuginfo/destructured-local.rs
@@ -245,6 +245,7 @@
 #![allow(unused_variables)]
 #![feature(box_patterns)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::Univariant::Unit;
diff --git a/src/test/debuginfo/evec-in-struct.rs b/src/test/debuginfo/evec-in-struct.rs
index 1a9b9f73cba..8624a0cba02 100644
--- a/src/test/debuginfo/evec-in-struct.rs
+++ b/src/test/debuginfo/evec-in-struct.rs
@@ -50,6 +50,7 @@
 // lldb-check:[...]$4 = StructPaddedAtEnd { x: [22, 23], y: [24, 25] }
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct NoPadding1 {
diff --git a/src/test/debuginfo/extern-c-fn.rs b/src/test/debuginfo/extern-c-fn.rs
index 9e73417e7de..c93db41dc55 100644
--- a/src/test/debuginfo/extern-c-fn.rs
+++ b/src/test/debuginfo/extern-c-fn.rs
@@ -44,6 +44,7 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 
diff --git a/src/test/debuginfo/function-arg-initialization.rs b/src/test/debuginfo/function-arg-initialization.rs
index a1ca59caa33..d007b507556 100644
--- a/src/test/debuginfo/function-arg-initialization.rs
+++ b/src/test/debuginfo/function-arg-initialization.rs
@@ -224,6 +224,7 @@
 
 
 #![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/src/test/debuginfo/function-arguments.rs b/src/test/debuginfo/function-arguments.rs
index 21c2cc09a9f..c8f2e385a6e 100644
--- a/src/test/debuginfo/function-arguments.rs
+++ b/src/test/debuginfo/function-arguments.rs
@@ -45,6 +45,7 @@
 // lldb-command:continue
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/function-prologue-stepping-no-stack-check.rs b/src/test/debuginfo/function-prologue-stepping-no-stack-check.rs
index d9cca5eb315..b5b6ca75727 100644
--- a/src/test/debuginfo/function-prologue-stepping-no-stack-check.rs
+++ b/src/test/debuginfo/function-prologue-stepping-no-stack-check.rs
@@ -247,6 +247,7 @@
 // lldb-command:continue
 
 #![allow(dead_code, unused_assignments, unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[no_stack_check]
diff --git a/src/test/debuginfo/function-prologue-stepping-regular.rs b/src/test/debuginfo/function-prologue-stepping-regular.rs
index b34f1af01f5..529a8cd635a 100644
--- a/src/test/debuginfo/function-prologue-stepping-regular.rs
+++ b/src/test/debuginfo/function-prologue-stepping-regular.rs
@@ -126,6 +126,7 @@
 // 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/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
index ae290e228cc..3115b3f7e76 100644
--- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
+++ b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
@@ -62,6 +62,7 @@
 
 #![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
diff --git a/src/test/debuginfo/generic-function.rs b/src/test/debuginfo/generic-function.rs
index 890133c58c8..415dd36212a 100644
--- a/src/test/debuginfo/generic-function.rs
+++ b/src/test/debuginfo/generic-function.rs
@@ -69,6 +69,7 @@
 // lldb-check:[...]$8 = ((5, Struct { a: 6, b: 7.5 }), (Struct { a: 6, b: 7.5 }, 5))
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Clone)]
diff --git a/src/test/debuginfo/generic-functions-nested.rs b/src/test/debuginfo/generic-functions-nested.rs
index 5f9236038b2..79ae007a500 100644
--- a/src/test/debuginfo/generic-functions-nested.rs
+++ b/src/test/debuginfo/generic-functions-nested.rs
@@ -70,6 +70,7 @@
 // lldb-command:continue
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn outer<TA: Clone>(a: TA) {
diff --git a/src/test/debuginfo/generic-method-on-generic-struct.rs b/src/test/debuginfo/generic-method-on-generic-struct.rs
index 14df15242df..968cb2e1597 100644
--- a/src/test/debuginfo/generic-method-on-generic-struct.rs
+++ b/src/test/debuginfo/generic-method-on-generic-struct.rs
@@ -112,6 +112,7 @@
 // lldb-command:continue
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Copy, Clone)]
diff --git a/src/test/debuginfo/generic-static-method-on-struct-and-enum.rs b/src/test/debuginfo/generic-static-method-on-struct-and-enum.rs
index f24b221ccec..603365089ec 100644
--- a/src/test/debuginfo/generic-static-method-on-struct-and-enum.rs
+++ b/src/test/debuginfo/generic-static-method-on-struct-and-enum.rs
@@ -31,6 +31,7 @@
 // gdb-command:continue
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Struct {
diff --git a/src/test/debuginfo/generic-struct-style-enum.rs b/src/test/debuginfo/generic-struct-style-enum.rs
index caed4bd181d..991404f56ef 100644
--- a/src/test/debuginfo/generic-struct-style-enum.rs
+++ b/src/test/debuginfo/generic-struct-style-enum.rs
@@ -29,6 +29,7 @@
 // gdb-check:$4 = {{a = -1}}
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::Regular::{Case1, Case2, Case3};
diff --git a/src/test/debuginfo/generic-struct.rs b/src/test/debuginfo/generic-struct.rs
index a459badfa8a..92a67a2344d 100644
--- a/src/test/debuginfo/generic-struct.rs
+++ b/src/test/debuginfo/generic-struct.rs
@@ -41,6 +41,7 @@
 // lldb-check:[...]$3 = AGenericStruct<f64, generic_struct::AGenericStruct<i32, f64>> { key: 6.5, value: AGenericStruct<i32, f64> { key: 7, value: 8.5 } }
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct AGenericStruct<TKey, TValue> {
diff --git a/src/test/debuginfo/generic-tuple-style-enum.rs b/src/test/debuginfo/generic-tuple-style-enum.rs
index 83340c83dc0..e2727fbe7df 100644
--- a/src/test/debuginfo/generic-tuple-style-enum.rs
+++ b/src/test/debuginfo/generic-tuple-style-enum.rs
@@ -47,6 +47,7 @@
 // lldb-command:print univariant
 // lldb-check:[...]$3 = TheOnlyCase(-1)
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::Regular::{Case1, Case2, Case3};
diff --git a/src/test/debuginfo/include_string.rs b/src/test/debuginfo/include_string.rs
index 1dead6c2734..2c75349e5c8 100644
--- a/src/test/debuginfo/include_string.rs
+++ b/src/test/debuginfo/include_string.rs
@@ -35,6 +35,7 @@
 // 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
diff --git a/src/test/debuginfo/issue12886.rs b/src/test/debuginfo/issue12886.rs
index b259efc9caf..c30ee92dc53 100644
--- a/src/test/debuginfo/issue12886.rs
+++ b/src/test/debuginfo/issue12886.rs
@@ -16,9 +16,10 @@
 
 // gdb-command:run
 // gdb-command:next
-// gdb-check:[...]34[...]s
+// gdb-check:[...]35[...]s
 // 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/src/test/debuginfo/issue22656.rs b/src/test/debuginfo/issue22656.rs
index af518797d19..a971e06ed5e 100644
--- a/src/test/debuginfo/issue22656.rs
+++ b/src/test/debuginfo/issue22656.rs
@@ -30,6 +30,7 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct ZeroSizedStruct;
diff --git a/src/test/debuginfo/lexical-scope-in-for-loop.rs b/src/test/debuginfo/lexical-scope-in-for-loop.rs
index dceb436310f..e99e241411b 100644
--- a/src/test/debuginfo/lexical-scope-in-for-loop.rs
+++ b/src/test/debuginfo/lexical-scope-in-for-loop.rs
@@ -85,6 +85,7 @@
 // lldb-check:[...]$6 = 1000000
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/lexical-scope-in-if.rs b/src/test/debuginfo/lexical-scope-in-if.rs
index 08a762fc4e5..42e288321e1 100644
--- a/src/test/debuginfo/lexical-scope-in-if.rs
+++ b/src/test/debuginfo/lexical-scope-in-if.rs
@@ -133,6 +133,7 @@
 // lldb-check:[...]$15 = -1
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/lexical-scope-in-match.rs b/src/test/debuginfo/lexical-scope-in-match.rs
index 228799848c6..597d9837aad 100644
--- a/src/test/debuginfo/lexical-scope-in-match.rs
+++ b/src/test/debuginfo/lexical-scope-in-match.rs
@@ -125,6 +125,7 @@
 // lldb-check:[...]$17 = 232
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Struct {
diff --git a/src/test/debuginfo/lexical-scope-in-stack-closure.rs b/src/test/debuginfo/lexical-scope-in-stack-closure.rs
index c0b65fbb22b..0a8d3b61a8d 100644
--- a/src/test/debuginfo/lexical-scope-in-stack-closure.rs
+++ b/src/test/debuginfo/lexical-scope-in-stack-closure.rs
@@ -69,6 +69,7 @@
 // lldb-check:[...]$5 = false
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs b/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs
index 868cea29a7b..e55088afd7d 100644
--- a/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs
+++ b/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs
@@ -131,6 +131,7 @@
 // lldb-check:[...]$12 = 2
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/lexical-scope-in-unique-closure.rs b/src/test/debuginfo/lexical-scope-in-unique-closure.rs
index 5bae2aa7ae2..70dece865ec 100644
--- a/src/test/debuginfo/lexical-scope-in-unique-closure.rs
+++ b/src/test/debuginfo/lexical-scope-in-unique-closure.rs
@@ -70,6 +70,7 @@
 // lldb-command:continue
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/lexical-scope-in-while.rs b/src/test/debuginfo/lexical-scope-in-while.rs
index b5f43e7d21f..38d8b75a644 100644
--- a/src/test/debuginfo/lexical-scope-in-while.rs
+++ b/src/test/debuginfo/lexical-scope-in-while.rs
@@ -131,6 +131,7 @@
 // lldb-check:[...]$12 = 2
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/lexical-scope-with-macro.rs b/src/test/debuginfo/lexical-scope-with-macro.rs
index 1dd738c6d51..a00d0f74f1e 100644
--- a/src/test/debuginfo/lexical-scope-with-macro.rs
+++ b/src/test/debuginfo/lexical-scope-with-macro.rs
@@ -110,6 +110,7 @@
 // lldb-command:continue
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 macro_rules! trivial {
diff --git a/src/test/debuginfo/lexical-scopes-in-block-expression.rs b/src/test/debuginfo/lexical-scopes-in-block-expression.rs
index 1d406af10a2..841786f930d 100644
--- a/src/test/debuginfo/lexical-scopes-in-block-expression.rs
+++ b/src/test/debuginfo/lexical-scopes-in-block-expression.rs
@@ -348,6 +348,7 @@
 
 #![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/src/test/debuginfo/limited-debuginfo.rs b/src/test/debuginfo/limited-debuginfo.rs
index ea7d150164d..3d21def3953 100644
--- a/src/test/debuginfo/limited-debuginfo.rs
+++ b/src/test/debuginfo/limited-debuginfo.rs
@@ -29,6 +29,7 @@
 
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Struct {
diff --git a/src/test/debuginfo/method-on-enum.rs b/src/test/debuginfo/method-on-enum.rs
index 77a11db8ba4..6437b3bb900 100644
--- a/src/test/debuginfo/method-on-enum.rs
+++ b/src/test/debuginfo/method-on-enum.rs
@@ -113,6 +113,7 @@
 // lldb-command:continue
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Copy, Clone)]
diff --git a/src/test/debuginfo/method-on-generic-struct.rs b/src/test/debuginfo/method-on-generic-struct.rs
index f76f8c8cad2..5b697f859d4 100644
--- a/src/test/debuginfo/method-on-generic-struct.rs
+++ b/src/test/debuginfo/method-on-generic-struct.rs
@@ -113,6 +113,7 @@
 
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Copy, Clone)]
diff --git a/src/test/debuginfo/method-on-struct.rs b/src/test/debuginfo/method-on-struct.rs
index 28885d0ad9b..3bf2e775e77 100644
--- a/src/test/debuginfo/method-on-struct.rs
+++ b/src/test/debuginfo/method-on-struct.rs
@@ -113,6 +113,7 @@
 
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Copy, Clone)]
diff --git a/src/test/debuginfo/method-on-trait.rs b/src/test/debuginfo/method-on-trait.rs
index b69a3856736..5ce4a7905a1 100644
--- a/src/test/debuginfo/method-on-trait.rs
+++ b/src/test/debuginfo/method-on-trait.rs
@@ -113,6 +113,7 @@
 
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Copy, Clone)]
diff --git a/src/test/debuginfo/method-on-tuple-struct.rs b/src/test/debuginfo/method-on-tuple-struct.rs
index 4ea0fd44475..d8644a3934f 100644
--- a/src/test/debuginfo/method-on-tuple-struct.rs
+++ b/src/test/debuginfo/method-on-tuple-struct.rs
@@ -113,6 +113,7 @@
 
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Copy, Clone)]
diff --git a/src/test/debuginfo/multiple-functions-equal-var-names.rs b/src/test/debuginfo/multiple-functions-equal-var-names.rs
index 5fe0c13e5e4..71ba1bcea30 100644
--- a/src/test/debuginfo/multiple-functions-equal-var-names.rs
+++ b/src/test/debuginfo/multiple-functions-equal-var-names.rs
@@ -44,6 +44,7 @@
 // lldb-check:[...]$2 = 30303
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn function_one() {
diff --git a/src/test/debuginfo/multiple-functions.rs b/src/test/debuginfo/multiple-functions.rs
index 3179a8050d3..7a1b7b19d9f 100644
--- a/src/test/debuginfo/multiple-functions.rs
+++ b/src/test/debuginfo/multiple-functions.rs
@@ -44,6 +44,7 @@
 // lldb-check:[...]$2 = 30303
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn function_one() {
diff --git a/src/test/debuginfo/name-shadowing-and-scope-nesting.rs b/src/test/debuginfo/name-shadowing-and-scope-nesting.rs
index 5553d7e496b..462e1c59aea 100644
--- a/src/test/debuginfo/name-shadowing-and-scope-nesting.rs
+++ b/src/test/debuginfo/name-shadowing-and-scope-nesting.rs
@@ -93,6 +93,7 @@
 // lldb-check:[...]$11 = 20
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/nil-enum.rs b/src/test/debuginfo/nil-enum.rs
index 44d7c2b1ad2..81399ec590b 100644
--- a/src/test/debuginfo/nil-enum.rs
+++ b/src/test/debuginfo/nil-enum.rs
@@ -22,6 +22,7 @@
 // gdb-check:$2 = {<No data fields>}
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 enum ANilEnum {}
diff --git a/src/test/debuginfo/no-debug-attribute.rs b/src/test/debuginfo/no-debug-attribute.rs
index f39e8ee2229..6bdd68d5e26 100644
--- a/src/test/debuginfo/no-debug-attribute.rs
+++ b/src/test/debuginfo/no-debug-attribute.rs
@@ -23,6 +23,8 @@
 // gdb-command:continue
 
 #![allow(unused_variables)]
+#![feature(no_debug)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn function_with_debuginfo() {
diff --git a/src/test/debuginfo/option-like-enum.rs b/src/test/debuginfo/option-like-enum.rs
index fba21d9a553..f103294a94a 100644
--- a/src/test/debuginfo/option-like-enum.rs
+++ b/src/test/debuginfo/option-like-enum.rs
@@ -79,6 +79,7 @@
 // lldb-check:[...]$9 = 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
diff --git a/src/test/debuginfo/packed-struct-with-destructor.rs b/src/test/debuginfo/packed-struct-with-destructor.rs
index 8b2f34a9909..9d37cb3012b 100644
--- a/src/test/debuginfo/packed-struct-with-destructor.rs
+++ b/src/test/debuginfo/packed-struct-with-destructor.rs
@@ -73,6 +73,7 @@
 
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[repr(packed)]
diff --git a/src/test/debuginfo/packed-struct.rs b/src/test/debuginfo/packed-struct.rs
index 9f3b7baf83d..e86e963f38c 100644
--- a/src/test/debuginfo/packed-struct.rs
+++ b/src/test/debuginfo/packed-struct.rs
@@ -59,6 +59,7 @@
 // lldb-check:[...]$5 = 40
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[repr(packed)]
diff --git a/src/test/debuginfo/recursive-enum.rs b/src/test/debuginfo/recursive-enum.rs
index ef1092efa11..3094bdeac8b 100644
--- a/src/test/debuginfo/recursive-enum.rs
+++ b/src/test/debuginfo/recursive-enum.rs
@@ -17,6 +17,7 @@
 // is taken from issue #11083.
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 pub struct Window<'a> {
diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs
index 4772ee10ff7..ea067d5bffb 100644
--- a/src/test/debuginfo/recursive-struct.rs
+++ b/src/test/debuginfo/recursive-struct.rs
@@ -69,6 +69,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::Opt::{Empty, Val};
diff --git a/src/test/debuginfo/self-in-default-method.rs b/src/test/debuginfo/self-in-default-method.rs
index f16f236a0cb..6d3f93c5d50 100644
--- a/src/test/debuginfo/self-in-default-method.rs
+++ b/src/test/debuginfo/self-in-default-method.rs
@@ -112,6 +112,7 @@
 // lldb-command:continue
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Copy, Clone)]
diff --git a/src/test/debuginfo/self-in-generic-default-method.rs b/src/test/debuginfo/self-in-generic-default-method.rs
index 56de877016d..aea3bae4bfc 100644
--- a/src/test/debuginfo/self-in-generic-default-method.rs
+++ b/src/test/debuginfo/self-in-generic-default-method.rs
@@ -112,6 +112,7 @@
 // lldb-command:continue
 
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 #[derive(Copy, Clone)]
diff --git a/src/test/debuginfo/shadowed-argument.rs b/src/test/debuginfo/shadowed-argument.rs
index 4d74e6f1084..baf782b7e67 100644
--- a/src/test/debuginfo/shadowed-argument.rs
+++ b/src/test/debuginfo/shadowed-argument.rs
@@ -58,6 +58,7 @@
 // lldb-command:continue
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn a_function(x: bool, y: bool) {
diff --git a/src/test/debuginfo/shadowed-variable.rs b/src/test/debuginfo/shadowed-variable.rs
index 630999677ab..4883853f72f 100644
--- a/src/test/debuginfo/shadowed-variable.rs
+++ b/src/test/debuginfo/shadowed-variable.rs
@@ -57,6 +57,7 @@
 // lldb-check:[...]$5 = 20
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/simd.rs b/src/test/debuginfo/simd.rs
index 6bc8892a83a..24eb407612c 100644
--- a/src/test/debuginfo/simd.rs
+++ b/src/test/debuginfo/simd.rs
@@ -41,6 +41,7 @@
 // gdb-command:continue
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 #![feature(core_simd)]
 
diff --git a/src/test/debuginfo/simple-lexical-scope.rs b/src/test/debuginfo/simple-lexical-scope.rs
index c1dae7a6d67..5f9a4fd0805 100644
--- a/src/test/debuginfo/simple-lexical-scope.rs
+++ b/src/test/debuginfo/simple-lexical-scope.rs
@@ -78,6 +78,7 @@
 // lldb-command:continue
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/simple-struct.rs b/src/test/debuginfo/simple-struct.rs
index 36007c10932..d25cd4d7c04 100644
--- a/src/test/debuginfo/simple-struct.rs
+++ b/src/test/debuginfo/simple-struct.rs
@@ -96,6 +96,7 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct NoPadding16 {
diff --git a/src/test/debuginfo/simple-tuple.rs b/src/test/debuginfo/simple-tuple.rs
index 29bf9c5e419..1b85ecc537a 100644
--- a/src/test/debuginfo/simple-tuple.rs
+++ b/src/test/debuginfo/simple-tuple.rs
@@ -91,6 +91,7 @@
 
 #![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);
diff --git a/src/test/debuginfo/static-method-on-struct-and-enum.rs b/src/test/debuginfo/static-method-on-struct-and-enum.rs
index 59fe96f9958..dab4ab515d9 100644
--- a/src/test/debuginfo/static-method-on-struct-and-enum.rs
+++ b/src/test/debuginfo/static-method-on-struct-and-enum.rs
@@ -53,6 +53,7 @@
 // lldb-check:[...]$4 = 5
 // lldb-command:continue
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Struct {
diff --git a/src/test/debuginfo/struct-in-enum.rs b/src/test/debuginfo/struct-in-enum.rs
index e200a497f51..98b90de6005 100644
--- a/src/test/debuginfo/struct-in-enum.rs
+++ b/src/test/debuginfo/struct-in-enum.rs
@@ -41,6 +41,7 @@
 // lldb-check:[...]$2 = 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};
diff --git a/src/test/debuginfo/struct-in-struct.rs b/src/test/debuginfo/struct-in-struct.rs
index 8bccb041c9a..76a1613c231 100644
--- a/src/test/debuginfo/struct-in-struct.rs
+++ b/src/test/debuginfo/struct-in-struct.rs
@@ -56,6 +56,7 @@
 // lldb-check:[...]$7 = Tree { x: Simple { x: 25 }, y: InternalPaddingParent { x: InternalPadding { x: 26, y: 27 }, y: InternalPadding { x: 28, y: 29 }, z: InternalPadding { x: 30, y: 31 } }, z: BagInBag { x: Bag { x: Simple { x: 32 } } } }
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Simple {
diff --git a/src/test/debuginfo/struct-style-enum.rs b/src/test/debuginfo/struct-style-enum.rs
index 43cb48d16bf..3376fc9bbd4 100644
--- a/src/test/debuginfo/struct-style-enum.rs
+++ b/src/test/debuginfo/struct-style-enum.rs
@@ -48,6 +48,7 @@
 // lldb-check:[...]$3 = TheOnlyCase { a: -1 }
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::Regular::{Case1, Case2, Case3};
diff --git a/src/test/debuginfo/struct-with-destructor.rs b/src/test/debuginfo/struct-with-destructor.rs
index 4c2c9d06ae9..ad8731997ab 100644
--- a/src/test/debuginfo/struct-with-destructor.rs
+++ b/src/test/debuginfo/struct-with-destructor.rs
@@ -44,6 +44,7 @@
 // lldb-check:[...]$3 = NestedOuter { a: NestedInner { a: WithDestructor { x: 7890, y: 9870 } } }
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct NoDestructor {
diff --git a/src/test/debuginfo/trait-pointers.rs b/src/test/debuginfo/trait-pointers.rs
index 3054f646b91..193cd419bab 100644
--- a/src/test/debuginfo/trait-pointers.rs
+++ b/src/test/debuginfo/trait-pointers.rs
@@ -16,6 +16,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 trait Trait {
diff --git a/src/test/debuginfo/tuple-in-struct.rs b/src/test/debuginfo/tuple-in-struct.rs
index 04119956f19..1a7fde766f0 100644
--- a/src/test/debuginfo/tuple-in-struct.rs
+++ b/src/test/debuginfo/tuple-in-struct.rs
@@ -42,6 +42,7 @@
 // gdb-check:$10 = {x = {__0 = {__0 = 40, __1 = 41, __2 = 42}, __1 = {__0 = 43, __1 = 44}}, y = {__0 = 45, __1 = 46, __2 = 47, __3 = 48}}
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct NoPadding1 {
diff --git a/src/test/debuginfo/tuple-in-tuple.rs b/src/test/debuginfo/tuple-in-tuple.rs
index e9810913031..a514b69a2d3 100644
--- a/src/test/debuginfo/tuple-in-tuple.rs
+++ b/src/test/debuginfo/tuple-in-tuple.rs
@@ -56,6 +56,7 @@
 // lldb-check:[...]$6 = ((21, 22), 23)
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 fn main() {
diff --git a/src/test/debuginfo/tuple-struct.rs b/src/test/debuginfo/tuple-struct.rs
index 5e4e8494574..a2ca8c2237b 100644
--- a/src/test/debuginfo/tuple-struct.rs
+++ b/src/test/debuginfo/tuple-struct.rs
@@ -62,6 +62,7 @@
 // structs.
 
 
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct NoPadding16(u16, i16);
diff --git a/src/test/debuginfo/tuple-style-enum.rs b/src/test/debuginfo/tuple-style-enum.rs
index 48c47c51150..52f171434b0 100644
--- a/src/test/debuginfo/tuple-style-enum.rs
+++ b/src/test/debuginfo/tuple-style-enum.rs
@@ -48,6 +48,7 @@
 // lldb-check:[...]$3 = TheOnlyCase(-1)
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::Regular::{Case1, Case2, Case3};
diff --git a/src/test/debuginfo/type-names.rs b/src/test/debuginfo/type-names.rs
index 4eae0741202..3db3e9d311d 100644
--- a/src/test/debuginfo/type-names.rs
+++ b/src/test/debuginfo/type-names.rs
@@ -175,6 +175,7 @@
 
 #![feature(box_syntax)]
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 use self::Enum1::{Variant1, Variant2};
diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs
index 0252e3b54ff..bbf13ec756a 100644
--- a/src/test/debuginfo/unique-enum.rs
+++ b/src/test/debuginfo/unique-enum.rs
@@ -42,6 +42,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![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
diff --git a/src/test/debuginfo/unreachable-locals.rs b/src/test/debuginfo/unreachable-locals.rs
index 63536b13834..4c4210ea132 100644
--- a/src/test/debuginfo/unreachable-locals.rs
+++ b/src/test/debuginfo/unreachable-locals.rs
@@ -13,6 +13,7 @@
 // compile-flags:-g
 
 #![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
diff --git a/src/test/debuginfo/var-captured-in-nested-closure.rs b/src/test/debuginfo/var-captured-in-nested-closure.rs
index d576aff8b1c..7090377e5db 100644
--- a/src/test/debuginfo/var-captured-in-nested-closure.rs
+++ b/src/test/debuginfo/var-captured-in-nested-closure.rs
@@ -79,6 +79,7 @@
 
 #![allow(unused_variables)]
 #![feature(box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Struct {
diff --git a/src/test/debuginfo/var-captured-in-sendable-closure.rs b/src/test/debuginfo/var-captured-in-sendable-closure.rs
index 2b27f938b30..aa269edadd8 100644
--- a/src/test/debuginfo/var-captured-in-sendable-closure.rs
+++ b/src/test/debuginfo/var-captured-in-sendable-closure.rs
@@ -41,6 +41,7 @@
 
 #![allow(unused_variables)]
 #![feature(unboxed_closures, box_syntax)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Struct {
diff --git a/src/test/debuginfo/var-captured-in-stack-closure.rs b/src/test/debuginfo/var-captured-in-stack-closure.rs
index 54ef42b48f1..6def5cf2859 100644
--- a/src/test/debuginfo/var-captured-in-stack-closure.rs
+++ b/src/test/debuginfo/var-captured-in-stack-closure.rs
@@ -71,6 +71,7 @@
 
 #![feature(unboxed_closures, box_syntax)]
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct Struct {
diff --git a/src/test/debuginfo/vec-slices.rs b/src/test/debuginfo/vec-slices.rs
index 87fd2e9a65d..0d396c885eb 100644
--- a/src/test/debuginfo/vec-slices.rs
+++ b/src/test/debuginfo/vec-slices.rs
@@ -77,6 +77,7 @@
 // lldb-check:[...]$5 = &[AStruct { x: 10, y: 11, z: 12 }, AStruct { x: 13, y: 14, z: 15 }]
 
 #![allow(dead_code, unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 struct AStruct {
diff --git a/src/test/debuginfo/vec.rs b/src/test/debuginfo/vec.rs
index f7bdf1bd3fa..c9827a02fc7 100644
--- a/src/test/debuginfo/vec.rs
+++ b/src/test/debuginfo/vec.rs
@@ -28,6 +28,7 @@
 // lldb-check:[...]$0 = [1, 2, 3]
 
 #![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
 
 static mut VECT: [i32; 3] = [1, 2, 3];