Skip to content

Commit 0cd7cc3

Browse files
committed
---
yaml --- r: 83218 b: refs/heads/try c: 2f845a5 h: refs/heads/master v: v3
1 parent d7e8600 commit 0cd7cc3

29 files changed

+292
-350
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: e02313a172acca34bd29e10cdd10f7495664694e
5+
refs/heads/try: 2f845a5e0aa9cdd4bc5dc25341bb241643f76f11
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ string_body : non_double_quote
248248
| '\x5c' [ '\x22' | common_escape ] ;
249249
250250
common_escape : '\x5c'
251-
| 'n' | 'r' | 't' | '0'
251+
| 'n' | 'r' | 't'
252252
| 'x' hex_digit 2
253253
| 'u' hex_digit 4
254254
| 'U' hex_digit 8 ;

branches/try/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
2828

2929
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
3030
@$$(call E, make: llvm)
31-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1))
31+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
3232
$$(Q)touch $$(LLVM_CONFIG_$(1))
3333
endif
3434

branches/try/mk/platform.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ AR_i686-pc-mingw32=$(AR)
352352
CFG_LIB_NAME_i686-pc-mingw32=$(1).dll
353353
CFG_LIB_GLOB_i686-pc-mingw32=$(1)-*.dll
354354
CFG_LIB_DSYM_GLOB_i686-pc-mingw32=$(1)-*.dylib.dSYM
355-
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600 -I$(CFG_SRC_DIR)src/etc/mingw-fix-include
355+
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600
356356
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
357357
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g -m32
358358
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
@@ -361,7 +361,6 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
361361
CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
362362
CFG_INSTALL_NAME_i686-pc-mingw32 =
363363
CFG_LIBUV_LINK_FLAGS_i686-pc-mingw32 := -lWs2_32 -lpsapi -liphlpapi
364-
CFG_LLVM_BUILD_ENV_i686-pc-mingw32 := CPATH=$(CFG_SRC_DIR)src/etc/mingw-fix-include
365364
CFG_EXE_SUFFIX_i686-pc-mingw32 := .exe
366365
CFG_WINDOWSY_i686-pc-mingw32 := 1
367366
CFG_UNIXY_i686-pc-mingw32 :=

branches/try/mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# working under these assumptions).
2525

2626
# Hack for passing flags into LIBUV, see below.
27-
LIBUV_FLAGS_i386 = -m32 -fPIC -I$(S)src/etc/mingw-fix-include
27+
LIBUV_FLAGS_i386 = -m32 -fPIC
2828
LIBUV_FLAGS_x86_64 = -m64 -fPIC
2929
ifeq ($(OSTYPE_$(1)), linux-androideabi)
3030
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99

branches/try/src/compiletest/compiletest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ extern mod extra;
1717

1818
use std::os;
1919
use std::rt;
20+
use std::f64;
2021

2122
use extra::getopts;
2223
use extra::getopts::groups::{optopt, optflag, reqopt};
@@ -130,7 +131,7 @@ pub fn parse_config(args: ~[~str]) -> config {
130131
ratchet_noise_percent:
131132
getopts::opt_maybe_str(matches,
132133
"ratchet-noise-percent").map_move(|s|
133-
from_str::<f64>(s).unwrap()),
134+
f64::from_str(s).unwrap()),
134135
runtool: getopts::opt_maybe_str(matches, "runtool"),
135136
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
136137
jit: getopts::opt_present(matches, "jit"),

branches/try/src/etc/mingw-fix-include/README.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

branches/try/src/etc/mingw-fix-include/bits/c++config.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

branches/try/src/etc/mingw-fix-include/winbase.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

branches/try/src/etc/mingw-fix-include/winsock2.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

branches/try/src/librustc/middle/const_eval.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use syntax::visit;
1919
use syntax::visit::Visitor;
2020
use syntax::ast::*;
2121

22+
use std::float;
2223
use std::hashmap::{HashMap, HashSet};
2324

2425
//
@@ -475,9 +476,9 @@ pub fn lit_to_const(lit: &lit) -> const_val {
475476
lit_int(n, _) => const_int(n),
476477
lit_uint(n, _) => const_uint(n),
477478
lit_int_unsuffixed(n) => const_int(n),
478-
lit_float(n, _) => const_float(from_str::<float>(n).unwrap() as f64),
479+
lit_float(n, _) => const_float(float::from_str(n).unwrap() as f64),
479480
lit_float_unsuffixed(n) =>
480-
const_float(from_str::<float>(n).unwrap() as f64),
481+
const_float(float::from_str(n).unwrap() as f64),
481482
lit_nil => const_int(0i64),
482483
lit_bool(b) => const_bool(b)
483484
}

