Skip to content
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

Rollup of 12 pull requests #56506

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c209ed8
Improve no result found sentence in doc search
GuillaumeGomez Nov 1, 2018
dd717de
Add crate filtering
GuillaumeGomez Sep 30, 2018
8062c7a
Add test for crate filtering
GuillaumeGomez Sep 30, 2018
afe4107
Add arrow to the crate select box
GuillaumeGomez Nov 29, 2018
1560a75
Refer to the second borrow as the "second borrow".
wildarch Nov 30, 2018
d92287a
Fix some rustc doc links
matthewjasper Nov 30, 2018
4f5b8ea
Remove the `region_map` field from `BorrowSet`
matthewjasper Nov 30, 2018
6000c2e
Use visit_local to find 2PB activations
matthewjasper Nov 30, 2018
3b705a0
rustbuild: Fix issues with compiler docs
ollie27 Dec 2, 2018
f31b6ab
Move former compile-fail-fulldeps tests to ui
petrochenkov Dec 2, 2018
39a4238
Move compile-fail-fulldeps tests to ui-fulldeps
petrochenkov Dec 2, 2018
7a3d7b1
Move some tests from ui-fulldeps to ui
petrochenkov Dec 2, 2018
3d809d3
Remove compile-fail-fulldeps test suite
petrochenkov Dec 2, 2018
380dd7d
Add rc::Weak.ptr_eq
Thomasdezeeuw Nov 15, 2018
d4b41fa
Add sync::Weak::ptr_eq
Thomasdezeeuw Nov 15, 2018
38e21f9
Fix link in Weak::new
Thomasdezeeuw Nov 23, 2018
1fb82b5
Handle existential types in dead code analysis
oli-obk Dec 3, 2018
651373c
data_structures: remove tuple_slice
ljedrz Dec 3, 2018
9c8802d
Explain raw identifer syntax
mark-i-m Dec 2, 2018
0b40be6
link to raw identifiers
mark-i-m Dec 2, 2018
3f253f5
Improve filter test
GuillaumeGomez Dec 3, 2018
11af6f6
Use iterator and pattern APIs instead of `char_at`
sinkuu Oct 27, 2018
4e31282
Fix test
sinkuu Oct 29, 2018
8c4129c
cleanup: remove static lifetimes from consts in libstd
ljedrz Dec 4, 2018
7ffd99e
Rollup merge of #55466 - sinkuu:cleanup, r=petrochenkov
kennytm Dec 4, 2018
1bca455
Rollup merge of #55563 - GuillaumeGomez:doc-search-sentence, r=QuietM…
kennytm Dec 4, 2018
8a5cb26
Rollup merge of #55987 - Thomasdezeeuw:weak-ptr_eq, r=sfackler
kennytm Dec 4, 2018
40337a1
Rollup merge of #56332 - GuillaumeGomez:specifi-crate-search, r=Quiet…
kennytm Dec 4, 2018
8d4f83e
Rollup merge of #56372 - wildarch:issue-55314-second-borrow-ref, r=da…
kennytm Dec 4, 2018
491411b
Rollup merge of #56388 - matthewjasper:more-lexical-mir-cleanup, r=ni…
kennytm Dec 4, 2018
8f746a6
Rollup merge of #56424 - mark-i-m:explain-raw, r=Centril
kennytm Dec 4, 2018
3dfaeab
Rollup merge of #56441 - ollie27:rustbuild_compiler_docs, r=alexcrichton
kennytm Dec 4, 2018
2d7e7cf
Rollup merge of #56444 - petrochenkov:uifull, r=davidtwco
kennytm Dec 4, 2018
939de36
Rollup merge of #56456 - oli-obk:private_impl_trait, r=cramertj
kennytm Dec 4, 2018
5985875
Rollup merge of #56466 - ljedrz:delete_tuple_slice, r=nikomatsakis
kennytm Dec 4, 2018
81d043b
Rollup merge of #56497 - ljedrz:cleanup_libstd_const_lifetimes, r=ken…
kennytm Dec 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ impl<'a> Builder<'a> {
test::UiFullDeps,
test::RunPassFullDeps,
test::RunFailFullDeps,
test::CompileFailFullDeps,
test::Rustdoc,
test::Pretty,
test::RunPassPretty,
Expand Down
17 changes: 11 additions & 6 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,6 @@ impl Step for Rustc {
return;
}

// Build libstd docs so that we generate relative links.
builder.ensure(Std { stage, target });

// Build rustc.
builder.ensure(compile::Rustc { compiler, target });

Expand All @@ -718,12 +715,16 @@ impl Step for Rustc {

// Find dependencies for top level crates.
let mut compiler_crates = HashSet::new();
for root_crate in &["rustc", "rustc_driver", "rustc_codegen_llvm"] {
for root_crate in &["rustc_driver", "rustc_codegen_llvm", "rustc_codegen_ssa"] {
let interned_root_crate = INTERNER.intern_str(root_crate);
find_compiler_crates(builder, &interned_root_crate, &mut compiler_crates);
}

for krate in &compiler_crates {
// Create all crate output directories first to make sure rustdoc uses
// relative links.
// FIXME: Cargo should probably do this itself.
t!(fs::create_dir_all(out_dir.join(krate)));
cargo.arg("-p").arg(krate);
}

Expand Down Expand Up @@ -797,8 +798,8 @@ impl Step for Rustdoc {
return;
}

// Build libstd docs so that we generate relative links.
builder.ensure(Std { stage, target });
// Build rustc docs so that we generate relative links.
builder.ensure(Rustc { stage, target });

// Build rustdoc.
builder.ensure(tool::Rustdoc { host: compiler.host });
Expand All @@ -822,6 +823,10 @@ impl Step for Rustdoc {
&[]
);

// Only include compiler crates, no dependencies of those, such as `libc`.
cargo.arg("--no-deps");
cargo.arg("-p").arg("rustdoc");

cargo.env("RUSTDOCFLAGS", "--document-private-items");
builder.run(&mut cargo);
}
Expand Down
6 changes: 0 additions & 6 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -833,12 +833,6 @@ host_test!(RunFailFullDeps {
suite: "run-fail-fulldeps"
});

host_test!(CompileFailFullDeps {
path: "src/test/compile-fail-fulldeps",
mode: "compile-fail",
suite: "compile-fail-fulldeps"
});

host_test!(Rustdoc {
path: "src/test/rustdoc",
mode: "rustdoc",
Expand Down
49 changes: 48 additions & 1 deletion src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1187,8 +1187,9 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {}

impl<T> Weak<T> {
/// Constructs a new `Weak<T>`, without allocating any memory.
/// Calling [`upgrade`][Weak::upgrade] on the return value always gives [`None`].
/// Calling [`upgrade`] on the return value always gives [`None`].
///
/// [`upgrade`]: #method.upgrade
/// [`None`]: ../../std/option/enum.Option.html
///
/// # Examples
Expand Down Expand Up @@ -1260,6 +1261,52 @@ impl<T: ?Sized> Weak<T> {
Some(unsafe { self.ptr.as_ref() })
}
}

/// Returns true if the two `Weak`s point to the same value (not just values
/// that compare as equal).
///
/// # Notes
///
/// Since this compares pointers it means that `Weak::new()` will equal each
/// other, even though they don't point to any value.
///
/// # Examples
///
/// ```
/// #![feature(weak_ptr_eq)]
/// use std::rc::{Rc, Weak};
///
/// let first_rc = Rc::new(5);
/// let first = Rc::downgrade(&first_rc);
/// let second = Rc::downgrade(&first_rc);
///
/// assert!(Weak::ptr_eq(&first, &second));
///
/// let third_rc = Rc::new(5);
/// let third = Rc::downgrade(&third_rc);
///
/// assert!(!Weak::ptr_eq(&first, &third));
/// ```
///
/// Comparing `Weak::new`.
///
/// ```
/// #![feature(weak_ptr_eq)]
/// use std::rc::{Rc, Weak};
///
/// let first = Weak::new();
/// let second = Weak::new();
/// assert!(Weak::ptr_eq(&first, &second));
///
/// let third_rc = Rc::new(());
/// let third = Rc::downgrade(&third_rc);
/// assert!(!Weak::ptr_eq(&first, &third));
/// ```
#[inline]
#[unstable(feature = "weak_ptr_eq", issue = "55981")]
pub fn ptr_eq(this: &Self, other: &Self) -> bool {
this.ptr.as_ptr() == other.ptr.as_ptr()
}
}

#[stable(feature = "rc_weak", since = "1.4.0")]
Expand Down
47 changes: 47 additions & 0 deletions src/liballoc/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,53 @@ impl<T: ?Sized> Weak<T> {
Some(unsafe { self.ptr.as_ref() })
}
}

/// Returns true if the two `Weak`s point to the same value (not just values
/// that compare as equal).
///
/// # Notes
///
/// Since this compares pointers it means that `Weak::new()` will equal each
/// other, even though they don't point to any value.
///
///
/// # Examples
///
/// ```
/// #![feature(weak_ptr_eq)]
/// use std::sync::{Arc, Weak};
///
/// let first_rc = Arc::new(5);
/// let first = Arc::downgrade(&first_rc);
/// let second = Arc::downgrade(&first_rc);
///
/// assert!(Weak::ptr_eq(&first, &second));
///
/// let third_rc = Arc::new(5);
/// let third = Arc::downgrade(&third_rc);
///
/// assert!(!Weak::ptr_eq(&first, &third));
/// ```
///
/// Comparing `Weak::new`.
///
/// ```
/// #![feature(weak_ptr_eq)]
/// use std::sync::{Arc, Weak};
///
/// let first = Weak::new();
/// let second = Weak::new();
/// assert!(Weak::ptr_eq(&first, &second));
///
/// let third_rc = Arc::new(());
/// let third = Arc::downgrade(&third_rc);
/// assert!(!Weak::ptr_eq(&first, &third));
/// ```
#[inline]
#[unstable(feature = "weak_ptr_eq", issue = "55981")]
pub fn ptr_eq(this: &Self, other: &Self) -> bool {
this.ptr.as_ptr() == other.ptr.as_ptr()
}
}

#[stable(feature = "arc_weak", since = "1.4.0")]
Expand Down
4 changes: 4 additions & 0 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ macro_rules! debug_assert_ne {
/// with converting downstream errors.
///
/// The `?` operator was added to replace `try!` and should be used instead.
/// Furthermore, `try` is a reserved word in Rust 2018, so if you must use
/// it, you will need to use the [raw-identifier syntax][ris]: `r#try`.
///
/// [ris]: https://doc.rust-lang.org/nightly/rust-by-example/compatibility/raw_identifiers.html
///
/// `try!` matches the given [`Result`]. In case of the `Ok` variant, the
/// expression has the value of the wrapped value.
Expand Down
1 change: 1 addition & 0 deletions src/librustc/middle/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
hir::ItemKind::Fn(..)
| hir::ItemKind::Ty(..)
| hir::ItemKind::Static(..)
| hir::ItemKind::Existential(..)
| hir::ItemKind::Const(..) => {
intravisit::walk_item(self, &item);
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_borrowck/borrowck/check_loans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
let new_loan_str = &new_loan.kind.to_user_str();
self.bccx.cannot_reborrow_already_uniquely_borrowed(
new_loan.span, "closure", &nl, &new_loan_msg, new_loan_str,
old_loan.span, &old_loan_msg, previous_end_span, Origin::Ast)
old_loan.span, &old_loan_msg, previous_end_span, "", Origin::Ast)
}
(..) =>
self.bccx.cannot_reborrow_already_borrowed(
Expand Down
1 change: 0 additions & 1 deletion src/librustc_data_structures/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub mod sync;
pub mod tiny_list;
pub mod thin_vec;
pub mod transitive_relation;
pub mod tuple_slice;
pub use ena::unify;
pub mod vec_linked_list;
pub mod work_queue;
Expand Down
70 changes: 0 additions & 70 deletions src/librustc_data_structures/tuple_slice.rs

This file was deleted.

Loading