Skip to content

Commit d758e4d

Browse files
committed
Update tests changed by rebase
1 parent ae5c092 commit d758e4d

6 files changed

+39
-4
lines changed

src/test/ui/coherence/coherence-fundamental-trait-objects.stderr renamed to src/test/ui/coherence/coherence-fundamental-trait-objects.old.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
2-
--> $DIR/coherence-fundamental-trait-objects.rs:12:1
2+
--> $DIR/coherence-fundamental-trait-objects.rs:15:1
33
|
44
LL | impl Misc for dyn Fundamental<Local> {}
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
2+
--> $DIR/coherence-fundamental-trait-objects.rs:15:1
3+
|
4+
LL | impl Misc for dyn Fundamental<Local> {}
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
6+
|
7+
= note: the impl does not reference any types defined in this crate
8+
= note: define and implement a trait or new type instead
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0117`.

src/test/ui/coherence/coherence-fundamental-trait-objects.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
// are distinct.
44

55
// aux-build:coherence_fundamental_trait_lib.rs
6+
// revisions: old re
7+
8+
#![cfg_attr(re, feature(re_rebalance_coherence))]
69

710
extern crate coherence_fundamental_trait_lib;
811

912
use coherence_fundamental_trait_lib::{Fundamental, Misc};
1013

1114
pub struct Local;
1215
impl Misc for dyn Fundamental<Local> {}
13-
//~^ ERROR E0117
16+
//[old]~^ ERROR E0117
17+
//[re]~^^ ERROR E0117
1418

1519
fn main() {}

src/test/ui/coherence/coherence-subtyping.stderr renamed to src/test/ui/coherence/coherence-subtyping.old.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2-
--> $DIR/coherence-subtyping.rs:11:1
2+
--> $DIR/coherence-subtyping.rs:15:1
33
|
44
LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
55
| --------------------------------------------------------- first implementation here
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2+
--> $DIR/coherence-subtyping.rs:15:1
3+
|
4+
LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
5+
| --------------------------------------------------------- first implementation here
6+
...
7+
LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
9+
|
10+
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
11+
12+
error: aborting due to previous error
13+
14+
For more information about this error, try `rustc --explain E0119`.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// Test that two distinct impls which match subtypes of one another
22
// yield coherence errors (or not) depending on the variance.
33

4+
// revisions: old re
5+
6+
#![cfg_attr(re, feature(re_rebalance_coherence))]
7+
48
trait TheTrait {
59
fn foo(&self) { }
610
}
@@ -9,7 +13,8 @@ impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
913
}
1014

1115
impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
12-
//~^ ERROR
16+
//[old]~^ ERROR
17+
//[re]~^^ ERROR
1318
}
1419

1520
fn main() { }

0 commit comments

Comments
 (0)