Skip to content

Commit f519250

Browse files
committed
---
yaml --- r: 81966 b: refs/heads/master c: 67394f2 h: refs/heads/master v: v3
1 parent 8a98da9 commit f519250

File tree

108 files changed

+563
-337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+563
-337
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: d7e8f4cb03e577169f78d57b74dc17877e1c96d3
2+
refs/heads/master: 67394f20eb0176828bc65f5caf6f4044994d9fb0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729

trunk/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ endif
141141

142142
# version-string calculation
143143
CFG_GIT_DIR := $(CFG_SRC_DIR).git
144-
CFG_RELEASE = 0.8
144+
CFG_RELEASE = 0.9-pre
145145
CFG_VERSION = $(CFG_RELEASE)
146146
# windows exe's need numeric versions - don't use anything but
147147
# numbers and dots here
148-
CFG_VERSION_WIN = 0.8
148+
CFG_VERSION_WIN = 0.9
149149

150150
ifneq ($(wildcard $(CFG_GIT)),)
151151
ifneq ($(wildcard $(CFG_GIT_DIR)),)

trunk/mk/clean.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ clean-misc:
5454
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
5555
$(Q)rm -Rf $(foreach ext, \
5656
html aux cp fn ky log pdf pg toc tp vr cps, \
57-
$(wildcard doc/*.$(ext) \
58-
doc/*/*.$(ext) \
59-
doc/*/*/*.$(ext)))
57+
$(wildcard doc/*.$(ext)))
58+
$(Q)find doc/std doc/extra -mindepth 1 | xargs rm -Rf
6059
$(Q)rm -Rf doc/version.md
6160
$(Q)rm -Rf $(foreach sub, index styles files search javascript, \
6261
$(wildcard doc/*/$(sub)))

trunk/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.8" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.9-pre" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

trunk/src/libextra/base64.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'self> ToBase64 for &'self [u8] {
6868
*
6969
* fn main () {
7070
* let str = [52,32].to_base64(standard);
71-
* printfln!("%s", str);
71+
* println!("{}", str);
7272
* }
7373
* ```
7474
*/
@@ -177,11 +177,11 @@ impl<'self> FromBase64 for &'self str {
177177
*
178178
* fn main () {
179179
* let hello_str = "Hello, World".to_base64(standard);
180-
* printfln!("%s", hello_str);
180+
* println!("{}", hello_str);
181181
* let bytes = hello_str.from_base64();
182-
* printfln!("%?", bytes);
182+
* println!("{:?}", bytes);
183183
* let result_str = str::from_utf8(bytes);
184-
* printfln!("%s", result_str);
184+
* println!("{}", result_str);
185185
* }
186186
* ```
187187
*/

trunk/src/libextra/extra.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Rust extras are part of the standard Rust distribution.
2121
*/
2222

2323
#[link(name = "extra",
24-
vers = "0.8",
24+
vers = "0.9-pre",
2525
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
2626
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];
2727

trunk/src/libextra/future.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* # fn make_a_sandwich() {};
2020
* let mut delayed_fib = extra::future::spawn (|| fib(5000) );
2121
* make_a_sandwich();
22-
* printfln!("fib(5000) = %?", delayed_fib.get())
22+
* println!("fib(5000) = {}", delayed_fib.get())
2323
* ```
2424
*/
2525

trunk/src/libextra/getopts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
//! }
4444
//!
4545
//! fn print_usage(program: &str, _opts: &[Opt]) {
46-
//! printfln!("Usage: %s [options]", program);
46+
//! println!("Usage: {} [options]", program);
4747
//! println("-o\t\tOutput");
4848
//! println("-h --help\tUsage");
4949
//! }

trunk/src/libextra/hex.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl<'self> ToHex for &'self [u8] {
3333
*
3434
* fn main () {
3535
* let str = [52,32].to_hex();
36-
* printfln!("%s", str);
36+
* println!("{}", str);
3737
* }
3838
* ```
3939
*/
@@ -77,11 +77,11 @@ impl<'self> FromHex for &'self str {
7777
*
7878
* fn main () {
7979
* let hello_str = "Hello, World".to_hex();
80-
* printfln!("%s", hello_str);
80+
* println!("{}", hello_str);
8181
* let bytes = hello_str.from_hex().unwrap();
82-
* printfln!("%?", bytes);
82+
* println!("{:?}", bytes);
8383
* let result_str = str::from_utf8(bytes);
84-
* printfln!("%s", result_str);
84+
* println!("{}", result_str);
8585
* }
8686
* ```
8787
*/

trunk/src/libextra/task_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@ fn test_task_pool() {
103103
};
104104
let mut pool = TaskPool::new(4, Some(SingleThreaded), f);
105105
do 8.times {
106-
pool.execute(|i| printfln!("Hello from thread %u!", *i));
106+
pool.execute(|i| println!("Hello from thread {}!", *i));
107107
}
108108
}

trunk/src/librust/rust.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// FIXME #2238 Make run only accept source that emits an executable
1414

1515
#[link(name = "rust",
16-
vers = "0.8",
16+
vers = "0.9-pre",
1717
uuid = "4a24da33-5cc8-4037-9352-2cbe9bd9d27c",
1818
url = "https://github.com/mozilla/rust/tree/master/src/rust")];
1919

@@ -136,13 +136,13 @@ fn cmd_help(args: &[~str]) -> ValidUsage {
136136
match find_cmd(command_string) {
137137
Some(command) => {
138138
match command.action {
139-
CallMain(prog, _) => printfln!(
140-
"The %s command is an alias for the %s program.",
139+
CallMain(prog, _) => println!(
140+
"The {} command is an alias for the {} program.",
141141
command.cmd, prog),
142142
_ => ()
143143
}
144144
match command.usage_full {
145-
UsgStr(msg) => printfln!("%s\n", msg),
145+
UsgStr(msg) => println!("{}\n", msg),
146146
UsgCall(f) => f(),
147147
}
148148
Valid(0)
@@ -215,7 +215,7 @@ fn usage() {
215215

216216
for command in COMMANDS.iter() {
217217
let padding = " ".repeat(INDENT - command.cmd.len());
218-
printfln!(" %s%s%s", command.cmd, padding, command.usage_line);
218+
println!(" {}{}{}", command.cmd, padding, command.usage_line);
219219
}
220220

221221
io::print(

trunk/src/librustc/front/std_inject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use syntax::fold::ast_fold;
2020
use syntax::fold;
2121
use syntax::opt_vec;
2222

23-
static STD_VERSION: &'static str = "0.8";
23+
static STD_VERSION: &'static str = "0.9-pre";
2424

2525
pub fn maybe_inject_libstd_ref(sess: Session, crate: @ast::Crate)
2626
-> @ast::Crate {

trunk/src/librustc/front/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ fn mk_std(cx: &TestCtxt) -> ast::view_item {
279279
path_node(~[id_extra]),
280280
ast::DUMMY_NODE_ID))])
281281
} else {
282-
let mi = attr::mk_name_value_item_str(@"vers", @"0.8");
282+
let mi = attr::mk_name_value_item_str(@"vers", @"0.9-pre");
283283
ast::view_item_extern_mod(id_extra, None, ~[mi], ast::DUMMY_NODE_ID)
284284
};
285285
ast::view_item {

trunk/src/librustc/metadata/encoder.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,17 +1822,17 @@ pub fn encode_metadata(parms: EncodeParams, crate: &Crate) -> ~[u8] {
18221822
}
18231823

18241824
io::println("metadata stats:");
1825-
printfln!(" inline bytes: %u", ecx.stats.inline_bytes);
1826-
printfln!(" attribute bytes: %u", ecx.stats.attr_bytes);
1827-
printfln!(" dep bytes: %u", ecx.stats.dep_bytes);
1828-
printfln!(" lang item bytes: %u", ecx.stats.lang_item_bytes);
1829-
printfln!(" link args bytes: %u", ecx.stats.link_args_bytes);
1830-
printfln!(" impl bytes: %u", ecx.stats.impl_bytes);
1831-
printfln!(" misc bytes: %u", ecx.stats.misc_bytes);
1832-
printfln!(" item bytes: %u", ecx.stats.item_bytes);
1833-
printfln!(" index bytes: %u", ecx.stats.index_bytes);
1834-
printfln!(" zero bytes: %u", ecx.stats.zero_bytes);
1835-
printfln!(" total bytes: %u", ecx.stats.total_bytes);
1825+
println!(" inline bytes: {}", ecx.stats.inline_bytes);
1826+
println!(" attribute bytes: {}", ecx.stats.attr_bytes);
1827+
println!(" dep bytes: {}", ecx.stats.dep_bytes);
1828+
println!(" lang item bytes: {}", ecx.stats.lang_item_bytes);
1829+
println!(" link args bytes: {}", ecx.stats.link_args_bytes);
1830+
println!(" impl bytes: {}", ecx.stats.impl_bytes);
1831+
println!(" misc bytes: {}", ecx.stats.misc_bytes);
1832+
println!(" item bytes: {}", ecx.stats.item_bytes);
1833+
println!(" index bytes: {}", ecx.stats.index_bytes);
1834+
println!(" zero bytes: {}", ecx.stats.zero_bytes);
1835+
println!(" total bytes: {}", ecx.stats.total_bytes);
18361836
}
18371837

18381838
// Pad this, since something (LLVM, presumably) is cutting off the

trunk/src/librustc/middle/borrowck/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@ pub fn check_crate(
100100

101101
if tcx.sess.borrowck_stats() {
102102
io::println("--- borrowck stats ---");
103-
printfln!("paths requiring guarantees: %u",
104-
bccx.stats.guaranteed_paths);
105-
printfln!("paths requiring loans : %s",
106-
make_stat(bccx, bccx.stats.loaned_paths_same));
107-
printfln!("paths requiring imm loans : %s",
108-
make_stat(bccx, bccx.stats.loaned_paths_imm));
109-
printfln!("stable paths : %s",
110-
make_stat(bccx, bccx.stats.stable_paths));
111-
printfln!("paths requiring purity : %s",
112-
make_stat(bccx, bccx.stats.req_pure_paths));
103+
println!("paths requiring guarantees: {}",
104+
bccx.stats.guaranteed_paths);
105+
println!("paths requiring loans : {}",
106+
make_stat(bccx, bccx.stats.loaned_paths_same));
107+
println!("paths requiring imm loans : {}",
108+
make_stat(bccx, bccx.stats.loaned_paths_imm));
109+
println!("stable paths : {}",
110+
make_stat(bccx, bccx.stats.stable_paths));
111+
println!("paths requiring purity : {}",
112+
make_stat(bccx, bccx.stats.req_pure_paths));
113113
}
114114

115115
return (bccx.root_map, bccx.write_guard_map);

trunk/src/librustc/middle/trans/base.rs

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl Drop for _InsnCtxt {
121121
}
122122

123123
pub fn push_ctxt(s: &'static str) -> _InsnCtxt {
124-
debug!("new InsnCtxt: %s", s);
124+
debug2!("new InsnCtxt: {}", s);
125125
do local_data::modify(task_local_insn_key) |c| {
126126
do c.map_move |ctx| {
127127
let mut ctx = (*ctx).clone();
@@ -2544,6 +2544,10 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
25442544
llvm::LLVMAddGlobal(ccx.llmod, llty, buf)
25452545
};
25462546

2547+
if !*ccx.sess.building_library {
2548+
lib::llvm::SetLinkage(g, lib::llvm::InternalLinkage);
2549+
}
2550+
25472551
// Apply the `unnamed_addr` attribute if
25482552
// requested
25492553
if attr::contains_name(i.attrs,
@@ -3058,31 +3062,18 @@ pub fn write_metadata(cx: &mut CrateContext, crate: &ast::Crate) {
30583062
}
30593063
}
30603064

3061-
fn mk_global(ccx: &CrateContext,
3062-
name: &str,
3063-
llval: ValueRef,
3064-
internal: bool)
3065-
-> ValueRef {
3065+
// Writes the current ABI version into the crate.
3066+
pub fn write_abi_version(ccx: &mut CrateContext) {
30663067
unsafe {
3067-
let llglobal = do name.with_c_str |buf| {
3068+
let llval = C_uint(ccx, abi::abi_version);
3069+
let llglobal = do "rust_abi_version".with_c_str |buf| {
30683070
llvm::LLVMAddGlobal(ccx.llmod, val_ty(llval).to_ref(), buf)
30693071
};
30703072
llvm::LLVMSetInitializer(llglobal, llval);
30713073
llvm::LLVMSetGlobalConstant(llglobal, True);
3072-
3073-
if internal {
3074-
lib::llvm::SetLinkage(llglobal, lib::llvm::InternalLinkage);
3075-
}
3076-
3077-
return llglobal;
30783074
}
30793075
}
30803076

3081-
// Writes the current ABI version into the crate.
3082-
pub fn write_abi_version(ccx: &mut CrateContext) {
3083-
mk_global(ccx, "rust_abi_version", C_uint(ccx, abi::abi_version), false);
3084-
}
3085-
30863077
pub fn trans_crate(sess: session::Session,
30873078
crate: &ast::Crate,
30883079
analysis: &CrateAnalysis,
@@ -3156,30 +3147,30 @@ pub fn trans_crate(sess: session::Session,
31563147
write_metadata(ccx, crate);
31573148
if ccx.sess.trans_stats() {
31583149
io::println("--- trans stats ---");
3159-
printfln!("n_static_tydescs: %u", ccx.stats.n_static_tydescs);
3160-
printfln!("n_glues_created: %u", ccx.stats.n_glues_created);
3161-
printfln!("n_null_glues: %u", ccx.stats.n_null_glues);
3162-
printfln!("n_real_glues: %u", ccx.stats.n_real_glues);
3163-
3164-
printfln!("n_fns: %u", ccx.stats.n_fns);
3165-
printfln!("n_monos: %u", ccx.stats.n_monos);
3166-
printfln!("n_inlines: %u", ccx.stats.n_inlines);
3167-
printfln!("n_closures: %u", ccx.stats.n_closures);
3150+
println!("n_static_tydescs: {}", ccx.stats.n_static_tydescs);
3151+
println!("n_glues_created: {}", ccx.stats.n_glues_created);
3152+
println!("n_null_glues: {}", ccx.stats.n_null_glues);
3153+
println!("n_real_glues: {}", ccx.stats.n_real_glues);
3154+
3155+
println!("n_fns: {}", ccx.stats.n_fns);
3156+
println!("n_monos: {}", ccx.stats.n_monos);
3157+
println!("n_inlines: {}", ccx.stats.n_inlines);
3158+
println!("n_closures: {}", ccx.stats.n_closures);
31683159
io::println("fn stats:");
31693160
do sort::quick_sort(ccx.stats.fn_stats) |&(_, _, insns_a), &(_, _, insns_b)| {
31703161
insns_a > insns_b
31713162
}
31723163
for tuple in ccx.stats.fn_stats.iter() {
31733164
match *tuple {
31743165
(ref name, ms, insns) => {
3175-
printfln!("%u insns, %u ms, %s", insns, ms, *name);
3166+
println!("{} insns, {} ms, {}", insns, ms, *name);
31763167
}
31773168
}
31783169
}
31793170
}
31803171
if ccx.sess.count_llvm_insns() {
31813172
for (k, v) in ccx.stats.llvm_insns.iter() {
3182-
printfln!("%-7u %s", *v, *k);
3173+
println!("{:7u} {}", *v, *k);
31833174
}
31843175
}
31853176

trunk/src/librustc/middle/trans/glue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,8 @@ pub fn declare_tydesc(ccx: &mut CrateContext, t: ty::t) -> @mut tydesc_info {
646646
let llty = type_of(ccx, t);
647647

648648
if ccx.sess.count_type_sizes() {
649-
printfln!("%u\t%s", llsize_of_real(ccx, llty),
650-
ppaux::ty_to_str(ccx.tcx, t));
649+
println!("{}\t{}", llsize_of_real(ccx, llty),
650+
ppaux::ty_to_str(ccx.tcx, t));
651651
}
652652

653653
let has_header = match ty::get(t).sty {

0 commit comments

Comments
 (0)