Skip to content

Commit d3ac71a

Browse files
committed
---
yaml --- r: 49543 b: refs/heads/master c: 2911fc2 h: refs/heads/master i: 49541: 73810e7 49539: 71c011f 49535: 1af62fd v: v3
1 parent 630c2be commit d3ac71a

File tree

4 files changed

+40
-19
lines changed

4 files changed

+40
-19
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: 585c57234f6f2dbab7d56ec1351e5aeb052d3edb
2+
refs/heads/master: 2911fc29d03bcabd6e55171e260291b33465cb5c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
55
refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea

trunk/configure

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ fi
536536
CFG_PREFIX=${CFG_PREFIX%/}
537537
CFG_HOST_TRIPLES="$(echo $CFG_HOST_TRIPLES | tr ',' ' ')"
538538
CFG_TARGET_TRIPLES="$(echo $CFG_TARGET_TRIPLES | tr ',' ' ')"
539+
CFG_SUPPORTED_TARGET_TRIPLES="$(grep ^CC_*=* $CFG_SRC_DIR/mk/platform.mk | sed 's,^[^_]*_,,' | sed 's/\([^=]*\).*/\1/' | xargs)"
539540

540541
# copy host-triples to target-triples so that hosts are a subset of targets
541542
V_TEMP=""
@@ -548,8 +549,22 @@ CFG_TARGET_TRIPLES=$V_TEMP
548549
# check target-specific tool-chains
549550
for i in $CFG_TARGET_TRIPLES
550551
do
552+
L_CHECK=false
553+
for j in $CFG_SUPPORTED_TARGET_TRIPLES
554+
do
555+
if [ $i = $j ]
556+
then
557+
L_CHECK=true
558+
fi
559+
done
560+
561+
if [ $L_CHECK = false ]
562+
then
563+
err "unsupported target triples \"$i\" found"
564+
fi
565+
551566
case $i in
552-
arm-unknown-android)
567+
arm-linux-androideabi)
553568

554569
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
555570
then

