You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an internal compiler error. I met with this while randomly moving code around while working on a project. I tried to reduce it to a minimal reproducible example.
I tried this code:
externcrate reqwest;// <- If I remove this line, rustc does not crashexterncrate select;use select::{
document::Document, predicate::{Class,Name},};fnmain(){let document = Document::from("");for node in document.find(Class("foo")){letmut img_url = None;ifletSome(img_link) = node.attr("src"){
img_url = img_link.as_ref();// <- If I remove this line, rustc does not crash}}}
I get an internal compiler error. I met with this while randomly moving code around while working on a project. I tried to reduce it to a minimal reproducible example.
I tried this code:
Full reproducible code is available here: https://github.com/malikolivier/rust-structural_impls-internal_compiler_error
I expected to see this happen: Something different from "internal compiler error". Probably this output:
Instead, this happened:
internal compiler error: librustc/traits/structural_impls.rs:180: impossible case reached
Meta
rustc --version --verbose
:The same bug happens on
rustc 1.29.0-nightly (97085f9fb 2018-08-01)
.Backtrace:
The text was updated successfully, but these errors were encountered: