Change error message for E0391 to "cyclic dependency detected"

This commit is contained in:
John Kåre Alsaker 2018-02-10 00:28:23 +01:00
parent ae46434b79
commit 46a3f2fa18
27 changed files with 31 additions and 31 deletions

View File

@ -84,7 +84,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
let span = self.sess.codemap().def_span(span);
let mut err =
struct_span_err!(self.sess, span, E0391,
"unsupported cyclic reference between types/traits detected");
"cyclic dependency detected");
err.span_label(span, "cyclic reference");
err.span_note(self.sess.codemap().def_span(stack[0].0),

View File

@ -17,7 +17,7 @@
#![feature(specialization)]
trait Trait<T> { type Assoc; }
//~^ unsupported cyclic reference between types/traits detected [E0391]
//~^ cyclic dependency detected [E0391]
impl<T> Trait<T> for Vec<T> {
type Assoc = ();

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern: unsupported cyclic reference between types/traits detected
// error-pattern: cyclic dependency detected
#![feature(const_fn)]

View File

@ -25,7 +25,7 @@ trait Trait { type Item; }
struct A<T>
where T : Trait,
T : Add<T::Item>
//~^ ERROR unsupported cyclic reference between types/traits detected
//~^ ERROR cyclic dependency detected
//~| ERROR associated type `Item` not found for `T`
{
data: T

View File

@ -12,7 +12,7 @@
// again references the trait.
trait Foo<X = Box<Foo>> {
//~^ ERROR unsupported cyclic reference
//~^ ERROR cyclic dependency detected
}
fn main() { }

View File

@ -11,7 +11,7 @@
// Test a supertrait cycle where a trait extends itself.
trait Chromosome: Chromosome {
//~^ ERROR unsupported cyclic reference
//~^ ERROR cyclic dependency detected
}
fn main() { }

View File

@ -9,6 +9,6 @@
// except according to those terms.
type x = Vec<x>;
//~^ ERROR unsupported cyclic reference
//~^ ERROR cyclic dependency detected
fn main() { let b: x = Vec::new(); }

View File

@ -9,7 +9,7 @@
// except according to those terms.
trait T : Iterator<Item=Self::Item>
//~^ ERROR unsupported cyclic reference between types/traits detected
//~^ ERROR cyclic dependency detected
//~| ERROR associated type `Item` not found for `Self`
{}

View File

@ -13,7 +13,7 @@ pub trait Subscriber {
}
pub trait Processor: Subscriber<Input = Self::Input> {
//~^ ERROR unsupported cyclic reference between types/traits detected [E0391]
//~^ ERROR cyclic dependency detected [E0391]
type Input;
}

View File

@ -14,7 +14,7 @@ trait Trait {
}
fn foo<T: Trait<A = T::B>>() { }
//~^ ERROR unsupported cyclic reference between types/traits detected
//~^ ERROR cyclic dependency detected
//~| ERROR associated type `B` not found for `T`
fn main() { }

View File

@ -9,7 +9,7 @@
// except according to those terms.
trait Expr : PartialEq<Self::Item> {
//~^ ERROR: unsupported cyclic reference between types/traits detected
//~^ ERROR: cyclic dependency detected
type Item;
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern: unsupported cyclic reference between types/traits detected
// error-pattern: cyclic dependency detected
// note-pattern: the cycle begins when computing layout of
// note-pattern: ...which then requires computing layout of
// note-pattern: ...which then again requires computing layout of

View File

@ -15,7 +15,7 @@ trait Trait<T> {
}
pub struct Foo<T = Box<Trait<DefaultFoo>>>;
type DefaultFoo = Foo; //~ ERROR unsupported cyclic reference
type DefaultFoo = Foo; //~ ERROR cyclic dependency detected
fn main() {
}

View File

@ -15,7 +15,7 @@ use std::intrinsics;
struct Foo {
bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
//~^ ERROR unsupported cyclic reference between types/traits detected
//~^ ERROR cyclic dependency detected
x: usize,
}

View File

@ -21,10 +21,10 @@ impl Tr for S where Self: Copy {} // OK
impl Tr for S where S<Self>: Copy {} // OK
impl Tr for S where Self::A: Copy {} // OK
impl Tr for Self {} //~ ERROR unsupported cyclic reference between types/traits detected
impl Tr for S<Self> {} //~ ERROR unsupported cyclic reference between types/traits detected
impl Self {} //~ ERROR unsupported cyclic reference between types/traits detected
impl S<Self> {} //~ ERROR unsupported cyclic reference between types/traits detected
impl Tr<Self::A> for S {} //~ ERROR unsupported cyclic reference between types/traits detected
impl Tr for Self {} //~ ERROR cyclic dependency detected
impl Tr for S<Self> {} //~ ERROR cyclic dependency detected
impl Self {} //~ ERROR cyclic dependency detected
impl S<Self> {} //~ ERROR cyclic dependency detected
impl Tr<Self::A> for S {} //~ ERROR cyclic dependency detected
fn main() {}

View File

@ -18,7 +18,7 @@ trait B: C {
}
trait C: B { }
//~^ ERROR unsupported cyclic reference
//~^ ERROR cyclic dependency detected
//~| cyclic reference
fn main() { }

View File

@ -1,4 +1,4 @@
error[E0391]: unsupported cyclic reference between types/traits detected
error[E0391]: cyclic dependency detected
--> $DIR/cycle-trait-supertrait-indirect.rs:20:1
|
20 | trait C: B { }

View File

@ -42,7 +42,7 @@ fn after() -> impl Fn(i32) {
// independently resolved and only require the concrete
// return type, which can't depend on the obligation.
fn cycle1() -> impl Clone {
//~^ ERROR unsupported cyclic reference between types/traits detected
//~^ ERROR cyclic dependency detected
//~| cyclic reference
send(cycle2().clone());

View File

@ -28,7 +28,7 @@ note: required by `send`
24 | fn send<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0391]: unsupported cyclic reference between types/traits detected
error[E0391]: cyclic dependency detected
--> $DIR/auto-trait-leak.rs:44:1
|
44 | fn cycle1() -> impl Clone {

View File

@ -12,7 +12,7 @@ trait t1 : t2 {
}
trait t2 : t1 {
//~^ ERROR unsupported cyclic reference between types/traits detected
//~^ ERROR cyclic dependency detected
//~| cyclic reference
}

View File

@ -1,4 +1,4 @@
error[E0391]: unsupported cyclic reference between types/traits detected
error[E0391]: cyclic dependency detected
--> $DIR/issue-12511.rs:14:1
|
14 | trait t2 : t1 {

View File

@ -1,4 +1,4 @@
error[E0391]: unsupported cyclic reference between types/traits detected
error[E0391]: cyclic dependency detected
--> $DIR/issue-23302-1.rs:14:9
|
14 | A = X::A as isize, //~ ERROR E0391

View File

@ -1,4 +1,4 @@
error[E0391]: unsupported cyclic reference between types/traits detected
error[E0391]: cyclic dependency detected
--> $DIR/issue-23302-2.rs:14:9
|
14 | A = Y::B as isize, //~ ERROR E0391

View File

@ -1,4 +1,4 @@
error[E0391]: unsupported cyclic reference between types/traits detected
error[E0391]: cyclic dependency detected
--> $DIR/issue-23302-3.rs:11:16
|
11 | const A: i32 = B; //~ ERROR E0391

View File

@ -1,4 +1,4 @@
error[E0391]: unsupported cyclic reference between types/traits detected
error[E0391]: cyclic dependency detected
--> $DIR/issue-36163.rs:14:9
|
14 | B = A, //~ ERROR E0391

View File

@ -13,6 +13,6 @@ pub trait ToNbt<T> {
}
impl ToNbt<Self> {}
//~^ ERROR unsupported cyclic reference
//~^ ERROR cyclic dependency detected
fn main() {}

View File

@ -1,4 +1,4 @@
error[E0391]: unsupported cyclic reference between types/traits detected
error[E0391]: cyclic dependency detected
--> $DIR/issue-23305.rs:15:12
|
15 | impl ToNbt<Self> {}