-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use ordinal number in argument error #125042
Use ordinal number in argument error #125042
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
This comment has been minimized.
This comment has been minimized.
I think using |
Yes, I will fix to use |
This comment has been minimized.
This comment has been minimized.
2d889a9
to
c71324b
Compare
r? compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit (swapping some words), then this is ready to go.
c71324b
to
5743c3f
Compare
Fix error message Fix tests Format
5743c3f
to
332b41d
Compare
@bors r+ rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125042 (Use ordinal number in argument error) - rust-lang#127229 (rustdoc: click target for sidebar items flush left) - rust-lang#127337 (Move a few intrinsics to Rust abi) - rust-lang#127472 (MIR building: Stop using `unpack!` for `BlockAnd<()>`) - rust-lang#127579 (Solve a error `.clone()` suggestion when moving a mutable reference) - rust-lang#127769 (Don't use implicit features in `Cargo.toml` in `compiler/`) - rust-lang#127844 (Remove invalid further restricting suggestion for type bound) - rust-lang#127855 (Add myself to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125042 (Use ordinal number in argument error) - rust-lang#127229 (rustdoc: click target for sidebar items flush left) - rust-lang#127337 (Move a few intrinsics to Rust abi) - rust-lang#127472 (MIR building: Stop using `unpack!` for `BlockAnd<()>`) - rust-lang#127579 (Solve a error `.clone()` suggestion when moving a mutable reference) - rust-lang#127769 (Don't use implicit features in `Cargo.toml` in `compiler/`) - rust-lang#127844 (Remove invalid further restricting suggestion for type bound) - rust-lang#127855 (Add myself to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125042 (Use ordinal number in argument error) - rust-lang#127229 (rustdoc: click target for sidebar items flush left) - rust-lang#127337 (Move a few intrinsics to Rust abi) - rust-lang#127472 (MIR building: Stop using `unpack!` for `BlockAnd<()>`) - rust-lang#127579 (Solve a error `.clone()` suggestion when moving a mutable reference) - rust-lang#127769 (Don't use implicit features in `Cargo.toml` in `compiler/`) - rust-lang#127844 (Remove invalid further restricting suggestion for type bound) - rust-lang#127855 (Add myself to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#125042 - long-long-float:suggest-move-arg-outside, r=fmease Use ordinal number in argument error Add an ordinal number to two argument errors ("unexpected" and "missing") for ease of understanding error. ``` error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> test.rs:11:5 | 11 | f(42, 'a'); | ^ --- 2nd argument of type `f32` is missing | (snip) error[E0061]: this function takes 3 arguments but 4 arguments were supplied --> test.rs:12:5 | 12 | f(42, 42, 1.0, 'a'); | ^ ---- | | | | | unexpected 2nd argument of type `{integer}` | help: remove the extra argument ``` To get an ordinal number, I copied `ordinalize` from other crate `rustc_resolve` because I think it is too much to link `rustc_resolve` for this small function. Please let me know if there is a better way.
Add an ordinal number to two argument errors ("unexpected" and "missing") for ease of understanding error.
To get an ordinal number, I copied
ordinalize
from other craterustc_resolve
because I think it is too much to linkrustc_resolve
for this small function. Please let me know if there is a better way.