diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-08-10 21:31:26 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-10-11 06:24:51 +0000 |
| commit | 152cd6322655bb5173655cdf0781ca64c2a7602f (patch) | |
| tree | bd3c5ca31c99c70fddcba8b7e57e31d68da14eac /src/test/ui/error-codes | |
| parent | 8796e7a9cfd4c5c4f1de15ec1c53994ddf288665 (diff) | |
| download | rust-152cd6322655bb5173655cdf0781ca64c2a7602f.tar.gz rust-152cd6322655bb5173655cdf0781ca64c2a7602f.zip | |
Report duplicate definitions in trait impls during resolution.
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0201.stderr | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/test/ui/error-codes/E0201.stderr b/src/test/ui/error-codes/E0201.stderr index 94e06894144..f72145a8244 100644 --- a/src/test/ui/error-codes/E0201.stderr +++ b/src/test/ui/error-codes/E0201.stderr @@ -1,27 +1,33 @@ -error[E0201]: duplicate definitions with name `bar`: - --> $DIR/E0201.rs:5:5 - | -LL | fn bar(&self) -> bool { self.0 > 5 } - | --------------------- previous definition of `bar` here -LL | fn bar() {} - | ^^^^^^^^ duplicate definition - error[E0201]: duplicate definitions with name `baz`: --> $DIR/E0201.rs:17:5 | +LL | fn baz(&self) -> bool; + | ---------------------- item in trait +... LL | fn baz(&self) -> bool { true } - | --------------------- previous definition of `baz` here + | ------------------------------ previous definition here LL | fn baz(&self) -> bool { self.0 > 5 } - | ^^^^^^^^^^^^^^^^^^^^^ duplicate definition + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition error[E0201]: duplicate definitions with name `Quux`: --> $DIR/E0201.rs:18:5 | +LL | type Quux; + | ---------- item in trait +... LL | type Quux = u32; - | --------- previous definition of `Quux` here + | ---------------- previous definition here ... LL | type Quux = u32; - | ^^^^^^^^^ duplicate definition + | ^^^^^^^^^^^^^^^^ duplicate definition + +error[E0201]: duplicate definitions with name `bar`: + --> $DIR/E0201.rs:5:5 + | +LL | fn bar(&self) -> bool { self.0 > 5 } + | --------------------- previous definition of `bar` here +LL | fn bar() {} + | ^^^^^^^^ duplicate definition error: aborting due to 3 previous errors |
