Closed
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
Area: Suggestions generated by the compiler applied by `cargo fix`Category: This is a bug.Diagnostics: A structured suggestion resulting in incorrect code.Diagnostics: An error or lint that needs small tweaks.Lint: unused_qualificationsRelevant to the compiler team, which will review and decide on the PR/issue.