Stream: t-compiler

Topic: ICE-#58837


centril (Mar 03 2019 at 15:21, on Zulip):

@Vadim Petrochenkov any idea as to why the ICE happens in the repro I made? not sure why NonMacroAttr(Builtin) even occurs...

centril (Mar 03 2019 at 15:26, on Zulip):

the ICE also seems quite specific to rustc_mir; changing to other crates doesn't seem to repro

Vadim Petrochenkov (Mar 03 2019 at 15:33, on Zulip):

#[rustc_mir] is actually a built-in attribute.

Vadim Petrochenkov (Mar 03 2019 at 15:33, on Zulip):

I haven't yet looked why it gets into a Module though.

centril (Mar 03 2019 at 15:37, on Zulip):

@Vadim Petrochenkov ah; iirc the origin is https://github.com/rust-lang/rust/blob/master/src/librustc_interface/util.rs#L15 which is then used in https://github.com/rust-lang/rust/blob/master/src/librustc_interface/util.rs#L52 -- maybe there's a conflict between the attribute and the crate?

centril (Mar 03 2019 at 15:42, on Zulip):

So changing things to e.g. use warn; or use ignore; will also repro; more generally any attribute in https://github.com/rust-lang/rust/blob/master/src/libsyntax/feature_gate.rs#L828 seems to do it (aside from cfg).

Vadim Petrochenkov (Mar 03 2019 at 15:56, on Zulip):

If everything works correctly, then rustc_mir in rustc_mir::DIAGNOSTICS should only be resolved in type namespace and the resolution in macro namespace should never end up in Module.

Vadim Petrochenkov (Mar 03 2019 at 15:56, on Zulip):

Even if the name exists in multiple namespaces.

centril (Mar 03 2019 at 16:24, on Zulip):

makes sense

Last update: Nov 16 2019 at 01:25UTC