Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #56155

Merged
merged 35 commits into from
Nov 22, 2018
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bc18857
Return &T / &mut T in ManuallyDrop Deref(Mut) impl
petertodd Oct 29, 2018
b937be8
Clarifying documentation for collections::hash_map::Entry::or_insert
meltinglava Nov 8, 2018
8b750a7
The example values are now easyer to differenciate
meltinglava Nov 13, 2018
a9a48ed
Fix VecDeque pretty-printer
tromey Nov 14, 2018
052bdff
lint based on closure pipe span
csmoe Nov 15, 2018
dbd9abd
update closure arg suggesstion ui test
csmoe Nov 15, 2018
7cb068e
add ui test
lcnr Nov 16, 2018
80c2101
change expected error message
lcnr Nov 16, 2018
218e35e
eat CloseDelim
lcnr Nov 16, 2018
675319e
lint if a private item has doctests
GuillaumeGomez Oct 25, 2018
4c4aff9
remove license
lcnr Nov 16, 2018
646d68f
add a note to the error message
lcnr Nov 16, 2018
fe23ffb
improve error when self is used as not the first argument
lcnr Nov 16, 2018
2be930b
fix tidy (remove whitespace)
lcnr Nov 16, 2018
5bfdcc1
remove stray file with UI testing output
lcnr Nov 17, 2018
d93e5b0
reserve whitespaces between prefix and pipe
csmoe Nov 17, 2018
7c9bcc5
Update any.rs documentation using keyword dyn
0xrgb Nov 19, 2018
a44e446
Add `override_export_symbols` option to Rust target specification
Nov 19, 2018
b8da719
Fix error message for `-C panic=xxx`.
ehuss Nov 19, 2018
88d6094
improve error note
lcnr Nov 20, 2018
8a0909d
Remove incorrect doc comment
bjorn3 Nov 20, 2018
9ce7b11
Remove incorrect doc comment in rustc_mir::monomorphize::item
bjorn3 Nov 20, 2018
9e2e575
Add x86_64-fortanix-unknown-sgx target to the compiler
Nov 19, 2018
e538a4a
core/benches/num: Add `from_str/from_str_radix()` benchmarks
Turbo87 Nov 13, 2018
9aedfd5
Rollup merge of #55367 - GuillaumeGomez:private-item-doc-test-lint, r…
GuillaumeGomez Nov 22, 2018
1c57f0a
Rollup merge of #55485 - petertodd:2018-10-manuallydrop-deref, r=TimNN
GuillaumeGomez Nov 22, 2018
89e0fce
Rollup merge of #55784 - meltinglava:master, r=KodrAus
GuillaumeGomez Nov 22, 2018
fa3941c
Rollup merge of #55961 - tromey:Bug-55944-vecdeque, r=nikomatsakis
GuillaumeGomez Nov 22, 2018
636f0a9
Rollup merge of #55980 - csmoe:issue-55891, r=estebank
GuillaumeGomez Nov 22, 2018
75d226e
Rollup merge of #56002 - Axary:master, r=estebank
GuillaumeGomez Nov 22, 2018
1646fc9
Rollup merge of #56063 - 0xrgb:patch-1, r=joshtriplett
GuillaumeGomez Nov 22, 2018
b473157
Rollup merge of #56067 - jethrogb:jb/sgx-target-spec, r=alexcrichton
GuillaumeGomez Nov 22, 2018
1bc9708
Rollup merge of #56078 - ehuss:fix-panic-opt-msg, r=alexcrichton
GuillaumeGomez Nov 22, 2018
6afecfd
Rollup merge of #56106 - bjorn3:patch-1, r=alexcrichton
GuillaumeGomez Nov 22, 2018
61d7b3e
Rollup merge of #56126 - Turbo87:bench-parse, r=alexcrichton
GuillaumeGomez Nov 22, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions src/test/ui/mismatched_types/closure-arg-count.stderr
Original file line number Diff line number Diff line change
@@ -60,8 +60,26 @@ help: consider changing the closure to take and ignore the expected argument
LL | f(|_| panic!());
| ^^^

error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
--> $DIR/closure-arg-count.rs:25:5
|
LL | f(move || panic!());
| ^ ------- takes 0 arguments
| |
| expected closure that takes 1 argument
|
note: required by `f`
--> $DIR/closure-arg-count.rs:13:1
|
LL | fn f<F: Fn<usize>>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
help: consider changing the closure to take and ignore the expected argument
|
LL | f(move|_| panic!());
| ^^^

error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
--> $DIR/closure-arg-count.rs:26:53
--> $DIR/closure-arg-count.rs:28:53
|
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
| ^^^ ------ takes 2 distinct arguments
@@ -73,7 +91,7 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
| ^^^^^^^^

error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
--> $DIR/closure-arg-count.rs:28:53
--> $DIR/closure-arg-count.rs:30:53
|
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i);
| ^^^ ------------- takes 2 distinct arguments
@@ -85,15 +103,15 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
| ^^^^^^^^

error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
--> $DIR/closure-arg-count.rs:30:53
--> $DIR/closure-arg-count.rs:32:53
|
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x, y| i);
| ^^^ --------- takes 3 distinct arguments
| |
| expected closure that takes a single 2-tuple as argument

error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments
--> $DIR/closure-arg-count.rs:32:53
--> $DIR/closure-arg-count.rs:34:53
|
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
| ^^^ expected function that takes a single 2-tuple as argument
@@ -102,15 +120,15 @@ LL | fn foo() {}
| -------- takes 0 arguments

error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
--> $DIR/closure-arg-count.rs:35:53
--> $DIR/closure-arg-count.rs:37:53
|
LL | let bar = |i, x, y| i;
| --------- takes 3 distinct arguments
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar);
| ^^^ expected closure that takes a single 2-tuple as argument

error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
--> $DIR/closure-arg-count.rs:37:53
--> $DIR/closure-arg-count.rs:39:53
|
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
| ^^^ expected function that takes a single 2-tuple as argument
@@ -119,13 +137,13 @@ LL | fn qux(x: usize, y: usize) {}
| -------------------------- takes 2 distinct arguments

error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
--> $DIR/closure-arg-count.rs:40:41
--> $DIR/closure-arg-count.rs:42:41
|
LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add);
| ^^^ expected function that takes 1 argument

error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> $DIR/closure-arg-count.rs:43:5
--> $DIR/closure-arg-count.rs:45:5
|
LL | call(Foo);
| ^^^^ expected function that takes 0 arguments
@@ -134,11 +152,11 @@ LL | struct Foo(u8);
| --------------- takes 1 argument
|
note: required by `call`
--> $DIR/closure-arg-count.rs:50:1
--> $DIR/closure-arg-count.rs:52:1
|
LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 13 previous errors
error: aborting due to 14 previous errors

For more information about this error, try `rustc --explain E0593`.