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 believe this should fixed by a recent patch. Could try with a recent build of rustc please? (Tonights nightly, if you are using nightlies). If you are still getting problems, could you post the whole function please? In particular the definition of body.
Here is the complete function body with the correct code I eventually ended up with commented out. I'm on pre-nightlies right now but as soon as I can figure out how to get the nightlies installed I'll try with those. Current version rustc 0.12.0-pre-nightly (aaf141d 2014-09-07 23:01:34 +0000)
fn get_page(uri: &str) -> Box<str> {//String {
let url = Url::parse(uri).unwrap();
let request: RequestWriter = match RequestWriter::new(Get, url) {
Ok(request) => request,
Err(error) => fail!("{}", error),
};
let mut response = match request.read_response() {
Ok(response) => response,
Err((_request, error)) => fail!("{}", error),
};
let body = match response.read_to_string() {
Ok(body) => body,
Err(error) => fail!("Failed to read response body {}", error),
};
box *body.as_slice()//body
}
Thanks for the full code! I tested this with an up to date rustc (actually with a few patches in the process of landing too) and it no longer ICEs. The last line gives the correct error - "error: cannot move a value of type str: the size of str cannot be statically determined [E0161]". I had to make some changes to make it compile though so I may not be hitting exactly the code paths you are.
Closing this issue for now. Feel free to reopen if it still ICEs for you on an up to date rustc.
feat: Allow rust files to be used linkedProjects
With this, script files become more usable as the user can at least add them manually to the linked projects, allowing them to be used "on the (manual) fly" without having to open a separate vscode window that only has files open and no folder.
Also makes build scripts work for them (though no proc-macros, for some reason the dylib field is not populated in the output)
I have a function defined like this which I suspect is not working because I'm doing it wrong but rustc isn't being very helpful.
The text was updated successfully, but these errors were encountered: