Skip to content

Commit 4ff16e6

Browse files
committed
---
yaml --- r: 233148 b: refs/heads/beta c: ad9a071 h: refs/heads/master v: v3
1 parent 142c2ba commit 4ff16e6

File tree

7 files changed

+20
-25
lines changed

7 files changed

+20
-25
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: b77d2f5ac7684390c72c99511cb446db0f4ce20a
26+
refs/heads/beta: ad9a0713fde9a9ee9eb3cb9d1b766300b36435c2
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/doc/nomicon/lifetimes.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ likely desugar to the following:
5252
}
5353
```
5454

55-
Wow. That's... awful. Let's all take a moment to thank Rust for being a
56-
diabetes-inducing torrent of syrupy-goodness.
55+
Wow. That's... awful. Let's all take a moment to thank Rust for making this easier.
5756

5857
Actually passing references to outer scopes will cause Rust to infer
5958
a larger lifetime:

branches/beta/src/doc/trpl/advanced-linking.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ Static linking refers to the process of creating output that contain all
3838
required libraries and so don't need libraries installed on every system where
3939
you want to use your compiled project. Pure-Rust dependencies are statically
4040
linked by default so you can use created binaries and libraries without
41-
installing Rust everywhere. By contrast, native libraries
42-
(e.g. `libc` and `libm`) are usually dynamically linked, but it is possible to
41+
installing the Rust everywhere. By contrast, native libraries
42+
(e.g. `libc` and `libm`) usually dynamically linked, but it is possible to
4343
change this and statically link them as well.
4444

45-
Linking is a very platform-dependent topic, and static linking may not even be
46-
possible on some platforms! This section assumes some basic familiarity with
45+
Linking is a very platform dependent topic — on some platforms, static linking
46+
may not be possible at all! This section assumes some basic familiarity with
4747
linking on your platform of choice.
4848

4949
## Linux
@@ -71,7 +71,8 @@ Dynamic linking on Linux can be undesirable if you wish to use new library
7171
features on old systems or target systems which do not have the required
7272
dependencies for your program to run.
7373

74-
Static linking is supported via an alternative `libc`, `musl`. You can compile
74+
Static linking is supported via an alternative `libc`, `musl` - this must be
75+
enabled at Rust compile-time with some prerequisites available. You can compile
7576
your own version of Rust with `musl` enabled and install it into a custom
7677
directory with the instructions below:
7778

@@ -122,7 +123,7 @@ $ du -h musldist/bin/rustc
122123
```
123124

124125
You now have a build of a `musl`-enabled Rust! Because we've installed it to a
125-
custom prefix we need to make sure our system can find the binaries and appropriate
126+
custom prefix we need to make sure our system can the binaries and appropriate
126127
libraries when we try and run it:
127128

128129
```text

branches/beta/src/doc/trpl/lifetimes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ We previously talked a little about [function syntax][functions], but we didn’
8181
discuss the `<>`s after a function’s name. A function can have ‘generic
8282
parameters’ between the `<>`s, of which lifetimes are one kind. We’ll discuss
8383
other kinds of generics [later in the book][generics], but for now, let’s
84-
just focus on the lifetimes aspect.
84+
just focus on the lifteimes aspect.
8585

8686
[functions]: functions.html
8787
[generics]: generics.html

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ impl<'a> CrateReader<'a> {
261261
let loader::Library { dylib, rlib, metadata } = lib;
262262

263263
let cnum_map = self.resolve_crate_deps(root, metadata.as_slice(), span);
264-
let staged_api = self.is_staged_api(metadata.as_slice());
265264

266265
let cmeta = Rc::new( cstore::crate_metadata {
267266
name: name.to_string(),
@@ -271,7 +270,6 @@ impl<'a> CrateReader<'a> {
271270
cnum: cnum,
272271
codemap_import_info: RefCell::new(vec![]),
273272
span: span,
274-
staged_api: staged_api
275273
});
276274

277275
let source = cstore::CrateSource {
@@ -285,17 +283,6 @@ impl<'a> CrateReader<'a> {
285283
(cnum, cmeta, source)
286284
}
287285

288-
fn is_staged_api(&self, data: &[u8]) -> bool {
289-
let attrs = decoder::get_crate_attributes(data);
290-
for attr in &attrs {
291-
if &attr.name()[..] == "staged_api" {
292-
match attr.node.value.node { ast::MetaWord(_) => return true, _ => (/*pass*/) }
293-
}
294-
}
295-
296-
return false;
297-
}
298-
299286
fn resolve_crate(&mut self,
300287
root: &Option<CratePaths>,
301288
ident: &str,

branches/beta/src/librustc/metadata/csearch.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use rbml::reader;
2222
use std::rc::Rc;
2323
use syntax::ast;
2424
use syntax::attr;
25+
use syntax::attr::AttrMetaMethods;
2526
use syntax::diagnostic::expect;
2627

2728
use std::collections::hash_map::HashMap;
@@ -385,7 +386,15 @@ pub fn get_stability(cstore: &cstore::CStore,
385386
}
386387

387388
pub fn is_staged_api(cstore: &cstore::CStore, krate: ast::CrateNum) -> bool {
388-
cstore.get_crate_data(krate).staged_api
389+
let cdata = cstore.get_crate_data(krate);
390+
let attrs = decoder::get_crate_attributes(cdata.data());
391+
for attr in &attrs {
392+
if &attr.name()[..] == "staged_api" {
393+
match attr.node.value.node { ast::MetaWord(_) => return true, _ => (/*pass*/) }
394+
}
395+
}
396+
397+
return false;
389398
}
390399

391400
pub fn get_repr_attrs(cstore: &cstore::CStore, def: ast::DefId)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ pub struct crate_metadata {
6363
pub cnum: ast::CrateNum,
6464
pub codemap_import_info: RefCell<Vec<ImportedFileMap>>,
6565
pub span: codemap::Span,
66-
pub staged_api: bool
6766
}
6867

6968
#[derive(Copy, Debug, PartialEq, Clone)]

0 commit comments

Comments
 (0)