forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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 rust-lang#73924 - Manishearth:rollup-8r51ld9, r=Manishe…
…arth Rollup of 17 pull requests Successful merges: - rust-lang#72071 (Added detailed error code explanation for issue E0687 in Rust compiler.) - rust-lang#72369 (Bring net/parser.rs up to modern up to date with modern rust patterns) - rust-lang#72445 (Stabilize `#[track_caller]`.) - rust-lang#73466 (impl From<char> for String) - rust-lang#73548 (remove rustdoc warnings) - rust-lang#73649 (Fix sentence structure) - rust-lang#73678 (Update Box::from_raw example to generalize better) - rust-lang#73705 (stop taking references in Relate) - rust-lang#73716 (Document the static keyword) - rust-lang#73752 (Remap Windows ERROR_INVALID_PARAMETER to ErrorKind::InvalidInput from Other) - rust-lang#73776 (Move terminator to new module) - rust-lang#73778 (Make `likely` and `unlikely` const, gated by feature `const_unlikely`) - rust-lang#73805 (Document the type keyword) - rust-lang#73806 (Use an 'approximate' universal upper bound when reporting region errors) - rust-lang#73828 (Fix wording for anonymous parameter name help) - rust-lang#73846 (Fix comma in debug_assert! docs) - rust-lang#73847 (Edit cursor.prev() method docs in lexer) Failed merges: r? @ghost
- Loading branch information
Showing
121 changed files
with
1,520 additions
and
1,234 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 was deleted.
Oops, something went wrong.
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
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 cannot be used in `fn`/`Fn` syntax. | ||
|
||
Erroneous code examples: | ||
|
||
```compile_fail,E0687 | ||
#![feature(in_band_lifetimes)] | ||
fn foo(x: fn(&'a u32)) {} // error! | ||
fn bar(x: &Fn(&'a u32)) {} // error! | ||
fn baz(x: fn(&'a u32), y: &'a u32) {} // error! | ||
struct Foo<'a> { x: &'a u32 } | ||
impl Foo<'a> { | ||
fn bar(&self, x: fn(&'a u32)) {} // error! | ||
} | ||
``` | ||
|
||
Lifetimes used in `fn` or `Fn` syntax must be explicitly | ||
declared using `<...>` binders. For example: | ||
|
||
``` | ||
fn foo<'a>(x: fn(&'a u32)) {} // ok! | ||
fn bar<'a>(x: &Fn(&'a u32)) {} // ok! | ||
fn baz<'a>(x: fn(&'a u32), y: &'a u32) {} // ok! | ||
struct Foo<'a> { x: &'a u32 } | ||
impl<'a> Foo<'a> { | ||
fn bar(&self, x: fn(&'a u32)) {} // ok! | ||
} | ||
``` |
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
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.