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

Spurious unused type alias warning (regression) #41203

Closed
jseyfried opened this Issue Apr 10, 2017 · 15 comments

Comments

Projects
None yet
7 participants
@jseyfried
Copy link
Contributor

jseyfried commented Apr 10, 2017

This example produced a spurious unused type alias warning:

struct S<T>(T);
type Alias<T> = S<T>;

trait Tr<T> { fn f(&self) {} }
impl<T> Tr<T> for S<T> {}

impl<T> S<T> where Alias<T>: Tr<T> {
    fn g(&self) { self.f() }
}

fn main() {
    S(0).g();
}
@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented May 31, 2017

Bisected regression to aedb49c -- rollup #39199; not really sure what PR in there this was caused by. Nominating for compiler discussion since regression without priority, though this is in stable now so not overly important I guess.

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Jun 1, 2017

@Mark-Simulacrum What's the "before" on that bisection? I've looked through the entire rollup and I can't find anything that would change the behavior there.

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Jun 1, 2017

Never mind -- sorry for the runaround, my bisect was broken, missing libstdc++6; this does not bisect to any point since 2017-01-13.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jun 8, 2017

@jseyfried says they had this working on a nightly from October without warning.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jun 8, 2017

triage: P-high

@rust-highfive rust-highfive added P-high and removed I-nominated labels Jun 8, 2017

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jun 15, 2017

@jseyfried do you mind self-assigning this P-high regression and taking a look?

@jseyfried

This comment has been minimized.

Copy link
Contributor Author

jseyfried commented Jun 15, 2017

@brson sure.

@jseyfried jseyfried self-assigned this Jun 15, 2017

@sanxiyn

This comment has been minimized.

Copy link
Member

sanxiyn commented Jul 13, 2017

#38051 implementing unused type alias landed in December, so of course October nightly would work.

@brson brson added the I-nominated label Jul 13, 2017

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jul 13, 2017

cc @rust-lang/compiler another P-high bug

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Jul 13, 2017

I can't find an issue, but I seem to recall this being a known problem of not checking impl signatures (everything outside the body) for "use"

@jseyfried

This comment has been minimized.

Copy link
Contributor Author

jseyfried commented Jul 13, 2017

This was introduced between nightly-2016-12-16 (8f02c42) and nightly-2016-12-19 (71c06a5).
I suspect #38051.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jul 17, 2017

Heh, sounds like a likely candidate!

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jul 17, 2017

@sanxiyn think you'll have time to investigate @jseyfried's hypothesis?

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Jul 22, 2017

Arguably this is the same/similar bug as #18290 (this is the bug I was looking for earlier).

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Jul 27, 2017

Closing as a duplicate of #18290.

@Mark-Simulacrum Mark-Simulacrum marked this as a duplicate of #18290 Jul 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.