diff options
| author | Jonathan Turner <jonathandturner@users.noreply.github.com> | 2016-08-07 09:59:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-07 09:59:40 -0700 |
| commit | 0b567c68da6bb3f95dc847fa2991f2aa3d728a87 (patch) | |
| tree | 684501fdc0d0c0fd4dcf25679442967c71813de5 /src/test/compile-fail/impl-wrong-item-for-trait.rs | |
| parent | f9f6fd4fbb2c57472ec1019e553332a82da2d89b (diff) | |
| parent | ed72c65f7291c893856d9bf220ab9b585939e724 (diff) | |
| download | rust-0b567c68da6bb3f95dc847fa2991f2aa3d728a87.tar.gz rust-0b567c68da6bb3f95dc847fa2991f2aa3d728a87.zip | |
Rollup merge of #35355 - shri3k:E0046, r=jonathandturner
Updates compiler error E0046 with new format
Addresses #35209 as part of #35233.
r? @jonathandturner
I've repeated the following in my code. If this is something not desirable then let me know if there's any process to make this any cleaner. Thank you.
```rust
missing_items.iter()
.map(|name| name.to_string())
.collect::<Vec<_>>().join("`, `"))
```
Diffstat (limited to 'src/test/compile-fail/impl-wrong-item-for-trait.rs')
| -rw-r--r-- | src/test/compile-fail/impl-wrong-item-for-trait.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/compile-fail/impl-wrong-item-for-trait.rs b/src/test/compile-fail/impl-wrong-item-for-trait.rs index 6452e50d089..e0ea1a4cac5 100644 --- a/src/test/compile-fail/impl-wrong-item-for-trait.rs +++ b/src/test/compile-fail/impl-wrong-item-for-trait.rs @@ -21,6 +21,7 @@ pub struct FooConstForMethod; impl Foo for FooConstForMethod { //~^ ERROR E0046 + //~| NOTE missing `bar` in implementation const bar: u64 = 1; //~^ ERROR E0323 //~| NOTE does not match trait @@ -31,6 +32,7 @@ pub struct FooMethodForConst; impl Foo for FooMethodForConst { //~^ ERROR E0046 + //~| NOTE missing `MY_CONST` in implementation fn bar(&self) {} fn MY_CONST() {} //~^ ERROR E0324 @@ -41,6 +43,7 @@ pub struct FooTypeForMethod; impl Foo for FooTypeForMethod { //~^ ERROR E0046 + //~| NOTE missing `bar` in implementation type bar = u64; //~^ ERROR E0325 //~| NOTE does not match trait |