trunk/src/librustdoc/tystr_pass.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ fn get_fn_sig(srv: astsrv::Srv, fn_id: doc::AstId) -> Option<~str> {
6969
match ctxt.ast_map.get(&fn_id) {
7070
ast_map::node_item(@ast::item {
7171
ident: ident,
72-
node: ast::item_fn(ref decl, purity, ref tys, _), _
72+
node: ast::item_fn(ref decl, _, ref tys, _), _
7373
}, _) |
7474
ast_map::node_foreign_item(@ast::foreign_item {
7575
ident: ident,
76-
node: ast::foreign_item_fn(ref decl, purity, ref tys), _
76+
node: ast::foreign_item_fn(ref decl, _, ref tys), _
7777
}, _, _, _) => {
78-
Some(pprust::fun_to_str(decl, purity, ident, None, tys,
78+
Some(pprust::fun_to_str(decl, ident, None, tys,
7979
extract::interner()))
8080
}
8181
_ => fail!(~"get_fn_sig: fn_id not bound to a fn item")
@@ -214,7 +214,6 @@ fn get_method_sig(
214214
ast::required(ty_m) => {
215215
Some(pprust::fun_to_str(
216216
&ty_m.decl,
217-
ty_m.purity,
218217
ty_m.ident,
219218
Some(ty_m.self_ty.node),
220219
&ty_m.generics,
@@ -224,7 +223,6 @@ fn get_method_sig(
224223
ast::provided(m) => {
225224
Some(pprust::fun_to_str(
226225
&m.decl,
227-
m.purity,
228226
m.ident,
229227
Some(m.self_ty.node),
230228
&m.generics,
@@ -245,7 +243,6 @@ fn get_method_sig(
245243
Some(method) => {
246244
Some(pprust::fun_to_str(
247245
&method.decl,
248-
method.purity,
249246
method.ident,
250247
Some(method.self_ty.node),
251248
&method.generics,

trunk/src/libsyntax/print/pprust.rs

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ pub fn path_to_str(&&p: @ast::path, intr: @ident_interner) -> ~str {
180180
to_str(p, |a,b| print_path(a, b, false), intr)
181181
}
182182

183-
pub fn fun_to_str(decl: &ast::fn_decl, purity: ast::purity, name: ast::ident,
183+
pub fn fun_to_str(decl: &ast::fn_decl, name: ast::ident,
184184
opt_self_ty: Option<ast::self_ty_>,
185185
generics: &ast::Generics, intr: @ident_interner) -> ~str {
186186
do io::with_str_writer |wr| {
187187
let s = rust_printer(wr, intr);
188-
print_fn(s, decl, purity, name, generics, opt_self_ty, ast::inherited);
188+
print_fn(s, decl, None, name, generics, opt_self_ty, ast::inherited);
189189
end(s); // Close the head box
190190
end(s); // Close the outer box
191191
eof(s.s);
@@ -441,7 +441,7 @@ pub fn print_foreign_item(s: @ps, item: @ast::foreign_item) {
441441
print_outer_attributes(s, item.attrs);
442442
match item.node {
443443
ast::foreign_item_fn(ref decl, purity, ref generics) => {
444-
print_fn(s, decl, purity, item.ident, generics, None,
444+
print_fn(s, decl, Some(purity), item.ident, generics, None,
445445
ast::inherited);
446446
end(s); // end head-ibox
447447
word(s.s, ~";");
@@ -484,7 +484,7 @@ pub fn print_item(s: @ps, &&item: @ast::item) {
484484
print_fn(
485485
s,
486486
decl,
487-
purity,
487+
Some(purity),
488488
item.ident,
489489
typarams,
490490
None,
@@ -815,7 +815,7 @@ pub fn print_method(s: @ps, meth: @ast::method) {
815815
hardbreak_if_not_bol(s);
816816
maybe_print_comment(s, meth.span.lo);
817817
print_outer_attributes(s, meth.attrs);
818-
print_fn(s, &meth.decl, meth.purity,
818+
print_fn(s, &meth.decl, Some(meth.purity),
819819
meth.ident, &meth.generics, Some(meth.self_ty.node),
820820
meth.vis);
821821
word(s.s, ~" ");
@@ -1663,7 +1663,7 @@ pub fn print_self_ty(s: @ps, self_ty: ast::self_ty_) -> bool {
16631663
16641664
pub fn print_fn(s: @ps,
16651665
decl: &ast::fn_decl,
1666-
purity: ast::purity,
1666+
purity: Option<ast::purity>,
16671667
name: ast::ident,
16681668
generics: &ast::Generics,
16691669
opt_self_ty: Option<ast::self_ty_>,
@@ -2158,6 +2158,16 @@ pub fn next_comment(s: @ps) -> Option<comments::cmnt> {
21582158
}
21592159
}
21602160

2161+
pub fn print_opt_purity(s: @ps, opt_purity: Option<ast::purity>) {
2162+
match opt_purity {
2163+
Some(ast::impure_fn) => { }
2164+
Some(purity) => {
2165+
word_nbsp(s, purity_to_str(purity));
2166+
}
2167+
None => {}
2168+
}
2169+
}
2170+
21612171
pub fn print_opt_abi(s: @ps, opt_abi: Option<ast::Abi>) {
21622172
match opt_abi {
21632173
Some(ast::RustAbi) => { word_nbsp(s, ~"extern"); }
@@ -2176,12 +2186,12 @@ pub fn print_opt_sigil(s: @ps, opt_sigil: Option<ast::Sigil>) {
21762186

21772187
pub fn print_fn_header_info(s: @ps,
21782188
opt_sty: Option<ast::self_ty_>,
2179-
purity: ast::purity,
2189+
opt_purity: Option<ast::purity>,
21802190
onceness: ast::Onceness,
21812191
opt_sigil: Option<ast::Sigil>,
21822192
vis: ast::visibility) {
21832193
word(s.s, visibility_qualified(vis, ~""));
2184-
print_purity(s, purity);
2194+
print_opt_purity(s, opt_purity);
21852195
print_onceness(s, onceness);
21862196
word(s.s, ~"fn");
21872197
print_opt_sigil(s, opt_sigil);
@@ -2254,9 +2264,8 @@ pub mod test {
22542264
cf: ast::return_val
22552265
};
22562266
let generics = ast_util::empty_generics();
2257-
assert_eq!(&fun_to_str(&decl, ast::impure_fn, abba_ident,
2258-
None, &generics, mock_interner),
2259-
&~"fn abba()");
2267+
assert_eq!(&fun_to_str(&decl, abba_ident, None, &generics, mock_interner),
2268+
&~"fn abba()");
22602269
}
22612270
22622271
#[test]

0 commit comments

Comments
 (0)