Skip to content

Commit 5b925a3

Browse files
committed
---
yaml --- r: 147310 b: refs/heads/try2 c: 529f915 h: refs/heads/master v: v3
1 parent 974b87a commit 5b925a3

File tree

357 files changed

+4543
-6631
lines changed

Some content is hidden

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

357 files changed

+4543
-6631
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 3272b002b3d2943f17be70e719bf2ffa6058cf72
8+
refs/heads/try2: 529f91572870cffdd9f13ddae12bb1f4e03186ab
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/configure

Lines changed: 10 additions & 43 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,45 +544,12 @@ then
544544
putvar CFG_ENABLE_CLANG
545545
fi
546546

547+
547548
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
548549
then
549550
err "either clang or gcc is required"
550551
fi
551552

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-
586553
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
587554
then
588555
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
@@ -591,20 +558,20 @@ then
591558
LLVM_VERSION=$($LLVM_CONFIG --version)
592559

593560
case $LLVM_VERSION in
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-
;;
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+
;;
600567
esac
601568
fi
602569

603570
if [ ! -z "$CFG_ENABLE_CLANG" ]
604571
then
605572
if [ -z "$CFG_CLANG" ]
606573
then
607-
err "clang requested but not found"
574+
err "clang requested but not found"
608575
fi
609576
CFG_CLANG_VERSION=$("$CFG_CLANG" \
610577
--version \

branches/try2/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(src.as_ptr(), src.len() as size_t) == 0\n"
171+
" snappy_validate_compressed_buffer(vec::raw::to_ptr(src), 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 = src.as_ptr();\n"
210+
" let psrc = vec::raw::to_ptr(src);\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 = dst.as_mut_ptr();\n"
219+
" let pdst = vec::raw::to_mut_ptr(dst);\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-
" dst.set_len(dstlen as uint);\n"
227+
" vec::raw::set_len(&mut dst, 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 = src.as_ptr();\n"
250+
" let psrc = vec::raw::to_ptr(src);\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 = dst.as_mut_ptr();\n"
266+
" let pdst = vec::raw::to_mut_ptr(dst);\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-
" dst.set_len(dstlen as uint);\n"
274+
" vec::raw::set_len(&mut dst, dstlen as uint);\n"
275275
" Some(dst)\n"
276276
" } else {\n"
277277
" None // SNAPPY_INVALID_INPUT\n"

branches/try2/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(src.as_ptr(), src.len() as size_t) == 0\n"
171+
" snappy_validate_compressed_buffer(vec::raw::to_ptr(src), 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 = src.as_ptr();\n"
210+
" let psrc = vec::raw::to_ptr(src);\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 = dst.as_mut_ptr();\n"
219+
" let pdst = vec::raw::to_mut_ptr(dst);\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-
" dst.set_len(dstlen as uint);\n"
227+
" vec::raw::set_len(&mut dst, 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 = src.as_ptr();\n"
250+
" let psrc = vec::raw::to_ptr(src);\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 = dst.as_mut_ptr();\n"
266+
" let pdst = vec::raw::to_mut_ptr(dst);\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-
" dst.set_len(dstlen as uint);\n"
274+
" vec::raw::set_len(&mut dst, dstlen as uint);\n"
275275
" Some(dst)\n"
276276
" } else {\n"
277277
" None // SNAPPY_INVALID_INPUT\n"

branches/try2/doc/rust.md

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

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

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`.
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`.
783797

784798
Four examples of `extern mod` declarations:
785799

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

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

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`).
2193+
[Path](#path-expressions), [field](#field-expressions) and [index](#index-expressions) expressions are lvalues.
21852194
All other expressions are rvalues.
21862195

21872196
The left operand of an [assignment](#assignment-expressions),
@@ -3329,12 +3338,6 @@ The kinds are:
33293338
This kind includes scalars, owning pointers, owned closures, and
33303339
structural types containing only other owned types.
33313340
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.
33383341
`'static`
33393342
: Types of this kind do not contain any borrowed pointers;
33403343
this can be a useful guarantee for code
@@ -3792,7 +3795,7 @@ specified then log level 4 is assumed. Debug messages can be omitted
37923795
by passing `--cfg ndebug` to `rustc`.
37933796

37943797
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 `pkgid`
3798+
`RUST_LOG` to `rustc`, which is the crate name (as specified in its `link`
37963799
[attribute](#attributes)). To narrow down the logs to just crate resolution,
37973800
you would set it to `rustc::metadata::creader`. To see just error logging
37983801
use `rustc=0`.

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

branches/try2/doc/rustpkg.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ 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-
9692
## Source files
9793

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

114110
> **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.
115114
116115
# Dependencies
117116

0 commit comments

Comments
 (0)