diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-11 11:58:59 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-04-27 22:00:51 +0200 |
| commit | a621b8499f61edfda48a87b993dde07e34d67998 (patch) | |
| tree | 277e5737dd15ea38167970e0037ae73bd356c728 /src/test | |
| parent | f901df3739b31c1ba4480484ccadaca1042a895d (diff) | |
| download | rust-a621b8499f61edfda48a87b993dde07e34d67998.tar.gz rust-a621b8499f61edfda48a87b993dde07e34d67998.zip | |
Bless tests.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/generic-associated-types/issue-70304.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/generic-associated-types/issue-70304.stderr | 14 | ||||
| -rw-r--r-- | src/test/ui/impl-trait/issues/issue-86800.rs | 6 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/test/ui/generic-associated-types/issue-70304.rs b/src/test/ui/generic-associated-types/issue-70304.rs index 448d7ec2873..1c3d166a1af 100644 --- a/src/test/ui/generic-associated-types/issue-70304.rs +++ b/src/test/ui/generic-associated-types/issue-70304.rs @@ -46,6 +46,7 @@ where fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'_>> { //~^ ERROR: missing lifetime specifier + //~| ERROR: missing lifetime specifier DocumentImpl {} } diff --git a/src/test/ui/generic-associated-types/issue-70304.stderr b/src/test/ui/generic-associated-types/issue-70304.stderr index c5f59a24057..08efc82c886 100644 --- a/src/test/ui/generic-associated-types/issue-70304.stderr +++ b/src/test/ui/generic-associated-types/issue-70304.stderr @@ -10,6 +10,18 @@ help: consider using the `'static` lifetime LL | fn create_doc() -> impl Document<Cursor<'static> = DocCursorImpl<'_>> { | ~~~~~~~ -error: aborting due to previous error +error[E0106]: missing lifetime specifier + --> $DIR/issue-70304.rs:47:61 + | +LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'_>> { + | ^^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the `'static` lifetime + | +LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'static>> { + | ~~~~~~~ + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0106`. diff --git a/src/test/ui/impl-trait/issues/issue-86800.rs b/src/test/ui/impl-trait/issues/issue-86800.rs index e8cef42f208..19edeaffc49 100644 --- a/src/test/ui/impl-trait/issues/issue-86800.rs +++ b/src/test/ui/impl-trait/issues/issue-86800.rs @@ -27,16 +27,16 @@ type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O> fn execute_transaction_fut<'f, F, O>( f: F, -) -> impl FnOnce(&mut dyn Transaction) -> TransactionFuture<O> +) -> impl FnOnce(&mut dyn Transaction) -> TransactionFuture<'_, O> where - F: FnOnce(&mut dyn Transaction) -> TransactionFuture<O> + 'f + F: FnOnce(&mut dyn Transaction) -> TransactionFuture<'_, O> + 'f { f } impl Context { async fn do_transaction<O>( - &self, f: impl FnOnce(&mut dyn Transaction) -> TransactionFuture<O> + &self, f: impl FnOnce(&mut dyn Transaction) -> TransactionFuture<'_, O> ) -> TransactionResult<O> { let mut conn = Connection {}; |
