Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5124

Cannot use reserved language keyword

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.0
    • 0.18.0
    • Rust - Compiler
    • None
    • MacOS with thrift version 0.13

    Description

      When running 

      thrift --gen rs -out . sample.thrift

      against a thrift file that contains a field with `From from` the generation fails with the error:

      [FAILURE:generation:1] Cannot use reserved language keyword: "from"

      It was my understanding that the rust library should escape all reserved words.

      An example thrift file:

      struct From {
        1: string name,
      }
      struct Sample {
        1: From from,
      }

       

      Attachments

        Issue Links

          Activity

            People

              jensg Jens Geyer
              xfactor973 Chris Holcombe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: