rollup merge of #20416: nikomatsakis/coherence
Conflicts: src/test/run-pass/issue-15734.rs src/test/run-pass/issue-3743.rs
This commit is contained in:
commit
735c308aed
45 changed files with 709 additions and 176 deletions
19
src/test/compile-fail/coherence-all-remote.rs
Normal file
19
src/test/compile-fail/coherence-all-remote.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// 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
|
||||
|
||||
extern crate "coherence-lib" as lib;
|
||||
use lib::Remote;
|
||||
|
||||
impl<T> Remote for int { }
|
||||
//~^ ERROR cannot provide an extension implementation
|
||||
|
||||
fn main() { }
|
||||
21
src/test/compile-fail/coherence-bigint-param.rs
Normal file
21
src/test/compile-fail/coherence-bigint-param.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// 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
|
||||
|
||||
extern crate "coherence-lib" as lib;
|
||||
use lib::Remote1;
|
||||
|
||||
pub struct BigInt;
|
||||
|
||||
impl<T> Remote1<BigInt> for T { }
|
||||
//~^ ERROR type parameter `T` must also appear
|
||||
|
||||
fn main() { }
|
||||
21
src/test/compile-fail/coherence-iterator-vec-any-elem.rs
Normal file
21
src/test/compile-fail/coherence-iterator-vec-any-elem.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// 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
|
||||
|
||||
extern crate "coherence-lib" as lib;
|
||||
use lib::Remote1;
|
||||
|
||||
struct Foo<T>(T);
|
||||
|
||||
impl<T,U> Remote1<U> for Foo<T> { }
|
||||
//~^ ERROR type parameter `U` must also appear
|
||||
|
||||
fn main() { }
|
||||
18
src/test/compile-fail/coherence-lone-type-parameter.rs
Normal file
18
src/test/compile-fail/coherence-lone-type-parameter.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// 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
|
||||
|
||||
extern crate "coherence-lib" as lib;
|
||||
use lib::Remote;
|
||||
|
||||
impl<T> Remote for T { } //~ ERROR E0117
|
||||
|
||||
fn main() { }
|
||||
21
src/test/compile-fail/coherence-overlapping-pairs.rs
Normal file
21
src/test/compile-fail/coherence-overlapping-pairs.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// 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
|
||||
|
||||
extern crate "coherence-lib" as lib;
|
||||
use lib::Remote;
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl<T> Remote for lib::Pair<T,Foo> { }
|
||||
//~^ ERROR type parameter `T` must also appear
|
||||
|
||||
fn main() { }
|
||||
21
src/test/compile-fail/coherence-pair-covered-uncovered.rs
Normal file
21
src/test/compile-fail/coherence-pair-covered-uncovered.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// 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
|
||||
|
||||
extern crate "coherence-lib" as lib;
|
||||
use lib::{Remote, Pair};
|
||||
|
||||
struct Local<T>(T);
|
||||
|
||||
impl<T,U> Remote for Pair<T,Local<U>> { }
|
||||
//~^ ERROR type parameter `T` must also appear
|
||||
|
||||
fn main() { }
|
||||
|
|
@ -9,6 +9,8 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![feature(opt_out_copy)]
|
||||
//~^ WARNING feature is deprecated
|
||||
//~| WARNING feature is deprecated
|
||||
|
||||
// Test that when using the `opt-out-copy` feature we still consider
|
||||
// destructors to be non-movable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue