Skip to content

Commit 1d240a8

Browse files
committed
---
yaml --- r: 83623 b: refs/heads/try c: 62855e2 h: refs/heads/master i: 83621: 0b3927b 83619: 83b233d 83615: 946f4df v: v3
1 parent 6bd07c5 commit 1d240a8

File tree

5 files changed

+17
-36
lines changed

5 files changed

+17
-36
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: eafbcfb73cad912a0b2c2ec24f028257e5f2f999
5+
refs/heads/try: 62855e2c089d73a2f08c96fd3b369ce2dcb08cb5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/tutorial-rustpkg.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ This makes sense, as we haven't gotten it from anywhere yet! Luckily for us,
3535
used like this:
3636

3737
~~~ {.notrust}
38-
$ rustpkg install pkg_id
38+
$ rustpkg install PKG_ID
3939
~~~
4040

41-
This will install a package named 'pkg_id' into your current Rust environment.
42-
I called it 'pkg_id' in this example because `rustpkg` calls this a 'package
41+
This will install a package named `PKG_ID` into your current Rust environment.
42+
I called it `PKG_ID` in this example because `rustpkg` calls this a 'package
4343
identifier.' When using it with an external package like this, it's often a
4444
URI fragment. You see, Rust has no central authority for packages. You can
4545
build your own `hello` library if you want, and that's fine. We'd both host

branches/try/src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ pub fn std_macros() -> @str {
821821
if lvl <= __log_level() {
822822
format_args!(|args| {
823823
::std::logging::log(lvl, args)
824-
}, \"{}\", fmt!(\"{:?}\", $arg))
824+
}, \"{}\", fmt!(\"%?\", $arg))
825825
}
826826
});
827827
($lvl:expr, $($arg:expr),+) => ({

branches/try/src/libsyntax/ext/format.rs

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -319,17 +319,6 @@ impl Context {
319319
}
320320
}
321321

322-
/// These attributes are applied to all statics that this syntax extension
323-
/// will generate.
324-
fn static_attrs(&self) -> ~[ast::Attribute] {
325-
// Flag statics as `address_insignificant` so LLVM can merge duplicate
326-
// globals as much as possible (which we're generating a whole lot of).
327-
let unnamed = self.ecx.meta_word(self.fmtsp, @"address_insignificant");
328-
let unnamed = self.ecx.attribute(self.fmtsp, unnamed);
329-
330-
return ~[unnamed];
331-
}
332-
333322
/// Translate a `parse::Piece` to a static `rt::Piece`
334323
fn trans_piece(&mut self, piece: &parse::Piece) -> @ast::Expr {
335324
let sp = self.fmtsp;
@@ -455,9 +444,14 @@ impl Context {
455444
~[]
456445
), None);
457446
let st = ast::item_static(ty, ast::MutImmutable, method);
458-
let static_name = self.ecx.ident_of(format!("__STATIC_METHOD_{}",
447+
let static_name = self.ecx.ident_of(format!("__static_method_{}",
459448
self.method_statics.len()));
460-
let item = self.ecx.item(sp, static_name, self.static_attrs(), st);
449+
// Flag these statics as `address_insignificant` so LLVM can
450+
// merge duplicate globals as much as possible (which we're
451+
// generating a whole lot of).
452+
let unnamed = self.ecx.meta_word(self.fmtsp, @"address_insignificant");
453+
let unnamed = self.ecx.attribute(self.fmtsp, unnamed);
454+
let item = self.ecx.item(sp, static_name, ~[unnamed], st);
461455
self.method_statics.push(item);
462456
self.ecx.expr_ident(sp, static_name)
463457
};
@@ -578,9 +572,11 @@ impl Context {
578572
);
579573
let ty = self.ecx.ty(self.fmtsp, ty);
580574
let st = ast::item_static(ty, ast::MutImmutable, fmt);
581-
let static_name = self.ecx.ident_of("__STATIC_FMTSTR");
582-
let item = self.ecx.item(self.fmtsp, static_name,
583-
self.static_attrs(), st);
575+
let static_name = self.ecx.ident_of("__static_fmtstr");
576+
// see above comment for `address_insignificant` and why we do it
577+
let unnamed = self.ecx.meta_word(self.fmtsp, @"address_insignificant");
578+
let unnamed = self.ecx.attribute(self.fmtsp, unnamed);
579+
let item = self.ecx.item(self.fmtsp, static_name, ~[unnamed], st);
584580
let decl = respan(self.fmtsp, ast::DeclItem(item));
585581
lets.push(@respan(self.fmtsp, ast::StmtDecl(@decl, ast::DUMMY_NODE_ID)));
586582

branches/try/src/test/run-pass/format-no-uppercase-statics.rs

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

0 commit comments

Comments
 (0)