diff options
| author | bors <bors@rust-lang.org> | 2017-01-27 12:23:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-27 12:23:23 +0000 |
| commit | 463affee6b74aabf19b27b6040a20a3c95709cc5 (patch) | |
| tree | 897512b623d3a3e02e15a5df667a13f7278161ee /src/test | |
| parent | 8367fb7ba6abae89ab7e17c1b3987ee321f5bb71 (diff) | |
| parent | 5056a43752a34ec633fb71ff395f518bfc7ce52c (diff) | |
| download | rust-463affee6b74aabf19b27b6040a20a3c95709cc5.tar.gz rust-463affee6b74aabf19b27b6040a20a3c95709cc5.zip | |
Auto merge of #39282 - petrochenkov:selfstab, r=nikomatsakis
Stabilize Self and associated types in struct expressions and patterns Rebase of https://github.com/rust-lang/rust/pull/37734 Closes https://github.com/rust-lang/rust/issues/37544 r? @nikomatsakis
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/struct-path-associated-type.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/struct-path-self-feature-gate.rs | 31 | ||||
| -rw-r--r-- | src/test/compile-fail/struct-path-self-type-mismatch.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/struct-path-self.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/struct-path-associated-type.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/struct-path-self.rs | 2 |
6 files changed, 0 insertions, 41 deletions
diff --git a/src/test/compile-fail/struct-path-associated-type.rs b/src/test/compile-fail/struct-path-associated-type.rs index ecaf269fcb1..660ac44ce0b 100644 --- a/src/test/compile-fail/struct-path-associated-type.rs +++ b/src/test/compile-fail/struct-path-associated-type.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(more_struct_aliases)] - struct S; trait Tr { diff --git a/src/test/compile-fail/struct-path-self-feature-gate.rs b/src/test/compile-fail/struct-path-self-feature-gate.rs deleted file mode 100644 index c40d0574955..00000000000 --- a/src/test/compile-fail/struct-path-self-feature-gate.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2016 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. - -// gate-test-more_struct_aliases - -struct S; - -trait Tr { - type A; -} - -fn f<T: Tr<A = S>>() { - let _ = T::A {}; - //~^ ERROR `Self` and associated types in struct expressions and patterns are unstable -} - -impl S { - fn f() { - let _ = Self {}; - //~^ ERROR `Self` and associated types in struct expressions and patterns are unstable - } -} - -fn main() {} diff --git a/src/test/compile-fail/struct-path-self-type-mismatch.rs b/src/test/compile-fail/struct-path-self-type-mismatch.rs index 8352bd6751f..f694e7d277c 100644 --- a/src/test/compile-fail/struct-path-self-type-mismatch.rs +++ b/src/test/compile-fail/struct-path-self-type-mismatch.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(more_struct_aliases)] - struct Foo<A> { inner: A } trait Bar { fn bar(); } diff --git a/src/test/compile-fail/struct-path-self.rs b/src/test/compile-fail/struct-path-self.rs index aeac199227b..067d6ac22dc 100644 --- a/src/test/compile-fail/struct-path-self.rs +++ b/src/test/compile-fail/struct-path-self.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(more_struct_aliases)] - struct S; trait Tr { diff --git a/src/test/run-pass/struct-path-associated-type.rs b/src/test/run-pass/struct-path-associated-type.rs index 292761dfd00..b033ed5c802 100644 --- a/src/test/run-pass/struct-path-associated-type.rs +++ b/src/test/run-pass/struct-path-associated-type.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(more_struct_aliases)] - struct S<T, U = u16> { a: T, b: U, diff --git a/src/test/run-pass/struct-path-self.rs b/src/test/run-pass/struct-path-self.rs index b569ab62c1b..c7a282c2a2f 100644 --- a/src/test/run-pass/struct-path-self.rs +++ b/src/test/run-pass/struct-path-self.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(more_struct_aliases)] - use std::ops::Add; struct S<T, U = u16> { |
