Skip to content

Commit bc82a20

Browse files
committed
---
yaml --- r: 144530 b: refs/heads/try2 c: 33d6572 h: refs/heads/master v: v3
1 parent 6017d6b commit bc82a20

File tree

5 files changed

+42
-7
lines changed

5 files changed

+42
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 3f791acf4dbf1bd3a5d4c24526734235cd1ff12f
8+
refs/heads/try2: 33d65720360dedf612cab5f0d4343429e11b227e
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/rt.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ ifneq ($(strip $(findstring snap,$(MAKECMDGOALS))),)
4141
SNAP_DEFINES=-DRUST_SNAPSHOT
4242
endif
4343

44+
define DEF_LIBUV_ARCH_VAR
45+
LIBUV_ARCH_$(1) = $$(subst i386,ia32,$$(subst x86_64,x64,$$(HOST_$(1))))
46+
endef
47+
$(foreach t,$(CFG_TARGET_TRIPLES),$(eval $(call DEF_LIBUV_ARCH_VAR,$(t))))
48+
4449
define DEF_RUNTIME_TARGETS
4550

4651
######################################################################
@@ -170,7 +175,7 @@ LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \
170175

171176
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_GYP)
172177
(cd $(S)src/libuv/ && \
173-
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(HOST_$(1)) -D ninja \
178+
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
174179
-Goutput_dir=$$(@D) --generator-output $$(@D))
175180

176181
# XXX: Shouldn't need platform-specific conditions here

branches/try2/src/etc/emacs/rust-mode.el

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@
2929

3030
table))
3131

32-
(defcustom rust-indent-offset default-tab-width
33-
"*Indent Rust code by this number of spaces.
34-
35-
The initializer is `DEFAULT-TAB-WIDTH'.")
32+
(defcustom rust-indent-offset 4
33+
"*Indent Rust code by this number of spaces.")
3634

3735
(defun rust-paren-level () (nth 0 (syntax-ppss)))
3836
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss)))
@@ -61,7 +59,7 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
6159

6260
;; If we're in any other token-tree / sexp, then:
6361
;; - [ or ( means line up with the opening token
64-
;; - { means indent to either nesting-level * tab width,
62+
;; - { means indent to either nesting-level * rust-indent-offset,
6563
;; or one further indent from that if either current line
6664
;; begins with 'else', or previous line didn't end in
6765
;; semi, comma or brace, and wasn't an attribute. PHEW.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// Regression test for issue #5239
12+
13+
fn main() {
14+
let x: &fn(int) -> int = |ref x| { x += 1; }; //~ ERROR binary operation + cannot be applied to type `&int`
15+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// Regression test for issue #5239
12+
13+
fn main() {
14+
let _f: &fn(int) -> int = |ref x: int| { *x };
15+
let foo = 10;
16+
assert!(_f(foo) == 10);
17+
}

0 commit comments

Comments
 (0)