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

E0619 diagnostic occurs twice in rustc source #46837

Closed
pnkfelix opened this issue Dec 19, 2017 · 5 comments · Fixed by #46914
Closed

E0619 diagnostic occurs twice in rustc source #46837

pnkfelix opened this issue Dec 19, 2017 · 5 comments · Fixed by #46914

Comments

@pnkfelix
Copy link
Member

PR #46664 injected a second use of E0619.

This causes a warning at compile-time for rustc_typeck:

   Compiling rustc_typeck v0.0.0 (file:///home/pnkfelix/Dev/Mozilla/rust-mirborrowck/src/librustc_typeck)
warning: diagnostic code E0619 already used
    --> /home/pnkfelix/Dev/Mozilla/rust-mirborrowck/src/librustc_typeck/check/mod.rs:4962:21
     |
4962 | /                     type_error_struct!(self.tcx.sess, sp, ty, E0619,
4963 | |                                        "the type of this value must be known in this context")
     | |______________________________________________________________________________________________^
     |
note: previous invocation
    --> /home/pnkfelix/Dev/Mozilla/rust-mirborrowck/src/librustc_typeck/check/method/probe.rs:328:25
     |
328  | /                         struct_span_warn!(self.tcx.sess, span, E0619,
329  | |                             "the type of this value must be known in this context")
     | |___________________________________________________________________________________^
     = note: this error originates in a macro outside of the current crate
@arielb1
Copy link
Contributor

arielb1 commented Dec 19, 2017

cc @mikeyhew - could you use a different error number for this soft warning?

@nodakai
Copy link
Contributor

nodakai commented Dec 19, 2017

I'm sort of surprised to see when rustc caught the duplication it only raised a warning.

Maybe a hard error?

@mikeyhew
Copy link
Contributor

I remember getting this warning, and was going to deal with it but forgot. @arielb1 creating a separate error code would not be ideal, because it's the same error. When I change the warning to a future-compatibility lint though, I believe this will go away since it won't use an error code.

@arielb1
Copy link
Contributor

arielb1 commented Dec 20, 2017

Sure enough. Change it to a future-compat warning. Just don't bother everyone with a duplicate error code.

@mikeyhew
Copy link
Contributor

@arielb1 I mean, I think it's the warning that's bothering people, not the fact that it's the same error code. The point was to exactly replicate the error, but make it a warning instead. Anyway, I'll change it to a future-compat lint. I'm just going to create a placeholder tracking issue for now, without explaining the reason for the lint, so that this issue gets resolved sooner.

bors added a commit that referenced this issue Dec 25, 2017
Convert warning about `*const _` to a future-compat lint

#46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change.

fixes #46837
tracking issue for the future-compatibility lint: #46906

r? @arielb1
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.

4 participants