Skip to content

Rollup of 6 pull requests #23697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 191 commits into from
Mar 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
9c906da
std: Fix create_dir_all for empty paths
alexcrichton Mar 15, 2015
a7f00cb
Fix a bug in inline assembly codegen where host clobbers were always …
woehr Mar 18, 2015
b92fee9
Remove unnecessary vector creation.
woehr Mar 18, 2015
959a0e6
std: Stabilize marker::MarkerTrait
alexcrichton Mar 18, 2015
f945190
rustc: Remove some long deprecated features:
alexcrichton Mar 18, 2015
6f693e9
Stabilize Entry types
aturon Mar 19, 2015
a848ce4
Adding sys/socket.h constants for iOS/Mac, particularly for SO_SOCKET…
drewcrawford Mar 15, 2015
6f09dfc
Socket options constants for *BSD/Linux/Windows
vhbit Mar 19, 2015
6a5148b
Introduce rsplit
shepmaster Mar 14, 2015
c6ca220
StrExt::splitn should not require a DoubleEndedSearcher
shepmaster Mar 15, 2015
9ae144f
Add default impls for Send/Sync
flaper87 Mar 9, 2015
01d2429
Feature gate defaulted traits
flaper87 Mar 11, 2015
38dbcb2
Check trait unsafety for defaulted traits
flaper87 Mar 11, 2015
04d5772
fix fallout
flaper87 Mar 20, 2015
0c040b0
guide: minor copy edits
ches Mar 2, 2015
92294e7
guide: Improvements to language covering enums
ches Mar 2, 2015
c175b35
fix the attributes sytax
FuGangqiang Mar 21, 2015
bc9d9f2
add lifetime for `while` and `for` expression
FuGangqiang Mar 21, 2015
e24fe5b
std: Remove deprecated ptr functions
alexcrichton Mar 19, 2015
1ec9adc
std: Tweak rt::at_exit behavior
alexcrichton Mar 21, 2015
1381249
implement `Clone` for `btree` iterators
apasel422 Mar 22, 2015
90c8592
Refine Cursor docstring
nagisa Mar 22, 2015
cfe7a8d
Reduce code bloat in closure
dotdash Mar 22, 2015
5321d22
Remove bad reference to std::io
steveklabnik Mar 22, 2015
3d04cb3
Note order of BinaryHeap::drain
steveklabnik Mar 22, 2015
fbc823d
Document how to document macros
steveklabnik Mar 22, 2015
29aca83
Remove an unsafe function definition in __thread_local_inner.
Ms2ger Mar 21, 2015
81801f2
Re-word explanation on closures in intro
steveklabnik Mar 22, 2015
8a500de
book: some Crates and Modules nits
tshepang Mar 14, 2015
558c427
Fix a typo in the Rust Book ownership page.
liammonahan Mar 23, 2015
0090e01
Get __pthread_get_minstack at runtime with dlsym
andersk Mar 23, 2015
b6641c1
min_stack_size: update non-Linux implementation comment
andersk Mar 23, 2015
737bb30
min_stack_size: clarify both reasons to use dlsym
andersk Mar 23, 2015
50ea6f6
Remove incorrect subtyping for `&mut Trait` and introduce coercion
nikomatsakis Mar 19, 2015
45fae88
When matching against a pattern (either via `match` or `let`) that
nikomatsakis Mar 6, 2015
d944689
Fix dead link for std::sync::mpsc.
WiSaGaN Mar 23, 2015
64532f7
implement `Clone` for various iterators
apasel422 Mar 23, 2015
7934d52
implement `ExactSizeIterator` for `linked_list::IntoIter`
apasel422 Mar 23, 2015
88edf97
document iteration order for `vec_deque::IntoIter`
apasel422 Mar 23, 2015
2750e3c
Add note about pointer state after the call.
steveklabnik Mar 20, 2015
d6fb7e9
derive missing trait implementations for cursor
mahkoh Mar 22, 2015
2625bf9
Fix regression in -C rpath that causes failures with symlinks
brson Mar 10, 2015
9ec9bc6
Clarify behavior of Path::relative_from
brson Mar 11, 2015
a5e1cbe
Beef up BufRead::consume documentation.
steveklabnik Mar 22, 2015
d52c362
Clarify that slices don't just point to arrays
steveklabnik Mar 23, 2015
d29d554
prctl instead of pthread on linux for name setup
nagisa Mar 23, 2015
9231ceb
Stabilize the Error trait
aturon Mar 19, 2015
6bd3ab0
Implement RFC 909: move thread_local into thread
aturon Mar 20, 2015
05c9728
Don't conflate regions and affine types
steveklabnik Mar 23, 2015
1be8fcb
Make note of str in 'more strings' chapter
steveklabnik Mar 23, 2015
3760113
Make the `Fn` traits inherit from one another and remove the bridging
nikomatsakis Feb 15, 2015
bc1dde4
Compiler and trait changes to make indexing by value.
nikomatsakis Mar 21, 2015
b4d4daf
Adjust Index/IndexMut impls. For generic collections, we take
nikomatsakis Mar 21, 2015
8e58af4
Fallout in stdlib, rustdoc, rustc, etc. For most maps, converted uses of
nikomatsakis Mar 22, 2015
57cf2de
Update borrowck tests to test that index is by-move now
nikomatsakis Mar 22, 2015
2df8830
rustdoc: Support for "array" primitive
tomjakubowski Mar 23, 2015
4a81e66
Rollup merge of #22954 - ches:docs, r=steveklabnik
steveklabnik Mar 23, 2015
f788159
Rollup merge of #23119 - nikomatsakis:issue-23116-ref-mut, r=pnkfelix
steveklabnik Mar 23, 2015
84f760b
Rollup merge of #23509 - aturon:stab-entry, r=Gankro
steveklabnik Mar 23, 2015
61e6904
Rollup merge of #23561 - steveklabnik:gh23422, r=alexcrichton
steveklabnik Mar 23, 2015
73b30db
Rollup merge of #23590 - FuGangqiang:attr, r=alexcrichton
steveklabnik Mar 23, 2015
9299446
Rollup merge of #23607 - mahkoh:cursor, r=alexcrichton
steveklabnik Mar 23, 2015
8b6c0fd
Rollup merge of #23608 - nagisa:refine-cursor-docstring, r=steveklabnik
steveklabnik Mar 23, 2015
71b9ba1
Rollup merge of #23618 - steveklabnik:gh23571, r=alexcrichton
steveklabnik Mar 23, 2015
1c25aec
Rollup merge of #23622 - steveklabnik:gh23196, r=alexcrichton
steveklabnik Mar 23, 2015
68af512
Rollup merge of #23639 - steveklabnik:gh21305, r=alexcrichton
steveklabnik Mar 23, 2015
6a5b1e9
Rollup merge of #23641 - steveklabnik:gh23632, r=alexcrichton
steveklabnik Mar 23, 2015
1aa75ce
configure: Fix detection of 32-bit Linux userspace
brson Mar 23, 2015
3d365f6
rustdoc: interpret all leading feature attributes in examples as crat…
brson Mar 12, 2015
7770ea7
rustdoc: Add #[doc(test(no_inject_crate))] attribute
brson Mar 16, 2015
df290f1
Require feature attributes, and add them where necessary
brson Mar 6, 2015
e901910
Add #![feature] attributes to doctests
brson Mar 13, 2015
8c93a79
rustdoc: Replace no-pretty-expanded with pretty-expanded
brson Mar 22, 2015
8389253
Add generic conversion traits
aturon Mar 18, 2015
d97d538
std: Stabilize the `Hasher::finish` method
alexcrichton Mar 23, 2015
8bd8466
Refactor how we handle overflow so that it is a fatal error that aborts
nikomatsakis Mar 20, 2015
76ead08
Remove auto-deref'ing Pattern impl because it conflicts with other
nikomatsakis Mar 21, 2015
d6054e4
rollup merge of #22954: ches/docs
alexcrichton Mar 23, 2015
ad41e7c
rollup merge of #23119: nikomatsakis/issue-23116-ref-mut
alexcrichton Mar 23, 2015
ec1a85a
rollup merge of #23211: FlaPer87/oibit-send-and-friends
alexcrichton Mar 23, 2015
67e516c
rollup merge of #23269: shepmaster/split-not-double-ended
alexcrichton Mar 23, 2015
e98d4d9
rollup merge of #23283: brson/rpathfix
alexcrichton Mar 23, 2015
d3fbc14
rollup merge of #23401: tshepang/crates-and-modules-doc-nits
alexcrichton Mar 23, 2015
4f74376
rollup merge of #23466: woehr/master
alexcrichton Mar 23, 2015
0678f0b
rollup merge of #23515: nikomatsakis/issue-14985-trait-subtyping
alexcrichton Mar 23, 2015
68cf9e0
rollup merge of #23517: vhbit/ext-socket-options
alexcrichton Mar 23, 2015
c77af69
rollup merge of #23536: pnkfelix/arith-oflo-shifts
alexcrichton Mar 23, 2015
fd13400
rollup merge of #23538: aturon/conversion
alexcrichton Mar 23, 2015
b97e1cc
rollup merge of #23541: aturon/stab-error
alexcrichton Mar 23, 2015
2153c58
rollup merge of #23557: aturon/rfc-909
alexcrichton Mar 23, 2015
88ae218
rollup merge of #23561: steveklabnik/gh23422
alexcrichton Mar 23, 2015
9e347b3
rollup merge of #23579: Ms2ger/thread_local-unsafe
alexcrichton Mar 23, 2015
bed7740
rollup merge of #23580: nikomatsakis/pattern-and-overflow
alexcrichton Mar 23, 2015
388e5ae
rollup merge of #23590: FuGangqiang/attr
alexcrichton Mar 23, 2015
753efb5
rollup merge of #23601: nikomatsakis/by-value-index
alexcrichton Mar 23, 2015
68fb3ac
rollup merge of #23604: apasel422/btree
alexcrichton Mar 23, 2015
71c705d
rollup merge of #23607: mahkoh/cursor
alexcrichton Mar 23, 2015
c999707
rollup merge of #23608: nagisa/refine-cursor-docstring
alexcrichton Mar 23, 2015
010895e
rollup merge of #23612: dotdash/closure_bloat
alexcrichton Mar 23, 2015
5a6a905
rollup merge of #23615: steveklabnik/gh23540
alexcrichton Mar 23, 2015
a78eb53
rollup merge of #23618: steveklabnik/gh23571
alexcrichton Mar 23, 2015
b03939b
rollup merge of #23619: steveklabnik/gh23220
alexcrichton Mar 23, 2015
ef07e07
rollup merge of #23622: steveklabnik/gh23196
alexcrichton Mar 23, 2015
28fcdc0
rollup merge of #23631: andersk/minstack-dlsym
alexcrichton Mar 23, 2015
19510ac
rollup merge of #23633: tomjakubowski/rustdoc-array-prim
alexcrichton Mar 23, 2015
c7509bb
rollup merge of #23634: WiSaGaN/bugfix/fix_dead_link
alexcrichton Mar 23, 2015
ca7f7cf
rollup merge of #23637: apasel422/iter
alexcrichton Mar 23, 2015
5e06ebb
rollup merge of #23639: steveklabnik/gh21305
alexcrichton Mar 23, 2015
8a15868
rollup merge of #23640: nagisa/thread-less-weak
alexcrichton Mar 23, 2015
fcf2ba7
rollup merge of #23641: steveklabnik/gh23632
alexcrichton Mar 23, 2015
7101ff4
rollup merge of #23648: steveklabnik/rollup
alexcrichton Mar 23, 2015
d8b0628
rollup merge of #23650: brson/32-bit-userspace
alexcrichton Mar 23, 2015
c608084
rollup merge of #23598: brson/gate
alexcrichton Mar 23, 2015
7d07f70
rollup merge of #23383: alexcrichton/fs-create-dir-all
alexcrichton Mar 23, 2015
04e667a
Test fixes and rebase conflicts, round 1
alexcrichton Mar 23, 2015
6e0f1d3
rollup merge of #23484: alexcrichton/marker-trait-stable
alexcrichton Mar 23, 2015
aea8226
rollup merge of #23503: alexcrichton/fix-ptr-docs
alexcrichton Mar 23, 2015
3112716
rollup merge of #23506: alexcrichton/remove-some-deprecated-things
alexcrichton Mar 23, 2015
248b2ec
Stabilize Entry types
aturon Mar 19, 2015
3f52d71
Update docs for ptr module.
mbrubeck Mar 23, 2015
3a0c15f
adding lastest Bitrig snapshot by hand
Mar 23, 2015
9330bae
Fallout from changing fn traits to use inheritance rather than bridge
nikomatsakis Mar 11, 2015
29b5438
Test fixes and rebase conflicts, round 2
alexcrichton Mar 23, 2015
690ee16
rollup merge of #23509: aturon/stab-entry
alexcrichton Mar 24, 2015
6a44f24
rollup merge of #23644: mbrubeck/doc-edit
alexcrichton Mar 24, 2015
7380b6f
rollup merge of #23645: steveklabnik/gh23642
alexcrichton Mar 24, 2015
1588cac
rollup merge of #23652: alexcrichton/stabilize-hasher-finish
alexcrichton Mar 24, 2015
253992e
rollup merge of #23653: dhuseby/bitrig-stage0-c64d671
alexcrichton Mar 24, 2015
37dc801
Improve the wording of the example section description on the ownersh…
liammonahan Mar 24, 2015
c5c3de0
Test fixes and rebase conflicts, round 3
alexcrichton Mar 24, 2015
a9b3196
Add the other S_I(RWX)(GRP/OTH) for posix `creat`
ubsan Mar 24, 2015
a34e87f
Add Examples for File
steveklabnik Mar 23, 2015
a7e2049
Merge remote-tracking branch 'origin/master' into rollup
alexcrichton Mar 24, 2015
f2996c0
Add basic information about associated types
steveklabnik Mar 21, 2015
0031d57
Clean up Any's title line
steveklabnik Mar 24, 2015
f2e0810
correct reference wrt shifts
steveklabnik Mar 24, 2015
d252d0a
Test fixes and rebase conflicts, round 4
alexcrichton Mar 24, 2015
ed81038
Auto merge of #23654 - alexcrichton:rollup, r=alexcrichton
bors Mar 24, 2015
4ccf374
std: Zero memory when calling `read_to_end()`
alexcrichton Mar 24, 2015
4065246
An example for clone
steveklabnik Mar 24, 2015
95602a7
Add trivial cast lints.
nrc Mar 20, 2015
9374c21
Minor refactoring in coercion.rs
nrc Mar 23, 2015
088cd56
Remove the UnusedCasts lint
nrc Mar 23, 2015
dc206a9
Add tests
nrc Mar 23, 2015
e7122a5
Change lint names to plurals
nrc Mar 23, 2015
0e838f7
libcollections: move Vec::push slow path out
emberian Mar 24, 2015
227d304
std: Update docs for removal of ReadExt, WriteExt
Mar 24, 2015
00e14f1
core: Update docs for StrExt demotion in libstd
Mar 24, 2015
547a48e
collections: Update docs for slice since SliceExt was removed
Mar 24, 2015
5fa4b4c
Remove unnecessary bounds from Drop impl for `Arc` and `arc::Weak` and
pnkfelix Mar 21, 2015
0adab50
Added `T:Send` bound to `sync::mpsc::Receiver` and `sync::mpsc::Sender`.
pnkfelix Mar 21, 2015
26a79e3
Added `Write` bounds to avoid a specialized Drop impl for `BufWriter`.
pnkfelix Mar 21, 2015
1249e60
Added `T:Send` bound to `Queue<T>` to avoid specialized Drop impl.
pnkfelix Mar 21, 2015
1e71d2e
Added `W: Writer` bound to `BufferedWriter<W>` to avoid specialized `…
pnkfelix Mar 21, 2015
018eeb7
added `T:Send` bound to `Mutex<T>` to avoid specialized Drop impl.
pnkfelix Mar 21, 2015
123b5c1
Added `T:Send` bound to `Packet<T>` to avoid specialized `Drop` impl.
pnkfelix Mar 21, 2015
5f57fd5
Added `T:Send` bound to `Queue<T>` to avoid specialized `Drop` impl.
pnkfelix Mar 21, 2015
290c8de
Added `T:Send` bound to `JoinGuard<T>` to avoid specialized `Drop` impl.
pnkfelix Mar 21, 2015
5b2e869
Reject specialized Drop impls.
pnkfelix Mar 21, 2015
1955e05
Unit tests for Issue 8142, collected into one file.
pnkfelix Mar 24, 2015
7e3ee02
Bug fixes
nrc Mar 24, 2015
8f6c879
rollup merge of #23282: nikomatsakis/fn-trait-inheritance
alexcrichton Mar 24, 2015
f5b65c5
rollup merge of #23573: steveklabnik/doc_associated_types
alexcrichton Mar 24, 2015
6106345
rollup merge of #23592: alexcrichton/tweak-at-exit
alexcrichton Mar 24, 2015
6da0b9d
rollup merge of #23629: liammonahan/master
alexcrichton Mar 24, 2015
a1d2e62
rollup merge of #23630: nrc/coerce-tidy
alexcrichton Mar 24, 2015
37d57e7
rollup merge of #23646: steveklabnik/doc_file
alexcrichton Mar 24, 2015
5c74ed9
rollup merge of #23659: GBGamer/master
alexcrichton Mar 24, 2015
8a0bb42
rollup merge of #23661: steveklabnik/any_docs
alexcrichton Mar 24, 2015
020efc7
rollup merge of #23662: steveklabnik/gh23421
alexcrichton Mar 24, 2015
5ed8733
rollup merge of #23668: alexcrichton/io-zero
alexcrichton Mar 24, 2015
eb2f1d9
rustc: Add support for `extern crate foo as bar`
alexcrichton Mar 19, 2015
91b633a
rollup merge of #23546: alexcrichton/hyphens
alexcrichton Mar 24, 2015
3b13b9c
rollup merge of #23638: pnkfelix/fsk-reject-specialized-drops
alexcrichton Mar 24, 2015
19cd000
rollup merge of #23671: steveklabnik/doc_std_clone
alexcrichton Mar 24, 2015
492f07b
Fix some fallout in librustdoc
nagisa Mar 24, 2015
123a754
Auto merge of #23546 - alexcrichton:hyphens, r=brson
bors Mar 24, 2015
efaef24
Test fixes and rebase conflicts, round 1
alexcrichton Mar 24, 2015
db2c3ba
rollup merge of #23674: nagisa/fallout-1
alexcrichton Mar 24, 2015
3021d4c
Test fixes and rebase conflicts, round 2
alexcrichton Mar 24, 2015
593db00
Auto merge of #23681 - alexcrichton:rollup, r=alexcrichton
bors Mar 25, 2015
eb5ed10
[iOS] Fallout from 8389253
tamird Mar 25, 2015
1663665
Fix ICE on SIMD overflow checking
yjh0502 Mar 25, 2015
eefb8e2
unbreak bitrig/openbsd build after 8389253d
semarie Mar 25, 2015
928e2e2
Auto merge of #23670 - cmr:vec-push-slowpath, r=pcwalton
bors Mar 25, 2015
b6783e6
Rollup merge of #23617 - steveklabnik:gh23564, r=Manishearth
Manishearth Mar 25, 2015
5535767
Rollup merge of #23664 - bluss:std-docs, r=steveklabnik
Manishearth Mar 25, 2015
5a5845d
Rollup merge of #23684 - tamird:ios-fallout, r=alexcrichton
Manishearth Mar 25, 2015
4283b2a
Rollup merge of #23692 - yjh0502:fix/simd-overflow, r=pnkfelix
Manishearth Mar 25, 2015
2354fc9
Rollup merge of #23693 - semarie:openbsd-pathbuf-new, r=nikomatsakis
Manishearth Mar 25, 2015
e962a1d
Rollup merge of #23702 - dotdash:match_reass, r=eddyb
Manishearth Mar 25, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 12 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,19 @@ esac
# Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
then
file -L "$SHELL" | grep -q "x86[_-]64"
if [ $? != 0 ]; then
CFG_CPUTYPE=i686
# $SHELL does not exist in standard 'sh', so probably only exists
# if configure is running in an interactive bash shell. /usr/bin/env
# exists *everywhere*.
BIN_TO_PROBE="$SHELL"
if [ -z "$BIN_TO_PROBE" -a -e "/usr/bin/env" ]; then
BIN_TO_PROBE="/usr/bin/env"
fi
if [ -n "$BIN_TO_PROBE" ]; then
file -L "$BIN_TO_PROBE" | grep -q "x86[_-]64"
if [ $? != 0 ]; then
CFG_CPUTYPE=i686
fi
fi
fi


Expand Down
10 changes: 6 additions & 4 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#![feature(std_misc)]
#![feature(test)]
#![feature(path_ext)]
#![feature(convert)]
#![feature(str_char)]

#![deny(warnings)]

Expand Down Expand Up @@ -115,7 +117,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {

fn opt_path(m: &getopts::Matches, nm: &str) -> PathBuf {
match m.opt_str(nm) {
Some(s) => PathBuf::new(&s),
Some(s) => PathBuf::from(&s),
None => panic!("no option (=path) found for {}", nm),
}
}
Expand All @@ -130,18 +132,18 @@ pub fn parse_config(args: Vec<String> ) -> Config {
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
rustc_path: opt_path(matches, "rustc-path"),
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::new(&s)),
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::from(&s)),
valgrind_path: matches.opt_str("valgrind-path"),
force_valgrind: matches.opt_present("force-valgrind"),
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::new(&s)),
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::from(&s)),
src_base: opt_path(matches, "src-base"),
build_base: opt_path(matches, "build-base"),
aux_base: opt_path(matches, "aux-base"),
stage_id: matches.opt_str("stage-id").unwrap(),
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
run_ignored: matches.opt_present("ignored"),
filter: filter,
logfile: matches.opt_str("logfile").map(|s| PathBuf::new(&s)),
logfile: matches.opt_str("logfile").map(|s| PathBuf::from(&s)),
runtool: matches.opt_str("runtool"),
host_rustcflags: matches.opt_str("host-rustcflags"),
target_rustcflags: matches.opt_str("target-rustcflags"),
Expand Down
23 changes: 12 additions & 11 deletions src/compiletest/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ pub struct TestProps {
pub check_stdout: bool,
// Don't force a --crate-type=dylib flag on the command line
pub no_prefer_dynamic: bool,
// Don't run --pretty expanded when running pretty printing tests
pub no_pretty_expanded: bool,
// Run --pretty expanded when running pretty printing tests
pub pretty_expanded: bool,
// Which pretty mode are we testing with, default to 'normal'
pub pretty_mode: String,
// Only compare pretty output and don't try compiling
Expand All @@ -62,7 +62,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
let mut force_host = false;
let mut check_stdout = false;
let mut no_prefer_dynamic = false;
let mut no_pretty_expanded = false;
let mut pretty_expanded = false;
let mut pretty_mode = None;
let mut pretty_compare_only = false;
let mut forbid_output = Vec::new();
Expand Down Expand Up @@ -96,8 +96,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
no_prefer_dynamic = parse_no_prefer_dynamic(ln);
}

if !no_pretty_expanded {
no_pretty_expanded = parse_no_pretty_expanded(ln);
if !pretty_expanded {
pretty_expanded = parse_pretty_expanded(ln);
}

if pretty_mode.is_none() {
Expand Down Expand Up @@ -152,7 +152,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
force_host: force_host,
check_stdout: check_stdout,
no_prefer_dynamic: no_prefer_dynamic,
no_pretty_expanded: no_pretty_expanded,
pretty_expanded: pretty_expanded,
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
pretty_compare_only: pretty_compare_only,
forbid_output: forbid_output,
Expand Down Expand Up @@ -295,8 +295,8 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
parse_name_directive(line, "no-prefer-dynamic")
}

fn parse_no_pretty_expanded(line: &str) -> bool {
parse_name_directive(line, "no-pretty-expanded")
fn parse_pretty_expanded(line: &str) -> bool {
parse_name_directive(line, "pretty-expanded")
}

fn parse_pretty_mode(line: &str) -> Option<String> {
Expand Down Expand Up @@ -328,10 +328,10 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {

fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
match parse_name_value_directive(line, "pp-exact") {
Some(s) => Some(PathBuf::new(&s)),
Some(s) => Some(PathBuf::from(&s)),
None => {
if parse_name_directive(line, "pp-exact") {
testfile.file_name().map(|s| PathBuf::new(s))
testfile.file_name().map(|s| PathBuf::from(s))
} else {
None
}
Expand All @@ -340,7 +340,8 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
}

fn parse_name_directive(line: &str, directive: &str) -> bool {
line.contains(directive)
// This 'no-' rule is a quick hack to allow pretty-expanded and no-pretty-expanded to coexist
line.contains(directive) && !line.contains(&("no-".to_string() + directive))
}

pub fn parse_name_value_directive(line: &str, directive: &str)
Expand Down
4 changes: 2 additions & 2 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
if !proc_res.status.success() {
fatal_proc_rec("pretty-printed source does not typecheck", &proc_res);
}
if props.no_pretty_expanded { return }
if !props.pretty_expanded { return }

// additionally, run `--pretty expanded` and try to build it.
let proc_res = print_source(config, props, testfile, srcs[round].clone(), "expanded");
Expand Down Expand Up @@ -1440,7 +1440,7 @@ fn aux_output_dir_name(config: &Config, testfile: &Path) -> PathBuf {
}

fn output_testname(testfile: &Path) -> PathBuf {
PathBuf::new(testfile.file_stem().unwrap())
PathBuf::from(testfile.file_stem().unwrap())
}

fn output_base_name(config: &Config, testfile: &Path) -> PathBuf {
Expand Down
20 changes: 10 additions & 10 deletions src/doc/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,16 +446,16 @@ It gives us this error:
error: aborting due to previous error
```

It mentions that "captured outer variable in an `FnMut` closure".
Because we declared the closure as a moving closure, and it referred
to `numbers`, the closure will try to take ownership of the
vector. But the closure itself is created in a loop, and hence we will
actually create three closures, one for every iteration of the
loop. This means that all three of those closures would try to own
`numbers`, which is impossible -- `numbers` must have just one
owner. Rust detects this and gives us the error: we claim that
`numbers` has ownership, but our code tries to make three owners. This
may cause a safety problem, so Rust disallows it.
This is a little confusing because there are two closures here: the one passed
to `map`, and the one passed to `thread::scoped`. In this case, the closure for
`thread::scoped` is attempting to reference `numbers`, a `Vec<i32>`. This
closure is a `FnOnce` closure, as that’s what `thread::scoped` takes as an
argument. `FnOnce` closures take ownership of their environment. That’s fine,
but there’s one detail: because of `map`, we’re going to make three of these
closures. And since all three try to take ownership of `numbers`, that would be
a problem. That’s what it means by ‘cannot move out of captured outer
variable’: our `thread::scoped` closure wants to take ownership, and it can’t,
because the closure for `map` won’t let it.

What to do here? Rust has two types that helps us: `Arc<T>` and `Mutex<T>`.
*Arc* stands for "atomically reference counted". In other words, an Arc will
Expand Down
12 changes: 7 additions & 5 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,7 @@ may optionally begin with any number of `attributes` that apply to the
containing module. Attributes on the anonymous crate module define important
metadata that influences the behavior of the compiler.

```{.rust}
# #![allow(unused_attribute)]
```no_run
// Crate name
#![crate_name = "projx"]

Expand Down Expand Up @@ -1020,6 +1019,7 @@ Use declarations support a number of convenient shortcuts:
An example of `use` declarations:

```
# #![feature(core)]
use std::iter::range_step;
use std::option::Option::{Some, None};
use std::collections::hash_map::{self, HashMap};
Expand Down Expand Up @@ -1080,6 +1080,7 @@ declarations.
An example of what will and will not work for `use` items:

```
# #![feature(core)]
# #![allow(unused_imports)]
use foo::core::iter; // good: foo is at the root of the crate
use foo::baz::foobaz; // good: foo is at the root of the crate
Expand Down Expand Up @@ -1264,7 +1265,7 @@ be undesired.
* Sending signals
* Accessing/modifying the file system
* Unsigned integer overflow (well-defined as wrapping)
* Signed integer overflow (well-defined as two's complement representation
* Signed integer overflow (well-defined as twos complement representation
wrapping)

#### Diverging functions
Expand Down Expand Up @@ -1781,6 +1782,7 @@ functions, with the exception that they may not have a body and are instead
terminated by a semicolon.

```
# #![feature(libc)]
extern crate libc;
use libc::{c_char, FILE};

Expand Down Expand Up @@ -2959,10 +2961,10 @@ meaning of the operators on standard types is given here.
: Exclusive or.
Calls the `bitxor` method of the `std::ops::BitXor` trait.
* `<<`
: Logical left shift.
: Left shift.
Calls the `shl` method of the `std::ops::Shl` trait.
* `>>`
: Logical right shift.
: Right shift.
Calls the `shr` method of the `std::ops::Shr` trait.

#### Lazy boolean operators
Expand Down
1 change: 1 addition & 0 deletions src/doc/trpl/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* [More Strings](more-strings.md)
* [Patterns](patterns.md)
* [Method Syntax](method-syntax.md)
* [Associated Types](associated-types.md)
* [Closures](closures.md)
* [Iterators](iterators.md)
* [Generics](generics.md)
Expand Down
Loading