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

u is not a type, but is reported as if it were in mismatched types message #13359

Closed
pnkfelix opened this issue Apr 6, 2014 · 0 comments · Fixed by #13452
Closed

u is not a type, but is reported as if it were in mismatched types message #13359

pnkfelix opened this issue Apr 6, 2014 · 0 comments · Fixed by #13452

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Apr 6, 2014

Here is a bad message I got from some code today:

/tmp/t.rs:4:9: 4:22 error: mismatched types: expected `u32` but found `uint` (expected `u32` but found `u`)
/tmp/t.rs:4     foo(1*(1 as uint));
                    ^~~~~~~~~~~~~
error: aborting due to previous error

Note the strange parenthetical: "(expected u32 but found u)"

Source code to reproduce:

fn foo(_s: u32) { }

fn main() {
    foo(1*(1 as uint));
}
Ryman added a commit to Ryman/rust that referenced this issue Apr 13, 2014
notriddle pushed a commit to notriddle/rust that referenced this issue Nov 10, 2022
…kril

feat: add config for inserting must_use in `generate_enum_as_method`

Should fix rust-lang#13312

Didn't add a test because I was not sure on how to add test for a specific configuration option, tried to look for the usages for other `AssistConfig` variants but couldn't find any in `tests`. If there is a way to test this, do point me towards it.

I tried to extract the formatting string as a common `template_string` and only have if-else for that, but it didn't compile :(

Also it seems these tests are failing:

```
test config::tests::generate_config_documentation ... FAILED
test config::tests::generate_package_json_config ... FAILED
```

Can you also point me to how to correct these 😅  ( I guess there is some command to automatically generate these? )
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

Successfully merging a pull request may close this issue.

1 participant