Skip to content

rustc: Don't link in syntax extensions #13496

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 14, 2014
Merged

Conversation

alexcrichton
Copy link
Member

This bug was introduced in #13384 by accident, and this commit continues the
work of #13384 by finishing support for loading a syntax extension crate without
registering it with the local cstore.

Closes #13495

This bug was introduced in rust-lang#13384 by accident, and this commit continues the
work of rust-lang#13384 by finishing support for loading a syntax extension crate without
registering it with the local cstore.

Closes rust-lang#13495
@sfackler
Copy link
Member

Won't the current setup load metadata for #[phase(syntax, link)] crates twice? It seems like it might make more sense to store syntax crates in the cstore with a flag to tell whether or not it should be linked to.

@alexcrichton
Copy link
Member Author

I added a should_link flag for that use case, and metadata for a library like libstd should only be loaded once as a result. If the should_link flag is true, the metadata is inserted into the cstore.

bors added a commit that referenced this pull request Apr 14, 2014
This bug was introduced in #13384 by accident, and this commit continues the
work of #13384 by finishing support for loading a syntax extension crate without
registering it with the local cstore.

Closes #13495
@bors bors closed this Apr 14, 2014
@bors bors merged commit e163ab2 into rust-lang:master Apr 14, 2014
@alexcrichton alexcrichton deleted the issue-13495 branch April 18, 2014 22:13
Dylan-DPC pushed a commit to Dylan-DPC/rust that referenced this pull request Nov 1, 2022
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 18, 2024
Show interior mutability chain in `mutable_key_type`

Fixes rust-lang#10619

Just ran into this myself and I definitely agree it's not very nice to have to manually go through all the types involved to figure out why this happens and to evaluate if this is really a problem (knowing if the field of a struct is something that a hash impl relies on), so this changes the lint to emit notes for each step involved.

changelog: none
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax-phase crates are always linked against
3 participants