Gate default type parameter overrides.

Fixes #12423.
This commit is contained in:
Eduard Burtescu 2014-02-24 22:45:31 +02:00
parent 672097753a
commit 3e531ed0ed
12 changed files with 47 additions and 47 deletions

View file

@ -8,16 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(default_type_params)];
// aux-build:default_type_params_xc.rs
#[deny(default_type_param_usage)];
pub struct Heap;
pub struct Vec<T, A = Heap>;
extern crate default_type_params_xc;
pub struct FooAlloc;
pub type VecFoo<T> = Vec<T, FooAlloc>; //~ ERROR provided type arguments with defaults
pub type VecFoo<T> = default_type_params_xc::FakeVec<T, FooAlloc>;
//~^ ERROR: default type parameters are experimental
fn main() {}

View file

@ -13,8 +13,6 @@
// ignore-fast #[feature] doesn't work with check-fast
#[feature(default_type_params)];
#[allow(default_type_param_usage)];
extern crate default_type_params_xc;
struct Vec<T, A = default_type_params_xc::Heap>;

View file

@ -11,8 +11,6 @@
// ignore-fast #[feature] doesn't work with check-fast
#[feature(default_type_params)];
#[allow(default_type_param_usage)];
struct Foo<A = (int, char)> {
a: A
}