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

ICE on inconsistent resolution for a macro #69932

Closed
Kixiron opened this issue Mar 11, 2020 · 4 comments
Closed

ICE on inconsistent resolution for a macro #69932

Kixiron opened this issue Mar 11, 2020 · 4 comments
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Kixiron
Copy link
Member

Kixiron commented Mar 11, 2020

Code

The code is rather long and complicated, and I unfortunately don't have the time or will to attempt reduction as of now, so I committed it as-is to this file.
My conjecture takes some setup, so bear with me. My code involves meta-macros, or macros that create other macros. While debugging said meta-macro, I had an expanded version of it already in the source file, so something clashed there.
To encounter the ICE I simply ran cargo test

Meta

rustc --version --verbose:

rustc 1.41.1 (f3e1a954d 2020-02-24)
binary: rustc
commit-hash: f3e1a954d2ead4e2fc197c7da7d71e6c61bad196
commit-date: 2020-02-24
host: x86_64-pc-windows-msvc
release: 1.41.1
LLVM version: 9.0

Error output

>cargo t
    Blocking waiting for file lock on build directory
   Compiling tagged-box v0.1.1 (G:\LocalFileServer\Programming\Rust\tagged-box)
error: a macro named `__expand_tuple` has already been exported
   --> src\tagged_box_macro.rs:571:9
    |
571 | /         macro_rules! __expand_tuple {
572 | |             $( $finished )*
573 | |         }
    | |_________^ `__expand_tuple` already exported
...
577 | / generate_tuple_expansion! {
578 | |     ($, others)
579 | |     (0, a), (1, b), (2, c), (3, d),
580 | |     (4, e), (5, f), (6, g), (7, h),
...   |
586 | |     (28, cc), (29, dd), (30, ee), (31, ff)
587 | | }
    | |_- in this macro invocation
    |
note: previous macro export is now shadowed
   --> src\tagged_box_macro.rs:591:1
    |
591 | / macro_rules! __expand_tuple {
592 | |     ($variant:path) => {
593 | |         $variant()
594 | |     };
...   |
797 | |     };
798 | | }
    | |_^

error: aborting due to previous error

error: could not compile `tagged-box`.
warning: build failed, waiting for other jobs to finish...
error: a macro named `__expand_tuple` has already been exported
   --> src\tagged_box_macro.rs:571:9
    |
571 | /         macro_rules! __expand_tuple {
572 | |             $( $finished )*
573 | |         }
    | |_________^ `__expand_tuple` already exported
...
577 | / generate_tuple_expansion! {
578 | |     ($, others)
579 | |     (0, a), (1, b), (2, c), (3, d),
580 | |     (4, e), (5, f), (6, g), (7, h),
...   |
586 | |     (28, cc), (29, dd), (30, ee), (31, ff)
587 | | }
    | |_- in this macro invocation
    |
note: previous macro export is now shadowed
   --> src\tagged_box_macro.rs:591:1
    |
591 | / macro_rules! __expand_tuple {
592 | |     ($variant:path) => {
593 | |         $variant()
594 | |     };
...   |
797 | |     };
798 | | }
    | |_^

error: unexpected end of macro invocation
   --> src\tagged_box_macro.rs:904:68
    |
571 |         macro_rules! __expand_tuple {
    |         --------------------------- when calling this macro
...
904 |                     $crate::__expand_tuple!($enum::$variant, tuple, $($ty),*)
    |                                                                    ^ missing tokens in macro arguments

error: unknown macro variable `tagged`
    --> src\tagged_box_macro.rs:545:98
     |
545  |                       let $tuple = $dollar crate::TaggedBox::into_inner::<$dollar variant>($dollar tagged);
     |  __________________________________________________________________________________________________^
546  | |                     $dollar variant($( $access )* $dollar $tuple . $field)
547  | |                 }};
548  | |             ]
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unknown macro variable `tuple`
    --> src\tagged_box_macro.rs:516:39
     |
516  |               @inner ($dollar, $others, tuple)
     |  _______________________________________^
517  | |             [
518  | |                 // ($variant:path) => {
519  | |                 //     $variant()
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: expected expression, found `.`
    --> src\tagged_box_macro.rs:550:44
     |
550  |               [ $( $access )* $dollar $tuple . $field, ]
     |                                              ^ expected expression
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unexpected end of macro invocation
   --> src\tagged_box_macro.rs:826:78
    |
571 |         macro_rules! __expand_tuple {
    |         --------------------------- when calling this macro
...
826 |                 let variant = $crate::__expand_tuple!($enum::$variant, tuple, $($ty),*);
    |                                                                              ^ missing tokens in macro arguments

error: unknown macro variable `tagged`
    --> src\tagged_box_macro.rs:545:98
     |
545  |                       let $tuple = $dollar crate::TaggedBox::into_inner::<$dollar variant>($dollar tagged);
     |  __________________________________________________________________________________________________^
546  | |                     $dollar variant($( $access )* $dollar $tuple . $field)
547  | |                 }};
548  | |             ]
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unknown macro variable `tuple`
    --> src\tagged_box_macro.rs:516:39
     |
516  |               @inner ($dollar, $others, tuple)
     |  _______________________________________^
517  | |             [
518  | |                 // ($variant:path) => {
519  | |                 //     $variant()
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: expected expression, found `.`
    --> src\tagged_box_macro.rs:550:44
     |
550  |               [ $( $access )* $dollar $tuple . $field, ]
     |                                              ^ expected expression
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unexpected end of macro invocation
   --> src\tagged_box_macro.rs:991:68
    |
571 |         macro_rules! __expand_tuple {
    |         --------------------------- when calling this macro
...
991 |                     $crate::__expand_tuple!($enum::$variant, tuple, $( $ty ),*)
    |                                                                    ^ missing tokens in macro arguments

error: unknown macro variable `tagged`
    --> src\tagged_box_macro.rs:545:98
     |
545  |                       let $tuple = $dollar crate::TaggedBox::into_inner::<$dollar variant>($dollar tagged);
     |  __________________________________________________________________________________________________^
546  | |                     $dollar variant($( $access )* $dollar $tuple . $field)
547  | |                 }};
548  | |             ]
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unknown macro variable `tuple`
    --> src\tagged_box_macro.rs:516:39
     |
516  |               @inner ($dollar, $others, tuple)
     |  _______________________________________^
517  | |             [
518  | |                 // ($variant:path) => {
519  | |                 //     $variant()
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: expected expression, found `.`
    --> src\tagged_box_macro.rs:550:44
     |
550  |               [ $( $access )* $dollar $tuple . $field, ]
     |                                              ^ expected expression
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unexpected end of macro invocation
    --> src\tagged_box_macro.rs:1108:111
     |
571  |         macro_rules! __expand_tuple {
     |         --------------------------- when calling this macro
...
1108 |                     let variant = core::mem::ManuallyDrop::new($crate::__expand_tuple!($enum::$variant, tuple, $($ty),*));
     |                                                                                                               ^ missing tokens in macro arguments

error: unknown macro variable `tagged`
    --> src\tagged_box_macro.rs:545:98
     |
545  |                       let $tuple = $dollar crate::TaggedBox::into_inner::<$dollar variant>($dollar tagged);
     |  __________________________________________________________________________________________________^
546  | |                     $dollar variant($( $access )* $dollar $tuple . $field)
547  | |                 }};
548  | |             ]
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unknown macro variable `tuple`
    --> src\tagged_box_macro.rs:516:39
     |
516  |               @inner ($dollar, $others, tuple)
     |  _______________________________________^
517  | |             [
518  | |                 // ($variant:path) => {
519  | |                 //     $variant()
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: expected expression, found `.`
    --> src\tagged_box_macro.rs:550:44
     |
550  |               [ $( $access )* $dollar $tuple . $field, ]
     |                                              ^ expected expression
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

thread 'rustc' panicked at 'src\librustc_resolve\macros.rs:742: inconsistent resolution for a macro', src\librustc\util\bug.rs:37:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.41.1 (f3e1a954d 2020-02-24) running on x86_64-pc-windows-msvc

note: compiler flags: -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden
Backtrace

>cargo t
   Compiling tagged-box v0.1.1 (G:\LocalFileServer\Programming\Rust\tagged-box)
error: a macro named `__expand_tuple` has already been exported
   --> src\tagged_box_macro.rs:571:9
    |
571 | /         macro_rules! __expand_tuple {
572 | |             $( $finished )*
573 | |         }
    | |_________^ `__expand_tuple` already exported
...
577 | / generate_tuple_expansion! {
578 | |     ($, others)
579 | |     (0, a), (1, b), (2, c), (3, d),
580 | |     (4, e), (5, f), (6, g), (7, h),
...   |
586 | |     (28, cc), (29, dd), (30, ee), (31, ff)
587 | | }
    | |_- in this macro invocation
    |
note: previous macro export is now shadowed
   --> src\tagged_box_macro.rs:591:1
    |
591 | / macro_rules! __expand_tuple {
592 | |     ($variant:path) => {
593 | |         $variant()
594 | |     };
...   |
797 | |     };
798 | | }
    | |_^

error: aborting due to previous error

error: could not compile `tagged-box`.
warning: build failed, waiting for other jobs to finish...
error: a macro named `__expand_tuple` has already been exported
   --> src\tagged_box_macro.rs:571:9
    |
571 | /         macro_rules! __expand_tuple {
572 | |             $( $finished )*
573 | |         }
    | |_________^ `__expand_tuple` already exported
...
577 | / generate_tuple_expansion! {
578 | |     ($, others)
579 | |     (0, a), (1, b), (2, c), (3, d),
580 | |     (4, e), (5, f), (6, g), (7, h),
...   |
586 | |     (28, cc), (29, dd), (30, ee), (31, ff)
587 | | }
    | |_- in this macro invocation
    |
note: previous macro export is now shadowed
   --> src\tagged_box_macro.rs:591:1
    |
591 | / macro_rules! __expand_tuple {
592 | |     ($variant:path) => {
593 | |         $variant()
594 | |     };
...   |
797 | |     };
798 | | }
    | |_^

error: unexpected end of macro invocation
   --> src\tagged_box_macro.rs:904:68
    |
571 |         macro_rules! __expand_tuple {
    |         --------------------------- when calling this macro
...
904 |                     $crate::__expand_tuple!($enum::$variant, tuple, $($ty),*)
    |                                                                    ^ missing tokens in macro arguments

error: unknown macro variable `tagged`
    --> src\tagged_box_macro.rs:545:98
     |
545  |                       let $tuple = $dollar crate::TaggedBox::into_inner::<$dollar variant>($dollar tagged);
     |  __________________________________________________________________________________________________^
546  | |                     $dollar variant($( $access )* $dollar $tuple . $field)
547  | |                 }};
548  | |             ]
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unknown macro variable `tuple`
    --> src\tagged_box_macro.rs:516:39
     |
516  |               @inner ($dollar, $others, tuple)
     |  _______________________________________^
517  | |             [
518  | |                 // ($variant:path) => {
519  | |                 //     $variant()
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: expected expression, found `.`
    --> src\tagged_box_macro.rs:550:44
     |
550  |               [ $( $access )* $dollar $tuple . $field, ]
     |                                              ^ expected expression
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unexpected end of macro invocation
   --> src\tagged_box_macro.rs:826:78
    |
571 |         macro_rules! __expand_tuple {
    |         --------------------------- when calling this macro
...
826 |                 let variant = $crate::__expand_tuple!($enum::$variant, tuple, $($ty),*);
    |                                                                              ^ missing tokens in macro arguments

error: unknown macro variable `tagged`
    --> src\tagged_box_macro.rs:545:98
     |
545  |                       let $tuple = $dollar crate::TaggedBox::into_inner::<$dollar variant>($dollar tagged);
     |  __________________________________________________________________________________________________^
546  | |                     $dollar variant($( $access )* $dollar $tuple . $field)
547  | |                 }};
548  | |             ]
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unknown macro variable `tuple`
    --> src\tagged_box_macro.rs:516:39
     |
516  |               @inner ($dollar, $others, tuple)
     |  _______________________________________^
517  | |             [
518  | |                 // ($variant:path) => {
519  | |                 //     $variant()
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: expected expression, found `.`
    --> src\tagged_box_macro.rs:550:44
     |
550  |               [ $( $access )* $dollar $tuple . $field, ]
     |                                              ^ expected expression
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unexpected end of macro invocation
   --> src\tagged_box_macro.rs:991:68
    |
571 |         macro_rules! __expand_tuple {
    |         --------------------------- when calling this macro
...
991 |                     $crate::__expand_tuple!($enum::$variant, tuple, $( $ty ),*)
    |                                                                    ^ missing tokens in macro arguments

error: unknown macro variable `tagged`
    --> src\tagged_box_macro.rs:545:98
     |
545  |                       let $tuple = $dollar crate::TaggedBox::into_inner::<$dollar variant>($dollar tagged);
     |  __________________________________________________________________________________________________^
546  | |                     $dollar variant($( $access )* $dollar $tuple . $field)
547  | |                 }};
548  | |             ]
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unknown macro variable `tuple`
    --> src\tagged_box_macro.rs:516:39
     |
516  |               @inner ($dollar, $others, tuple)
     |  _______________________________________^
517  | |             [
518  | |                 // ($variant:path) => {
519  | |                 //     $variant()
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: expected expression, found `.`
    --> src\tagged_box_macro.rs:550:44
     |
550  |               [ $( $access )* $dollar $tuple . $field, ]
     |                                              ^ expected expression
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unexpected end of macro invocation
    --> src\tagged_box_macro.rs:1108:111
     |
571  |         macro_rules! __expand_tuple {
     |         --------------------------- when calling this macro
...
1108 |                     let variant = core::mem::ManuallyDrop::new($crate::__expand_tuple!($enum::$variant, tuple, $($ty),*));
     |                                                                                                               ^ missing tokens in macro arguments

error: unknown macro variable `tagged`
    --> src\tagged_box_macro.rs:545:98
     |
545  |                       let $tuple = $dollar crate::TaggedBox::into_inner::<$dollar variant>($dollar tagged);
     |  __________________________________________________________________________________________________^
546  | |                     $dollar variant($( $access )* $dollar $tuple . $field)
547  | |                 }};
548  | |             ]
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: unknown macro variable `tuple`
    --> src\tagged_box_macro.rs:516:39
     |
516  |               @inner ($dollar, $others, tuple)
     |  _______________________________________^
517  | |             [
518  | |                 // ($variant:path) => {
519  | |                 //     $variant()
...    |
577  | | generate_tuple_expansion! {
578  | |     ($, others)
     | |_____^ unknown macro variable
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

error: expected expression, found `.`
    --> src\tagged_box_macro.rs:550:44
     |
550  |               [ $( $access )* $dollar $tuple . $field, ]
     |                                              ^ expected expression
...
1517 | /         tagged_box! {
1518 | |             #[derive(Debug, Clone, PartialEq, Eq)]
1519 | |             struct Container, enum Item {
1520 | |                 Unit,
...    |
1528 | |             }
1529 | |         }
     | |_________- in this macro invocation

thread 'rustc' panicked at 'src\librustc_resolve\macros.rs:742: inconsistent resolution for a macro', src\librustc\util\bug.rs:37:26
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: <std::io::IoSliceMut as core::fmt::Debug>::fmt
   3: std::panicking::take_hook
   4: std::panicking::take_hook
   5: rustc_driver::report_ice
   6: std::panicking::rust_panic_with_hook
   7: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as syntax::visit::Visitor>::visit_ty
   8: <rustc_resolve::late::PathSource as core::fmt::Debug>::fmt
   9: <rustc_resolve::late::PathSource as core::fmt::Debug>::fmt
  10: <rustc_resolve::late::PathSource as core::fmt::Debug>::fmt
  11: <rustc_resolve::late::PathSource as core::fmt::Debug>::fmt
  12: <rustc_resolve::late::PathSource as core::fmt::Debug>::fmt
  13: rustc_resolve::macros::<impl rustc_resolve::Resolver>::resolve_macro_path
  14: rustc_resolve::Resolver::resolve_crate
  15: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::compile
  16: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::compile
  17: rustc_interface::queries::Queries::expansion
  18: rustc_driver::pretty::print_after_hir_lowering
  19: <syntax_pos::symbol::SymbolStr as core::fmt::Display>::fmt
  20: <chalk_engine::stack::StackIndex as core::convert::From<usize>>::from
  21: <rustc_driver::Compilation as core::fmt::Debug>::fmt
  22: <chalk_engine::stack::StackIndex as core::convert::From<usize>>::from
  23: _rust_maybe_catch_panic
  24: rustc_driver::pretty::print_after_hir_lowering
  25: ZN244_$LT$std..error..$LT$impl$u20$core..convert..From$LT$alloc..string..String$GT$$u20$for$u20$alloc..boxed..Box$LT$dyn$u20$std..error..Error$u2b$core..marker..Send$u2b$core..marker..Sync$GT$$GT$..from..StringError$u20$as$u20$core..fmt..Display$GT$3fmt17
  26: std::sys::windows::thread::Thread::new
  27: BaseThreadInitThunk
  28: RtlUserThreadStart
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.41.1 (f3e1a954d 2020-02-24) running on x86_64-pc-windows-msvc

note: compiler flags: -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: aborting due to 17 previous errors

error: could not compile `tagged-box`.

To learn more, run the command again with --verbose.

@Kixiron Kixiron added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) P-low Low priority labels Mar 11, 2020
@petrochenkov
Copy link
Contributor

petrochenkov commented Mar 11, 2020

I have copypasted the provided code into the playground and the ICE doesn't reproduce.

Could you check whether it reproduces on nightly?
It could be fixed by the PR making duplicate_macro_exports an error (#65785).

@Kixiron
Copy link
Member Author

Kixiron commented Mar 11, 2020

Nightly 1.43.0-nightly (564758c4c 2020-03-08) does not ICE

@Centril Centril added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. labels Mar 11, 2020
@Enselic
Copy link
Member

Enselic commented Aug 24, 2023

Triage: I can't reproduce the ICE with the exact compiler you originally reported to reproduce with. I run the following commands in PowerShell:

> rustup install 1.41.1 --profile minimal
> cargo +1.41.1 new --lib crash
> cd crash
> Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Kixiron/tagged-box/563c864320a7f613db2961d87666215193e59beb/src/tagged_box_macro.rs" -OutFile "src/lib.rs"
> cargo +1.41.1 test
error: aborting due to 57 previous errors
# no ICE
> cargo +1.41.1 rustc -- --version --verbose
rustc 1.41.1 (f3e1a954d 2020-02-24)
binary: rustc
commit-hash: f3e1a954d2ead4e2fc197c7da7d71e6c61bad196
commit-date: 2020-02-24
host: x86_64-pc-windows-msvc
release: 1.41.1
LLVM version: 9.0

Can you reproduce with the above commands? What am I missing?

@Enselic
Copy link
Member

Enselic commented Oct 12, 2023

Triage: Closing as not reproducible.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants