Skip to content

Commit d292bc5

Browse files
committed
---
yaml --- r: 274663 b: refs/heads/stable c: f08626b h: refs/heads/master i: 274661: 4372ee7 274659: da1c4c0 274655: 7a7dfc2
1 parent 48b3060 commit d292bc5

File tree

16 files changed

+57
-182
lines changed

16 files changed

+57
-182
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 04f12ef4f775cf367f2e34b99d498d51e677a15e
32+
refs/heads/stable: f08626bc9b99eef97dbb78a8ac5f7dec958c0be7
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/man/rustc.1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ rustc \- The Rust compiler
66
[\fIOPTIONS\fR] \fIINPUT\fR
77

88
.SH DESCRIPTION
9-
This program is a compiler for the Rust language, available at https://www.rust\-lang.org.
9+
This program is a compiler for the Rust language, available at
10+
.UR https://www.rust\-lang.org
11+
.UE .
1012

1113
.SH OPTIONS
1214

@@ -296,7 +298,10 @@ To build an executable with debug info:
296298
.BR rustdoc (1)
297299

298300
.SH "BUGS"
299-
See https://github.com/rust\-lang/rust/issues for issues.
301+
See
302+
.UR https://github.com/rust\-lang/rust/issues
303+
.UE
304+
for issues.
300305

301306
.SH "AUTHOR"
302307
See \fIAUTHORS.txt\fR in the Rust source distribution.

branches/stable/man/rustdoc.1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ rustdoc \- generate documentation from Rust source code
88
.SH DESCRIPTION
99
This tool generates API reference documentation by extracting comments from
1010
source code written in the Rust language, available at
11-
<\fBhttps://www.rust-lang.org\fR>. It accepts several input formats and
12-
provides several output formats for the generated documentation.
11+
.UR https://www.rust\-lang.org
12+
.UE .
13+
It accepts several input formats and provides several output formats
14+
for the generated documentation.
1315

1416
.SH OPTIONS
1517

@@ -129,7 +131,9 @@ The generated HTML can be viewed with any standard web browser.
129131
.BR rustc (1)
130132

131133
.SH "BUGS"
132-
See <\fBhttps://github.com/rust\-lang/rust/issues\fR>
134+
See
135+
.UR https://github.com/rust\-lang/rust/issues
136+
.UE
133137
for issues.
134138

135139
.SH "AUTHOR"

branches/stable/src/libcore/ptr.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ impl<T: ?Sized> PartialOrd for *mut T {
465465
fn ge(&self, other: &*mut T) -> bool { *self >= *other }
466466
}
467467

468-
/// A wrapper around a raw non-null `*mut T` that indicates that the possessor
468+
/// A wrapper around a raw `*mut T` that indicates that the possessor
469469
/// of this wrapper owns the referent. This in turn implies that the
470470
/// `Unique<T>` is `Send`/`Sync` if `T` is `Send`/`Sync`, unlike a raw
471471
/// `*mut T` (which conveys no particular ownership semantics). It
@@ -502,10 +502,6 @@ unsafe impl<T: Sync + ?Sized> Sync for Unique<T> { }
502502
#[unstable(feature = "unique", issue = "27730")]
503503
impl<T: ?Sized> Unique<T> {
504504
/// Creates a new `Unique`.
505-
///
506-
/// # Safety
507-
///
508-
/// `ptr` must be non-null.
509505
pub const unsafe fn new(ptr: *mut T) -> Unique<T> {
510506
Unique { pointer: NonZero::new(ptr), _marker: PhantomData }
511507
}
@@ -541,7 +537,7 @@ impl<T> fmt::Pointer for Unique<T> {
541537
}
542538
}
543539

