-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Can't implement methods for an imported struct type without using global path #11798
Comments
This appears to be a problem still. With the latest Rust master, the following compiles and runs without error:
But this does not:
The above fails to compile with this error:
Changing "impl Bar" to "impl ::foo::Bar" still fixes it. |
I believe this is the same as #9052 |
This now has a real error message:
|
And yes, as the error says, this is expected. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Nov 16, 2023
move `suspicious_doc_comments` to doc pass This was my first lint. I've been meaning to move it over to `doc.rs` since that's a better place. There weren't any changes made to the lint logic itself. I guess this can be considered part of rust-lang#11493 changelog: none
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 1, 2023
Split `doc.rs` up into a subdirectory So, first, sorry for the bad diff. 😅 In rust-lang#11798, `@flip1995` suggested splitting `doc.rs` up, much like how we have the `methods/`, `matches/`, `types/` subdirectories. I agree with this, the file is getting bigger as we add more and more doc lints that it makes sense to do this refactoring. This is purely an internal change that moves things around a bit. (**EDIT:** depending on the outcome of rust-lang/rust-clippy#11801 (comment) , this may change the lint group name from `doc_markdoc` to `doc`). I tried to not change any of the actual logic of the lints and as such some things weren't as easy to move to a separate file. So we still have some `span_lint*` calls in the `doc/mod.rs` file, which I think is fine. This is also the case in `methods/mod.rs`. Also worth mentioning that the lints missing_errors_doc, missing_panics_doc, missing_safety_doc and unnecessary_safety_doc have a lot of the same logic so it didn't make much sense for each of these to be in their own file. Instead I just put them all in `missing_headers.rs` I also added a bit of documentation to the involved `check_{attrs,doc}` methods. changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This does not work:
It results in:
Changing "impl Bar" to "impl ::foo::Bar" on line 3 does work, however. Is this the intended behavior?
The text was updated successfully, but these errors were encountered: