about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2018-10-03 00:27:12 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2018-10-19 21:57:52 -0700
commit37393576eced8680065d2ae629a6e96912a782f9 (patch)
treebfbd9971b4d8f2579f61e2575343c6e3d4c6fd8c /src/test
parent89be71a46234a2231b5b3839cd497188e072291f (diff)
downloadrust-37393576eced8680065d2ae629a6e96912a782f9.tar.gz
rust-37393576eced8680065d2ae629a6e96912a782f9.zip
Stabilize impl_header_lifetime_elision in 2015
It's already stable in 2018; this finishes the stabilization.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision-with-in_band.rs27
-rw-r--r--src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision-with-in_band.stderr15
-rw-r--r--src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision.rs21
-rw-r--r--src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision.stderr15
-rw-r--r--src/test/ui/feature-gates/feature-gate-in_band_lifetimes.rs3
-rw-r--r--src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr34
-rw-r--r--src/test/ui/impl-header-lifetime-elision/assoc-type.rs2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/assoc-type.stderr4
-rw-r--r--src/test/ui/impl-header-lifetime-elision/dyn-trait.rs2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr6
-rw-r--r--src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/path-elided.rs2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/path-elided.stderr2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/path-underscore.rs2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/ref-underscore.rs2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/trait-elided.rs2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/trait-elided.stderr2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/trait-underscore.rs2
-rw-r--r--src/test/ui/nll/issue-52742.rs1
-rw-r--r--src/test/ui/nll/issue-52742.stderr2
20 files changed, 25 insertions, 123 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision-with-in_band.rs b/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision-with-in_band.rs
deleted file mode 100644
index b7e07e1dca6..00000000000
--- a/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision-with-in_band.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2017 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.
-
-#![allow(warnings)]
-
-// Make sure this related feature didn't accidentally enable this
-#![feature(in_band_lifetimes)]
-
-trait MyTrait<'a> { }
-
-impl MyTrait<'a> for &u32 { }
-//~^ ERROR missing lifetime specifier
-
-struct MyStruct;
-trait MarkerTrait {}
-
-impl MarkerTrait for &'_ MyStruct { }
-//~^ ERROR missing lifetime specifier
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision-with-in_band.stderr b/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision-with-in_band.stderr
deleted file mode 100644
index 9487d11d505..00000000000
--- a/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision-with-in_band.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0106]: missing lifetime specifier
-  --> $DIR/feature-gate-impl_header_lifetime_elision-with-in_band.rs:18:22
-   |
-LL | impl MyTrait<'a> for &u32 { }
-   |                      ^ expected lifetime parameter
-
-error[E0106]: missing lifetime specifier
-  --> $DIR/feature-gate-impl_header_lifetime_elision-with-in_band.rs:24:23
-   |
-LL | impl MarkerTrait for &'_ MyStruct { }
-   |                       ^^ expected lifetime parameter
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0106`.
diff --git a/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision.rs b/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision.rs
deleted file mode 100644
index 3eb2ac1b008..00000000000
--- a/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2017 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.
-
-#![allow(warnings)]
-
-trait MyTrait<'a> { }
-
-impl<'a> MyTrait<'a> for &u32 { }
-//~^ ERROR missing lifetime specifier
-
-impl<'a> MyTrait<'_> for &'a f32 { }
-//~^ ERROR missing lifetime specifier
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision.stderr b/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision.stderr
deleted file mode 100644
index 2c8a7dd4305..00000000000
--- a/src/test/ui/feature-gates/feature-gate-impl_header_lifetime_elision.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0106]: missing lifetime specifier
-  --> $DIR/feature-gate-impl_header_lifetime_elision.rs:15:26
-   |
-LL | impl<'a> MyTrait<'a> for &u32 { }
-   |                          ^ expected lifetime parameter
-
-error[E0106]: missing lifetime specifier
-  --> $DIR/feature-gate-impl_header_lifetime_elision.rs:18:18
-   |
-LL | impl<'a> MyTrait<'_> for &'a f32 { }
-   |                  ^^ expected lifetime parameter
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0106`.
diff --git a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.rs b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.rs
index 23b30711cf3..ae1f81c2f57 100644
--- a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.rs
+++ b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.rs
@@ -10,9 +10,6 @@
 
 #![allow(warnings)]
 
