Update tests changed by rebase

上级 ae5c0926
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-fundamental-trait-objects.rs:12:1
--> $DIR/coherence-fundamental-trait-objects.rs:15:1
|
LL | impl Misc for dyn Fundamental<Local> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
......
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-fundamental-trait-objects.rs:15:1
|
LL | impl Misc for dyn Fundamental<Local> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.
......@@ -3,6 +3,9 @@
// are distinct.
// aux-build:coherence_fundamental_trait_lib.rs
// revisions: old re
#![cfg_attr(re, feature(re_rebalance_coherence))]
extern crate coherence_fundamental_trait_lib;
......@@ -10,6 +13,7 @@
pub struct Local;
impl Misc for dyn Fundamental<Local> {}
//~^ ERROR E0117
//[old]~^ ERROR E0117
//[re]~^^ ERROR E0117
fn main() {}
error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
--> $DIR/coherence-subtyping.rs:11:1
--> $DIR/coherence-subtyping.rs:15:1
|
LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
| --------------------------------------------------------- first implementation here
......
error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
--> $DIR/coherence-subtyping.rs:15:1
|
LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
| --------------------------------------------------------- first implementation here
...
LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
|
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.
// Test that two distinct impls which match subtypes of one another
// yield coherence errors (or not) depending on the variance.
// revisions: old re
#![cfg_attr(re, feature(re_rebalance_coherence))]
trait TheTrait {
fn foo(&self) { }
}
......@@ -9,7 +13,8 @@ impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
}
impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
//~^ ERROR
//[old]~^ ERROR
//[re]~^^ ERROR
}
fn main() { }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册