diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr')
-rw-r--r-- | src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr new file mode 100644 index 000000000..1e3b071ef --- /dev/null +++ b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr @@ -0,0 +1,78 @@ +error[E0195]: lifetime parameters or bounds on method `no_bound` do not match the trait declaration + --> $DIR/regions-bound-missing-bound-in-impl.rs:19:16 + | +LL | fn no_bound<'b>(self, b: Inv<'b>); + | ---- lifetimes in impl do not match this method in trait +... +LL | fn no_bound<'b:'a>(self, b: Inv<'b>) { + | ^^^^^^^ lifetimes do not match method in trait + +error[E0195]: lifetime parameters or bounds on method `has_bound` do not match the trait declaration + --> $DIR/regions-bound-missing-bound-in-impl.rs:23:17 + | +LL | fn has_bound<'b:'a>(self, b: Inv<'b>); + | ------- lifetimes in impl do not match this method in trait +... +LL | fn has_bound<'b>(self, b: Inv<'b>) { + | ^^^^ lifetimes do not match method in trait + +error[E0308]: method not compatible with trait + --> $DIR/regions-bound-missing-bound-in-impl.rs:27:5 + | +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch + | + = note: expected fn pointer `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'_>)` + found fn pointer `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'_>)` +note: the lifetime `'c` as defined here... + --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24 + | +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { + | ^^ +note: ...does not necessarily outlive the lifetime `'c` as defined here + --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24 + | +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { + | ^^ + +error[E0308]: method not compatible with trait + --> $DIR/regions-bound-missing-bound-in-impl.rs:27:5 + | +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch + | + = note: expected fn pointer `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'_>)` + found fn pointer `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'_>)` +note: the lifetime `'c` as defined here... + --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24 + | +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { + | ^^ +note: ...does not necessarily outlive the lifetime `'c` as defined here + --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24 + | +LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { + | ^^ + +error[E0195]: lifetime parameters or bounds on method `wrong_bound2` do not match the trait declaration + --> $DIR/regions-bound-missing-bound-in-impl.rs:42:20 + | +LL | fn wrong_bound2<'b,'c,'d:'a+'b>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>); + | ---------------- lifetimes in impl do not match this method in trait +... +LL | fn wrong_bound2(self, b: Inv, c: Inv, d: Inv) { + | ^ lifetimes do not match method in trait + +error[E0276]: impl has stricter requirements than trait + --> $DIR/regions-bound-missing-bound-in-impl.rs:49:26 + | +LL | fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>); + | ------------------------------------------------------- definition of `another_bound` from trait +... +LL | fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) { + | ^^ impl has extra requirement `'x: 't` + +error: aborting due to 6 previous errors + +Some errors have detailed explanations: E0195, E0276, E0308. +For more information about an error, try `rustc --explain E0195`. |