branches/try/src/librustc/middle/lang_items.rs

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -59,36 +59,36 @@ pub enum LangItem {
5959

6060
StrEqFnLangItem, // 19
6161
UniqStrEqFnLangItem, // 20
62-
FailFnLangItem, // 22
63-
FailBoundsCheckFnLangItem, // 23
64-
ExchangeMallocFnLangItem, // 24
65-
ClosureExchangeMallocFnLangItem, // 25
66-
ExchangeFreeFnLangItem, // 26
67-
MallocFnLangItem, // 27
68-
FreeFnLangItem, // 28
69-
BorrowAsImmFnLangItem, // 29
70-
BorrowAsMutFnLangItem, // 30
71-
ReturnToMutFnLangItem, // 31
72-
CheckNotBorrowedFnLangItem, // 32
73-
StrDupUniqFnLangItem, // 33
74-
RecordBorrowFnLangItem, // 34
75-
UnrecordBorrowFnLangItem, // 35
76-
77-
StartFnLangItem, // 36
78-
79-
TyDescStructLangItem, // 37
80-
TyVisitorTraitLangItem, // 38
81-
OpaqueStructLangItem, // 39
62+
FailFnLangItem, // 21
63+
FailBoundsCheckFnLangItem, // 22
64+
ExchangeMallocFnLangItem, // 23
65+
ClosureExchangeMallocFnLangItem, // 24
66+
ExchangeFreeFnLangItem, // 25
67+
MallocFnLangItem, // 26
68+
FreeFnLangItem, // 27
69+
BorrowAsImmFnLangItem, // 28
70+
BorrowAsMutFnLangItem, // 29
71+
ReturnToMutFnLangItem, // 30
72+
CheckNotBorrowedFnLangItem, // 31
73+
StrDupUniqFnLangItem, // 32
74+
RecordBorrowFnLangItem, // 33
75+
UnrecordBorrowFnLangItem, // 34
76+
77+
StartFnLangItem, // 35
78+
79+
TyDescStructLangItem, // 36
80+
TyVisitorTraitLangItem, // 37
81+
OpaqueStructLangItem, // 38
8282
}
8383

8484
pub struct LanguageItems {
85-
items: [Option<DefId>, ..41]
85+
items: [Option<DefId>, ..39]
8686
}
8787

