Skip to content

Commit

Permalink
Rename test struct names to something more sensible
Browse files Browse the repository at this point in the history
  • Loading branch information
kyren committed Mar 12, 2019
1 parent 8b1742e commit aa9bd68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/test/ui/nll/trait-associated-constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ trait Anything<'a: 'b, 'b> {
const AC: Option<&'b str>;
}

struct OKStruct { }
struct OKStruct1 { }

impl<'a: 'b, 'b> Anything<'a, 'b> for OKStruct {
impl<'a: 'b, 'b> Anything<'a, 'b> for OKStruct1 {
const AC: Option<&'b str> = None;
}

struct FailStruct1 { }
struct FailStruct { }

impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 {
impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct {
const AC: Option<&'c str> = None;
//~^ ERROR: mismatched types
}

struct FailStruct2 { }
struct OKStruct2 { }

impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 {
impl<'a: 'b, 'b> Anything<'a, 'b> for OKStruct2 {
const AC: Option<&'a str> = None;
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/nll/trait-associated-constant.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ LL | const AC: Option<&'c str> = None;
note: the lifetime 'c as defined on the impl at 20:18...
--> $DIR/trait-associated-constant.rs:20:18
|
LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 {
LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct {
| ^^
note: ...does not necessarily outlive the lifetime 'b as defined on the impl at 20:14
--> $DIR/trait-associated-constant.rs:20:14
|
LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 {
LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct {
| ^^

error: aborting due to previous error
Expand Down

0 comments on commit aa9bd68

Please sign in to comment.