-// Make sure this related feature didn't accidentally enable this
-#![feature(impl_header_lifetime_elision)]
-
 fn foo(x: &'x u8) -> &'x u8 { x }
 //~^ ERROR use of undeclared lifetime name
 //~^^ ERROR use of undeclared lifetime name
diff --git a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr
index 5fe143959d2..cc0855306e1 100644
--- a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr
+++ b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr
@@ -1,101 +1,101 @@
 error[E0261]: use of undeclared lifetime name `'x`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:16:12
+  --> $DIR/feature-gate-in_band_lifetimes.rs:13:12
    |
 LL | fn foo(x: &'x u8) -> &'x u8 { x }
    |            ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'x`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:16:23
+  --> $DIR/feature-gate-in_band_lifetimes.rs:13:23
    |
 LL | fn foo(x: &'x u8) -> &'x u8 { x }
    |                       ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:28:12
+  --> $DIR/feature-gate-in_band_lifetimes.rs:25:12
    |
 LL | impl<'a> X<'b> {
    |            ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:30:27
+  --> $DIR/feature-gate-in_band_lifetimes.rs:27:27
    |
 LL |     fn inner_2(&self) -> &'b u8 {
    |                           ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:36:8
+  --> $DIR/feature-gate-in_band_lifetimes.rs:33:8
    |
 LL | impl X<'b> {
    |        ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:38:27
+  --> $DIR/feature-gate-in_band_lifetimes.rs:35:27
    |
 LL |     fn inner_3(&self) -> &'b u8 {
    |                           ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:46:9
+  --> $DIR/feature-gate-in_band_lifetimes.rs:43:9
    |
 LL | impl Y<&'a u8> {
    |         ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:48:25
+  --> $DIR/feature-gate-in_band_lifetimes.rs:45:25
    |
 LL |     fn inner(&self) -> &'a u8 {
    |                         ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:56:27
+  --> $DIR/feature-gate-in_band_lifetimes.rs:53:27
    |
 LL |     fn any_lifetime() -> &'b u8;
    |                           ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:58:27
+  --> $DIR/feature-gate-in_band_lifetimes.rs:55:27
    |
 LL |     fn borrowed_lifetime(&'b self) -> &'b u8;
    |                           ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:58:40
+  --> $DIR/feature-gate-in_band_lifetimes.rs:55:40
    |
 LL |     fn borrowed_lifetime(&'b self) -> &'b u8;
    |                                        ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:63:14
+  --> $DIR/feature-gate-in_band_lifetimes.rs:60:14
    |
 LL | impl MyTrait<'a> for Y<&'a u8> {
    |              ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:63:25
+  --> $DIR/feature-gate-in_band_lifetimes.rs:60:25
    |
 LL | impl MyTrait<'a> for Y<&'a u8> {
    |                         ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:66:31
+  --> $DIR/feature-gate-in_band_lifetimes.rs:63:31
    |
 LL |     fn my_lifetime(&self) -> &'a u8 { self.0 }
    |                               ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:68:27
+  --> $DIR/feature-gate-in_band_lifetimes.rs:65:27
    |
 LL |     fn any_lifetime() -> &'b u8 { &0 }
    |                           ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:70:27
+  --> $DIR/feature-gate-in_band_lifetimes.rs:67:27
    |
 LL |     fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
    |                           ^^ undeclared lifetime
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/feature-gate-in_band_lifetimes.rs:70:40
+  --> $DIR/feature-gate-in_band_lifetimes.rs:67:40
    |
 LL |     fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
    |                                        ^^ undeclared lifetime
diff --git a/src/test/ui/impl-header-lifetime-elision/assoc-type.rs b/src/test/ui/impl-header-lifetime-elision/assoc-type.rs
index 15cf07771f2..49f528df8f6 100644
--- a/src/test/ui/impl-header-lifetime-elision/assoc-type.rs
+++ b/src/test/ui/impl-header-lifetime-elision/assoc-type.rs
@@ -13,8 +13,6 @@
 
 #![allow(warnings)]
 
-#![feature(impl_header_lifetime_elision)]
-
 trait MyTrait {
     type Output;
 }
diff --git a/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr b/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr
index 59b2cfd2226..022b8bc717b 100644
--- a/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr
+++ b/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr
@@ -1,11 +1,11 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/assoc-type.rs:23:19
+  --> $DIR/assoc-type.rs:21:19
    |
 LL |     type Output = &i32;
    |                   ^ expected lifetime parameter
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/assoc-type.rs:28:20
+  --> $DIR/assoc-type.rs:26:20
    |
 LL |     type Output = &'_ i32;
    |                    ^^ expected lifetime parameter
diff --git a/src/test/ui/impl-header-lifetime-elision/dyn-trait.rs b/src/test/ui/impl-header-lifetime-elision/dyn-trait.rs
index 661bfa8bdcc..384c08ff5bb 100644
--- a/src/test/ui/impl-header-lifetime-elision/dyn-trait.rs
+++ b/src/test/ui/impl-header-lifetime-elision/dyn-trait.rs
@@ -13,8 +13,6 @@
 
 #![allow(warnings)]
 
-#![feature(impl_header_lifetime_elision)]
-
 use std::fmt::Debug;
 
 // Equivalent to `Box<dyn Debug + 'static>`:
diff --git a/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr b/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr
index 3e54ebeb398..f0e174a1207 100644
--- a/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr
+++ b/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr
@@ -1,11 +1,11 @@
 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
-  --> $DIR/dyn-trait.rs:32:16
+  --> $DIR/dyn-trait.rs:30:16
    |
 LL |     static_val(x); //~ ERROR cannot infer
    |                ^
    |
-note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 31:26...
-  --> $DIR/dyn-trait.rs:31:26
+note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 29:26...
+  --> $DIR/dyn-trait.rs:29:26
    |
 LL | fn with_dyn_debug_static<'a>(x: Box<dyn Debug + 'a>) {
    |                          ^^
diff --git a/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs b/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs
index 56dd6691abb..c0d454d9426 100644
--- a/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs
+++ b/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs
@@ -12,8 +12,6 @@
 
 #![allow(warnings)]
 
-#![feature(impl_header_lifetime_elision)]
-
 // This works for functions...
 fn foo<'a>(x: &str, y: &'a str) {}
 
diff --git a/src/test/ui/impl-header-lifetime-elision/path-elided.rs b/src/test/ui/impl-header-lifetime-elision/path-elided.rs
index f88c899065c..b68a0f375f6 100644
--- a/src/test/ui/impl-header-lifetime-elision/path-elided.rs
+++ b/src/test/ui/impl-header-lifetime-elision/path-elided.rs
@@ -9,8 +9,6 @@
 // except according to those terms.
 #![allow(warnings)]
 
-#![feature(impl_header_lifetime_elision)]
-
 trait MyTrait { }
 
 struct Foo<'a> { x: &'a u32 }
diff --git a/src/test/ui/impl-header-lifetime-elision/path-elided.stderr b/src/test/ui/impl-header-lifetime-elision/path-elided.stderr
index 6c1d72411bf..03e8f8c9ad5 100644
--- a/src/test/ui/impl-header-lifetime-elision/path-elided.stderr
+++ b/src/test/ui/impl-header-lifetime-elision/path-elided.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/path-elided.rs:18:18
+  --> $DIR/path-elided.rs:16:18
    |
 LL | impl MyTrait for Foo {
    |                  ^^^ expected lifetime parameter
diff --git a/src/test/ui/impl-header-lifetime-elision/path-underscore.rs b/src/test/ui/impl-header-lifetime-elision/path-underscore.rs
index 38118f0d213..b2c7a415efe 100644
--- a/src/test/ui/impl-header-lifetime-elision/path-underscore.rs
+++ b/src/test/ui/impl-header-lifetime-elision/path-underscore.rs
@@ -14,8 +14,6 @@
 
 #![allow(warnings)]
 
-#![feature(impl_header_lifetime_elision)]
-
 trait MyTrait { }
 
 struct Foo<'a> { x: &'a u32 }
diff --git a/src/test/ui/impl-header-lifetime-elision/ref-underscore.rs b/src/test/ui/impl-header-lifetime-elision/ref-underscore.rs
index 96a56aacd87..e62e7dc56a4 100644
--- a/src/test/ui/impl-header-lifetime-elision/ref-underscore.rs
+++ b/src/test/ui/impl-header-lifetime-elision/ref-underscore.rs
@@ -14,8 +14,6 @@
 
 #![allow(warnings)]
 
-#![feature(impl_header_lifetime_elision)]
-
 trait MyTrait { }
 
 impl MyTrait for &i32 {
diff --git a/src/test/ui/impl-header-lifetime-elision/trait-elided.rs b/src/test/ui/impl-header-lifetime-elision/trait-elided.rs
index afdf2200d90..1fb57b96ba9 100644
--- a/src/test/ui/impl-header-lifetime-elision/trait-elided.rs
+++ b/src/test/ui/impl-header-lifetime-elision/trait-elided.rs
@@ -9,8 +9,6 @@
 // except according to those terms.
 #![allow(warnings)]
 
-#![feature(impl_header_lifetime_elision)]
-
 trait MyTrait<'a> { }
 
 impl MyTrait for u32 {
diff --git a/src/test/ui/impl-header-lifetime-elision/trait-elided.stderr b/src/test/ui/impl-header-lifetime-elision/trait-elided.stderr
index fe3ded8e04c..7138b321f97 100644
--- a/src/test/ui/impl-header-lifetime-elision/trait-elided.stderr
+++ b/src/test/ui/impl-header-lifetime-elision/trait-elided.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/trait-elided.rs:16:6
+  --> $DIR/trait-elided.rs:14:6
    |
 LL | impl MyTrait for u32 {
    |      ^^^^^^^ expected lifetime parameter
diff --git a/src/test/ui/impl-header-lifetime-elision/trait-underscore.rs b/src/test/ui/impl-header-lifetime-elision/trait-underscore.rs
index 98242ff6577..54d23f5f4de 100644
--- a/src/test/ui/impl-header-lifetime-elision/trait-underscore.rs
+++ b/src/test/ui/impl-header-lifetime-elision/trait-underscore.rs
@@ -15,8 +15,6 @@
 
 #![allow(warnings)]
 
-#![feature(impl_header_lifetime_elision)]
-
 trait MyTrait<'a> { }
 
 // This is equivalent to `MyTrait<'a> for &'b i32`, which is proven by
diff --git a/src/test/ui/nll/issue-52742.rs b/src/test/ui/nll/issue-52742.rs
index c36e4cc70fd..84d06a1d20a 100644
--- a/src/test/ui/nll/issue-52742.rs
+++ b/src/test/ui/nll/issue-52742.rs
@@ -10,7 +10,6 @@
 
 #![feature(nll)]
 #![feature(in_band_lifetimes)]
-#![feature(impl_header_lifetime_elision)]
 
 struct Foo<'a, 'b> {
     x: &'a u32,
diff --git a/src/test/ui/nll/issue-52742.stderr b/src/test/ui/nll/issue-52742.stderr
index 83a594941c0..ccd6ec5cb77 100644
--- a/src/test/ui/nll/issue-52742.stderr
+++ b/src/test/ui/nll/issue-52742.stderr
@@ -1,5 +1,5 @@
 error: unsatisfied lifetime constraints
-  --> $DIR/issue-52742.rs:26:9
+  --> $DIR/issue-52742.rs:25:9
    |
 LL |     fn take_bar(&mut self, b: Bar<'_>) {
    |                 ---------         -- let's call this `'1`