Skip to content

Commit 47559cb

Browse files
committed
---
yaml --- r: 92382 b: refs/heads/auto c: bf30a21 h: refs/heads/master v: v3
1 parent 3a00e12 commit 47559cb

File tree

354 files changed

+6190
-4543
lines changed

Some content is hidden

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

354 files changed

+6190
-4543
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: b76997f3a947b296ca04be184da88ff1c0959dcb
16+
refs/heads/auto: bf30a213c4de79ba46e3729558118669f207435e
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ then
469469
PV_MINOR=${PV_MAJOR_MINOR#* }
470470
if [ "$PV_MAJOR" -lt "$MIN_PV_MAJOR" ] || [ "$PV_MINOR" -lt "$MIN_PV_MINOR" ]
471471
then
472-
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"
473-
BAD_PANDOC=1
472+
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"
473+
BAD_PANDOC=1
474474
fi
475475
fi
476476

@@ -544,12 +544,45 @@ then
544544
putvar CFG_ENABLE_CLANG
545545
fi
546546

547-
548547
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
549548
then
550549
err "either clang or gcc is required"
551550
fi
552551

552+
# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
553+
# system, so if we find that gcc is clang, we should just use clang directly.
554+
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]
555+
then
556+
CFG_OSX_GCC_VERSION=$("$CFG_GCC" --version 2>&1 | grep "Apple LLVM version")
557+
if [ $? -eq 0 ]
558+
then
559+
step_msg "on OS X 10.9, forcing use of clang"
560+
CFG_ENABLE_CLANG=1
561+
putvar CFG_ENABLE_CLANG
562+
else
563+
# on OS X, with xcode 5 and newer, certain developers may have
564+
# cc, gcc and g++ point to a mixture of clang and gcc
565+
# if so, this will create very strange build errors
566+
# this last stanza is to detect some such problems and save the future rust
567+
# contributor some time solving that issue.
568+
# this detection could be generalized to other OSes aside from OS X
569+
# but the issue seems most likely to happen on OS X
570+
571+
chk_cc () {
572+
$1 --version 2> /dev/null | grep -q $2
573+
}
574+
# check that gcc, cc and g++ all point to the same compiler.
575+
# note that for xcode 5, g++ points to clang, not clang++
576+
if !((chk_cc gcc clang && chk_cc g++ clang) ||
577+
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
578+
err "the gcc and g++ in your path point to different compilers.
579+
Check which versions are in your path with cc --version and g++ --version.
580+
To resolve this problem, either fix your PATH or run configure with --enable-clang"
581+
fi
582+
583+
fi
584+
fi
585+
553586
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
554587
then
555588
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
@@ -558,20 +591,20 @@ then
558591
LLVM_VERSION=$($LLVM_CONFIG --version)
559592

560593
case $LLVM_VERSION in
561-
(3.3|3.3svn|3.2|3.2svn)
562-
msg "found ok version of LLVM: $LLVM_VERSION"
563-
;;
564-
(*)
565-
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
566-
;;
594+
(3.3|3.3svn|3.2|3.2svn)
595+
msg "found ok version of LLVM: $LLVM_VERSION"
596+
;;
597+
(*)
598+
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
599+
;;
567600
esac
568601
fi
569602

570603
if [ ! -z "$CFG_ENABLE_CLANG" ]
571604
then
572605
if [ -z "$CFG_CLANG" ]
573606
then
574-
err "clang requested but not found"
607+
err "clang requested but not found"
575608
fi
576609
CFG_CLANG_VERSION=$("$CFG_CLANG" \
577610
--version \

branches/auto/doc/po/ja/tutorial-ffi.md.po

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ msgid ""
168168
"~~~~ {.xfail-test}\n"
169169
"pub fn validate_compressed_buffer(src: &[u8]) -> bool {\n"
170170
" unsafe {\n"
171-
" snappy_validate_compressed_buffer(vec::raw::to_ptr(src), src.len() as size_t) == 0\n"
171+
" snappy_validate_compressed_buffer(src.as_ptr(), src.len() as size_t) == 0\n"
172172
" }\n"
173173
"}\n"
174174
"~~~~\n"
@@ -207,7 +207,7 @@ msgid ""
207207
"pub fn compress(src: &[u8]) -> ~[u8] {\n"
208208
" unsafe {\n"
209209
" let srclen = src.len() as size_t;\n"
210-
" let psrc = vec::raw::to_ptr(src);\n"
210+
" let psrc = src.as_ptr();\n"
211211
msgstr ""
212212

213213
#. type: Plain text
@@ -216,15 +216,15 @@ msgstr ""
216216
msgid ""
217217
" let mut dstlen = snappy_max_compressed_length(srclen);\n"
218218
" let mut dst = vec::with_capacity(dstlen as uint);\n"
219-
" let pdst = vec::raw::to_mut_ptr(dst);\n"
219+
" let pdst = dst.as_mut_ptr();\n"
220220
msgstr ""
221221

222222
#. type: Plain text
223223
#: doc/tutorial-ffi.md:113
224224
#, no-wrap
225225
msgid ""
226226
" snappy_compress(psrc, srclen, pdst, &mut dstlen);\n"
227-
" vec::raw::set_len(&mut dst, dstlen as uint);\n"
227+
" dst.set_len(dstlen as uint);\n"
228228
" dst\n"
229229
" }\n"
230230
"}\n"
@@ -247,7 +247,7 @@ msgid ""
247247
"pub fn uncompress(src: &[u8]) -> Option<~[u8]> {\n"
248248
" unsafe {\n"
249249
" let srclen = src.len() as size_t;\n"
250-
" let psrc = vec::raw::to_ptr(src);\n"
250+
" let psrc = src.as_ptr();\n"
251251
msgstr ""
252252

253253
#. type: Plain text
@@ -263,15 +263,15 @@ msgstr ""
263263
#, no-wrap
264264
msgid ""
265265
" let mut dst = vec::with_capacity(dstlen as uint);\n"
266-
" let pdst = vec::raw::to_mut_ptr(dst);\n"
266+
" let pdst = dst.as_mut_ptr();\n"
267267
msgstr ""
268268

269269
#. type: Plain text
270270
#: doc/tutorial-ffi.md:138
271271
#, no-wrap
272272
msgid ""
273273
" if snappy_uncompress(psrc, srclen, pdst, &mut dstlen) == 0 {\n"
274-
" vec::raw::set_len(&mut dst, dstlen as uint);\n"
274+
" dst.set_len(dstlen as uint);\n"
275275
" Some(dst)\n"
276276
" } else {\n"
277277
" None // SNAPPY_INVALID_INPUT\n"

branches/auto/doc/po/tutorial-ffi.md.pot

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ msgid ""
168168
"~~~~ {.xfail-test}\n"
169169
"pub fn validate_compressed_buffer(src: &[u8]) -> bool {\n"
170170
" unsafe {\n"
171-
" snappy_validate_compressed_buffer(vec::raw::to_ptr(src), src.len() as size_t) == 0\n"
171+
" snappy_validate_compressed_buffer(src.as_ptr(), src.len() as size_t) == 0\n"
172172
" }\n"
173173
"}\n"
174174
"~~~~\n"
@@ -207,7 +207,7 @@ msgid ""
207207
"pub fn compress(src: &[u8]) -> ~[u8] {\n"
208208
" unsafe {\n"
209209
" let srclen = src.len() as size_t;\n"
210-
" let psrc = vec::raw::to_ptr(src);\n"
210+
" let psrc = src.as_ptr();\n"
211211
msgstr ""
212212

213213
#. type: Plain text
@@ -216,15 +216,15 @@ msgstr ""
216216
msgid ""
217217
" let mut dstlen = snappy_max_compressed_length(srclen);\n"
218218
" let mut dst = vec::with_capacity(dstlen as uint);\n"
219-
" let pdst = vec::raw::to_mut_ptr(dst);\n"
219+
" let pdst = dst.as_mut_ptr();\n"
220220
msgstr ""
221221

222222
#. type: Plain text
223223
#: doc/tutorial-ffi.md:113
224224
#, no-wrap
225225
msgid ""
226226
" snappy_compress(psrc, srclen, pdst, &mut dstlen);\n"
227-
" vec::raw::set_len(&mut dst, dstlen as uint);\n"
227+
" dst.set_len(dstlen as uint);\n"
228228
" dst\n"
229229
" }\n"
230230
"}\n"
@@ -247,7 +247,7 @@ msgid ""
247247
"pub fn uncompress(src: &[u8]) -> Option<~[u8]> {\n"
248248
" unsafe {\n"
249249
" let srclen = src.len() as size_t;\n"
250-
" let psrc = vec::raw::to_ptr(src);\n"
250+
" let psrc = src.as_ptr();\n"
251251
msgstr ""
252252

253253
#. type: Plain text
@@ -263,15 +263,15 @@ msgstr ""
263263
#, no-wrap
264264
msgid ""
265265
" let mut dst = vec::with_capacity(dstlen as uint);\n"
266-
" let pdst = vec::raw::to_mut_ptr(dst);\n"
266+
" let pdst = dst.as_mut_ptr();\n"
267267
msgstr ""
268268

269269
#. type: Plain text
270270
#: doc/tutorial-ffi.md:138
271271
#, no-wrap
272272
msgid ""
273273
" if snappy_uncompress(psrc, srclen, pdst, &mut dstlen) == 0 {\n"
274-
" vec::raw::set_len(&mut dst, dstlen as uint);\n"
274+
" dst.set_len(dstlen as uint);\n"
275275
" Some(dst)\n"
276276
" } else {\n"
277277
" None // SNAPPY_INVALID_INPUT\n"

branches/auto/doc/rust.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,8 @@ Attributes on the anonymous crate module define important metadata that influenc
609609
the behavior of the compiler.
610610

611611
~~~~
612-
// Linkage attributes
613-
#[ link(name = "projx",
614-
vers = "2.5",
615-
uuid = "9cccc5d5-aceb-4af5-8285-811211826b82") ];
612+
// Package ID
613+
#[ pkgid = "projx#2.5" ];
616614
617615
// Additional metadata attributes
618616
#[ desc = "Project X" ];
@@ -775,36 +773,24 @@ An _`extern mod` declaration_ specifies a dependency on an external crate.
775773
The external crate is then bound into the declaring scope
776774
as the `ident` provided in the `extern_mod_decl`.
777775

