mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			191 lines
		
	
	
		
			6.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			191 lines
		
	
	
		
			6.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:8:13
 | |
|    |
 | |
| LL |     let _ = await bar();
 | |
|    |             ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:12:13
 | |
|    |
 | |
| LL |     let _ = await? bar();
 | |
|    |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:16:13
 | |
|    |
 | |
| LL |     let _ = await bar()?;
 | |
|    |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:20:13
 | |
|    |
 | |
| LL |     let _ = await { bar() };
 | |
|    |             ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:24:13
 | |
|    |
 | |
| LL |     let _ = await(bar());
 | |
|    |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `(bar()).await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:28:13
 | |
|    |
 | |
| LL |     let _ = await { bar() }?;
 | |
|    |             ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:32:14
 | |
|    |
 | |
| LL |     let _ = (await bar())?;
 | |
|    |              ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:36:24
 | |
|    |
 | |
| LL |     let _ = bar().await();
 | |
|    |                        ^^ help: `await` is not a method call, remove the parentheses
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:40:24
 | |
|    |
 | |
| LL |     let _ = bar().await()?;
 | |
|    |                        ^^ help: `await` is not a method call, remove the parentheses
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:52:13
 | |
|    |
 | |
| LL |     let _ = await bar();
 | |
|    |             ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:56:13
 | |
|    |
 | |
| LL |     let _ = await? bar();
 | |
|    |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:60:13
 | |
|    |
 | |
| LL |     let _ = await bar()?;
 | |
|    |             ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:64:14
 | |
|    |
 | |
| LL |     let _ = (await bar())?;
 | |
|    |              ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:68:24
 | |
|    |
 | |
| LL |     let _ = bar().await();
 | |
|    |                        ^^ help: `await` is not a method call, remove the parentheses
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:73:24
 | |
|    |
 | |
| LL |     let _ = bar().await()?;
 | |
|    |                        ^^ help: `await` is not a method call, remove the parentheses
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:101:13
 | |
|    |
 | |
| LL |     let _ = await!(bar());
 | |
|    |             ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:105:13
 | |
|    |
 | |
| LL |     let _ = await!(bar())?;
 | |
|    |             ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:110:17
 | |
|    |
 | |
| LL |         let _ = await!(bar())?;
 | |
|    |                 ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:117:17
 | |
|    |
 | |
| LL |         let _ = await!(bar())?;
 | |
|    |                 ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
 | |
| 
 | |
| error: expected expression, found `=>`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:124:25
 | |
|    |
 | |
| LL |     match await { await => () }
 | |
|    |                   ----- ^^ expected expression
 | |
|    |                   |
 | |
|    |                   while parsing this incorrect await expression
 | |
| 
 | |
| error: incorrect use of `await`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:124:11
 | |
|    |
 | |
| LL |     match await { await => () }
 | |
|    |           ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await`
 | |
| 
 | |
| error: expected one of `.`, `?`, `{`, or an operator, found `}`
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:127:1
 | |
|    |
 | |
| LL |     match await { await => () }
 | |
|    |     -----                      - expected one of `.`, `?`, `{`, or an operator
 | |
|    |     |
 | |
|    |     while parsing this `match` expression
 | |
| ...
 | |
| LL | }
 | |
|    | ^ unexpected token
 | |
| 
 | |
| error[E0728]: `await` is only allowed inside `async` functions and blocks
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:68:19
 | |
|    |
 | |
| LL | fn foo13() -> Result<(), ()> {
 | |
|    |    ----- this is not `async`
 | |
| LL |     let _ = bar().await();
 | |
|    |                   ^^^^^ only allowed inside `async` functions and blocks
 | |
| 
 | |
| error[E0728]: `await` is only allowed inside `async` functions and blocks
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:73:19
 | |
|    |
 | |
| LL | fn foo14() -> Result<(), ()> {
 | |
|    |    ----- this is not `async`
 | |
| LL |     let _ = bar().await()?;
 | |
|    |                   ^^^^^ only allowed inside `async` functions and blocks
 | |
| 
 | |
| error[E0728]: `await` is only allowed inside `async` functions and blocks
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:78:19
 | |
|    |
 | |
| LL | fn foo15() -> Result<(), ()> {
 | |
|    |    ----- this is not `async`
 | |
| LL |     let _ = bar().await;
 | |
|    |                   ^^^^^ only allowed inside `async` functions and blocks
 | |
| 
 | |
| error[E0728]: `await` is only allowed inside `async` functions and blocks
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:82:19
 | |
|    |
 | |
| LL | fn foo16() -> Result<(), ()> {
 | |
|    |    ----- this is not `async`
 | |
| LL |     let _ = bar().await?;
 | |
|    |                   ^^^^^ only allowed inside `async` functions and blocks
 | |
| 
 | |
| error[E0728]: `await` is only allowed inside `async` functions and blocks
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:87:23
 | |
|    |
 | |
| LL |     fn foo() -> Result<(), ()> {
 | |
|    |        --- this is not `async`
 | |
| LL |         let _ = bar().await?;
 | |
|    |                       ^^^^^ only allowed inside `async` functions and blocks
 | |
| 
 | |
| error[E0728]: `await` is only allowed inside `async` functions and blocks
 | |
|   --> $DIR/incorrect-syntax-suggestions.rs:94:23
 | |
|    |
 | |
| LL |     let foo = || {
 | |
|    |               -- this is not `async`
 | |
| LL |         let _ = bar().await?;
 | |
|    |                       ^^^^^ only allowed inside `async` functions and blocks
 | |
| 
 | |
| error: aborting due to 28 previous errors
 | |
| 
 | |
| For more information about this error, try `rustc --explain E0728`.
 | 
