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
fnmain(){enumR{REB(())}structTau{t:uint}enumE{B(R,Tau)}let e = B(REB(()),Tau{t:3});let u = match e {B(Tau{t: x}, _) => x,};println!("u: {}", u);}
It contains a programmer error: They swapped the order of arguments to the B variant constructor.
It seems like some component gets confused though, and we end up ICE'ing instead of providing a useful error message. (I'm guessing the fact that I am passing a struct into a pattern that is expecting some enum variant is part of the explanation here; perhaps it is being parsed expecting the pattern to be an instance of some (non-existent) struct-variant of the enum being matched?
Transcript:
% rustc --version
rustc 0.12.0-pre (5ddc7b4a252fbebee5f2ac87ed755139816d6823 2014-07-18 13:31:22 +0000)
% rustc /tmp/f.rs
/tmp/f.rs:8:11: 8:20 error: internal compiler error: resolve didn't write in variant
/tmp/f.rs:8 B(Tau{t: x}, _) => x,
^~~~~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /Users/fklock/Dev/Mozilla/rust.git/src/libsyntax/diagnostic.rs:115
%
The text was updated successfully, but these errors were encountered:
Show placeholder while run command gets runnables from server
This PR fixes a UI annoyance in the VS Code extension when working in large codebases where rust-analyzer can take a few moments to interact with the server. Scenario:
1. Invoke "rust-analyzer: Run" from the command palette or hotkey
2. Quickly start typing to filter the list (or press Enter to accept the last runnable)
We often do this quickly from muscle memory without waiting to see the picker. The picker often takes several seconds to come up, causing us to type garbage into the currently open editor.
Fix:
Show a placeholder item before we call out to the server.

Selecting this item does nothing so if the user accidentally hits Enter nothing happens.
The list is populated and the placeholder dismissed when the actual runnables are retrieved. From here the behavior is the same as before.

Here is a test case:
It contains a programmer error: They swapped the order of arguments to the
B
variant constructor.It seems like some component gets confused though, and we end up ICE'ing instead of providing a useful error message. (I'm guessing the fact that I am passing a struct into a pattern that is expecting some enum variant is part of the explanation here; perhaps it is being parsed expecting the pattern to be an instance of some (non-existent) struct-variant of the enum being matched?
Transcript:
The text was updated successfully, but these errors were encountered: