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

Improve error message for APIT with explicit generic arguments #65614

Merged
merged 1 commit into from Oct 21, 2019

Conversation

@varkor
Copy link
Member

varkor commented Oct 20, 2019

This is disallowed with type or const generics. cc #61410.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 20, 2019

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 20, 2019

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@varkor varkor changed the title Improve error message for APIT with explicit generic parameters Improve error message for APIT with explicit generic arguments Oct 20, 2019
@varkor varkor force-pushed the varkor:apit-explicit-generics branch from 8016331 to 547259f Oct 20, 2019
--> $DIR/synthetic-param.rs:23:5
|
LL | Foo::func::<u8>(42);
| ^^^^^^^^^^^^^^^

error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position.
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
--> $DIR/synthetic-param.rs:26:5
|
LL | Bar::<i8>::func::<u8>(42);

This comment has been minimized.

Copy link
@varkor

varkor Oct 20, 2019

Author Member

This span is not very good. I'll file a follow up issue.

This comment has been minimized.

Copy link
@varkor

varkor Oct 20, 2019

Author Member

Filed #65642.

This is disallowed with type or const generics.
@varkor varkor force-pushed the varkor:apit-explicit-generics branch from 547259f to 2f7c9a2 Oct 20, 2019
@matthewjasper

This comment has been minimized.

Copy link
Contributor

matthewjasper commented Oct 20, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 20, 2019

📌 Commit 2f7c9a2 has been approved by matthewjasper

Centril added a commit to Centril/rust that referenced this pull request Oct 20, 2019
…tthewjasper

Improve error message for APIT with explicit generic arguments

This is disallowed with type or const generics. cc rust-lang#61410.
bors added a commit that referenced this pull request Oct 20, 2019
Rollup of 8 pull requests

Successful merges:

 - #65314 (rustdoc: forward -Z options to rustc)
 - #65592 (clarify const_prop ICE protection comment)
 - #65603 (Avoid ICE when include! is used by stdin crate)
 - #65614 (Improve error message for APIT with explicit generic arguments)
 - #65629 (Remove `borrowck_graphviz_postflow` from test)
 - #65633 (Remove leading :: from paths in doc examples)
 - #65638 (Rename the default argument 'def' to 'default')
 - #65639 (Fix parameter name in documentation)

Failed merges:

r? @ghost
@bors bors merged commit 2f7c9a2 into rust-lang:master Oct 21, 2019
4 checks passed
4 checks passed
pr Build #20191020.3 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.