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

Duplicating names in a type parameter should be illegal. #15969

Closed
TyOverby opened this issue Jul 25, 2014 · 1 comment
Closed

Duplicating names in a type parameter should be illegal. #15969

TyOverby opened this issue Jul 25, 2014 · 1 comment

Comments

@TyOverby
Copy link
Contributor

The following function compiles:

fn foo<A: Share, A>(a: A) -> A{ a }

When unused the compiler issues the standard unused code warning.

As far as I can tell, there is no way to actually use the function without annotating the types for everything (foo::<&str, uint>(5u)) because otherwise the compiler can't infer the type of the function.

@huonw
Copy link
Member

huonw commented Jul 25, 2014

Dupe of #11658.

@huonw huonw closed this as completed Jul 25, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 21, 2024
…r=Veykril

`macro_rules` as macro name

This PR makes RA parse `macro_rules! {}` (note the missing identifier) as a `MACRO_CALL` instead of `MACRO_RULES`.

Fixes rust-lang#15969.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@TyOverby @huonw and others