File: misuse.stderr

package info (click to toggle)
rust-proc-macro-error2 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 308 kB
  • sloc: makefile: 2
file content (24 lines) | stat: -rw-r--r-- 1,332 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
error[E0599]: the method `FIRST_ARG_MUST_EITHER_BE_Span_OR_IMPLEMENT_ToTokens_OR_BE_SpanRange` exists for reference `&Foo`, but its trait bounds were not satisfied
 --> tests/ui/misuse.rs:7:5
  |
3 | struct Foo;
  | ---------- doesn't satisfy `Foo: quote::to_tokens::ToTokens`
...
7 |     abort!(Foo, "BOOM");
  |     ^^^^^^^^^^^^^^^^^^^ method cannot be called on `&Foo` due to unsatisfied trait bounds
  |
  = note: the following trait bounds were not satisfied:
          `Foo: quote::to_tokens::ToTokens`
          which is required by `&Foo: ToTokensAsSpanRange`
note: the trait `quote::to_tokens::ToTokens` must be implemented
 --> $CARGO/quote-1.0.37/src/to_tokens.rs
  |
  | pub trait ToTokens {
  | ^^^^^^^^^^^^^^^^^^
  = help: items from traits can only be used if the trait is implemented and in scope
  = note: the following traits define an item `FIRST_ARG_MUST_EITHER_BE_Span_OR_IMPLEMENT_ToTokens_OR_BE_SpanRange`, perhaps you need to implement one of them:
          candidate #1: `Span2AsSpanRange`
          candidate #2: `SpanAsSpanRange`
          candidate #3: `SpanRangeAsSpanRange`
          candidate #4: `ToTokensAsSpanRange`
  = note: this error originates in the macro `$crate::diagnostic` which comes from the expansion of the macro `abort` (in Nightly builds, run with -Z macro-backtrace for more info)