Skip to content

Commit 03c3785

Browse files
committed
---
yaml --- r: 47773 b: refs/heads/incoming c: df4273f h: refs/heads/master i: 47771: dff6994 v: v3
1 parent d5135dd commit 03c3785

File tree

9 files changed

+198
-176
lines changed

9 files changed

+198
-176
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: 99c4de73001e2f85a00c819fc208b31e93808480
9+
refs/heads/incoming: df4273f8742b2305632916091c2af77128a6e4bf
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ This requirement most often affects name-designator pairs when they occur at the
549549

550550
* `log_syntax!` : print out the arguments at compile time
551551
* `trace_macros!` : supply `true` or `false` to enable or disable printing of the macro expansion process.
552-
* `stringify!` : turn the identifier argument into a string literal
552+
* `ident_to_str!` : turn the identifier argument into a string literal
553553
* `concat_idents!` : create a new identifier by concatenating the arguments
554554

555555

branches/incoming/src/librustc/metadata/creader.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ pub fn read_crates(diag: span_handler,
5555
visit_view_item: |a| visit_view_item(e, a),
5656
visit_item: |a| visit_item(e, a),
5757
.. *visit::default_simple_visitor()});
58+
visit_crate(e, crate);
5859
visit::visit_crate(crate, (), v);
5960
dump_crates(e.crate_cache);
6061
warn_if_multiple_versions(e, diag, e.crate_cache);
@@ -125,6 +126,20 @@ struct Env {
125126
intr: @ident_interner
126127
}
127128

129+
fn visit_crate(e: @mut Env, c: ast::crate) {
130+
let cstore = e.cstore;
131+
let link_args = attr::find_attrs_by_name(c.node.attrs, "link_args");
132+
133+
for link_args.each |a| {
134+
match attr::get_meta_item_value_str(attr::attr_meta(*a)) {
135+
Some(ref linkarg) => {
136+
cstore::add_used_link_args(cstore, (/*bad*/copy *linkarg));
137+
}
138+
None => {/* fallthrough */ }
139+
}
140+
}
141+
}
142+
128143
fn visit_view_item(e: @mut Env, i: @ast::view_item) {
129144
match /*bad*/copy i.node {
130145
ast::view_item_use(ident, meta_items, id) => {
@@ -181,7 +196,7 @@ fn visit_item(e: @mut Env, i: @ast::item) {
181196
for link_args.each |a| {
182197
match attr::get_meta_item_value_str(attr::attr_meta(*a)) {
183198
Some(ref linkarg) => {
184-
cstore::add_used_link_args(cstore, (/*bad*/copy *linkarg));
199+
cstore::add_used_link_args(cstore, *linkarg);
185200
}
186201
None => {/* fallthrough */ }
187202
}

branches/incoming/src/librustc/metadata/cstore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub fn get_used_libraries(cstore: @mut CStore) -> ~[~str] {
119119
return /*bad*/copy cstore.used_libraries;
120120
}
121121

122-
pub fn add_used_link_args(cstore: @mut CStore, args: ~str) {
122+
pub fn add_used_link_args(cstore: @mut CStore, args: &str) {
123123
cstore.used_link_args.push_all(str::split_char(args, ' '));
124124
}
125125

0 commit comments

Comments
 (0)