mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
stabilize debugger visualizer attribute
This commit is contained in:
parent
0b4ba4cf0e
commit
05c1e6b1db
@ -130,6 +130,8 @@ declare_features! (
|
||||
(accepted, copy_closures, "1.26.0", Some(44490), None),
|
||||
/// Allows `crate` in paths.
|
||||
(accepted, crate_in_paths, "1.30.0", Some(45477), None),
|
||||
/// Allows using `#[debugger_visualizer]` attribute.
|
||||
(accepted, debugger_visualizer, "CURRENT_RUSTC_VERSION", Some(95939), None),
|
||||
/// Allows rustc to inject a default alloc_error_handler
|
||||
(accepted, default_alloc_error_handler, "1.68.0", Some(66741), None),
|
||||
/// Allows using assigning a default type to type parameters in algebraic data type definitions.
|
||||
|
@ -364,8 +364,6 @@ declare_features! (
|
||||
(active, custom_inner_attributes, "1.30.0", Some(54726), None),
|
||||
/// Allows custom test frameworks with `#![test_runner]` and `#[test_case]`.
|
||||
(active, custom_test_frameworks, "1.30.0", Some(50297), None),
|
||||
/// Allows using `#[debugger_visualizer]`.
|
||||
(active, debugger_visualizer, "1.62.0", Some(95939), None),
|
||||
/// Allows declarative macros 2.0 (`macro`).
|
||||
(active, decl_macro, "1.17.0", Some(39412), None),
|
||||
/// Allows default type parameters to influence type inference.
|
||||
|
@ -403,16 +403,16 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk
|
||||
),
|
||||
|
||||
// Debugging
|
||||
ungated!(
|
||||
debugger_visualizer, Normal,
|
||||
template!(List: r#"natvis_file = "...", gdb_script_file = "...""#), DuplicatesOk
|
||||
),
|
||||
|
||||
// ==========================================================================
|
||||
// Unstable attributes:
|
||||
// ==========================================================================
|
||||
|
||||
// RFC #3191: #[debugger_visualizer] support
|
||||
gated!(
|
||||
debugger_visualizer, Normal, template!(List: r#"natvis_file = "...", gdb_script_file = "...""#),
|
||||
DuplicatesOk, experimental!(debugger_visualizer)
|
||||
),
|
||||
|
||||
// Linking:
|
||||
gated!(
|
||||
naked, Normal, template!(Word), WarnFollowing, @only_local: true,
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ignore-lldb
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(debugger_visualizer)]
|
||||
#![cfg_attr(bootstrap, feature(debugger_visualizer))]
|
||||
#![debugger_visualizer(natvis_file = "dependency-with-embedded-visualizers.natvis")]
|
||||
#![debugger_visualizer(gdb_script_file = "dependency-with-embedded-visualizers.py")]
|
||||
#![crate_type = "rlib"]
|
||||
|
@ -60,7 +60,7 @@
|
||||
// gdb-check:$4 = "Person A" is 10 years old.
|
||||
|
||||
#![allow(unused_variables)]
|
||||
#![feature(debugger_visualizer)]
|
||||
#![cfg_attr(bootstrap, feature(debugger_visualizer))]
|
||||
#![debugger_visualizer(natvis_file = "embedded-visualizer.natvis")]
|
||||
#![debugger_visualizer(gdb_script_file = "embedded-visualizer.py")]
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
#![debugger_visualizer(natvis_file = "auxiliary/debugger-visualizer.natvis")] //~ ERROR the `#[debugger_visualizer]` attribute is an experimental feature
|
||||
|
||||
fn main() {}
|
@ -1,12 +0,0 @@
|
||||
error[E0658]: the `#[debugger_visualizer]` attribute is an experimental feature
|
||||
--> $DIR/feature-gate-debugger-visualizer.rs:1:1
|
||||
|
|
||||
LL | #![debugger_visualizer(natvis_file = "auxiliary/debugger-visualizer.natvis")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #95939 <https://github.com/rust-lang/rust/issues/95939> for more information
|
||||
= help: add `#![feature(debugger_visualizer)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
@ -1,7 +1,7 @@
|
||||
// normalize-stderr-test: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG ("
|
||||
// normalize-stderr-test: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE"
|
||||
|
||||
#![feature(debugger_visualizer)]
|
||||
#![cfg_attr(bootstrap, feature(debugger_visualizer))]
|
||||
#![debugger_visualizer(random_file = "../foo.random")] //~ ERROR invalid argument
|
||||
#![debugger_visualizer(natvis_file = "../foo.random")] //~ ERROR
|
||||
fn main() {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(debugger_visualizer)]
|
||||
#![cfg_attr(bootstrap, feature(debugger_visualizer))]
|
||||
|
||||
#[debugger_visualizer(natvis_file = "../foo.natvis")] //~ ERROR attribute should be applied to a module
|
||||
fn main() {}
|
||||
|
Loading…
Reference in New Issue
Block a user