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

Associated type in constant not normalized correctly #26614

Closed
eefriedman opened this issue Jun 27, 2015 · 2 comments
Closed

Associated type in constant not normalized correctly #26614

eefriedman opened this issue Jun 27, 2015 · 2 comments
Labels
A-associated-items Area: Associated items such as associated types and consts. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@eefriedman
Copy link
Contributor

trait Mirror { type It; }
impl<T> Mirror for T { type It = Self; }
fn main() {
    let c : <u32 as Mirror>::It = 5;
    const CCCC : <u32 as Mirror>::It = 5;
}
<anon>:5:40: 5:41 error: mismatched types:
 expected `<u32 as Mirror>::It`,
    found `_`
(expected associated type,
    found integral variable) [E0308]
<anon>:5     const CCCC : <u32 as Mirror>::It = 5;
                                                ^
<anon>:5:40: 5:41 help: see the detailed explanation for E0308
error: aborting due to previous error
@steveklabnik steveklabnik added the A-associated-items Area: Associated items such as associated types and consts. label Jun 29, 2015
@steveklabnik
Copy link
Member

Triage: reproduces today, though with the new-style error, of course.

@Mark-Simulacrum
Copy link
Member

No longer reproduces; E-needstest.

@Mark-Simulacrum Mark-Simulacrum added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label May 19, 2017
MaloJaffre added a commit to MaloJaffre/rust that referenced this issue Jun 18, 2017
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jun 18, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this issue Jun 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-associated-items Area: Associated items such as associated types and consts. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

No branches or pull requests

3 participants