-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #74313 - Manishearth:rollup-b55rn6t, r=Manishearth
Rollup of 8 pull requests Successful merges: - #73354 (Update RELEASES.md for 1.45.0) - #73852 (rustdoc: insert newlines between attributes) - #73867 (Document the union keyword) - #74046 (Fix caching issue when building tools.) - #74123 (clean up E0718 explanation) - #74147 (rustdoc: Allow linking from private items to private types) - #74285 (#71669: add ui, codegen tests for volatile + nearby int intrinsics) - #74286 (Added detailed error code explanation for issue E0688 in Rust compiler.) Failed merges: r? @ghost
- Loading branch information
Showing
18 changed files
with
500 additions
and
20 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
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
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
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
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,36 @@ | ||
In-band lifetimes were mixed with explicit lifetime binders. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0688 | ||
#![feature(in_band_lifetimes)] | ||
fn foo<'a>(x: &'a u32, y: &'b u32) {} // error! | ||
struct Foo<'a> { x: &'a u32 } | ||
impl Foo<'a> { | ||
fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} // error! | ||
} | ||
impl<'b> Foo<'a> { // error! | ||
fn baz() {} | ||
} | ||
``` | ||
|
||
In-band lifetimes cannot be mixed with explicit lifetime binders. | ||
For example: | ||
|
||
``` | ||
fn foo<'a, 'b>(x: &'a u32, y: &'b u32) {} // ok! | ||
struct Foo<'a> { x: &'a u32 } | ||
impl<'a> Foo<'a> { | ||
fn bar<'b,'c>(x: &'a u32, y: &'b u32, z: &'c u32) {} // ok! | ||
} | ||
impl<'a> Foo<'a> { // ok! | ||
fn baz() {} | ||
} | ||
``` |
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
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
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
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
Oops, something went wrong.