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

Link rot in error messages #57104

Closed
m-hilgendorf opened this issue Dec 24, 2018 · 1 comment
Closed

Link rot in error messages #57104

m-hilgendorf opened this issue Dec 24, 2018 · 1 comment
Assignees
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools P-medium Medium priority

Comments

@m-hilgendorf
Copy link

Happy holidays everyone, I know this isn't going to get looked at for a few days and it's probably a clone of an existing issue (couldn't find it)

I noticed today that the compiler has invalid links in its error messages. Example:

struct Foo<B: Bar> {
    bar : B
}

trait Bar {
    fn foo() -> Foo<Self>;
}

Yields the error

error[E0277]: the size for values of type `Self` cannot be known at compilation time                                                                                                                 
  --> src/lib.rs:10:5                                                                                                                                                                                
   |                                                                                                                                                                                                 
10 |     fn foo() -> Foo<Self>;                                                                                                                                                                      
   |     ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time                                                                                                                            
   |                                                                                                                                                                                                 
   = help: the trait `std::marker::Sized` is not implemented for `Self`                                                                                                                              
   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>                                              
   = help: consider adding a `where Self: std::marker::Sized` bound      

I love this feature, but that link is incorrect. The correct link is:

https://doc.rust-lang.org/book/ch19-04-advanced-types.html?highlight=dynamical#dynamically-sized-types-and-the--sized--trait.

This is just an example, I'm sure there are other error messages that have the same issue. I'm not certain if it's better fixed in the compiler (who wants to rewrite error messages every time docs.rust-lang.org changes an URL?) or if this should be filed as an issue over at that repository.

@varkor varkor added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Dec 24, 2018
@steveklabnik steveklabnik added the P-medium Medium priority label Dec 27, 2018
@frewsxcv frewsxcv self-assigned this Jan 1, 2019
frewsxcv added a commit to frewsxcv/rust that referenced this issue Jan 1, 2019
@frewsxcv
Copy link
Member

frewsxcv commented Jan 1, 2019

Opened a PR for this #57249

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jan 3, 2019
…=KodrAus

Fix broken links to second edition TRPL.

Fixes rust-lang#57104.

Remove `second-edition/` from TRPL hyperlinks.
kennytm added a commit to kennytm/rust that referenced this issue Jan 5, 2019
…=KodrAus

Fix broken links to second edition TRPL.

Fixes rust-lang#57104.

Remove `second-edition/` from TRPL hyperlinks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

4 participants