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

Bad type error message with parameterized types #711

Closed
catamorphism opened this issue Jul 19, 2011 · 1 comment
Closed

Bad type error message with parameterized types #711

catamorphism opened this issue Jul 19, 2011 · 1 comment
Labels
A-type-system Area: Type system

Comments

@catamorphism
Copy link
Contributor

This code:

use std;
import std::option;

fn bad() {
  let @option::t[int] rz = foo[uint]();
}

fn foo[ZZZ]() -> @option::t[ZZZ] {
  fail;
}

fails with a type error:
error: mismatched types: expected @option::t[int] but found @option::t[ZZZ] (types differ)

This is a bad error message because it refers to a line inside bad() -- in this scope, ZZZ is meaningless. The error should say uint instead of ZZZ.

@msullivan
Copy link
Contributor

This seems to be fixed.

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Add BOTHER & termios2 to Android & Linux

This should be the same for both the struct and the constant across all Linux/Android platforms, but we'll see!
marysaka pushed a commit to sunriseos/rust that referenced this issue Oct 20, 2019
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

2 participants