Fixing a typo

hello i just found a typo with this code

fn test<T: T>(value: T) {}
error[E0404]: expected trait, found type parameter `T`                                                                  
 --> src\main.rs:5:12                                                                                                   
  |                                                                                                                     
5 | fn test<T: T>(value: T) {                                                                                           
  |         -  ^ not a trait                                                                                            
  |         |                                                                                                           
  |         found this type pararmeter                                                                                  
                                  
For more information about this error, try `rustc --explain E0404`.                                                     
error: could not compile `testingproject` due to previous error
4 Likes

Good find, let’s fix this!

2 Likes

This should solve the problem ^^

5 Likes

FYI, the more typical channel for reporting such a typo would be by opening an issue on GitHub (this one could classify as “bug report” or “diagnostics issue”).

3 Likes

sorry for opening this bug error without wrong category but i am new to this forum and i am blind user who learned this page so somethings can take longer until i figure

2 Likes

There is absolutely no problem with reporting the issue here, especially as a new user! Every form of contribution is good, and no matter where you're reporting an issue, it's infinitely better than not reporting the issue at all!

I was just letting you know for the future, in case you come across any other issues with the rust compiler, that the more common/proper approach is with a GitHub issue.

10 Likes

off-topic This is something that I love in this community. People answer to the best possible version of badly formulated questions, and even when the wrong medium is used they say it but still answer the question. You really feel welcomed and gently guided as a newcommer.

4 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.