about summary refs log tree commit diff
path: root/tests/ui/diagnostic_namespace/on_unimplemented/on_impl_trait.stderr
blob: e9d0c6e5daf555d3ec3398d82f22867df70ea59c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
warning: `#[diagnostic::on_unimplemented]` can only be applied to trait definitions
  --> $DIR/on_impl_trait.rs:8:1
   |
LL | #[diagnostic::on_unimplemented(message = "blah", label = "blah", note = "blah")]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(misplaced_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default

error[E0277]: the trait bound `{integer}: Alias` is not satisfied
  --> $DIR/on_impl_trait.rs:16:9
   |
LL |     foo(&1);
   |     --- ^^ the trait `Test` is not implemented for `{integer}`
   |     |
   |     required by a bound introduced by this call
   |
help: this trait has no implementations, consider adding one
  --> $DIR/on_impl_trait.rs:6:1
   |
LL | trait Test {}
   | ^^^^^^^^^^
   = note: required for `{integer}` to implement `Alias`
note: required by a bound in `foo`
  --> $DIR/on_impl_trait.rs:13:11
   |
LL | fn foo<T: Alias>(v: &T) {}
   |           ^^^^^ required by this bound in `foo`

error: aborting due to 1 previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0277`.