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

Record the ast of uses and imports #188

Merged
1 commit merged into from
Dec 30, 2010
Merged

Record the ast of uses and imports #188

1 commit merged into from
Dec 30, 2010

Conversation

espindola
Copy link

Some points I would really like some feedback on

  1. Do we have a better name for "use or import" than "use_or_import" :-)

  2. Is

use foo;
import foo.bar;
use zed;

legal or should we require that all uses come first?

  1. I did the same as the rustboot parser and do the "use foo;" -> "use foo(name = "foo");" conversion very early. Is that desirable or should I keep the ast closer to what the user typed?

@graydon
Copy link
Contributor

graydon commented Dec 29, 2010

  1. use_or_import is probably fine.
  2. I don't have a strong opinion on. Mixing them is probably ok.
  3. The rule in rustc is that we'd like to support complete reconstruction of user input from AST (excluding whitespace, but eventually including comments); so aim for "keep what the user typed".

@espindola
Copy link
Author

I have update the branch to avoid the adding the implicit name metadata as it parses.

arielb1 pushed a commit to arielb1/rust that referenced this pull request Apr 10, 2015
Improve the issue reference format in headers.
oli-obk added a commit to oli-obk/rust that referenced this pull request Jul 19, 2017
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this pull request Dec 12, 2017
Roll together a few PRs in the queue
dlrobertson pushed a commit to dlrobertson/rust that referenced this pull request Nov 29, 2018
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Mar 7, 2023
celinval pushed a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
Handle duplicate dynamic trait names correctly, for now keeping the string-matching based vtable implementation. In the generated vtable itself, use the function name scoped to the specific trait (A::foo vs B::foo) instead of just the function name. Merge some vtable lookup handling. Add tests for more potential naming conflicts.
carolynzech pushed a commit to celinval/rust-dev that referenced this pull request Dec 9, 2024
…nd `byte_offset` (rust-lang#188)

Towards rust-lang#76 

This pull request impelments proof for contracts for `byte_add`,
`byte_sub` and `byte_offset` for `<dyn Trait>`. Both `const` and `mut`
versions are included.

It serves as an addition to an existing
[PR](model-checking#169) but is
submitted separately to avoid disrupting the ongoing review process for
that PR.

---------

Co-authored-by: Surya Togaru <stogaru@andrew.cmu.edu>
Co-authored-by: stogaru <143449212+stogaru@users.noreply.github.com>
Co-authored-by: Felipe R. Monteiro <rms.felipe@gmail.com>
This pull request was closed.
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

Successfully merging this pull request may close these issues.

3 participants