-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.L-unused_qualificationsLint: unused_qualificationsLint: unused_qualificationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I tried this code:
// run-pass
#![feature(unsized_fn_params)]
use std::ops;
use std::ops::Index;
pub struct A;
impl ops::Index<str> for A {
type Output = ();
fn index(&self, _: str) -> &Self::Output {
&()
}
}
rustc --force-warn unused-qualifications
warning: unnecessary qualification
--> ./tests/ui/unsized-locals/unsized-index.rs:10:6
|
10 | impl ops::Index<str> for A {
| ^^^^^^^^^^^^^^^
|
= note: requested on the command line with `--force-warn unused-qualifications`
help: replace it with the unqualified path
|
10 | impl Index for A {
| ~~~~~
Somehow the generic info gets lost completely? :S
Metadata
Metadata
Assignees
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.L-unused_qualificationsLint: unused_qualificationsLint: unused_qualificationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.