forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#70296 - Centril:rollup-wvfmb3n, r=Centril
Rollup of 9 pull requests Successful merges: - rust-lang#69251 (#[track_caller] in traits) - rust-lang#69880 (miri engine: turn error sanity checks into assertions) - rust-lang#70207 (Use getentropy(2) on macos) - rust-lang#70227 (Only display definition when suggesting a typo) - rust-lang#70236 (resolve: Avoid "self-confirming" import resolutions in one more case) - rust-lang#70248 (parser: simplify & remove unused field) - rust-lang#70249 (handle ConstKind::Unresolved after monomorphizing) - rust-lang#70269 (remove redundant closures (clippy::redundant_closure)) - rust-lang#70270 (Clean up E0449 explanation) Failed merges: r? @ghost
- Loading branch information
Showing
67 changed files
with
468 additions
and
340 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
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 |
---|---|---|
@@ -1,48 +1,11 @@ | ||
`#[track_caller]` cannot be used in traits yet. This is due to limitations in | ||
the compiler which are likely to be temporary. See [RFC 2091] for details on | ||
this and other restrictions. | ||
`#[track_caller]` cannot be used to annotate foreign functions. | ||
|
||
Erroneous example with a trait method implementation: | ||
Erroneous example: | ||
|
||
```compile_fail,E0738 | ||
#![feature(track_caller)] | ||
trait Foo { | ||
fn bar(&self); | ||
} | ||
impl Foo for u64 { | ||
#[track_caller] | ||
fn bar(&self) {} | ||
} | ||
``` | ||
|
||
Erroneous example with a blanket trait method implementation: | ||
|
||
```compile_fail,E0738 | ||
#![feature(track_caller)] | ||
trait Foo { | ||
extern "Rust" { | ||
#[track_caller] | ||
fn bar(&self) {} | ||
fn baz(&self); | ||
fn bar(); | ||
} | ||
``` | ||
|
||
Erroneous example with a trait method declaration: | ||
|
||
```compile_fail,E0738 | ||
#![feature(track_caller)] | ||
trait Foo { | ||
fn bar(&self) {} | ||
#[track_caller] | ||
fn baz(&self); | ||
} | ||
``` | ||
|
||
Note that while the compiler may be able to support the attribute in traits in | ||
the future, [RFC 2091] prohibits their implementation without a follow-up RFC. | ||
|
||
[RFC 2091]: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md |
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
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.