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#82341 - GuillaumeGomez:rollup-t7y7tyg, r=Guil…
…laumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#80595 (`impl PartialEq<Punct> for char`; symmetry for rust-lang#78636) - rust-lang#81991 (Fix panic in 'remove semicolon' when types are not local) - rust-lang#82176 (fix MIR fn-ptr pretty-printing) - rust-lang#82244 (Keep consistency in example for Stdin StdinLock) - rust-lang#82260 (rustc: Show ``@path`` usage in stable) - rust-lang#82316 (Fix minor mistake in LTO docs.) - rust-lang#82332 (Don't generate src link on dummy spans) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
14 changed files
with
117 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has foo/struct.Unsized.html | ||
// @has - '//h3[@id="impl-Sized"]/code' 'impl !Sized for Unsized' | ||
// @!has - '//h3[@id="impl-Sized"]/a[@class="srclink"]' '[src]' | ||
// @has - '//h3[@id="impl-Sync"]/code' 'impl Sync for Unsized' | ||
// @!has - '//h3[@id="impl-Sync"]/a[@class="srclink"]' '[src]' | ||
// @has - '//h3[@id="impl-Any"]/code' 'impl<T> Any for T' | ||
// @has - '//h3[@id="impl-Any"]/a[@class="srclink"]' '[src]' | ||
pub struct Unsized { | ||
data: [u8], | ||
} |
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 @@ | ||
// edition:2018 | ||
|
||
pub struct Test {} | ||
|
||
impl Test { | ||
pub async fn answer_str(&self, _s: &str) -> Test { | ||
Test {} | ||
} | ||
} |
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,17 @@ | ||
// aux-build:issue-81839.rs | ||
// edition:2018 | ||
|
||
extern crate issue_81839; | ||
|
||
async fn test(ans: &str, num: i32, cx: &issue_81839::Test) -> u32 { | ||
match num { | ||
1 => { | ||
cx.answer_str("hi"); | ||
} | ||
_ => cx.answer_str("hi"), //~ `match` arms have incompatible types | ||
} | ||
|
||
1 | ||
} | ||
|
||
fn main() {} |
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,27 @@ | ||
error[E0308]: `match` arms have incompatible types | ||
--> $DIR/issue-81839.rs:11:14 | ||
| | ||
LL | / match num { | ||
LL | | 1 => { | ||
LL | | cx.answer_str("hi"); | ||
| | -------------------- | ||
| | | | | ||
| | | help: consider removing this semicolon | ||
| | this is found to be of type `()` | ||
LL | | } | ||
LL | | _ => cx.answer_str("hi"), | ||
| | ^^^^^^^^^^^^^^^^^^^ expected `()`, found opaque type | ||
LL | | } | ||
| |_____- `match` arms have incompatible types | ||
| | ||
::: $DIR/auxiliary/issue-81839.rs:6:49 | ||
| | ||
LL | pub async fn answer_str(&self, _s: &str) -> Test { | ||
| ---- the `Output` of this `async fn`'s found opaque type | ||
| | ||
= note: expected type `()` | ||
found opaque type `impl Future` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
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