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

Weird docs for trait aliases #18632

Open
ionicmc-rs opened this issue Dec 7, 2024 · 3 comments
Open

Weird docs for trait aliases #18632

ionicmc-rs opened this issue Dec 7, 2024 · 3 comments
Labels
C-bug Category: bug

Comments

@ionicmc-rs
Copy link

ionicmc-rs commented Dec 7, 2024

rust-analyzer version: rust-analyzer version: 0.3.2204-standalone

rustc version: rustc 1.84.0-nightly (5ec7d6eee 2024-11-17)

editor or extension: Visual Studio Code

relevant settings: None

repository link (if public, optional): None

code snippet to reproduce:

#![feature(trait_alias)]

trait Foo {}
trait Bar {}

trait MyTrait = Foo + Bar;

when hovering over MyTrait (to see the documentation, for example) it ends up like this

trait MyTrait = 
where
    Self: Foo + Bar

it looks a little weird,

Extra

rustdoc does not do this

@ionicmc-rs ionicmc-rs added the C-bug Category: bug label Dec 7, 2024
@ChayimFriedman2
Copy link
Contributor

This is not incorrect, writing it like that is also permitted, but yeah it's not the best. However given that it's a nightly-only feature I don't feel rushed to fix that (of course, PRs welcomed).

@ionicmc-rs
Copy link
Author

This is not incorrect, writing it like that is also permitted, but yeah it's not the best. However given that it's a nightly-only feature I don't feel rushed to fix that (of course, PRs welcomed).

I'll update the title, but yes it is only a nightly feature so no rush

@ionicmc-rs ionicmc-rs changed the title Incorrect docs for trait aliases Weird docs for trait aliases Dec 7, 2024
@Veykril
Copy link
Member

Veykril commented Dec 8, 2024

Also note that r-a doesn't semantically (as in the type system) support trait aliases yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants