-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't ICE when encountering unresolved regions in fully_resolve
- Loading branch information
1 parent
3d575a2
commit 5f1fd77
Showing
6 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule reference
updated
2 files
+2 −2 | src/attributes.md | |
+5 −41 | src/behavior-considered-undefined.md |
Submodule rust-by-example
updated
11 files
+2 −2 | src/SUMMARY.md | |
+3 −29 | src/attribute.md | |
+1 −1 | src/custom_types/constants.md | |
+18 −16 | src/flow_control/while_let.md | |
+1 −1 | src/fn/hof.md | |
+3 −6 | src/meta/doc.md | |
+4 −11 | src/meta/playground.md | |
+1 −1 | src/scope/lifetime.md | |
+1 −1 | src/scope/move.md | |
+0 −3 | src/std_misc/arg/matching.md | |
+4 −2 | src/std_misc/file/read_lines.md |
Submodule cargo
updated
70 files
21 changes: 21 additions & 0 deletions
21
tests/ui/async-await/in-trait/unconstrained-impl-region.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// edition: 2021 | ||
|
||
#![feature(async_fn_in_trait)] | ||
|
||
pub(crate) trait Inbox<M> { | ||
async fn next(self) -> M; | ||
} | ||
|
||
pub(crate) trait Actor: Sized { | ||
type Message; | ||
|
||
async fn on_mount(self, _: impl Inbox<Self::Message>); | ||
} | ||
|
||
impl<'a> Actor for () { | ||
//~^ ERROR the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates | ||
type Message = &'a (); | ||
async fn on_mount(self, _: impl Inbox<&'a ()>) {} | ||
} | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
tests/ui/async-await/in-trait/unconstrained-impl-region.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates | ||
--> $DIR/unconstrained-impl-region.rs:15:6 | ||
| | ||
LL | impl<'a> Actor for () { | ||
| ^^ unconstrained lifetime parameter | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0207`. |