Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a1df132
Deduplicate some error messages
Jul 17, 2019
43a2cbd
lifetime elision: add conforming-to-fn tests.
Centril Aug 8, 2019
a694782
lifetime elision: add non-conforming-to-fn tests.
Centril Aug 8, 2019
d9294a2
lifetime elision: document conformance of 'async fn' to 'fn'.
Centril Aug 8, 2019
f395787
Add async version of self_lifetime.rs test.
Centril Aug 8, 2019
5ce8f7a
Add async versions of arbitrary_self_types_pin_lifetime tests.
Centril Aug 8, 2019
2644205
Remove unneeded comment in src/libcore/hash/mod.rs
sd234678 Aug 9, 2019
51ce121
Implement Clone, Display for ascii::EscapeDefault
Aug 9, 2019
fa7a40c
Document From trait for BinaryHeap
Observer42 Aug 12, 2019
eb832b2
ci: move mirrors to their standalone bucket
pietroalbini Aug 12, 2019
91af5c2
Bring back suggestion for splitting `<-` into `< -`
iluuu1994 Aug 11, 2019
fecf305
DiagnosticBuilder docs
RalfJung Aug 12, 2019
e30480c
Apply suggestions from code review
Aug 12, 2019
34dcca2
syntax: account for CVarArgs being in the argument list.
eddyb Aug 11, 2019
861d1bb
typeck: Prohibit RPIT types that inherit lifetimes
davidtwco Jul 21, 2019
18e5453
use `ParamName` to track in-scope lifetimes instead of Ident
nikomatsakis Aug 12, 2019
03e7b96
revamp how we handle elision in async fn
nikomatsakis Aug 12, 2019
cbe8518
use `modern` everywhere
nikomatsakis Aug 12, 2019
a02a171
add edition to regression test
nikomatsakis Aug 12, 2019
948739f
revamp comment
nikomatsakis Aug 12, 2019
ad214fe
fix README.md
nikomatsakis Aug 12, 2019
e4756e6
clear in-scope lifetimes for nested items in HIR lowering
nikomatsakis Aug 13, 2019
d7c7c52
bless tests
nikomatsakis Aug 13, 2019
d824edf
Do not ICE when synthesizing spans falling inside unicode chars
estebank Aug 13, 2019
686553d
ci: add a check for clock drift
pietroalbini Aug 13, 2019
84cab92
Provide map_ok and map_err method for Poll<Option<Result<T, E>>>
95th Aug 13, 2019
18d69c8
bless tests with compare-mode=nll
nikomatsakis Aug 13, 2019
105b3a0
review comment: remove unecessary error in test
estebank Aug 13, 2019
c259d1c
RELEASES.md: ? is one of three Kleene operators
andersk Aug 13, 2019
ea1a9a0
Fix typo in error message.
ehuss Aug 13, 2019
84e202e
review comments
estebank Aug 13, 2019
643ddfa
Apply Centril's suggestion
ehuss Aug 13, 2019
dda33ca
Rollup merge of #62760 - chansuke:dedupe-error-messages, r=zackmdavis
Centril Aug 14, 2019
3f18112
Rollup merge of #62849 - davidtwco:prohibit-inheriting-lifetimes, r=n…
Centril Aug 14, 2019
3d5387d
Rollup merge of #63383 - Centril:async-lifetime-elision-tests, r=niko…
Centril Aug 14, 2019
b5df4bb
Rollup merge of #63421 - clarfon:escape_default, r=dtolnay
Centril Aug 14, 2019
76bd7d6
Rollup merge of #63459 - eddyb:issue-63430, r=petrochenkov
Centril Aug 14, 2019
c824839
Rollup merge of #63475 - iluuu1994:issue-62632, r=Centril
Centril Aug 14, 2019
6092519
Rollup merge of #63485 - pietroalbini:new-mirror-bucket, r=alexcrichton
Centril Aug 14, 2019
4e1b865
Rollup merge of #63486 - Observer42:document-from-trait-in-binaryheap…
Centril Aug 14, 2019
f47226e
Rollup merge of #63488 - RalfJung:diagnostic-docs, r=zackmdavis
Centril Aug 14, 2019
0098d0c
Rollup merge of #63493 - sd234678:remove-unneeded-comment-from-src/li…
Centril Aug 14, 2019
4134241
Rollup merge of #63499 - nikomatsakis:issuee-63388-async-fn-elision-s…
Centril Aug 14, 2019
5741e29
Rollup merge of #63501 - nikomatsakis:issue-63500-async-anon-impl-lif…
Centril Aug 14, 2019
43f4990
Rollup merge of #63508 - estebank:compromice, r=petrochenkov
Centril Aug 14, 2019
051598b
Rollup merge of #63511 - pietroalbini:pa-ci-date, r=Mark-Simulacrum
Centril Aug 14, 2019
d5dd097
Rollup merge of #63512 - 95th:master, r=cramertj
Centril Aug 14, 2019
92e5508
Rollup merge of #63529 - andersk:release-notes-kleene, r=Centril
Centril Aug 14, 2019
a8bb375
Rollup merge of #63530 - ehuss:typo-statemement, r=centril
Centril Aug 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add async version of self_lifetime.rs test.
  • Loading branch information
Centril committed Aug 8, 2019
commit f3957876c81ce45c31895316060e23149c6fb964
11 changes: 11 additions & 0 deletions src/test/ui/self/self_lifetime-async.nll.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
error[E0106]: missing lifetime specifier
--> $DIR/self_lifetime-async.rs:9:44
|
LL | async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
| ^
|
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found none.

error: aborting due to previous error

For more information about this error, try `rustc --explain E0106`.
20 changes: 20 additions & 0 deletions src/test/ui/self/self_lifetime-async.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// FIXME: Investigate why `self_lifetime.rs` is check-pass but this isn't.

// edition:2018

#![feature(async_await)]

struct Foo<'a>(&'a ());
impl<'a> Foo<'a> {
async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
//~^ ERROR missing lifetime specifier
//~| ERROR cannot infer an appropriate lifetime
}

type Alias = Foo<'static>;
impl Alias {
async fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
//~^ ERROR lifetime mismatch
}

fn main() {}
39 changes: 39 additions & 0 deletions src/test/ui/self/self_lifetime-async.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
error[E0106]: missing lifetime specifier
--> $DIR/self_lifetime-async.rs:9:44
|
LL | async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
| ^
|
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found none.

error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
--> $DIR/self_lifetime-async.rs:9:22
|
LL | async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
| ^^^^
|
note: first, the lifetime cannot outlive the lifetime 'a as defined on the impl at 8:6...
--> $DIR/self_lifetime-async.rs:8:6
|
LL | impl<'a> Foo<'a> {
| ^^
= note: ...so that the expression is assignable:
expected &Foo<'_>
found &'b Foo<'a>
= note: but, the lifetime must be valid for the static lifetime...
= note: ...so that the types are compatible:
expected &()
found &'static ()

error[E0623]: lifetime mismatch
--> $DIR/self_lifetime-async.rs:16:52
|
LL | async fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
| ------ ^^^
| | |
| | ...but data from `arg` is returned here
| this parameter and the return type are declared with different lifetimes...

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0106`.