Fix rebase and clippy tests

This commit is contained in:
Esteban Kuber 2021-11-16 22:06:25 +00:00
parent 8888d0d61e
commit b825b0fe63
21 changed files with 136 additions and 184 deletions

View file

@ -162,68 +162,68 @@ LL | let _ = (await bar())?;
| ^^^^^^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/incorrect-syntax-suggestions.rs:71:19
--> $DIR/incorrect-syntax-suggestions.rs:71:18
|
LL | fn foo13() -> Result<(), ()> {
| ----- this is not `async`
LL | let _ = bar().await();
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/incorrect-syntax-suggestions.rs:76:19
--> $DIR/incorrect-syntax-suggestions.rs:76:18
|
LL | fn foo14() -> Result<(), ()> {
| ----- this is not `async`
LL | let _ = bar().await()?;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/incorrect-syntax-suggestions.rs:81:19
--> $DIR/incorrect-syntax-suggestions.rs:81:18
|
LL | fn foo15() -> Result<(), ()> {
| ----- this is not `async`
LL | let _ = bar().await;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/incorrect-syntax-suggestions.rs:85:19
--> $DIR/incorrect-syntax-suggestions.rs:85:18
|
LL | fn foo16() -> Result<(), ()> {
| ----- this is not `async`
LL | let _ = bar().await?;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/incorrect-syntax-suggestions.rs:90:23
--> $DIR/incorrect-syntax-suggestions.rs:90:22
|
LL | fn foo() -> Result<(), ()> {
| --- this is not `async`
LL | let _ = bar().await?;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/incorrect-syntax-suggestions.rs:97:23
--> $DIR/incorrect-syntax-suggestions.rs:97:22
|
LL | let foo = || {
| -- this is not `async`
LL | let _ = bar().await?;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/incorrect-syntax-suggestions.rs:113:17
--> $DIR/incorrect-syntax-suggestions.rs:113:29
|
LL | fn foo() -> Result<(), ()> {
| --- this is not `async`
LL | let _ = await!(bar())?;
| ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
| ^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/incorrect-syntax-suggestions.rs:121:17
--> $DIR/incorrect-syntax-suggestions.rs:121:29
|
LL | let foo = || {
| -- this is not `async`
LL | let _ = await!(bar())?;
| ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
| ^ only allowed inside `async` functions and blocks
error: aborting due to 33 previous errors

View file

@ -6,7 +6,6 @@ async fn fun() {
//~| error: `.await` is not allowed in a `const`
//~| error: `.await` is not allowed in a `const`
//~| error: `()` is not a future
//~| error: `()` is not a future
}
fn main() {}

View file

@ -1,16 +1,16 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-70594.rs:4:12
--> $DIR/issue-70594.rs:4:11
|
LL | async fn fun() {
| --- this is not `async`
LL | [1; ().await];
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0744]: `.await` is not allowed in a `const`
--> $DIR/issue-70594.rs:4:12
--> $DIR/issue-70594.rs:4:9
|
LL | [1; ().await];
| ^^^^^
| ^^^^^^^^
error[E0744]: `.await` is not allowed in a `const`
--> $DIR/issue-70594.rs:4:11
@ -18,16 +18,6 @@ error[E0744]: `.await` is not allowed in a `const`
LL | [1; ().await];
| ^^^^^^
error[E0277]: `()` is not a future
--> $DIR/issue-70594.rs:4:12
|
LL | [1; ().await];
| ^^^^^ `()` is not a future
|
= 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 `()`
error[E0277]: `()` is not a future
--> $DIR/issue-70594.rs:4:11
|
@ -36,13 +26,14 @@ LL | [1; ().await];
|
= 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: do not `.await` the expression
|
LL - [1; ().await];
LL + [1; ()];
|
error: aborting due to 5 previous errors
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0277, E0728, E0744.
For more information about an error, try `rustc --explain E0277`.

View file

@ -1,8 +1,8 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-51719.rs:8:25
--> $DIR/issue-51719.rs:8:24
|
LL | let _gen = || foo().await;
| -- ^^^^^ only allowed inside `async` functions and blocks
| -- ^^^^^^ only allowed inside `async` functions and blocks
| |
| this is not `async`

View file

@ -1,11 +1,11 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-51751.rs:9:27
--> $DIR/issue-51751.rs:9:26
|
LL | fn main() {
| ---- this is not `async`
LL | let result = inc(10000);
LL | let finished = result.await;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error: aborting due to previous error

View file

@ -12,5 +12,4 @@ fn main() {
(|_| 2333).await;
//~^ ERROR `await` is only allowed inside `async` functions and blocks
//~| ERROR is not a future
//~| ERROR is not a future
}

View file

@ -1,38 +1,28 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-62009-1.rs:6:23
--> $DIR/issue-62009-1.rs:6:22
|
LL | fn main() {
| ---- this is not `async`
LL | async { let (); }.await;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-62009-1.rs:10:7
--> $DIR/issue-62009-1.rs:10:6
|
LL | fn main() {
| ---- this is not `async`
...
LL | }.await;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-62009-1.rs:12:16
--> $DIR/issue-62009-1.rs:12:15
|
LL | fn main() {
| ---- this is not `async`
...
LL | (|_| 2333).await;
| ^^^^^ only allowed inside `async` functions and blocks
error[E0277]: `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future
--> $DIR/issue-62009-1.rs:12:16
|
LL | (|_| 2333).await;
| ^^^^^ `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future
|
= help: the trait `Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
= note: [closure@$DIR/issue-62009-1.rs:12:5: 12:15] must be a future or must implement `IntoFuture` to be awaited
= note: required because of the requirements on the impl of `IntoFuture` for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0277]: `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future
--> $DIR/issue-62009-1.rs:12:15
@ -42,13 +32,14 @@ LL | (|_| 2333).await;
|
= help: the trait `Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
= note: [closure@$DIR/issue-62009-1.rs:12:5: 12:15] must be a future or must implement `IntoFuture` to be awaited
= note: required because of the requirements on the impl of `IntoFuture` for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
help: do not `.await` the expression
|
LL - (|_| 2333).await;
LL + (|_| 2333);
|
error: aborting due to 5 previous errors
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0277, E0728.
For more information about an error, try `rustc --explain E0277`.

View file

@ -1,10 +1,10 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-62009-2.rs:8:23
--> $DIR/issue-62009-2.rs:8:22
|
LL | fn main() {
| ---- this is not `async`
LL | (async || 2333)().await;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error: aborting due to previous error

View file

@ -1,11 +1,11 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/non-async-enclosing-span.rs:9:28
--> $DIR/non-async-enclosing-span.rs:9:27
|
LL | fn main() {
| ---- this is not `async`
LL | let x = move || {};
LL | let y = do_the_thing().await;
| ^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error: aborting due to previous error

View file

@ -39,7 +39,7 @@ LL | dummy();
| +
error[E0308]: `if` and `else` have incompatible types
--> $DIR/suggest-missing-await.rs:35:17
--> $DIR/suggest-missing-await.rs:35:9
|
LL | let _x = if true {
| ______________-
@ -48,7 +48,7 @@ LL | | dummy()
LL | |
LL | | } else {
LL | | dummy().await
| | ^^^^^ expected opaque type, found `()`
| | ^^^^^^^^^^^^^ expected opaque type, found `()`
LL | |
LL | | };
| |_____- `if` and `else` have incompatible types
@ -61,7 +61,7 @@ LL | dummy().await
| ++++++
error[E0308]: `match` arms have incompatible types
--> $DIR/suggest-missing-await.rs:45:22
--> $DIR/suggest-missing-await.rs:45:14
|
LL | let _x = match 0usize {
| ______________-
@ -70,7 +70,7 @@ LL | | 0 => dummy(),
LL | | 1 => dummy(),
| | ------- this is found to be of type `impl Future<Output = ()>`
LL | | 2 => dummy().await,
| | ^^^^^ expected opaque type, found `()`
| | ^^^^^^^^^^^^^ expected opaque type, found `()`
LL | |
LL | | };
| |_____- `match` arms have incompatible types

View file

@ -7,6 +7,8 @@ LL | boo().await;
| 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: do not `.await` the expression
|
LL - boo().await;

View file

@ -23,20 +23,6 @@ LL | for _ in HashMap::new().iter().cloned() {}
= note: required because of the requirements on the impl of `Iterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
= note: required because of the requirements on the impl of `IntoIterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
<<<<<<< HEAD
error: aborting due to 2 previous errors
=======
error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as Iterator>::Item == &_`
--> $DIR/issue-33941.rs:4:14
|
LL | for _ in HashMap::new().iter().cloned() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference
|
= note: expected tuple `(&_, &_)`
found reference `&_`
= note: required because of the requirements on the impl of `Iterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
error: aborting due to 3 previous errors
>>>>>>> 330b90f5fc1 (Remove yet more output from `for`-loop and `?` errors)
For more information about this error, try `rustc --explain E0271`.