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

Fix unindentation of multiline note #301

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Fix unindentation of multiline note #301

merged 2 commits into from
Jan 23, 2025

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jan 23, 2025

Before:

error[E0038]: the trait `MyTrait` is not dyn compatible
 --> src/main.rs:8:12
  |
8 |     let _: &dyn MyTrait;
  |            ^^^^^^^^^^^^ `MyTrait` is not dyn compatible
  |
note: for a trait to be dyn compatible it needs to allow building a vtable
      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
   --> $RUST/core/src/hash/mod.rs
    |
    |     fn hash<H: Hasher>(&self, state: &mut H);
    |        ^^^^ ...because method `hash` has generic type parameters
    |
   ::: src/main.rs:3:7
    |
3   | trait MyTrait: Hash {
    |       ------- this trait is not dyn compatible...
    = help: consider moving `hash` to another trait

After:

error[E0038]: the trait `MyTrait` is not dyn compatible
 --> src/main.rs:8:12
  |
8 |     let _: &dyn MyTrait;
  |            ^^^^^^^^^^^^ `MyTrait` is not dyn compatible
  |
note: for a trait to be dyn compatible it needs to allow building a vtable
      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
 --> $RUST/core/src/hash/mod.rs
  |
  |     fn hash<H: Hasher>(&self, state: &mut H);
  |        ^^^^ ...because method `hash` has generic type parameters
  |
 ::: src/main.rs:3:7
  |
3 | trait MyTrait: Hash {
  |       ------- this trait is not dyn compatible...
  = help: consider moving `hash` to another trait

@dtolnay dtolnay merged commit 7a19ab7 into master Jan 23, 2025
20 checks passed
@dtolnay dtolnay deleted the multilinenote branch January 23, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant