Skip to content

rustc 1.39 crashed when compile code which using an unknown attribute #67141

@flier

Description

@flier

rustc crashed when compile code which using an unknown attribute

I tried this code:

/// Client request to connect to Server
#[repr(transparent)]
#[derive(Clone, Debug, PartialEq, Deref, DerefMut)]
pub struct Connect<'a, P>(
    #[deref]
    #[deref_mut]
    packet::Connect<'a>,
    PhantomData<P>,
);

I expected to see this happen:

a compile warning

error: cannot determine resolution for the derive macro `Deref`
  --> mqtt-proto/src/connect.rs:38:35
   |
38 | #[derive(Clone, Debug, PartialEq, Deref, DerefMut)]
   |                                   ^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

Instead, this happened:

rustc crashed

Meta

rustc --version --verbose:

rustc 1.39.0 (4560ea788 2019-11-04)
binary: rustc
commit-hash: 4560ea788cb760f0a34127156c78e2552949f734
commit-date: 2019-11-04
host: x86_64-apple-darwin
release: 1.39.0
LLVM version: 9.0

Backtrace:

thread 'rustc' panicked at 'no entry found for key', src/libcore/option.rs:1190:5
stack backtrace:
   0:        0x1044df165 - <unknown>
   1:        0x104515e10 - <unknown>
   2:        0x1044d27bb - <unknown>
   3:        0x1044e34aa - <unknown>
   4:        0x1044e31b5 - <unknown>
   5:        0x10544c762 - <unknown>
   6:        0x1044e3ce2 - <unknown>
   7:        0x1044e374d - <unknown>
   8:        0x1044e3649 - <unknown>
   9:        0x10450f3bf - <unknown>
  10:        0x10450f4ce - <unknown>
  11:        0x106746a19 - <unknown>
  12:        0x1057fccdf - <unknown>
  13:        0x1058244d0 - <unknown>
  14:        0x106e13fa5 - <unknown>
  15:        0x106e114da - <unknown>
  16:        0x106e0c4f3 - <unknown>
  17:        0x10552205c - <unknown>
  18:        0x10551c30d - <unknown>
  19:        0x1054e2032 - <unknown>
  20:        0x1055573a2 - <unknown>
  21:        0x10552ad17 - <unknown>
  22:        0x1054def35 - <unknown>
  23:        0x1054c8120 - <unknown>
  24:        0x105593eec - <unknown>
  25:        0x10541c062 - <unknown>
  26:        0x10544e284 - <unknown>
  27:        0x1054525c2 - <unknown>
  28:        0x10546b765 - <unknown>
  29:        0x1053ead1d - <unknown>
  30:        0x1044f2f8f - <unknown>
  31:        0x10540ff97 - <unknown>
  32:        0x1044c500e - <unknown>
  33:        0x1044f1d9e - <unknown>
  34:     0x7fff6abaad36 - <unknown>

error: internal compiler error: unexpected panic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions