-
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 #108789 - matthiaskrgr:rollup-nyurto8, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #108244 (Add test for semicolon recovery ICE) - #108746 (Don't project to RPITIT that has no default value) - #108764 (Tweaks to -Zdrop-tracking-mir) - #108770 (Improve documentation and argument naming of some TyCtxt methods) - #108773 (x fmt: Only check modified files locally) - #108775 (Use the correct bound vars in return type suggestion.) - #108776 (Make `x test tidy` less noisy) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
17 changed files
with
151 additions
and
54 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
16 changes: 16 additions & 0 deletions
16
tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.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,16 @@ | ||
#![feature(return_position_impl_trait_in_trait)] | ||
//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete | ||
|
||
trait MyTrait { | ||
fn foo(&self) -> impl Sized; | ||
fn bar(&self) -> impl Sized; | ||
} | ||
|
||
impl MyTrait for i32 { | ||
//~^ ERROR not all trait items implemented, missing: `foo` | ||
fn bar(&self) -> impl Sized { | ||
self.foo() | ||
} | ||
} | ||
|
||
fn main() {} |
21 changes: 21 additions & 0 deletions
21
tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.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,21 @@ | ||
warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/dont-project-to-rpitit-with-no-value.rs:1:12 | ||
| | ||
LL | #![feature(return_position_impl_trait_in_trait)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error[E0046]: not all trait items implemented, missing: `foo` | ||
--> $DIR/dont-project-to-rpitit-with-no-value.rs:9:1 | ||
| | ||
LL | fn foo(&self) -> impl Sized; | ||
| ---------------------------- `foo` from trait | ||
... | ||
LL | impl MyTrait for i32 { | ||
| ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation | ||
|
||
error: aborting due to previous error; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0046`. |
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,5 @@ | ||
fn foo() {} | ||
fn main() { | ||
foo(; | ||
foo(; | ||
} //~ ERROR mismatched closing delimiter |
13 changes: 13 additions & 0 deletions
13
tests/ui/parser/issues/issue-108242-semicolon-recovery.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,13 @@ | ||
error: mismatched closing delimiter: `}` | ||
--> $DIR/issue-108242-semicolon-recovery.rs:4:8 | ||
| | ||
LL | fn main() { | ||
| - closing delimiter possibly meant for this | ||
LL | foo(; | ||
LL | foo(; | ||
| ^ unclosed delimiter | ||
LL | } | ||
| ^ mismatched closing delimiter | ||
|
||
error: aborting due to previous error | ||
|
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,6 @@ | ||
// edition: 2021 | ||
|
||
async fn str<T>(T: &str) -> &str { &str } | ||
//~^ ERROR mismatched types | ||
|
||
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,12 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-107860.rs:3:36 | ||
| | ||
LL | async fn str<T>(T: &str) -> &str { &str } | ||
| ^^^^ expected `&str`, found `&fn(&str) -> ... {str::<...>}` | ||
| | ||
= note: expected reference `&str` | ||
found reference `&for<'a> fn(&'a str) -> impl Future<Output = &'a str> {str::<_>}` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |