convert coherence-cow to use revisions
This commit is contained in:
parent
c5bdc35b60
commit
4cffa9b4e3
3 changed files with 11 additions and 52 deletions
|
@ -1,27 +0,0 @@
|
|||
// Copyright 2014 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.
|
||||
|
||||
// aux-build:coherence_lib.rs
|
||||
|
||||
// Test that the `Pair` type reports an error if it contains type
|
||||
// parameters, even when they are covered by local types. This test
|
||||
// was originally intended to test the opposite, but the rules changed
|
||||
// with RFC 1023 and this became illegal.
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate coherence_lib as lib;
|
||||
use lib::{Remote,Pair};
|
||||
|
||||
pub struct Cover<T>(T);
|
||||
|
||||
impl<T> Remote for Pair<Cover<T>,T> { } //~ ERROR E0210
|
||||
|
||||
fn main() { }
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2014 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.
|
||||
|
||||
// aux-build:coherence_lib.rs
|
||||
|
||||
// Test that it's not ok for T to appear uncovered
|
||||
|
||||
extern crate coherence_lib as lib;
|
||||
use lib::{Remote,Pair};
|
||||
|
||||
pub struct Cover<T>(T);
|
||||
|
||||
impl<T,U> Remote for Pair<Cover<T>,U> { }
|
||||
//~^ ERROR type parameter `T` must be used as the type parameter for some local type
|
||||
|
||||
fn main() { }
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// revisions: a b c
|
||||
|
||||
// aux-build:coherence_lib.rs
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
@ -22,7 +24,14 @@ use lib::{Remote,Pair};
|
|||
|
||||
pub struct Cover<T>(T);
|
||||
|
||||
impl<T> Remote for Pair<T,Cover<T>> { }
|
||||
//~^ ERROR E0210
|
||||
#[cfg(a)]
|
||||
impl<T> Remote for Pair<T,Cover<T>> { } //[a]~ ERROR E0210
|
||||
|
||||
#[cfg(b)]
|
||||
impl<T> Remote for Pair<Cover<T>,T> { } //[b]~ ERROR E0210
|
||||
|
||||
#[cfg(c)]
|
||||
impl<T,U> Remote for Pair<Cover<T>,U> { }
|
||||
//[c]~^ ERROR type parameter `T` must be used as the type parameter for some local type
|
||||
|
||||
fn main() { }
|
Loading…
Add table
Add a link
Reference in a new issue