544-
/// A wrapper around a raw non-null `*mut T` that indicates that the possessor
540+
/// A wrapper around a raw `*mut T` that indicates that the possessor
545541
/// of this wrapper has shared ownership of the referent. Useful for
546542
/// building abstractions like `Rc<T>` or `Arc<T>`, which internally
547543
/// use raw pointers to manage the memory that they own.
@@ -570,10 +566,6 @@ impl<T: ?Sized> !Sync for Shared<T> { }
570566
#[unstable(feature = "shared", issue = "27730")]
571567
impl<T: ?Sized> Shared<T> {
572568
/// Creates a new `Shared`.
573-
///
574-
/// # Safety
575-
///
576-
/// `ptr` must be non-null.
577569
pub unsafe fn new(ptr: *mut T) -> Self {
578570
Shared { pointer: NonZero::new(ptr), _marker: PhantomData }
579571
}

branches/stable/src/librustc/middle/infer/region_inference/mod.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,14 +1105,7 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> {
11051105
for _ in 0..num_vars {
11061106
graph.add_node(());
11071107
}
1108-
1109-
// Issue #30438: two distinct dummy nodes, one for incoming
1110-
// edges (dummy_source) and another for outgoing edges
1111-
// (dummy_sink). In `dummy -> a -> b -> dummy`, using one
1112-
// dummy node leads one to think (erroneously) there exists a
1113-
// path from `b` to `a`. Two dummy nodes sidesteps the issue.
1114-
let dummy_source = graph.add_node(());
1115-
let dummy_sink = graph.add_node(());
1108+
let dummy_idx = graph.add_node(());
11161109

11171110
for (constraint, _) in constraints.iter() {
11181111
match *constraint {
@@ -1122,10 +1115,10 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> {
11221115
*constraint);
11231116
}
11241117
ConstrainRegSubVar(_, b_id) => {
1125-
graph.add_edge(dummy_source, NodeIndex(b_id.index as usize), *constraint);
1118+
graph.add_edge(dummy_idx, NodeIndex(b_id.index as usize), *constraint);
11261119
}
11271120
ConstrainVarSubReg(a_id, _) => {
1128-
graph.add_edge(NodeIndex(a_id.index as usize), dummy_sink, *constraint);
1121+
graph.add_edge(NodeIndex(a_id.index as usize), dummy_idx, *constraint);
11291122
}
11301123
}
11311124
}

branches/stable/src/librustc_back/target/windows_base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ pub fn opts() -> TargetOptions {
8484
"rsend.o".to_string()
8585
),
8686
custom_unwind_resume: true,
87+
exe_allocation_crate: super::maybe_jemalloc(),
8788

8889
.. Default::default()
8990
}

branches/stable/src/librustc_back/target/x86_64_rumprun_netbsd.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pub fn target() -> Target {
2121
base.position_independent_executables = false;
2222
base.disable_redzone = true;
2323
base.no_default_libraries = false;
24-
base.exe_allocation_crate = "alloc_system".to_string();
2524

2625
Target {
2726
llvm_target: "x86_64-rumprun-netbsd".to_string(),

branches/stable/src/librustc_mir/build/expr/into.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
6363
} else {
6464
// Body of the `if` expression without an `else` clause must return `()`, thus
6565
// we implicitly generate a `else {}` if it is not specified.
66-
this.cfg.push_assign_unit(else_block, expr_span, destination);
66+
this.cfg.push_assign_unit(else_block, expr_span, &Lvalue::ReturnPointer);
6767
else_block
6868
};
6969

branches/stable/src/librustc_trans/trans/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>(
421421
}
422422
}, ArgVals(&llargs[(self_idx + 1)..]), dest).bcx;
423423

424-
fcx.pop_custom_cleanup_scope(self_scope);
424+
fcx.pop_and_trans_custom_cleanup_scope(bcx, self_scope);
425425

426426
finish_fn(&fcx, bcx, sig.output, DebugLoc::None);
427427

branches/stable/src/libstd/fs.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,46 +1940,12 @@ mod tests {
19401940
check!(fs::create_dir_all(&d2));
19411941
check!(check!(File::create(&canary)).write(b"foo"));
19421942
check!(symlink_junction(&d2, &dt.join("d2")));
1943-
let _ = symlink_file(&canary, &d1.join("canary"));
19441943
check!(fs::remove_dir_all(&d1));
19451944

19461945
assert!(!d1.is_dir());
19471946
assert!(canary.exists());
19481947
}
19491948

1950-
#[test]
1951-
fn recursive_rmdir_of_symlink() {
1952-
// test we do not recursively delete a symlink but only dirs.
1953-
let tmpdir = tmpdir();
1954-
let link = tmpdir.join("d1");
1955-
let dir = tmpdir.join("d2");
1956-
let canary = dir.join("do_not_delete");
1957-
check!(fs::create_dir_all(&dir));
1958-
check!(check!(File::create(&canary)).write(b"foo"));
1959-
check!(symlink_junction(&dir, &link));
1960-
check!(fs::remove_dir_all(&link));
1961-
1962-
assert!(!link.is_dir());
1963-
assert!(canary.exists());
1964-
}
1965-
1966-
#[test]
1967-
// only Windows makes a distinction between file and directory symlinks.
1968-
#[cfg(windows)]
1969-
fn recursive_rmdir_of_file_symlink() {
1970-
let tmpdir = tmpdir();
1971-
if !got_symlink_permission(&tmpdir) { return };
1972-
1973-
let f1 = tmpdir.join("f1");
1974-
let f2 = tmpdir.join("f2");
1975-
check!(check!(File::create(&f1)).write(b"foo"));
1976-
check!(symlink_file(&f1, &f2));
1977-
match fs::remove_dir_all(&f2) {
1978-
Ok(..) => panic!("wanted a failure"),
1979-
Err(..) => {}
1980-
}
1981-
}
1982-
19831949
#[test]
19841950
fn unicode_path_is_dir() {
19851951
assert!(Path::new(".").is_dir());

branches/stable/src/libstd/sys/unix/fs.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -627,19 +627,10 @@ pub fn rmdir(p: &Path) -> io::Result<()> {
627627
}
628628

629629
pub fn remove_dir_all(path: &Path) -> io::Result<()> {
630-
let filetype = try!(lstat(path)).file_type();
631-
if filetype.is_symlink() {
632-
unlink(path)
633-
} else {
634-
remove_dir_all_recursive(path)
635-
}
636-
}
637-
638-
fn remove_dir_all_recursive(path: &Path) -> io::Result<()> {
639630
for child in try!(readdir(path)) {
640631
let child = try!(child);
641632
if try!(child.file_type()).is_dir() {
642-
try!(remove_dir_all_recursive(&child.path()));
633+
try!(remove_dir_all(&child.path()));
643634
} else {
644635
try!(unlink(&child.path()));
645636
}

branches/stable/src/libstd/sys/windows/fs.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -552,22 +552,11 @@ pub fn rmdir(p: &Path) -> io::Result<()> {
552552
}
553553

554554
pub fn remove_dir_all(path: &Path) -> io::Result<()> {
555-
let filetype = try!(lstat(path)).file_type();
556-
if filetype.is_symlink() {
557-
// On Windows symlinks to files and directories are removed differently.
558-
// rmdir only deletes dir symlinks and junctions, not file symlinks.
559-
rmdir(path)
560-
} else {
561-
remove_dir_all_recursive(path)
562-
}
563-
}
564-
565-
fn remove_dir_all_recursive(path: &Path) -> io::Result<()> {
566555
for child in try!(readdir(path)) {
567556
let child = try!(child);
568557
let child_type = try!(child.file_type());
569558
if child_type.is_dir() {
570-
try!(remove_dir_all_recursive(&child.path()));
559+
try!(remove_dir_all(&child.path()));
571560
} else if child_type.is_symlink_dir() {
572561
try!(rmdir(&child.path()));
573562
} else {

branches/stable/src/test/compile-fail/issue-30438-a.rs

Lines changed: 0 additions & 33 deletions
This file was deleted.

branches/stable/src/test/compile-fail/issue-30438-b.rs

Lines changed: 0 additions & 34 deletions
This file was deleted.

branches/stable/src/test/compile-fail/issue-30438-c.rs

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
struct Foo<'a>(&'a mut bool);
12+
13+
impl<'a> Drop for Foo<'a> {
14+
fn drop(&mut self) {
15+
*self.0 = true;
16+
}
17+
}
18+
19+
fn f<T: FnOnce()>(t: T) {
20+
t()
21+
}
22+
23+
fn main() {
24+
let mut ran_drop = false;
25+
{
26+
let x = Foo(&mut ran_drop);
27+
let x = move || { let _ = x; };
28+
f(x);
29+
}
30+
assert!(ran_drop);
31+
}
32+

0 commit comments

Comments
 (0)