778-
The external crate is resolved to a specific `soname` at compile time,
779-
and a runtime linkage requirement to that `soname` is passed to the linker for
780-
loading at runtime.
781-
The `soname` is resolved at compile time by scanning the compiler's library path
782-
and matching the `link_attrs` provided in the `use_decl` against any `#link` attributes that
783-
were declared on the external crate when it was compiled.
784-
If no `link_attrs` are provided,
785-
a default `name` attribute is assumed,
786-
equal to the `ident` given in the `use_decl`.
787-
788-
Optionally, an identifier in an `extern mod` declaration may be followed by an equals sign,
789-
then a string literal denoting a relative path on the filesystem.
790-
This path should exist in one of the directories in the Rust path,
791-
which by default contains the `.rust` subdirectory of the current directory and each of its parents,
792-
as well as any directories in the colon-separated (or semicolon-separated on Windows)
793-
list of paths that is the `RUST_PATH` environment variable.
794-
The meaning of `extern mod a = "b/c/d";`, supposing that `/a` is in the RUST_PATH,
795-
is that the name `a` should be taken as a reference to the crate whose absolute location is
796-
`/a/b/c/d`.
776+
The external crate is resolved to a specific `soname` at compile time, and a
777+
runtime linkage requirement to that `soname` is passed to the linker for
778+
loading at runtime. The `soname` is resolved at compile time by scanning the
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
782+
assumed, equal to the `ident` given in the `extern_mod_decl`.
797783

798784
Four examples of `extern mod` declarations:
799785

800786
~~~~ {.xfail-test}
801-
extern mod pcre (uuid = "54aba0f8-a7b1-4beb-92f1-4cf625264841");
787+
extern mod pcre;
802788
803-
extern mod extra; // equivalent to: extern mod extra ( name = "extra" );
789+
extern mod extra; // equivalent to: extern mod extra = "extra";
804790
805-
extern mod rustextra (name = "extra"); // linking to 'extra' under another name
791+
extern mod rustextra = "extra"; // linking to 'extra' under another name
806792
807-
extern mod complicated_mod = "some-file/in/the-rust/path";
793+
extern mod foo = "some/where/rust-foo#foo:1.0"; // a full package ID for rustpkg
808794
~~~~
809795

810796
##### Use declarations
@@ -1742,7 +1728,8 @@ names are effectively reserved. Some significant attributes include:
17421728
* The `doc` attribute, for documenting code in-place.
17431729
* The `cfg` attribute, for conditional-compilation by build-configuration.
17441730
* The `lang` attribute, for custom definitions of traits and functions that are known to the Rust compiler (see [Language items](#language-items)).
1745-
* The `link` attribute, for describing linkage metadata for a crate.
1731+
* The `link` attribute, for describing linkage metadata for a extern blocks.
1732+
* The `pkgid` attribute, for describing the package ID of a crate.
17461733
* The `test` attribute, for marking functions as unit tests.
17471734
* The `allow`, `warn`, `forbid`, and `deny` attributes, for
17481735
controlling lint checks (see [Lint check attributes](#lint-check-attributes)).
@@ -2190,7 +2177,11 @@ Expressions are divided into two main categories: _lvalues_ and _rvalues_.
21902177
Likewise within each expression, sub-expressions may occur in _lvalue context_ or _rvalue context_.
21912178
The evaluation of an expression depends both on its own category and the context it occurs within.
21922179

2193-
[Path](#path-expressions), [field](#field-expressions) and [index](#index-expressions) expressions are lvalues.
2180+
An lvalue is an expression that represents a memory location. These
2181+
expressions are [paths](#path-expressions) (which refer to local
2182+
variables, function and method arguments, or static variables),
2183+
dereferences (`*expr`), [indexing expressions](#index-expressions)
2184+
(`expr[expr]`), and [field references](#field-expressions) (`expr.f`).
21942185
All other expressions are rvalues.
21952186

21962187
The left operand of an [assignment](#assignment-expressions),
@@ -3338,6 +3329,12 @@ The kinds are:
33383329
This kind includes scalars, owning pointers, owned closures, and
33393330
structural types containing only other owned types.
33403331
All `Send` types are `'static`.
3332+
`Pod`
3333+
: Types of this kind consist of "Plain Old Data"
3334+
which can be copied by simply moving bits.
3335+
All values of this kind can be implicitly copied.
3336+
This kind includes scalars and immutable references,
3337+
as well as structural types containing other `Pod` types.
33413338
`'static`
33423339
: Types of this kind do not contain any borrowed pointers;
33433340
this can be a useful guarantee for code
@@ -3795,7 +3792,7 @@ specified then log level 4 is assumed. Debug messages can be omitted
37953792
by passing `--cfg ndebug` to `rustc`.
37963793

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

branches/auto/doc/rustdoc.md

Lines changed: 1 addition & 1 deletion
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-
#[link(name="universe")];
16+
#[pkgid = "universe"];
1717
#[crate_type="lib"];
1818
1919
//! Tools for dealing with universes (this is a doc comment, and is shown on

branches/auto/doc/rustpkg.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ as well as `foo/src/bar/extras/baz/lib.rs`,
8989
then both `bar` and `bar/extras/baz` are valid package identifiers
9090
in the workspace `foo`.
9191

92+
Because rustpkg uses generic source file names as the main inputs, you will
93+
need to specify the package identifier in them using the `pkgid` attribute
94+
on the crate.
95+
9296
## Source files
9397

9498
rustpkg searches for four different fixed filenames in order to determine the crates to build:
@@ -108,9 +112,6 @@ When building a package that is not under version control,
108112
or that has no tags, `rustpkg` assumes the intended version is 0.1.
109113

110114
> **Note:** A future version of rustpkg will support semantic versions.
111-
> Also, a future version will add the option to specify a version with a metadata
112-
> attribute like `#[link(vers = "3.1415")]` inside the crate module,
113-
> though this attribute will never be mandatory.
114115
115116
# Dependencies
116117

0 commit comments

Comments
 (0)