Skip to content

Commit 30baad8

Browse files
committed
---
yaml --- r: 60063 b: refs/heads/master c: 4cd51c4 h: refs/heads/master i: 60061: c8e683e 60059: 592d7ca 60055: 6ebc562 60047: 868bb47 60031: b40d7e5 v: v3
1 parent 4516fb0 commit 30baad8

File tree

5 files changed

+27
-29
lines changed

5 files changed

+27
-29
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 506392830052ec5da8ad0cdb0afc3439ec69f938
2+
refs/heads/master: 4cd51c416b8cf1a9d89089c99b8a1e2ac2f7255a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
55
refs/heads/try: c50a9d5b664478e533ba1d1d353213d70c8ad589

trunk/src/rt/rust_kernel.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -257,25 +257,6 @@ rust_kernel::generate_task_id() {
257257
return id;
258258
}
259259

260-
#ifdef __WIN32__
261-
void
262-
rust_kernel::win32_require(LPCTSTR fn, BOOL ok) {
263-
if (!ok) {
264-
LPTSTR buf;
265-
DWORD err = GetLastError();
266-
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
267-
FORMAT_MESSAGE_FROM_SYSTEM |
268-
FORMAT_MESSAGE_IGNORE_INSERTS,
269-
NULL, err,
270-
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
271-
(LPTSTR) &buf, 0, NULL );
272-
KLOG_ERR_(dom, "%s failed with error %ld: %s", fn, err, buf);
273-
LocalFree((HLOCAL)buf);
274-
assert(ok);
275-
}
276-
}
277-
#endif
278-
279260
void
280261
rust_kernel::set_exit_status(int code) {
281262
scoped_lock with(rval_lock);

trunk/src/rt/rust_kernel.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,6 @@ class rust_kernel {
147147
void wait_for_schedulers();
148148
int run();
149149

150-
#ifdef __WIN32__
151-
void win32_require(LPCTSTR fn, BOOL ok);
152-
#endif
153-
154150
rust_task_id generate_task_id();
155151

156152
void set_exit_status(int code);

trunk/src/rt/rust_rng.cpp

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@
1212
#include "rust_rng.h"
1313
#include "rust_util.h"
1414

15+
16+
#ifdef __WIN32__
17+
void
18+
win32_require(LPCTSTR fn, BOOL ok) {
19+
if (!ok) {
20+
LPTSTR buf;
21+
DWORD err = GetLastError();
22+
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
23+
FORMAT_MESSAGE_FROM_SYSTEM |
24+
FORMAT_MESSAGE_IGNORE_INSERTS,
25+
NULL, err,
26+
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
27+
(LPTSTR) &buf, 0, NULL );
28+
fprintf(stderr, "%s failed with error %ld: %s", fn, err, buf);
29+
LocalFree((HLOCAL)buf);
30+
abort();
31+
}
32+
}
33+
#endif
34+
1535
size_t
1636
rng_seed_size() {
1737
randctx rctx;
@@ -24,13 +44,13 @@ void
2444
rng_gen_seed(rust_kernel* kernel, uint8_t* dest, size_t size) {
2545
#ifdef __WIN32__
2646
HCRYPTPROV hProv;
27-
kernel->win32_require
47+
win32_require
2848
(_T("CryptAcquireContext"),
2949
CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
3050
CRYPT_VERIFYCONTEXT|CRYPT_SILENT));
31-
kernel->win32_require
51+
win32_require
3252
(_T("CryptGenRandom"), CryptGenRandom(hProv, size, (BYTE*) dest));
33-
kernel->win32_require
53+
win32_require
3454
(_T("CryptReleaseContext"), CryptReleaseContext(hProv, 0));
3555
#else
3656
int fd = open("/dev/urandom", O_RDONLY);

trunk/src/test/compile-fail/issue-3707.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// xfail-test
1112
struct Obj {
1213
member: uint
1314
}
@@ -16,8 +17,8 @@ pub impl Obj {
1617
fn boom() -> bool {
1718
return 1+1 == 2
1819
}
19-
fn chirp(&self) {
20-
self.boom(); //~ ERROR `&Obj` does not implement any method in scope named `boom`
20+
fn chirp() {
21+
self.boom(); //~ ERROR wat
2122
}
2223
}
2324

0 commit comments

Comments
 (0)