about summary refs log tree commit diff
path: root/src/test/auxiliary
diff options
context:
space:
mode:
authorRyan Prichard <ryan.prichard@gmail.com>2015-04-03 20:22:36 -0700
committerRyan Prichard <ryan.prichard@gmail.com>2015-04-11 16:00:58 -0700
commita893c646d0ba9b58fb6167dca6fbbc567b479c95 (patch)
tree21b590b7afdbc0ef77dbf7eb6ae3dc0294a9ae7b /src/test/auxiliary
parent0f46e4f1f23368f4615a9847671e3a91b2ebaf18 (diff)
downloadrust-a893c646d0ba9b58fb6167dca6fbbc567b479c95.tar.gz
rust-a893c646d0ba9b58fb6167dca6fbbc567b479c95.zip
Expand internal-unstable to handle named field accesses and method calls.
Diffstat (limited to 'src/test/auxiliary')
-rw-r--r--src/test/auxiliary/internal_unstable.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/test/auxiliary/internal_unstable.rs b/src/test/auxiliary/internal_unstable.rs
index 3d59b8e9009..7f682d5d8d1 100644
--- a/src/test/auxiliary/internal_unstable.rs
+++ b/src/test/auxiliary/internal_unstable.rs
@@ -22,6 +22,17 @@ pub struct Foo {
     pub x: u8
 }
 
+impl Foo {
+    #[unstable(feature = "method")]
+    pub fn method(&self) {}
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+pub struct Bar {
+    #[unstable(feature = "struct2_field")]
+    pub x: u8
+}
+
 #[allow_internal_unstable]
 #[macro_export]
 macro_rules! call_unstable_allow {
@@ -38,6 +49,18 @@ macro_rules! construct_unstable_allow {
 
 #[allow_internal_unstable]
 #[macro_export]
+macro_rules! call_method_allow {
+    ($e: expr) => { $e.method() }
+}
+
+#[allow_internal_unstable]
+#[macro_export]
+macro_rules! access_field_allow {
+    ($e: expr) => { $e.x }
+}
+
+#[allow_internal_unstable]
+#[macro_export]
 macro_rules! pass_through_allow {
     ($e: expr) => { $e }
 }
@@ -55,6 +78,16 @@ macro_rules! construct_unstable_noallow {
 }
 
 #[macro_export]
+macro_rules! call_method_noallow {
+    ($e: expr) => { $e.method() }
+}
+
+#[macro_export]
+macro_rules! access_field_noallow {
+    ($e: expr) => { $e.x }
+}
+
+#[macro_export]
 macro_rules! pass_through_noallow {
     ($e: expr) => { $e }
 }