forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delay bug instead of skipping check_expr
- Loading branch information
1 parent
27b6c44
commit 7237f15
Showing
3 changed files
with
42 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
struct Process; | ||
|
||
pub type Group = (Vec<String>, Vec<Process>); | ||
|
||
fn test(process: &Process, groups: Vec<Group>) -> Vec<Group> { | ||
let new_group = vec![String::new()]; | ||
|
||
if groups.capacity() == 0 { | ||
groups.push(new_group, vec![process]); | ||
//~^ ERROR this function takes 1 argument but 2 arguments were supplied | ||
return groups; | ||
} | ||
|
||
todo!() | ||
} | ||
|
||
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,17 @@ | ||
error[E0061]: this function takes 1 argument but 2 arguments were supplied | ||
--> $DIR/wrong_argument_ice-3.rs:9:16 | ||
| | ||
LL | groups.push(new_group, vec![process]); | ||
| ^^^^ --------- ------------- supplied 2 arguments | ||
| | | ||
| expected 1 argument | ||
| | ||
note: associated function defined here | ||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | ||
| | ||
LL | pub fn push(&mut self, value: T) { | ||
| ^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0061`. |