-
Notifications
You must be signed in to change notification settings - Fork 13.4k
thread 'rustc' panicked at 'called Option::unwrap()
on a None
value'
#66286
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-frontend
Area: Compiler frontend (errors, parsing and HIR)
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
I reduced the proc macro to the following: use wasm_bindgen_macro::wasm_bindgen;
#[wasm_bindgen]
pub extern fn third(_: Vec(u32)) -> u32 {
0
} extern crate proc_macro;
use proc_macro::TokenStream;
use quote::ToTokens;
#[proc_macro_attribute]
pub fn wasm_bindgen(attr: TokenStream, input: TokenStream) -> TokenStream {
let mut tokens = proc_macro2::TokenStream::new();
let item = syn::parse::<syn::Item>(input).expect("parse");
if let syn::Item::Fn(f) = item {
f.to_tokens(&mut tokens);
}
tokens.into()
} with tokens being:
|
rust/src/librustc/hir/lowering.rs Line 1863 in 9124f7a
panic due to not found ( inside snippet while trying to suggest Vec(T) to Vec<T> .cc @estebank |
triage: P-high. Removing I-nominated. |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Nov 15, 2019
Fix ICE when trying to suggest `Type<>` instead of `Type()` Fixes rust-lang#66286, but the output has no span: ``` error[E0214]: parenthesized type parameters may only be used with a `Fn` trait error: aborting due to previous error For more information about this error, try `rustc --explain E0214`. ```
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Nov 15, 2019
Fix ICE when trying to suggest `Type<>` instead of `Type()` Fixes rust-lang#66286, but the output has no span: ``` error[E0214]: parenthesized type parameters may only be used with a `Fn` trait error: aborting due to previous error For more information about this error, try `rustc --explain E0214`. ```
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-frontend
Area: Compiler frontend (errors, parsing and HIR)
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following rust code crashes
rustc 1.39.0 (4560ea788 2019-11-04) running on x86_64-unknown-linux-gnu
.(Note, changing
Vec(u32)
toVec<u32>
fixes the crash.)Meta
Running with RUST_BACKTRACE, I get the following error message.
rustc --version --verbose
yieldsThank you.
The text was updated successfully, but these errors were encountered: