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#96846 - matthiaskrgr:rollup-yxu9ot9, r=matthi…
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#96617 (Fix incorrect syntax suggestion with `pub async fn`) - rust-lang#96828 (Further elaborate the lack of guarantees from `Hasher`) - rust-lang#96829 (Fix the `x.py clippy` command) - rust-lang#96830 (Add and tweak const-generics tests) - rust-lang#96835 (Add more eslint rules) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
9 changed files
with
148 additions
and
14 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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...const-generics/issues/issue-775377.stderr → .../const-generics/issues/issue-77357.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
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,15 @@ | ||
// check-pass | ||
|
||
struct A<const M: u32> {} | ||
|
||
struct B<const M: u32> {} | ||
|
||
impl<const M: u32> B<M> { | ||
const M: u32 = M; | ||
} | ||
|
||
struct C<const M: u32> { | ||
a: A<{ B::<1>::M }>, | ||
} | ||
|
||
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,19 @@ | ||
// edition:2018 | ||
|
||
async fn f() { | ||
m::f1().await; //~ ERROR `()` is not a future | ||
m::f2().await; //~ ERROR `()` is not a future | ||
m::f3().await; //~ ERROR `()` is not a future | ||
} | ||
|
||
mod m { | ||
pub fn f1() {} | ||
|
||
pub(crate) fn f2() {} | ||
|
||
pub | ||
fn | ||
f3() {} | ||
} | ||
|
||
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,66 @@ | ||
error[E0277]: `()` is not a future | ||
--> $DIR/issue-96555.rs:4:12 | ||
| | ||
LL | m::f1().await; | ||
| -------^^^^^^ `()` is not a future | ||
| | | ||
| this call returns `()` | ||
| | ||
= help: the trait `Future` is not implemented for `()` | ||
= note: () must be a future or must implement `IntoFuture` to be awaited | ||
= note: required because of the requirements on the impl of `IntoFuture` for `()` | ||
help: remove the `.await` | ||
| | ||
LL - m::f1().await; | ||
LL + m::f1(); | ||
| | ||
help: alternatively, consider making `fn f1` asynchronous | ||
| | ||
LL | pub async fn f1() {} | ||
| +++++ | ||
|
||
error[E0277]: `()` is not a future | ||
--> $DIR/issue-96555.rs:5:12 | ||
| | ||
LL | m::f2().await; | ||
| -------^^^^^^ `()` is not a future | ||
| | | ||
| this call returns `()` | ||
| | ||
= help: the trait `Future` is not implemented for `()` | ||
= note: () must be a future or must implement `IntoFuture` to be awaited | ||
= note: required because of the requirements on the impl of `IntoFuture` for `()` | ||
help: remove the `.await` | ||
| | ||
LL - m::f2().await; | ||
LL + m::f2(); | ||
| | ||
help: alternatively, consider making `fn f2` asynchronous | ||
| | ||
LL | pub(crate) async fn f2() {} | ||
| +++++ | ||
|
||
error[E0277]: `()` is not a future | ||
--> $DIR/issue-96555.rs:6:12 | ||
| | ||
LL | m::f3().await; | ||
| -------^^^^^^ `()` is not a future | ||
| | | ||
| this call returns `()` | ||
| | ||
= help: the trait `Future` is not implemented for `()` | ||
= note: () must be a future or must implement `IntoFuture` to be awaited | ||
= note: required because of the requirements on the impl of `IntoFuture` for `()` | ||
help: remove the `.await` | ||
| | ||
LL - m::f3().await; | ||
LL + m::f3(); | ||
| | ||
help: alternatively, consider making `fn f3` asynchronous | ||
| | ||
LL | pub async | ||
| +++++ | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |