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

Syntax error in my code lets rustc crash #76611

Closed
jeena opened this issue Sep 11, 2020 · 1 comment
Closed

Syntax error in my code lets rustc crash #76611

jeena opened this issue Sep 11, 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

@jeena
Copy link

jeena commented Sep 11, 2020

With this example code with a syntax error rustc times out. The g was supposed to be on the next line. This leads to weird behaviour in rls which blocks my whole computer because it consumes a lot of resources.

Code

        let login: gtk::Dialog = gtk::Dialog::new_with_buttons(Some("Login"),
                                                                Some(&widget),
                                                                gtk::DialogFlags::MODAL | g
                                                                tk::DialogFlags::DESTROY_WITH_PARENT |
                                                                gtk::DialogFlags::USE_HEADER_BAR,
                                                                &[cancel_button, login_button]);

Meta

rustc --version --verbose:

➜ jeena@William Projects rustc --version --verbose
rustc 1.46.0 (04488afe3 2020-08-24)
binary: rustc
commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9
commit-date: 2020-08-24
host: x86_64-unknown-linux-gnu
release: 1.46.0
LLVM version: 10.0

Error output

error: could not compile `feedthemonkey`.

Caused by:
  process didn't exit successfully: `rustc --crate-name feedthemonkey --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=865c8db208de96f3 -C extra-filename=-865c8db208de96f3 --out-dir /home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps -C incremental=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/incremental -L dependency=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps --extern gdk=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libgdk-e4b722cd8d9463f2.rlib --extern gettextrs=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libgettextrs-ea5a2d7dbdfe566e.rlib --extern gio=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libgio-f7947b8dfd7a35ba.rlib --extern glib=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libglib-e7c2c93c3f636c78.rlib --extern gtk=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libgtk-7e1f83000f401ea8.rlib` (signal: 9, SIGKILL: kill)
FAILED: src/feedthemonkey 

Backtrace

➜ jeena@William FeedTheMonkey (master✗) RUST_BACKTRACE=1 cargo build
   Compiling pkg-config v0.3.18
   Compiling libc v0.2.76
   Compiling proc-macro2 v1.0.20
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.40
   Compiling pin-project-internal v0.4.23
   Compiling lazy_static v1.4.0
   Compiling proc-macro-nested v0.1.6
   Compiling futures-core v0.3.5
   Compiling proc-macro-hack v0.5.18
   Compiling once_cell v1.4.1
   Compiling slab v0.4.2
   Compiling bitflags v1.2.1
   Compiling pin-utils v0.1.0
   Compiling memchr v2.3.3
   Compiling gio v0.8.1
   Compiling cairo-rs v0.8.1
   Compiling gdk-pixbuf v0.8.0
   Compiling futures-io v0.3.5
   Compiling cc v1.0.59
   Compiling pango v0.8.0
   Compiling atk v0.8.0
   Compiling regex-syntax v0.6.18
   Compiling gdk v0.12.1
   Compiling gtk v0.8.1
   Compiling thread_local v1.0.1
   Compiling futures-channel v0.3.5
   Compiling futures-task v0.3.5
   Compiling glib-sys v0.9.1
   Compiling gobject-sys v0.9.1
   Compiling gio-sys v0.9.1
   Compiling cairo-sys-rs v0.9.2
   Compiling gdk-pixbuf-sys v0.9.1
   Compiling pango-sys v0.9.1
   Compiling atk-sys v0.9.1
   Compiling gdk-sys v0.9.1
   Compiling gtk-sys v0.9.2
   Compiling aho-corasick v0.7.13
   Compiling quote v1.0.7
   Compiling gettext-sys v0.19.9
   Compiling regex v1.3.9
   Compiling locale_config v0.2.3
   Compiling gettext-rs v0.4.4
   Compiling futures-macro v0.3.5
   Compiling pin-project v0.4.23
   Compiling futures-util v0.3.5
   Compiling futures-executor v0.3.5
   Compiling glib v0.9.3
   Compiling feedthemonkey v0.1.0 (/home/jeena/Projects/FeedTheMonkey)
error: could not compile `feedthemonkey`.

Caused by:
  process didn't exit successfully: `rustc --crate-name feedthemonkey --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=865c8db208de96f3 -C extra-filename=-865c8db208de96f3 --out-dir /home/jeena/Projects/FeedTheMonkey/target/debug/deps -C incremental=/home/jeena/Projects/FeedTheMonkey/target/debug/incremental -L dependency=/home/jeena/Projects/FeedTheMonkey/target/debug/deps --extern gdk=/home/jeena/Projects/FeedTheMonkey/target/debug/deps/libgdk-e4b722cd8d9463f2.rlib --extern gettextrs=/home/jeena/Projects/FeedTheMonkey/target/debug/deps/libgettextrs-ea5a2d7dbdfe566e.rlib --extern gio=/home/jeena/Projects/FeedTheMonkey/target/debug/deps/libgio-f7947b8dfd7a35ba.rlib --extern glib=/home/jeena/Projects/FeedTheMonkey/target/debug/deps/libglib-e7c2c93c3f636c78.rlib --extern gtk=/home/jeena/Projects/FeedTheMonkey/target/debug/deps/libgtk-7e1f83000f401ea8.rlib` (signal: 9, SIGKILL: kill)

I'm attaching a zip with the whole project I had because it's really small so you can reproduce it.
FeedTheMonkey.zip

@jeena jeena 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 Sep 11, 2020
@jeena jeena changed the title Syntax error in code let's rustc crash Syntax error in my code let's rustc crash Sep 11, 2020
@jeena jeena changed the title Syntax error in my code let's rustc crash Syntax error in my code lets rustc crash Sep 11, 2020
@jonas-schievink
Copy link
Contributor

Duplicate of #76597

@jonas-schievink jonas-schievink marked this as a duplicate of #76597 Sep 11, 2020
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