dprint / dprint-plugin-json

JSON code formatting plugin for dprint.
https://dprint.dev/plugins/json
MIT License
18 stars 5 forks source link

fix: add lifetime for rust +nightly compiler #12

Closed mmastrac closed 1 year ago

mmastrac commented 1 year ago

Nightly compiler complains:

13 |   fn get_token_at_index(&self, index: usize) -> &'a Self::TToken;
   |   --------------------------------------------------------------- expected `fn(&'1 LocalTokenCollection<'a>, usize) -> &'a TokenAndRange<'a>`
   |
   = note: expected signature `fn(&'1 LocalTokenCollection<'a>, usize) -> &'a TokenAndRange<'a>`
              found signature `fn(&'1 LocalTokenCollection<'a>, usize) -> &'a TokenAndRange<'1>`
   = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
   = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.