Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9625ed8
Move settings into full JS
GuillaumeGomez Jan 19, 2022
e7d7d75
Add GUI test for settings menu
GuillaumeGomez Jan 19, 2022
2f074de
Extend settings test to ensure settings text is as expected
GuillaumeGomez Apr 29, 2022
09f758f
Remove ```` ```ignore```` from E0705 test
CAD97 Apr 30, 2022
336bb0a
Rename run_lto_pass_manager to optimize_fat and remove thin parameter
bjorn3 Apr 30, 2022
ee94ff2
Let LtoModuleCodegen::optimize take self by value
bjorn3 Apr 30, 2022
fab7230
Remove config parameter of optimize_fat and avoid interior mutability…
bjorn3 Apr 30, 2022
78c65a5
Merge new_metadata into codegen_allocator
bjorn3 Apr 30, 2022
685f66b
Use source callsite in check_argument_types suggestion
Badel2 Apr 30, 2022
121c978
Revert #92191 Prefer projection candidates instead of param_env candi…
jackh726 May 1, 2022
73688e4
* Add documentation for settings page rendering functions.
GuillaumeGomez May 1, 2022
18b12fa
Add a regression test for #92305
JohnTitor May 1, 2022
0349f8b
Use a yes/no enum instead of a bool.
oli-obk May 2, 2022
7790b6e
Mitigate impact of subtle invalid call suggestion logic
estebank May 2, 2022
60b238b
Rollup merge of #93097 - GuillaumeGomez:settings-js, r=jsha
GuillaumeGomez May 2, 2022
3ff71e9
Rollup merge of #96580 - CAD97:E0705-no-ignore, r=michaelwoerister
GuillaumeGomez May 2, 2022
23785c2
Rollup merge of #96587 - bjorn3:refactor_backend_write, r=michaelwoer…
GuillaumeGomez May 2, 2022
a0e2a37
Rollup merge of #96589 - Badel2:source-callsite, r=michaelwoerister
GuillaumeGomez May 2, 2022
393705b
Rollup merge of #96593 - jackh726:issue-93262, r=compiler-errors
GuillaumeGomez May 2, 2022
cffbc43
Rollup merge of #96614 - JohnTitor:test-92305, r=oli-obk
GuillaumeGomez May 2, 2022
c161dcc
Rollup merge of #96641 - oli-obk:bool_args, r=wesleywiser
GuillaumeGomez May 2, 2022
ed7ce52
Rollup merge of #96646 - estebank:issue-96638, r=jackh726
GuillaumeGomez May 2, 2022
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
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/fn_ctxt/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
);
for (idx, arg) in matched_inputs.iter().enumerate() {
let suggestion_text = if let Some(arg) = arg {
let arg_span = provided_args[*arg].span;
let arg_span = provided_args[*arg].span.source_callsite();
let arg_text = source_map.span_to_snippet(arg_span).unwrap();
arg_text
} else {
Expand Down
9 changes: 9 additions & 0 deletions src/test/ui/typeck/remove-extra-argument.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// run-rustfix
// Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())`
fn l(_a: Vec<u8>) {}

fn main() {
l(vec![])
//~^ ERROR this function takes 1 argument but 2 arguments were supplied
//~| HELP remove the extra argument
}
9 changes: 9 additions & 0 deletions src/test/ui/typeck/remove-extra-argument.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// run-rustfix
// Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())`
fn l(_a: Vec<u8>) {}

fn main() {
l(vec![], vec![])
//~^ ERROR this function takes 1 argument but 2 arguments were supplied
//~| HELP remove the extra argument
}
19 changes: 19 additions & 0 deletions src/test/ui/typeck/remove-extra-argument.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/remove-extra-argument.rs:6:5
|
LL | l(vec![], vec![])
| ^ ------ argument unexpected
|
note: function defined here
--> $DIR/remove-extra-argument.rs:3:4
|
LL | fn l(_a: Vec<u8>) {}
| ^ -----------
help: remove the extra argument
|
LL | l(vec![])
|

error: aborting due to previous error

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