This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rust/20165] New: bad completion interaction with expression parsing in rust


https://sourceware.org/bugzilla/show_bug.cgi?id=20165

            Bug ID: 20165
           Summary: bad completion interaction with expression parsing in
                    rust
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: rust
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

>From https://github.com/tromey/gdb/issues/35

Completion may give you a command line like:

ptype collections::vec::Vec<u8>

But this is a syntax error, it should be 

ptype collections::vec::Vec::<u8>

For this to work completion would have to be syntax-sensitive,
and we'd have to rewrite the symbol name to add the necessary "::".

On the other hand we would not want the "::" for

ptype something as collections::vec::Vec<u8>


One alternative approach would be to re-parse the expression
using "type" as the entry point.  (Ideally in this case we'd
only lex once, so it's a somewhat bigger change than might
be thought.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]