mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	 dd2b027d5d
			
		
	
	
		dd2b027d5d
		
	
	
	
	
		
			
			Much like the previous commit. I think the removal of "the token" in each message is fine here. There are many more error messages that mention tokens without saying "the token" than those that do say it.
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| error: expected one of `,`, `.`, `?`, or an operator, found `some`
 | |
|   --> $DIR/assert-trailing-junk.rs:9:18
 | |
|    |
 | |
| LL |     assert!(true some extra junk, "whatever");
 | |
|    |                  ^^^^ expected one of `,`, `.`, `?`, or an operator
 | |
| 
 | |
| error: expected one of `,`, `.`, `?`, or an operator, found `some`
 | |
|   --> $DIR/assert-trailing-junk.rs:12:18
 | |
|    |
 | |
| LL |     assert!(true some extra junk);
 | |
|    |                  ^^^^ expected one of `,`, `.`, `?`, or an operator
 | |
| 
 | |
| error: no rules expected `blah`
 | |
|   --> $DIR/assert-trailing-junk.rs:15:30
 | |
|    |
 | |
| LL |     assert!(true, "whatever" blah);
 | |
|    |                             -^^^^ no rules expected this token in macro call
 | |
|    |                             |
 | |
|    |                             help: missing comma here
 | |
|    |
 | |
|    = note: while trying to match sequence start
 | |
| 
 | |
| error: unexpected string literal
 | |
|   --> $DIR/assert-trailing-junk.rs:18:18
 | |
|    |
 | |
| LL |     assert!(true "whatever" blah);
 | |
|    |                 -^^^^^^^^^^
 | |
|    |                 |
 | |
|    |                 help: try adding a comma
 | |
| 
 | |
| error: no rules expected `blah`
 | |
|   --> $DIR/assert-trailing-junk.rs:18:29
 | |
|    |
 | |
| LL |     assert!(true "whatever" blah);
 | |
|    |                            -^^^^ no rules expected this token in macro call
 | |
|    |                            |
 | |
|    |                            help: missing comma here
 | |
|    |
 | |
|    = note: while trying to match sequence start
 | |
| 
 | |
| error: macro requires an expression as an argument
 | |
|   --> $DIR/assert-trailing-junk.rs:22:5
 | |
|    |
 | |
| LL |     assert!(true;);
 | |
|    |     ^^^^^^^^^^^^-^
 | |
|    |                 |
 | |
|    |                 help: try removing semicolon
 | |
| 
 | |
| error: unexpected string literal
 | |
|   --> $DIR/assert-trailing-junk.rs:25:27
 | |
|    |
 | |
| LL |     assert!(false || true "error message");
 | |
|    |                          -^^^^^^^^^^^^^^^
 | |
|    |                          |
 | |
|    |                          help: try adding a comma
 | |
| 
 | |
| error: aborting due to 7 previous errors
 | |
| 
 |