about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/compile-fail/deprecation-lint.rs8
-rw-r--r--src/test/rustdoc/deprecated-future.rs16
2 files changed, 24 insertions, 0 deletions
diff --git a/src/test/compile-fail/deprecation-lint.rs b/src/test/compile-fail/deprecation-lint.rs
index a058234a649..93eb6b6b115 100644
--- a/src/test/compile-fail/deprecation-lint.rs
+++ b/src/test/compile-fail/deprecation-lint.rs
@@ -180,6 +180,11 @@ mod this_crate {
     #[deprecated(since = "1.0.0", note = "text")]
     pub fn deprecated_text() {}
 
+    #[deprecated(since = "99.99.99", note = "text")]
+    pub fn deprecated_future() {}
+    #[deprecated(since = "99.99.99", note = "text")]
+    pub fn deprecated_future_text() {}
+
     pub struct MethodTester;
 
     impl MethodTester {
@@ -266,6 +271,9 @@ mod this_crate {
         <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text
         <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text
 
+        deprecated_future(); // Fine; no error.
+        deprecated_future_text(); // Fine; no error.
+
         let _ = DeprecatedStruct {
             //~^ ERROR use of deprecated item 'this_crate::DeprecatedStruct': text
             i: 0 //~ ERROR use of deprecated item 'this_crate::DeprecatedStruct::i': text
diff --git a/src/test/rustdoc/deprecated-future.rs b/src/test/rustdoc/deprecated-future.rs
new file mode 100644
index 00000000000..6ba54039ed3
--- /dev/null
+++ b/src/test/rustdoc/deprecated-future.rs
@@ -0,0 +1,16 @@
+// Copyright 2018 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.
+
+#![feature(deprecated)]
+
+// @has deprecated_future/struct.S.html '//*[@class="stab deprecated"]' \
+//      'This will be deprecated in 99.99.99: effectively never'
+#[deprecated(since = "99.99.99", note = "effectively never")]
+pub struct S;