8888
impl LanguageItems {
8989
pub fn new() -> LanguageItems {
9090
LanguageItems {
91-
items: [ None, ..41 ]
91+
items: [ None, ..39 ]
9292
}
9393
}
9494

@@ -122,27 +122,26 @@ impl LanguageItems {
122122

123123
19 => "str_eq",
124124
20 => "uniq_str_eq",
125-
21 => "log_type",
126-
22 => "fail_",
127-
23 => "fail_bounds_check",
128-
24 => "exchange_malloc",
129-
25 => "closure_exchange_malloc",
130-
26 => "exchange_free",
131-
27 => "malloc",
132-
28 => "free",
133-
29 => "borrow_as_imm",
134-
30 => "borrow_as_mut",
135-
31 => "return_to_mut",
136-
32 => "check_not_borrowed",
137-
33 => "strdup_uniq",
138-
34 => "record_borrow",
139-
35 => "unrecord_borrow",
140-
141-
36 => "start",
142-
143-
37 => "ty_desc",
144-
38 => "ty_visitor",
145-
39 => "opaque",
125+
21 => "fail_",
126+
22 => "fail_bounds_check",
127+
23 => "exchange_malloc",
128+
24 => "closure_exchange_malloc",
129+
25 => "exchange_free",
130+
26 => "malloc",
131+
27 => "free",
132+
28 => "borrow_as_imm",
133+
29 => "borrow_as_mut",
134+
30 => "return_to_mut",
135+
31 => "check_not_borrowed",
136+
32 => "strdup_uniq",
137+
33 => "record_borrow",
138+
34 => "unrecord_borrow",
139+
140+
35 => "start",
141+
142+
36 => "ty_desc",
143+
37 => "ty_visitor",
144+
38 => "opaque",
146145

147146
_ => "???"
148147
}

branches/try/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2660,7 +2660,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
26602660
foreign::register_foreign_item_fn(ccx, abis, &path, ni)
26612661
}
26622662
ast::foreign_item_static(*) => {
2663-
let ident = foreign::link_name(ccx, ni);
2663+
let ident = token::ident_to_str(&ni.ident);
26642664
let g = do ident.with_c_str |buf| {
26652665
unsafe {
26662666
let ty = type_of(ccx, ty);

branches/try/src/librustc/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub fn version(argv0: &str) {
134134

135135
pub fn usage(argv0: &str) {
136136
let message = fmt!("Usage: %s [OPTIONS] INPUT", argv0);
137-
printfln!("%s\n\
137+
printfln!("%s\
138138
Additional help:
139139
-W help Print 'lint' options and default settings
140140
-Z help Print internal options for debugging rustc\n",

branches/try/src/libstd/num/f32.rs

Lines changed: 60 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,39 @@ impl num::ToStrRadix for f32 {
822822
}
823823
}
824824

825+
///
826+
/// Convert a string in base 10 to a float.
827+
/// Accepts a optional decimal exponent.
828+
///
829+
/// This function accepts strings such as
830+
///
831+
/// * '3.14'
832+
/// * '+3.14', equivalent to '3.14'
833+
/// * '-3.14'
834+
/// * '2.5E10', or equivalently, '2.5e10'
835+
/// * '2.5E-10'
836+
/// * '.' (understood as 0)
837+
/// * '5.'
838+
/// * '.5', or, equivalently, '0.5'
839+
/// * '+inf', 'inf', '-inf', 'NaN'
840+
///
841+
/// Leading and trailing whitespace represent an error.
842+
///
843+
/// # Arguments
844+
///
845+
/// * num - A string
846+
///
847+
/// # Return value
848+
///
849+
/// `none` if the string did not represent a valid number. Otherwise,
850+
/// `Some(n)` where `n` is the floating-point number represented by `num`.
851+
///
852+
#[inline]
853+
pub fn from_str(num: &str) -> Option<f32> {
854+
strconv::from_str_common(num, 10u, true, true, true,
855+
strconv::ExpDec, false, false)
856+
}
857+
825858
///
826859
/// Convert a string in base 16 to a float.
827860
/// Accepts a optional binary exponent.
@@ -855,65 +888,40 @@ pub fn from_str_hex(num: &str) -> Option<f32> {
855888
strconv::ExpBin, false, false)
856889
}
857890

891+
///
892+
/// Convert a string in an given base to a float.
893+
///
894+
/// Due to possible conflicts, this function does **not** accept
895+
/// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**
896+
/// does it recognize exponents of any kind.
897+
///
898+
/// Leading and trailing whitespace represent an error.
899+
///
900+
/// # Arguments
901+
///
902+
/// * num - A string
903+
/// * radix - The base to use. Must lie in the range [2 .. 36]
904+
///
905+
/// # Return value
906+
///
907+
/// `none` if the string did not represent a valid number. Otherwise,
908+
/// `Some(n)` where `n` is the floating-point number represented by `num`.
909+
///
910+
#[inline]
911+
pub fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
912+
strconv::from_str_common(num, rdx, true, true, false,
913+
strconv::ExpNone, false, false)
914+
}
915+
858916
impl FromStr for f32 {
859-
///
860-
/// Convert a string in base 10 to a float.
861-
/// Accepts a optional decimal exponent.
862-
///
863-
/// This function accepts strings such as
864-
///
865-
/// * '3.14'
866-
/// * '+3.14', equivalent to '3.14'
867-
/// * '-3.14'
868-
/// * '2.5E10', or equivalently, '2.5e10'
869-
/// * '2.5E-10'
870-
/// * '.' (understood as 0)
871-
/// * '5.'
872-
/// * '.5', or, equivalently, '0.5'
873-
/// * '+inf', 'inf', '-inf', 'NaN'
874-
///
875-
/// Leading and trailing whitespace represent an error.
876-
///
877-
/// # Arguments
878-
///
879-
/// * num - A string
880-
///
881-
/// # Return value
882-
///
883-
/// `none` if the string did not represent a valid number. Otherwise,
884-
/// `Some(n)` where `n` is the floating-point number represented by `num`.
885-
///
886917
#[inline]
887-
fn from_str(val: &str) -> Option<f32> {
888-
strconv::from_str_common(val, 10u, true, true, true,
889-
strconv::ExpDec, false, false)
890-
}
918+
fn from_str(val: &str) -> Option<f32> { from_str(val) }
891919
}
892920

893921
impl num::FromStrRadix for f32 {
894-
///
895-
/// Convert a string in an given base to a float.
896-
///
897-
/// Due to possible conflicts, this function does **not** accept
898-
/// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**
899-
/// does it recognize exponents of any kind.
900-
///
901-
/// Leading and trailing whitespace represent an error.
902-
///
903-
/// # Arguments
904-
///
905-
/// * num - A string
906-
/// * radix - The base to use. Must lie in the range [2 .. 36]
907-
///
908-
/// # Return value
909-
///
910-
/// `none` if the string did not represent a valid number. Otherwise,
911-
/// `Some(n)` where `n` is the floating-point number represented by `num`.
912-
///
913922
#[inline]
914923
fn from_str_radix(val: &str, rdx: uint) -> Option<f32> {
915-
strconv::from_str_common(val, rdx, true, true, false,
916-
strconv::ExpNone, false, false)
924+
from_str_radix(val, rdx)
917925
}
918926
}
919927

0 commit comments

Comments
 (0)