-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
thread 'rustc' panicked at 'called Option::unwrap()
on a None
value'
#66286
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:
|
Centril
added
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
A-frontend
Area: Compiler frontend (errors, parsing and HIR)
I-nominated
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, ..)
labels
Nov 11, 2019
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`. ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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: