Skip to content

Commit 2e950b4

Browse files
committed
---
yaml --- r: 90989 b: refs/heads/master c: b3ae7b1 h: refs/heads/master i: 90987: 6f875c7 v: v3
1 parent 150824f commit 2e950b4

Some content is hidden

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

83 files changed

+891
-909
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: 6db7e35c599f55699534747099c757dfead9a884
2+
refs/heads/master: b3ae7b13ec6dcf43941ce0aa46cc636af3de9a14
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ src/.DS_Store
7575
/doc/latex
7676
/doc/std
7777
/doc/extra
78+
/doc/green
79+
/doc/native
7880
/nd/
7981
/llvm/
8082
version.md

trunk/.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "src/llvm"]
22
path = src/llvm
3-
url = https://github.com/luqmana/llvm.git
3+
url = https://github.com/alexcrichton/llvm.git
44
branch = master
55
[submodule "src/libuv"]
66
path = src/libuv

trunk/doc/rust.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -610,12 +610,12 @@ the behavior of the compiler.
610610

611611
~~~~
612612
// Package ID
613-
#[ crate_id = "projx#2.5" ];
613+
#[ pkgid = "projx#2.5" ];
614614
615615
// Additional metadata attributes
616616
#[ desc = "Project X" ];
617617
#[ license = "BSD" ];
618-
#[ comment = "This is a comment on Project X." ];
618+
#[ author = "Jane Doe" ];
619619
620620
// Specify the output type
621621
#[ crate_type = "lib" ];
@@ -776,9 +776,9 @@ as the `ident` provided in the `extern_mod_decl`.
776776
The external crate is resolved to a specific `soname` at compile time, and a
777777
runtime linkage requirement to that `soname` is passed to the linker for
778778
loading at runtime. The `soname` is resolved at compile time by scanning the
779-
compiler's library path and matching the optional `crateid` provided as a string literal
780-
against the `crateid` attributes that were declared on the external crate when
781-
it was compiled. If no `crateid` is provided, a default `name` attribute is
779+
compiler's library path and matching the optional `pkgid` provided as a string literal
780+
against the `pkgid` attributes that were declared on the external crate when
781+
it was compiled. If no `pkgid` is provided, a default `name` attribute is
782782
assumed, equal to the `ident` given in the `extern_mod_decl`.
783783

784784
Four examples of `extern mod` declarations:
@@ -1729,7 +1729,7 @@ names are effectively reserved. Some significant attributes include:
17291729
* The `cfg` attribute, for conditional-compilation by build-configuration.
17301730
* The `lang` attribute, for custom definitions of traits and functions that are known to the Rust compiler (see [Language items](#language-items)).
17311731
* The `link` attribute, for describing linkage metadata for a extern blocks.
1732-
* The `crate_id` attribute, for describing the package ID of a crate.
1732+
* The `pkgid` attribute, for describing the package ID of a crate.
17331733
* The `test` attribute, for marking functions as unit tests.
17341734
* The `allow`, `warn`, `forbid`, and `deny` attributes, for
17351735
controlling lint checks (see [Lint check attributes](#lint-check-attributes)).
@@ -3792,7 +3792,7 @@ specified then log level 4 is assumed. Debug messages can be omitted
37923792
by passing `--cfg ndebug` to `rustc`.
37933793

37943794
As an example, to see all the logs generated by the compiler, you would set
3795-
`RUST_LOG` to `rustc`, which is the crate name (as specified in its `crate_id`
3795+
`RUST_LOG` to `rustc`, which is the crate name (as specified in its `pkgid`
37963796
[attribute](#attributes)). To narrow down the logs to just crate resolution,
37973797
you would set it to `rustc::metadata::creader`. To see just error logging
37983798
use `rustc=0`.

trunk/doc/rustdoc.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ comments":
1313
~~~
1414
// the "link" crate attribute is currently required for rustdoc, but normally
1515
// isn't needed.
16-
#[crate_id = "universe"];
16+
#[pkgid = "universe"];
1717
#[crate_type="lib"];
1818
1919
//! Tools for dealing with universes (this is a doc comment, and is shown on
@@ -132,10 +132,9 @@ specifiers that can be used to dictate how a code block is tested:
132132
~~~
133133

134134
Rustdoc also supplies some extra sugar for helping with some tedious
135-
documentation examples. If a line is prefixed with `# `, then the line
136-
will not show up in the HTML documentation, but it will be used when
137-
testing the code block (NB. the space after the `#` is required, so
138-
that one can still write things like `#[deriving(Eq)]`).
135+
documentation examples. If a line is prefixed with a `#` character, then the
136+
line will not show up in the HTML documentation, but it will be used when
137+
testing the code block.
139138

140139
~~~
141140
```rust

trunk/doc/rustpkg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ then both `bar` and `bar/extras/baz` are valid package identifiers
9090
in the workspace `foo`.
9191

9292
Because rustpkg uses generic source file names as the main inputs, you will
93-
need to specify the package identifier in them using the `crate_id` attribute
93+
need to specify the package identifier in them using the `pkgid` attribute
9494
on the crate.
9595

9696
## Source files

trunk/src/etc/combine-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def scrub(b):
4545
"""
4646
// AUTO-GENERATED FILE: DO NOT EDIT
4747
#[crate_id=\"run_pass_stage2#0.1\"];
48-
#[crate_id=\"run_pass_stage2#0.1\"];
48+
#[pkgid=\"run_pass_stage2#0.1\"];
4949
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
5050
#[allow(warnings)];
5151
"""

trunk/src/libgreen/sched.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ mod test {
14331433
drop(handle);
14341434

14351435
let mut handle = pool.spawn_sched();
1436-
handle.send(PinnedTask(pool.task(TaskOpts::new(), proc() {
1436+
handle.send(TaskFromFriend(pool.task(TaskOpts::new(), proc() {
14371437
// Wait until the other task has its lock
14381438
start_po.recv();
14391439

trunk/src/librustc/back/link.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use syntax::ast;
4141
use syntax::ast_map::{path, path_mod, path_name, path_pretty_name};
4242
use syntax::attr;
4343
use syntax::attr::AttrMetaMethods;
44-
use syntax::crateid::CrateId;
44+
use syntax::pkgid::PkgId;
4545

4646
#[deriving(Clone, Eq)]
4747
pub enum output_type {
@@ -444,13 +444,13 @@ pub mod write {
444444
*
445445
* So here is what we do:
446446
*
447-
* - Consider the package id; every crate has one (specified with crate_id
447+
* - Consider the package id; every crate has one (specified with pkgid
448448
* attribute). If a package id isn't provided explicitly, we infer a
449449
* versionless one from the output name. The version will end up being 0.0
450450
* in this case. CNAME and CVERS are taken from this package id. For
451451
* example, github.com/mozilla/CNAME#CVERS.
452452
*
453-
* - Define CMH as SHA256(crateid).
453+
* - Define CMH as SHA256(pkgid).
454454
*
455455
* - Define CMH8 as the first 8 characters of CMH.
456456
*
@@ -469,13 +469,13 @@ pub fn build_link_meta(sess: Session,
469469
symbol_hasher: &mut Sha256)
470470
-> LinkMeta {
471471
// This calculates CMH as defined above
472-
fn crate_hash(symbol_hasher: &mut Sha256, crateid: &CrateId) -> @str {
472+
fn crate_hash(symbol_hasher: &mut Sha256, pkgid: &PkgId) -> @str {
473473
symbol_hasher.reset();
474-
symbol_hasher.input_str(crateid.to_str());
474+
symbol_hasher.input_str(pkgid.to_str());
475475
truncated_hash_result(symbol_hasher).to_managed()
476476
}
477477

478-
let crateid = match attr::find_crateid(attrs) {
478+
let pkgid = match attr::find_pkgid(attrs) {
479479
None => {
480480
let stem = session::expect(
481481
sess,
@@ -487,10 +487,10 @@ pub fn build_link_meta(sess: Session,
487487
Some(s) => s,
488488
};
489489

490-
let hash = crate_hash(symbol_hasher, &crateid);
490+
let hash = crate_hash(symbol_hasher, &pkgid);
491491

492492
LinkMeta {
493-
crateid: crateid,
493+
pkgid: pkgid,
494494
crate_hash: hash,
495495
}
496496
}
@@ -509,7 +509,7 @@ pub fn symbol_hash(tcx: ty::ctxt,
509509
// to be independent of one another in the crate.
510510

511511
symbol_hasher.reset();
512-
symbol_hasher.input_str(link_meta.crateid.name);
512+
symbol_hasher.input_str(link_meta.pkgid.name);
513513
symbol_hasher.input_str("-");
514514
symbol_hasher.input_str(link_meta.crate_hash);
515515
symbol_hasher.input_str("-");
@@ -669,7 +669,7 @@ pub fn mangle_exported_name(ccx: &CrateContext,
669669
let hash = get_symbol_hash(ccx, t);
670670
return exported_name(ccx.sess, path,
671671
hash,
672-
ccx.link_meta.crateid.version_or_default());
672+
ccx.link_meta.pkgid.version_or_default());
673673
}
674674

675675
pub fn mangle_internal_name_by_type_only(ccx: &CrateContext,
@@ -710,9 +710,9 @@ pub fn mangle_internal_name_by_path(ccx: &CrateContext, path: path) -> ~str {
710710

711711
pub fn output_lib_filename(lm: &LinkMeta) -> ~str {
712712
format!("{}-{}-{}",
713-
lm.crateid.name,
713+
lm.pkgid.name,
714714
lm.crate_hash.slice_chars(0, 8),
715-
lm.crateid.version_or_default())
715+
lm.pkgid.version_or_default())
716716
}
717717

718718
pub fn get_cc_prog(sess: Session) -> ~str {

trunk/src/librustc/driver/driver.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,12 +1030,12 @@ pub fn build_output_filenames(input: &input,
10301030
str_input(_) => @"rust_out"
10311031
};
10321032

1033-
// If a crateid is present, we use it as the link name
1034-
let crateid = attr::find_crateid(attrs);
1035-
match crateid {
1033+
// If a pkgid is present, we use it as the link name
1034+
let pkgid = attr::find_pkgid(attrs);
1035+
match pkgid {
10361036
None => {}
1037-
Some(crateid) => {
1038-
stem = crateid.name.to_managed()
1037+
Some(pkgid) => {
1038+
stem = pkgid.name.to_managed()
10391039
}
10401040
}
10411041

trunk/src/librustc/front/assign_node_ids.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ struct NodeIdAssigner {
1818
}
1919

2020
impl ast_fold for NodeIdAssigner {
21-
fn new_id(&mut self, old_id: ast::NodeId) -> ast::NodeId {
21+
fn new_id(&self, old_id: ast::NodeId) -> ast::NodeId {
2222
assert_eq!(old_id, ast::DUMMY_NODE_ID);
2323
self.sess.next_node_id()
2424
}
2525
}
2626

2727
pub fn assign_node_ids(sess: Session, crate: ast::Crate) -> ast::Crate {
28-
let mut fold = NodeIdAssigner {
28+
let fold = NodeIdAssigner {
2929
sess: sess,
3030
};
3131
fold.fold_crate(crate)

trunk/src/librustc/front/config.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ pub fn strip_unconfigured_items(crate: ast::Crate) -> ast::Crate {
2424
}
2525

2626
impl<'a> fold::ast_fold for Context<'a> {
27-
fn fold_mod(&mut self, module: &ast::_mod) -> ast::_mod {
27+
fn fold_mod(&self, module: &ast::_mod) -> ast::_mod {
2828
fold_mod(self, module)
2929
}
30-
fn fold_block(&mut self, block: ast::P<ast::Block>) -> ast::P<ast::Block> {
30+
fn fold_block(&self, block: ast::P<ast::Block>) -> ast::P<ast::Block> {
3131
fold_block(self, block)
3232
}
33-
fn fold_foreign_mod(&mut self, foreign_module: &ast::foreign_mod)
33+
fn fold_foreign_mod(&self, foreign_module: &ast::foreign_mod)
3434
-> ast::foreign_mod {
3535
fold_foreign_mod(self, foreign_module)
3636
}
37-
fn fold_item_underscore(&mut self, item: &ast::item_) -> ast::item_ {
37+
fn fold_item_underscore(&self, item: &ast::item_) -> ast::item_ {
3838
fold_item_underscore(self, item)
3939
}
4040
}
4141

4242
pub fn strip_items(crate: ast::Crate,
4343
in_cfg: |attrs: &[ast::Attribute]| -> bool)
4444
-> ast::Crate {
45-
let mut ctxt = Context {
45+
let ctxt = Context {
4646
in_cfg: in_cfg,
4747
};
4848
ctxt.fold_crate(crate)
@@ -57,7 +57,7 @@ fn filter_view_item<'r>(cx: &Context, view_item: &'r ast::view_item)
5757
}
5858
}
5959

60-
fn fold_mod(cx: &mut Context, m: &ast::_mod) -> ast::_mod {
60+
fn fold_mod(cx: &Context, m: &ast::_mod) -> ast::_mod {
6161
let filtered_items = m.items.iter()
6262
.filter(|&a| item_in_cfg(cx, *a))
6363
.flat_map(|&x| cx.fold_item(x).move_iter())
@@ -80,7 +80,7 @@ fn filter_foreign_item(cx: &Context, item: @ast::foreign_item)
8080
}
8181
}
8282

83-
fn fold_foreign_mod(cx: &mut Context, nm: &ast::foreign_mod) -> ast::foreign_mod {
83+
fn fold_foreign_mod(cx: &Context, nm: &ast::foreign_mod) -> ast::foreign_mod {
8484
let filtered_items = nm.items
8585
.iter()
8686
.filter_map(|a| filter_foreign_item(cx, *a))
@@ -95,7 +95,7 @@ fn fold_foreign_mod(cx: &mut Context, nm: &ast::foreign_mod) -> ast::foreign_mod
9595
}
9696
}
9797

98-
fn fold_item_underscore(cx: &mut Context, item: &ast::item_) -> ast::item_ {
98+
fn fold_item_underscore(cx: &Context, item: &ast::item_) -> ast::item_ {
9999
let item = match *item {
100100
ast::item_impl(ref a, ref b, c, ref methods) => {
101101
let methods = methods.iter().filter(|m| method_in_cfg(cx, **m))
@@ -129,7 +129,7 @@ fn retain_stmt(cx: &Context, stmt: @ast::Stmt) -> bool {
129129
}
130130
}
131131

132-
fn fold_block(cx: &mut Context, b: ast::P<ast::Block>) -> ast::P<ast::Block> {
132+
fn fold_block(cx: &Context, b: ast::P<ast::Block>) -> ast::P<ast::Block> {
133133
let resulting_stmts = b.stmts.iter()
134134
.filter(|&a| retain_stmt(cx, *a))
135135
.flat_map(|&stmt| cx.fold_stmt(stmt).move_iter())

trunk/src/librustc/front/std_inject.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct StandardLibraryInjector {
5656
}
5757

5858
impl fold::ast_fold for StandardLibraryInjector {
59-
fn fold_crate(&mut self, crate: ast::Crate) -> ast::Crate {
59+
fn fold_crate(&self, crate: ast::Crate) -> ast::Crate {
6060
let version = STD_VERSION.to_managed();
6161
let vers_item = attr::mk_name_value_item_str(@"vers", version);
6262
let mut vis = ~[ast::view_item {
@@ -108,7 +108,7 @@ impl fold::ast_fold for StandardLibraryInjector {
108108
}
109109
}
110110

111-
fn fold_item(&mut self, item: @ast::item) -> SmallVector<@ast::item> {
111+
fn fold_item(&self, item: @ast::item) -> SmallVector<@ast::item> {
112112
if !no_prelude(item.attrs) {
113113
// only recur if there wasn't `#[no_implicit_prelude];`
114114
// on this item, i.e. this means that the prelude is not
@@ -119,7 +119,7 @@ impl fold::ast_fold for StandardLibraryInjector {
119119
}
120120
}
121121

122-
fn fold_mod(&mut self, module: &ast::_mod) -> ast::_mod {
122+
fn fold_mod(&self, module: &ast::_mod) -> ast::_mod {
123123
let prelude_path = ast::Path {
124124
span: dummy_sp(),
125125
global: false,
@@ -158,7 +158,7 @@ impl fold::ast_fold for StandardLibraryInjector {
158158
}
159159

160160
fn inject_libstd_ref(sess: Session, crate: ast::Crate) -> ast::Crate {
161-
let mut fold = StandardLibraryInjector {
161+
let fold = StandardLibraryInjector {
162162
sess: sess,
163163
};
164164
fold.fold_crate(crate)

0 commit comments

Comments
 (0)