Skip to content

"type annotations required" errors in 1.28 beta #51844

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

Closed
4 of 7 tasks
pietroalbini opened this issue Jun 27, 2018 · 13 comments
Closed
4 of 7 tasks

"type annotations required" errors in 1.28 beta #51844

pietroalbini opened this issue Jun 27, 2018 · 13 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Milestone

Comments

@pietroalbini
Copy link
Member

pietroalbini commented Jun 27, 2018

A bunch of crates failed to compile in 1.28 beta with error messages like these:

type annotations required: cannot resolve `std::io::Error: std::convert::From<_>`
type annotations required: cannot resolve `std::borrow::Cow<'_, str>: std::convert::From<&_>`'`
type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`

Also, the following crates are failing because they depend on tokio-dns-unofficial:

@pietroalbini pietroalbini added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Jun 27, 2018
@pietroalbini pietroalbini added this to the 1.28 milestone Jun 27, 2018
@mbillingr
Copy link

mbillingr commented Jun 27, 2018

I fixed this in openml (mbillingr/openml-rust@96d7877) by changing Cow::from(self.as_ref()) to Cow::from(self.as_str()) (self is of type String). This is probably how it should have been written anyway.

@sbstp
Copy link

sbstp commented Jun 27, 2018

I don't see any errors in the build log of my crate. The fold issue was spotted and fixed a few weeks ago here. It seems like the issue in other crates is because they depend on old versions.

Any clue why this breaking change started happening? I don't think I can release a 0.1.2.

@pietroalbini
Copy link
Member Author

I don't see any errors in the build log of my crate.

Copy-pasted the link for the wrong version, sorry. This is the one for 0.1.1.

Any clue why this breaking change started happening? I don't think I can release a 0.1.2.

I haven't investigated this yet. If it's a bug in the compiler we'll get this fixed before 1.28 reaches stable.

@sbstp
Copy link

sbstp commented Jun 27, 2018

Is it possible to backport the fix? The current version is 0.3.1, is cargo able to publish a 0.1.2 version that's semver compatible with the broken version? I guess I could yank that version, but the existing dependencies will still continue to break.

@sfackler
Copy link
Member

You can publish a 0.1.2

@sbstp
Copy link

sbstp commented Jun 27, 2018

Alright, I've released 0.1.2 and it seems to have fixed the issue.

@r-darwish
Copy link

I also changed my code to as_str as it makes more sense.

@pietroalbini this process of checking the beta compiler by compiling actual crates is awesome. Is there any place in which I can read more about how it works?

@mbillingr
Copy link

@r-darwish I think crater is the tool in use.

@Mark-Simulacrum
Copy link
Member

This is caused by b559710, probably #50170. cc @rust-lang/libs, I've closed #50954 as a duplicate of this bug.

@Mark-Simulacrum Mark-Simulacrum added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 28, 2018
@nikomatsakis nikomatsakis added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 28, 2018
Enet4 added a commit to Enet4/dicom-rs that referenced this issue Jul 3, 2018
@pietroalbini
Copy link
Member Author

Ping @rust-lang/libs, any news on this?

@alexcrichton
Copy link
Member

We'll be discussing this in this week's triage meeting

@alexcrichton
Copy link
Member

The conclusion of said discussion is that we're going to leave this as-is, but if any crates have difficulty updating we're more than willing to help!

@jq-rs
Copy link

jq-rs commented Jul 12, 2018

Mles-client build is failing due to dependencies, thus it should work now as the dependencies are fixed. Just made a build with nightly, runs smoothly. So it was just miscategorized here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

9 participants