Skip to content

Using #[phase(syntax)] on use instead of mod crashes the compiler #11806

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

Closed
uzytkownik opened this issue Jan 26, 2014 · 3 comments · Fixed by #12175
Closed

Using #[phase(syntax)] on use instead of mod crashes the compiler #11806

uzytkownik opened this issue Jan 26, 2014 · 3 comments · Fixed by #12175
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@uzytkownik
Copy link

(gdb) bt
#0  0x00007ffff7727630 in rust_fail ()
   from /usr/bin/../lib/libstd-966edb7e-0.10-pre.so
#1  0x00007ffff75cbd39 in rt::unwind::Unwinder::begin_unwind::h3b1cb9a3eb8d991bXOaD::v0.10.pre () from /usr/bin/../lib/libstd-966edb7e-0.10-pre.so
#2  0x00007ffff2dd6aa8 in rt::unwind::begin_unwind::hd9a1d253d4a33d5aaQ::v0.10.pre () from /usr/bin/../lib/librustc-0d83f02f-0.10-pre.so
#3  0x00007ffff3976efb in option::Option::unwrap::h144931b46c7e68dblhaV::v0.10.pre () from /usr/bin/../lib/librustc-0d83f02f-0.10-pre.so
#4  0x00007ffff3869351 in metadata::creader::CrateLoader$Loader::load_crate::he9aa556ffd45c033OYae::v0.10.pre ()
   from /usr/bin/../lib/librustc-0d83f02f-0.10-pre.so
#5  0x00007ffff62db6ab in ext::expand::load_extern_macros::h9b911bdebace7cc7aw::v0.10.pre () from /usr/bin/../lib/libsyntax-ebc61d75-0.10-pre.so
#6  0x00007ffff62db384 in ext::expand::expand_view_item::hf01392e46aef41d3an::v0.10.pre () from /usr/bin/../lib/libsyntax-ebc61d75-0.10-pre.so
#7  0x00007ffff62c9434 in ext::expand::Folder$MacroExpander::fold_view_item::hc549b12bf2909253TxaX::v0.10.pre ()
   from /usr/bin/../lib/libsyntax-ebc61d75-0.10-pre.so
#8  0x00007ffff62c93c8 in fold::noop_fold_mod::anon::expr_fn::aVaW ()
   from /usr/bin/../lib/libsyntax-ebc61d75-0.10-pre.so
#9  0x00007ffff62c98d6 in iter::Map::do_map::hcd7f6781e31a9c951za2::v0.10.pre
    () from /usr/bin/../lib/libsyntax-ebc61d75-0.10-pre.so
#10 0x00007ffff62c9818 in iter::Iterator$Map::next::h9083bbf0fab46094r6a1::v0.10
@alexcrichton
Copy link
Member

Thanks for the report! Do you have some example code that triggers this as well? It's helpful to have the exact code with the exact command line parameters in order to help us duplicating these.

cc @sfackler

@sfackler
Copy link
Member

Oops! I thought I had a check in there somewhere for that. Should be an easy fix.

@uzytkownik
Copy link
Author

@alexcrichton: I'd have to check it but it was really simple. Something it wasn't more complicated then:

extern mod test;

#[phase(syntax)]
use test;

pub fn main() {}

bors added a commit that referenced this issue Feb 11, 2014
It could throw an error but I think it's best to not since `#[phase(..)]` syntax in other places would be silently ignored.

Closes #11806
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 16, 2023
Changelog for Rust 1.74 🎃

Roses are red,
Halloween is over,
Have you considered,
Buying a Mars rover?

---

### The cats of this release:

<img height=500 src="https://github.com/rust-lang/rust-clippy/assets/17087237/095bd32e-b5e3-41db-8f0f-bdef7ca1a6d0" alt="The cats of this Clippy release" />

<sub>The cat for the next release can be nominated in the comments</sub>

---

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants