Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the way spans of external definitions are printed #160

Open
sonmarcho opened this issue Apr 25, 2024 · 0 comments
Open

Update the way spans of external definitions are printed #160

sonmarcho opened this issue Apr 25, 2024 · 0 comments

Comments

@sonmarcho
Copy link
Member

Today, when printing spans for external declarations we generated ugly strings, leading to noise in the generated code.
For instance:

/- [core::cell::{core::cell::Cell<T>#10}::get]:
   Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/cell.rs', lines 497:4-497:26
   Name pattern: core::cell::{core::cell::Cell<@T>}::get -/
axiom core.cell.Cell.get
  (T : Type) (markerCopyInst : core.marker.Copy T) :
  core.cell.Cell T → State → Result (State × T)

/- [core::cell::{core::cell::Cell<T>#11}::get_mut]:
   Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/cell.rs', lines 574:4-574:39
   Name pattern: core::cell::{core::cell::Cell<@T>}::get_mut -/
axiom core.cell.Cell.get_mut
  (T : Type) :
  core.cell.Cell T → State → Result (State × (T × (T → State → Result
    (State × (core.cell.Cell T)))))

We would like to have something like:

/- [core::cell::{core::cell::Cell<T>#10}::get]:
   Source: 'core/src/cell.rs', lines 497:4-497:26
   Name pattern: core::cell::{core::cell::Cell<@T>}::get -/
axiom core.cell.Cell.get
  (T : Type) (markerCopyInst : core.marker.Copy T) :
  core.cell.Cell T → State → Result (State × T)

/- [core::cell::{core::cell::Cell<T>#11}::get_mut]:
   Source: 'core/src/cell.rs', lines 574:4-574:39
   Name pattern: core::cell::{core::cell::Cell<@T>}::get_mut -/
axiom core.cell.Cell.get_mut
  (T : Type) :
  core.cell.Cell T → State → Result (State × (T × (T → State → Result
    (State × (core.cell.Cell T)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant