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

Inconsistent resolution for a macro #75533

Closed
arturoc opened this issue Aug 14, 2020 · 1 comment
Closed

Inconsistent resolution for a macro #75533

arturoc opened this issue Aug 14, 2020 · 1 comment
Labels
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.

Comments

@arturoc
Copy link
Contributor

arturoc commented Aug 14, 2020

Happens when compiling the crate numext-fixed-uint.core for target wasm32-unknown-unknown on both stable and current nightly

Meta

rustc --version --verbose:

rustc 1.45.2 (d3fb005a3 2020-07-31)
binary: rustc
commit-hash: d3fb005a39e62501b8b0b356166e515ae24e2e54
commit-date: 2020-07-31
host: x86_64-unknown-linux-gnu
release: 1.45.2
LLVM version: 10.0

and

rustc +nightly --version --verbose:

rustc 1.47.0-nightly (6c8927b0c 2020-07-26)
binary: rustc
commit-hash: 6c8927b0cf80ceee19386026cf9d7fd4fd9d486f
commit-date: 2020-07-26
host: x86_64-unknown-linux-gnu
release: 1.47.0-nightly
LLVM version: 10.0

Error output

thread 'rustc' panicked at 'src/librustc_resolve/macros.rs:883: inconsistent resolution for a macro', /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/libstd/macros.rs:13:23
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:490
  12: std::panicking::begin_panic
  13: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
  14: rustc_middle::ty::context::tls::with_opt::{{closure}}
  15: rustc_middle::ty::context::tls::with_opt
  16: rustc_middle::util::bug::opt_span_bug_fmt
  17: rustc_middle::util::bug::span_bug_fmt
  18: rustc_resolve::macros::<impl rustc_resolve::Resolver>::finalize_macro_resolutions::{{closure}}
  19: rustc_resolve::Resolver::resolve_crate
  20: rustc_interface::passes::configure_and_expand_inner
  21: rustc_interface::passes::configure_and_expand::{{closure}}
  22: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new
  23: rustc_interface::queries::Queries::expansion
  24: rustc_interface::interface::run_compiler_in_existing_thread_pool
  25: rustc_ast::attr::with_globals
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.45.2 (d3fb005a3 2020-07-31) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

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

query stack during panic:
end of query stack
error: could not compile `numext-fixed-uint-core`.
@arturoc arturoc 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. labels Aug 14, 2020
@jonas-schievink
Copy link
Contributor

Duplicate of #56935

@jonas-schievink jonas-schievink marked this as a duplicate of #56935 Aug 14, 2020
bors bot added a commit to nervosnetwork/ckb that referenced this issue Nov 3, 2020
2338: chore(deps): bump numext-fixed-uint from 1.4.0 to 1.6.0 r=doitian,driftluo a=yangby-cryptape

Bumps [numext-fixed-uint](https://github.com/cryptape/rust-numext) from 0.1.4 to 0.1.6.

<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/cryptape/rust-numext/blob/v0.1.6/CHANGELOG.md">rust-numext's changelog</a>.</em></p>
<blockquote>

### Major Updates

- Use features to let all structs be optional.
- Should NOT consider hashes as numbers.
  - Add methods to replace numerical methods for hashes.
    - `zero() -> empty()`
    - `is_zero() -> is_empty()`
    - `is_max() -> is_full()`
  - **BREAKING CHANGE** Remove `checked_neg(..)` for hashes.
- Upgrade dependencies.
  - `quote v0.6 -> v1.0`
  - `syn v0.15 -> v1.0`
  - `proc-macro2 v0.4 -> v1.0`
  - Remove dependencies "proc-macro-hack" for crates in the workspace.
    - Update the minimum supported version of rust toolchain to `1.45.0` for the feature: [Stabilizing function-like procedural macros in expressions, patterns, and statements](https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html#stabilizing-function-like-procedural-macros-in-expressions-patterns-and-statements).
  - Use `thiserror` instead of `failure` since `failure` is officially deprecated.

### Fixed Bugs

- Constructors can not handle short inputs correctly ([#42]).
- `as_fixed_bytes_mut(&mut self)` return an immutable reference ([#42]).
- Avoid trigger [a rustc bug](rust-lang/rust#75533) which causes errors when build with target `wasm32-unknown-unknown` ([#54]).

</blockquote>
</details>

Full commits viewable in [compare view](cryptape/rust-numext@v0.1.4...v0.1.6).

You can trigger a rebase of this PR by commenting `@yangby-cryptape rebase`.

<small>

#### Notice

**The latest rust tool chain is not friendly for old proc-macros (there are a lot of issues, for example: compile errors).**
**But after this PR, we still have few crates depend on very old proc-macros crates: `enum-display-derive` and `wasm-*`.**

</small>

[#42]: cryptape/rust-numext#42
[#54]: cryptape/rust-numext#54

Co-authored-by: Boyu Yang <[email protected]>
bors bot added a commit to nervosnetwork/ckb that referenced this issue Nov 3, 2020
2338: chore(deps): bump numext-fixed-uint from 1.4.0 to 1.6.0 r=doitian,driftluo a=yangby-cryptape

Bumps [numext-fixed-uint](https://github.com/cryptape/rust-numext) from 0.1.4 to 0.1.6.

<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/cryptape/rust-numext/blob/v0.1.6/CHANGELOG.md">rust-numext's changelog</a>.</em></p>
<blockquote>

### Major Updates

- Use features to let all structs be optional.
- Should NOT consider hashes as numbers.
  - Add methods to replace numerical methods for hashes.
    - `zero() -> empty()`
    - `is_zero() -> is_empty()`
    - `is_max() -> is_full()`
  - **BREAKING CHANGE** Remove `checked_neg(..)` for hashes.
- Upgrade dependencies.
  - `quote v0.6 -> v1.0`
  - `syn v0.15 -> v1.0`
  - `proc-macro2 v0.4 -> v1.0`
  - Remove dependencies "proc-macro-hack" for crates in the workspace.
    - Update the minimum supported version of rust toolchain to `1.45.0` for the feature: [Stabilizing function-like procedural macros in expressions, patterns, and statements](https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html#stabilizing-function-like-procedural-macros-in-expressions-patterns-and-statements).
  - Use `thiserror` instead of `failure` since `failure` is officially deprecated.

### Fixed Bugs

- Constructors can not handle short inputs correctly ([#42]).
- `as_fixed_bytes_mut(&mut self)` return an immutable reference ([#42]).
- Avoid trigger [a rustc bug](rust-lang/rust#75533) which causes errors when build with target `wasm32-unknown-unknown` ([#54]).

</blockquote>
</details>

Full commits viewable in [compare view](cryptape/rust-numext@v0.1.4...v0.1.6).

You can trigger a rebase of this PR by commenting `@yangby-cryptape rebase`.

<small>

#### Notice

**The latest rust tool chain is not friendly for old proc-macros (there are a lot of issues, for example: compile errors).**
**But after this PR, we still have few crates depend on very old proc-macros crates: `enum-display-derive` and `wasm-*`.**

</small>

[#42]: cryptape/rust-numext#42
[#54]: cryptape/rust-numext#54

Co-authored-by: Boyu Yang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

No branches or pull requests

2 participants