Skip to content

Commit 9219dc3

Browse files
committed
---
yaml --- r: 190292 b: refs/heads/master c: 1f5f76a h: refs/heads/master v: v3
1 parent 8f83aee commit 9219dc3

32 files changed

+600
-463
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: b4f5e78b467fff62bcb5287f34940fd0037f2216
2+
refs/heads/master: 1f5f76adc36082ec514a6cfa4ad2d7e6655a5253
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 270a677d4d698916f5ad103f0afc3c070b8dbeb4
55
refs/heads/try: 1c28ab65017d74fc13d003f7c7a73d1a48e5406f

trunk/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,11 +823,11 @@ then
823823
LLVM_VERSION=$($LLVM_CONFIG --version)
824824

825825
case $LLVM_VERSION in
826-
(3.[5-6]*)
826+
(3.[2-6]*)
827827
msg "found ok version of LLVM: $LLVM_VERSION"
828828
;;
829829
(*)
830-
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
830+
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
831831
;;
832832
esac
833833
fi

trunk/mk/main.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
290290
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
291291
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
292292
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
293-
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
294293
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
295294
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
296295
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

trunk/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8484
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) \
8585
$$(RUST_LIB_FLAGS_ST$(1)) \
8686
-L "$$(RT_OUTPUT_DIR_$(2))" \
87-
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
87+
-L "$$(LLVM_LIBDIR_$(2))" \
8888
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
8989
$$(RUSTFLAGS_$(4)) \
9090
--out-dir $$(@D) \

trunk/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
372372
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
373373
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
374374
-L "$$(RT_OUTPUT_DIR_$(2))" \
375-
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
375+
-L "$$(LLVM_LIBDIR_$(2))" \
376376
$$(RUSTFLAGS_$(4))
377377

378378
endef

trunk/src/doc/trpl/closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ is that a moving closure always takes ownership of all variables that
6868
it uses. Ordinary closures, in contrast, just create a reference into
6969
the enclosing stack frame. Moving closures are most useful with Rust's
7070
concurrency features, and so we'll just leave it at this for
71-
now. We'll talk about them more in the "Concurrency" chapter of the book.
71+
now. We'll talk about them more in the "Threads" section of the guide.
7272

7373
## Accepting closures as arguments
7474

trunk/src/doc/trpl/concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ fn main() {
339339
});
340340
}
341341
342-
rx.recv().ok().expect("Could not receive answer");
342+
rx.recv().ok().expect("Could not recieve answer");
343343
}
344344
```
345345

trunk/src/doc/trpl/method-syntax.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ impl CircleBuilder {
187187
}
188188
189189
fn coordinate(&mut self, coordinate: f64) -> &mut CircleBuilder {
190-
self.coordinate = coordinate;
191-
self
190+
self.coordinate = coordinate;
191+
self
192192
}
193193
194194
fn radius(&mut self, radius: f64) -> &mut CircleBuilder {
195-
self.radius = radius;
196-
self
195+
self.radius = radius;
196+
self
197197
}
198198
199199
fn finalize(&self) -> Circle {

trunk/src/librustc/session/search_paths.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use std::slice;
1212
use std::path::{Path, PathBuf};
13-
use session::early_error;
1413

1514
#[derive(Clone, Debug)]
1615
pub struct SearchPaths {
@@ -51,9 +50,6 @@ impl SearchPaths {
5150
} else {
5251
(PathKind::All, path)
5352
};
54-
if path.is_empty() {
55-
early_error("empty search path given via `-L`");
56-
}
5753
self.paths.push((kind, PathBuf::new(path)));
5854
}
5955

trunk/src/librustc_lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ impl NonCamelCaseTypes {
811811
if i == 0 {
812812
c.to_uppercase().collect::<String>()
813813
} else {
814-
c.to_lowercase().collect()
814+
c.to_string()
815815
}
816816
)).collect::<Vec<_>>().concat()
817817
}

trunk/src/librustc_trans/trans/tvec.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ pub fn write_content<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
293293
}
294294
SaveIn(lldest) => {
295295
match ty::eval_repeat_count(bcx.tcx(), &**count_expr) {
296-
0 => expr::trans_into(bcx, &**element, Ignore),
296+
0 => bcx,
297297
1 => expr::trans_into(bcx, &**element, SaveIn(lldest)),
298298
count => {
299299
let elem = unpack_datum!(bcx, expr::trans(bcx, &**element));
@@ -410,12 +410,8 @@ pub fn iter_vec_loop<'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
410410
F: FnOnce(Block<'blk, 'tcx>, ValueRef, Ty<'tcx>) -> Block<'blk, 'tcx>,
411411
{
412412
let _icx = push_ctxt("tvec::iter_vec_loop");
413-
414-
if bcx.unreachable.get() {
415-
return bcx;
416-
}
417-
418413
let fcx = bcx.fcx;
414+
419415
let loop_bcx = fcx.new_temp_block("expr_repeat");
420416
let next_bcx = fcx.new_temp_block("expr_repeat: next");
421417

trunk/src/libstd/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ pub fn get_exit_status() -> i32 {
452452
EXIT_STATUS.load(Ordering::SeqCst) as i32
453453
}
454454

455-
/// An iterator over the arguments of a process, yielding a `String` value
455+
/// An iterator over the arguments of a process, yielding an `String` value
456456
/// for each argument.
457457
///
458458
/// This structure is created through the `std::env::args` method.

trunk/src/libstd/fs/mod.rs

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl File {
124124
/// This function will return an error if `path` does not already exist.
125125
/// Other errors may also be returned according to `OpenOptions::open`.
126126
#[stable(feature = "rust1", since = "1.0.0")]
127-
pub fn open<P: AsPath>(path: P) -> io::Result<File> {
127+
pub fn open<P: AsPath + ?Sized>(path: &P) -> io::Result<File> {
128128
OpenOptions::new().read(true).open(path)
129129
}
130130

@@ -135,7 +135,7 @@ impl File {
135135
///
136136
/// See the `OpenOptions::open` function for more details.
137137
#[stable(feature = "rust1", since = "1.0.0")]
138-
pub fn create<P: AsPath>(path: P) -> io::Result<File> {
138+
pub fn create<P: AsPath + ?Sized>(path: &P) -> io::Result<File> {
139139
OpenOptions::new().write(true).create(true).truncate(true).open(path)
140140
}
141141

@@ -297,7 +297,7 @@ impl OpenOptions {
297297
/// permissions for
298298
/// * Filesystem-level errors (full disk, etc)
299299
#[stable(feature = "rust1", since = "1.0.0")]
300-
pub fn open<P: AsPath>(&self, path: P) -> io::Result<File> {
300+
pub fn open<P: AsPath + ?Sized>(&self, path: &P) -> io::Result<File> {
301301
let path = path.as_path();
302302
let inner = try!(fs_imp::File::open(path, &self.0));
303303
Ok(File { path: path.to_path_buf(), inner: inner })
@@ -410,7 +410,7 @@ impl DirEntry {
410410
/// user lacks permissions to remove the file, or if some other filesystem-level
411411
/// error occurs.
412412
#[stable(feature = "rust1", since = "1.0.0")]
413-
pub fn remove_file<P: AsPath>(path: P) -> io::Result<()> {
413+
pub fn remove_file<P: AsPath + ?Sized>(path: &P) -> io::Result<()> {
414414
fs_imp::unlink(path.as_path())
415415
}
416416

@@ -438,7 +438,7 @@ pub fn remove_file<P: AsPath>(path: P) -> io::Result<()> {
438438
/// permissions to perform a `metadata` call on the given `path` or if there
439439
/// is no entry in the filesystem at the provided path.
440440
#[stable(feature = "rust1", since = "1.0.0")]
441-
pub fn metadata<P: AsPath>(path: P) -> io::Result<Metadata> {
441+
pub fn metadata<P: AsPath + ?Sized>(path: &P) -> io::Result<Metadata> {
442442
fs_imp::stat(path.as_path()).map(Metadata)
443443
}
444444

@@ -459,7 +459,8 @@ pub fn metadata<P: AsPath>(path: P) -> io::Result<Metadata> {
459459
/// reside on separate filesystems, or if some other intermittent I/O error
460460
/// occurs.
461461
#[stable(feature = "rust1", since = "1.0.0")]
462-
pub fn rename<P: AsPath, Q: AsPath>(from: P, to: Q) -> io::Result<()> {
462+
pub fn rename<P: AsPath + ?Sized, Q: AsPath + ?Sized>(from: &P, to: &Q)
463+
-> io::Result<()> {
463464
fs_imp::rename(from.as_path(), to.as_path())
464465
}
465466

@@ -489,9 +490,9 @@ pub fn rename<P: AsPath, Q: AsPath>(from: P, to: Q) -> io::Result<()> {
489490
/// * The current process does not have the permission rights to access
490491
/// `from` or write `to`
491492
#[stable(feature = "rust1", since = "1.0.0")]
492-
pub fn copy<P: AsPath, Q: AsPath>(from: P, to: Q) -> io::Result<u64> {
493+
pub fn copy<P: AsPath + ?Sized, Q: AsPath + ?Sized>(from: &P, to: &Q)
494+
-> io::Result<u64> {
493495
let from = from.as_path();
494-
let to = to.as_path();
495496
if !from.is_file() {
496497
return Err(Error::new(ErrorKind::MismatchedFileTypeForOperation,
497498
"the source path is not an existing file",
@@ -512,15 +513,17 @@ pub fn copy<P: AsPath, Q: AsPath>(from: P, to: Q) -> io::Result<u64> {
512513
/// The `dst` path will be a link pointing to the `src` path. Note that systems
513514
/// often require these two paths to both be located on the same filesystem.
514515
#[stable(feature = "rust1", since = "1.0.0")]
515-
pub fn hard_link<P: AsPath, Q: AsPath>(src: P, dst: Q) -> io::Result<()> {
516+
pub fn hard_link<P: AsPath + ?Sized, Q: AsPath + ?Sized>(src: &P, dst: &Q)
517+
-> io::Result<()> {
516518
fs_imp::link(src.as_path(), dst.as_path())
517519
}
518520

519521
/// Creates a new soft link on the filesystem.
520522
///
521523
/// The `dst` path will be a soft link pointing to the `src` path.
522524
#[stable(feature = "rust1", since = "1.0.0")]
523-
pub fn soft_link<P: AsPath, Q: AsPath>(src: P, dst: Q) -> io::Result<()> {
525+
pub fn soft_link<P: AsPath + ?Sized, Q: AsPath + ?Sized>(src: &P, dst: &Q)
526+
-> io::Result<()> {
524527
fs_imp::symlink(src.as_path(), dst.as_path())
525528
}
526529

@@ -532,7 +535,7 @@ pub fn soft_link<P: AsPath, Q: AsPath>(src: P, dst: Q) -> io::Result<()> {
532535
/// reading a file that does not exist or reading a file that is not a soft
533536
/// link.
534537
#[stable(feature = "rust1", since = "1.0.0")]
535-
pub fn read_link<P: AsPath>(path: P) -> io::Result<PathBuf> {
538+
pub fn read_link<P: AsPath + ?Sized>(path: &P) -> io::Result<PathBuf> {
536539
fs_imp::readlink(path.as_path())
537540
}
538541

@@ -551,7 +554,7 @@ pub fn read_link<P: AsPath>(path: P) -> io::Result<PathBuf> {
551554
/// This function will return an error if the user lacks permissions to make a
552555
/// new directory at the provided `path`, or if the directory already exists.
553556
#[stable(feature = "rust1", since = "1.0.0")]
554-
pub fn create_dir<P: AsPath>(path: P) -> io::Result<()> {
557+
pub fn create_dir<P: AsPath + ?Sized>(path: &P) -> io::Result<()> {
555558
fs_imp::mkdir(path.as_path())
556559
}
557560

@@ -565,7 +568,7 @@ pub fn create_dir<P: AsPath>(path: P) -> io::Result<()> {
565568
/// error conditions for when a directory is being created (after it is
566569
/// determined to not exist) are outlined by `fs::create_dir`.
567570
#[stable(feature = "rust1", since = "1.0.0")]
568-
pub fn create_dir_all<P: AsPath>(path: P) -> io::Result<()> {
571+
pub fn create_dir_all<P: AsPath + ?Sized>(path: &P) -> io::Result<()> {
569572
let path = path.as_path();
570573
if path.is_dir() { return Ok(()) }
571574
if let Some(p) = path.parent() { try!(create_dir_all(p)) }
@@ -587,7 +590,7 @@ pub fn create_dir_all<P: AsPath>(path: P) -> io::Result<()> {
587590
/// This function will return an error if the user lacks permissions to remove
588591
/// the directory at the provided `path`, or if the directory isn't empty.
589592
#[stable(feature = "rust1", since = "1.0.0")]
590-
pub fn remove_dir<P: AsPath>(path: P) -> io::Result<()> {
593+
pub fn remove_dir<P: AsPath + ?Sized>(path: &P) -> io::Result<()> {
591594
fs_imp::rmdir(path.as_path())
592595
}
593596

@@ -601,7 +604,7 @@ pub fn remove_dir<P: AsPath>(path: P) -> io::Result<()> {
601604
///
602605
/// See `file::remove_file` and `fs::remove_dir`
603606
#[stable(feature = "rust1", since = "1.0.0")]
604-
pub fn remove_dir_all<P: AsPath>(path: P) -> io::Result<()> {
607+
pub fn remove_dir_all<P: AsPath + ?Sized>(path: &P) -> io::Result<()> {
605608
let path = path.as_path();
606609
for child in try!(read_dir(path)) {
607610
let child = try!(child).path();
@@ -654,7 +657,7 @@ pub fn remove_dir_all<P: AsPath>(path: P) -> io::Result<()> {
654657
/// the process lacks permissions to view the contents or if the `path` points
655658
/// at a non-directory file
656659
#[stable(feature = "rust1", since = "1.0.0")]
657-
pub fn read_dir<P: AsPath>(path: P) -> io::Result<ReadDir> {
660+
pub fn read_dir<P: AsPath + ?Sized>(path: &P) -> io::Result<ReadDir> {
658661
fs_imp::readdir(path.as_path()).map(ReadDir)
659662
}
660663

@@ -670,7 +673,7 @@ pub fn read_dir<P: AsPath>(path: P) -> io::Result<ReadDir> {
670673
reason = "the precise semantics and defaults for a recursive walk \
671674
may change and this may end up accounting for files such \
672675
as symlinks differently")]
673-
pub fn walk_dir<P: AsPath>(path: P) -> io::Result<WalkDir> {
676+
pub fn walk_dir<P: AsPath + ?Sized>(path: &P) -> io::Result<WalkDir> {
674677
let start = try!(read_dir(path));
675678
Ok(WalkDir { cur: Some(start), stack: Vec::new() })
676679
}
@@ -756,8 +759,8 @@ impl PathExt for Path {
756759
reason = "the argument type of u64 is not quite appropriate for \
757760
this function and may change if the standard library \
758761
gains a type to represent a moment in time")]
759-
pub fn set_file_times<P: AsPath>(path: P, accessed: u64,
760-
modified: u64) -> io::Result<()> {
762+
pub fn set_file_times<P: AsPath + ?Sized>(path: &P, accessed: u64,
763+
modified: u64) -> io::Result<()> {
761764
fs_imp::utimes(path.as_path(), accessed, modified)
762765
}
763766

@@ -785,7 +788,8 @@ pub fn set_file_times<P: AsPath>(path: P, accessed: u64,
785788
reason = "a more granual ability to set specific permissions may \
786789
be exposed on the Permissions structure itself and this \
787790
method may not always exist")]
788-
pub fn set_permissions<P: AsPath>(path: P, perm: Permissions) -> io::Result<()> {
791+
pub fn set_permissions<P: AsPath + ?Sized>(path: &P, perm: Permissions)
792+
-> io::Result<()> {
789793
fs_imp::set_perm(path.as_path(), perm.0)
790794
}
791795

trunk/src/libstd/io/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
// except according to those terms.
1010

1111
//! Traits, helpers, and type definitions for core I/O functionality.
12+
//!
13+
//! > **NOTE**: This module is very much a work in progress and is under active
14+
//! > development. At this time it is still recommended to use the `old_io`
15+
//! > module while the details of this module shake out.
1216
1317
#![stable(feature = "rust1", since = "1.0.0")]
1418

0 commit comments

Comments
 (0)