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 16 pull requests #64751

Merged
merged 74 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
9755fe8
Add fs::read_dir() and ReadDir warning about iterator order + example
Aug 7, 2019
8068812
Remove Iteration order heading
Aug 8, 2019
53c5046
Fix gramitcal error in read_dir example
Aug 15, 2019
3c820fe
Comment out println in read_dir sorting example
Aug 26, 2019
4dd4da9
remove directory libstd/sys/vxworks/backtrace which is not used any more
bpangWR Aug 30, 2019
d61605c
Don't call `self.parse()` in `Compiler::crate_name()` unless necessary.
nnethercote Aug 29, 2019
cd0c21b
Remove `lower_to_hir()` call from `prepare_output()`.
nnethercote Aug 30, 2019
91fd8ef
document the unstable iter_order_by library feature
KodrAus Sep 8, 2019
1161aeb
Replace println statements with explanatory comments
Sep 9, 2019
d264a56
Move call site of `dep_graph_future()`.
nnethercote Aug 30, 2019
04b27ef
Move to print functions on types instead of impl fmt::Display
Mark-Simulacrum Sep 12, 2019
ec349be
Unwrap Visibility fields
Mark-Simulacrum Sep 13, 2019
8a9dab3
Remove *Space wrappers in favor of direct impls or functions
Mark-Simulacrum Sep 13, 2019
3f144e1
Move Toc printing from fmt::Display
Mark-Simulacrum Sep 13, 2019
aa4055c
Simplify render_spotlight_traits
Mark-Simulacrum Sep 13, 2019
e0e0c37
Replace SlashChecker with ensure_trailing_slash
Mark-Simulacrum Sep 13, 2019
98c94f6
Move edition field out of Context
Mark-Simulacrum Sep 13, 2019
c265180
Move error codes to shared context
Mark-Simulacrum Sep 13, 2019
f4bb5a7
Move playground to shared context
Mark-Simulacrum Sep 13, 2019
f5ed0fd
Move `Cache` generation to separate module
Mark-Simulacrum Sep 13, 2019
6e0b0d4
Move cache into Context, avoid TLS
Mark-Simulacrum Sep 13, 2019
0ad789a
Stylistic fix -- remove double impl
Mark-Simulacrum Sep 13, 2019
2521189
Add a comment to `Compiler::compile()`.
nnethercote Aug 30, 2019
645cdca
reduce visibility of a bunch of stuff in ext::tt
matklad Sep 22, 2019
827a5b2
rename libsyntax::ext::tt to mbe
matklad Sep 22, 2019
49f849c
rename tt -> mbe, part 2
matklad Sep 22, 2019
e30c516
move mbe module to a separate file
matklad Sep 22, 2019
636b354
docstring for mbe module
matklad Sep 22, 2019
9fd75f5
pull mbe token tree definition up
matklad Sep 22, 2019
9835697
push TokenTree::parse down
matklad Sep 22, 2019
81fe857
make mbe::TokenTree private to module
matklad Sep 22, 2019
4ea371e
Delete iter-order-by.md
KodrAus Sep 23, 2019
0423c2a
Remove unused dependencies
sinkuu Sep 19, 2019
5f58834
Provide helper for synthesizing paths with resource suffix
Mark-Simulacrum Sep 13, 2019
61f1692
Remove needless Rc<RefCell<...>>
Mark-Simulacrum Sep 13, 2019
583a81d
Remove pointless or
Mark-Simulacrum Sep 13, 2019
53acfc3
Utilize shared error codes rather than re-querying env
Mark-Simulacrum Sep 13, 2019
cac7e5f
Remove unused arguments
Mark-Simulacrum Sep 13, 2019
059163f
Remove needless `mut` in paths
Mark-Simulacrum Sep 13, 2019
ae8b3e8
Introduce a diagnostic stashing API.
Centril Sep 23, 2019
62d8584
Add parser recovery for `const $ident = $expr;`.
Centril Sep 23, 2019
62fc4d3
stash_diagnostic: ICE in a different way
Centril Sep 23, 2019
8acf958
update test
andrewbanchich Sep 23, 2019
f70665a
cleanup librustc_errors Handler code.
Centril Sep 23, 2019
2753233
Merge pull request #28 from rust-lang/master
BaoshanPang Sep 23, 2019
cd88dae
Merge pull request #26 from rust-lang/master
n-salim Sep 23, 2019
4fd9b99
Add cycle detection for graphs
ecstatic-morse Sep 18, 2019
c9e4816
Add convenience function for detecting cyclic CFGs
ecstatic-morse Sep 18, 2019
b548814
remove rtp.rs, and move rtpSpawn and RTP_ID_ERROR to libc
bpangWR Sep 23, 2019
75ecbe2
Merge pull request #29 from Wind-River/cleanup
n-salim Sep 23, 2019
fa2cfaf
Fixed issue from #64447
hman523 Sep 23, 2019
a6da0e9
changed a line from an if else to std::cmp::max
hman523 Sep 24, 2019
5aa5d57
fix one typo
Sep 24, 2019
62dc794
fix several issues in String docs
jordins Sep 24, 2019
33e1dd7
Fix coherence checking for impl trait in type aliases
Aaron1011 Aug 27, 2019
e8cf46e
relnotes: make compatibility section more sterile and fix rustc version
pietroalbini Sep 24, 2019
61cfe92
Add additional tests for type alias impl trait coherence
Aaron1011 Sep 24, 2019
7b71abd
Fix #64744 -- handle zero sub-pats case.
Centril Sep 24, 2019
c623aa4
Rollup merge of #63356 - ali-raheem:issue#63183, r=KodrAus
Centril Sep 24, 2019
94628af
Rollup merge of #63934 - Aaron1011:fix/impl-trait-coherence, r=nikoma…
Centril Sep 24, 2019
ad0b78d
Rollup merge of #64016 - nnethercote:Compiler-fiddling, r=oli-obk
Centril Sep 24, 2019
e74d953
Rollup merge of #64296 - KodrAus:chore/iter_order_by, r=Centril
Centril Sep 24, 2019
4a58b14
Rollup merge of #64443 - Mark-Simulacrum:rustdoc-clean-1, r=Guillaume…
Centril Sep 24, 2019
e00bd27
Rollup merge of #64622 - ecstatic-morse:cycle-detector, r=oli-obk
Centril Sep 24, 2019
6a4be43
Rollup merge of #64689 - matklad:refactor-mbe, r=petrochenkov
Centril Sep 24, 2019
0d0f753
Rollup merge of #64698 - Centril:infer-const-with-stash, r=estebank
Centril Sep 24, 2019
9e12827
Rollup merge of #64702 - sinkuu:deps, r=jonas-schievink
Centril Sep 24, 2019
8db83a0
Rollup merge of #64717 - andrewbanchich:master, r=joshtriplett
Centril Sep 24, 2019
e861424
Rollup merge of #64720 - Wind-River:master, r=alexcrichton
Centril Sep 24, 2019
bea1933
Rollup merge of #64721 - hman523:issue64447, r=estebank
Centril Sep 24, 2019
1252e70
Rollup merge of #64725 - guanqun:typo-fix, r=zackmdavis
Centril Sep 24, 2019
477bdcd
Rollup merge of #64737 - jordins:master, r=steveklabnik
Centril Sep 24, 2019
c9dbaec
Rollup merge of #64742 - pietroalbini:relnotes-fixes, r=Mark-Simulacrum
Centril Sep 24, 2019
aeb2414
Rollup merge of #64748 - Centril:fix-64744, r=estebank
Centril Sep 24, 2019
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
13 changes: 0 additions & 13 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3324,8 +3324,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_errors",
"syntax",
"syntax_pos",
]

Expand All @@ -3347,7 +3345,6 @@ dependencies = [
"log",
"memmap",
"num_cpus",
"parking_lot 0.9.0",
"rustc",
"rustc_apfloat",
"rustc_codegen_utils",
Expand All @@ -3366,7 +3363,6 @@ dependencies = [
name = "rustc_codegen_utils"
version = "0.0.0"
dependencies = [
"flate2",
"log",
"punycode",
"rustc",
Expand Down Expand Up @@ -3561,7 +3557,6 @@ name = "rustc_mir"
version = "0.0.0"
dependencies = [
"arena",
"byteorder",
"either",
"graphviz",
"log",
Expand Down Expand Up @@ -3614,7 +3609,6 @@ name = "rustc_plugin_impl"
version = "0.0.0"
dependencies = [
"rustc",
"rustc_errors",
"rustc_metadata",
"syntax",
"syntax_pos",
Expand All @@ -3638,7 +3632,6 @@ version = "0.0.0"
dependencies = [
"arena",
"bitflags",
"indexmap",
"log",
"rustc",
"rustc_data_structures",
Expand All @@ -3660,7 +3653,6 @@ dependencies = [
"rustc_codegen_utils",
"rustc_data_structures",
"rustc_target",
"rustc_typeck",
"serde_json",
"syntax",
"syntax_pos",
Expand Down Expand Up @@ -3691,9 +3683,7 @@ checksum = "b725dadae9fabc488df69a287f5a99c5eaf5d10853842a8a3dfac52476f544ee"
name = "rustc_traits"
version = "0.0.0"
dependencies = [
"bitflags",
"chalk-engine",
"graphviz",
"log",
"rustc",
"rustc_data_structures",
Expand Down Expand Up @@ -4056,7 +4046,6 @@ version = "0.0.0"
dependencies = [
"alloc",
"backtrace",
"cc",
"cfg-if",
"compiler_builtins",
"core",
Expand Down Expand Up @@ -4241,7 +4230,6 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_lexer",
"rustc_macros",
"rustc_target",
"scoped-tls",
"serialize",
Expand All @@ -4257,7 +4245,6 @@ dependencies = [
"log",
"rustc_data_structures",
"rustc_errors",
"rustc_lexer",
"rustc_target",
"smallvec",
"syntax",
Expand Down
8 changes: 4 additions & 4 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ Misc

Compatibility Notes
-------------------
- Unfortunately the [`x86_64-unknown-uefi` platform can not be built][62785]
with rustc 1.39.0.
- The [`armv7-unknown-linux-gnueabihf` platform is also known to have
issues][62896] for certain crates such as libc.
- The [`x86_64-unknown-uefi` platform can not be built][62785] with rustc
1.38.0.
- The [`armv7-unknown-linux-gnueabihf` platform is known to have
issues][62896] with certain crates such as libc.

[60260]: https://github.com/rust-lang/rust/pull/60260/
[61457]: https://github.com/rust-lang/rust/pull/61457/
Expand Down
8 changes: 4 additions & 4 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ impl String {

/// Converts a vector of bytes to a `String`.
///
/// A string slice ([`&str`]) is made of bytes ([`u8`]), and a vector of bytes
/// A string ([`String`]) is made of bytes ([`u8`]), and a vector of bytes
/// ([`Vec<u8>`]) is made of bytes, so this function converts between the
/// two. Not all byte slices are valid `String`s, however: `String`
/// requires that it is valid UTF-8. `from_utf8()` checks to ensure that
Expand All @@ -446,7 +446,7 @@ impl String {
/// If you need a [`&str`] instead of a `String`, consider
/// [`str::from_utf8`].
///
/// The inverse of this method is [`as_bytes`].
/// The inverse of this method is [`into_bytes`].
///
/// # Errors
///
Expand Down Expand Up @@ -480,11 +480,11 @@ impl String {
/// with this error.
///
/// [`from_utf8_unchecked`]: struct.String.html#method.from_utf8_unchecked
/// [`&str`]: ../../std/primitive.str.html
/// [`String`]: struct.String.html
/// [`u8`]: ../../std/primitive.u8.html
/// [`Vec<u8>`]: ../../std/vec/struct.Vec.html
/// [`str::from_utf8`]: ../../std/str/fn.from_utf8.html
/// [`as_bytes`]: struct.String.html#method.as_bytes
/// [`into_bytes`]: struct.String.html#method.into_bytes
/// [`FromUtf8Error`]: struct.FromUtf8Error.html
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
#[inline]
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,7 @@ pub trait Iterator {
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (x * x).cmp(&y)), Ordering::Equal);
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (2 * x).cmp(&y)), Ordering::Greater);
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn cmp_by<I, F>(mut self, other: I, mut cmp: F) -> Ordering
where
Self: Sized,
Expand Down Expand Up @@ -2664,7 +2664,7 @@ pub trait Iterator {
/// Some(Ordering::Greater)
/// );
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn partial_cmp_by<I, F>(mut self, other: I, mut partial_cmp: F) -> Option<Ordering>
where
Self: Sized,
Expand Down Expand Up @@ -2729,7 +2729,7 @@ pub trait Iterator {
///
/// assert!(xs.iter().eq_by(&ys, |&x, &y| x * x == y));
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn eq_by<I, F>(mut self, other: I, mut eq: F) -> bool
where
Self: Sized,
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,9 +818,9 @@ impl<T> fmt::Debug for Discriminant<T> {
///
/// enum Foo { A(&'static str), B(i32), C(i32) }
///
/// assert!(mem::discriminant(&Foo::A("bar")) == mem::discriminant(&Foo::A("baz")));
/// assert!(mem::discriminant(&Foo::B(1)) == mem::discriminant(&Foo::B(2)));
/// assert!(mem::discriminant(&Foo::B(3)) != mem::discriminant(&Foo::C(3)));
/// assert_eq!(mem::discriminant(&Foo::A("bar")), mem::discriminant(&Foo::A("baz")));
/// assert_eq!(mem::discriminant(&Foo::B(1)), mem::discriminant(&Foo::B(2)));
/// assert_ne!(mem::discriminant(&Foo::B(3)), mem::discriminant(&Foo::C(3)));
/// ```
#[stable(feature = "discriminant_value", since = "1.21.0")]
pub fn discriminant<T>(v: &T) -> Discriminant<T> {
Expand Down
6 changes: 6 additions & 0 deletions src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ impl<'tcx> Body<'tcx> {
dominators(self)
}

/// Returns `true` if a cycle exists in the control-flow graph that is reachable from the
/// `START_BLOCK`.
pub fn is_cfg_cyclic(&self) -> bool {
graph::is_cyclic(self)
}

#[inline]
pub fn local_kind(&self, local: Local) -> LocalKind {
let index = local.as_usize();
Expand Down
1 change: 1 addition & 0 deletions src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ impl Session {
}
pub fn compile_status(&self) -> Result<(), ErrorReported> {
if self.has_errors() {
self.diagnostic().emit_stashed_diagnostics();
Err(ErrorReported)
} else {
Ok(())
Expand Down
18 changes: 13 additions & 5 deletions src/librustc/traits/coherence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ fn orphan_check_trait_ref<'tcx>(
}

fn uncovered_tys<'tcx>(tcx: TyCtxt<'_>, ty: Ty<'tcx>, in_crate: InCrate) -> Vec<Ty<'tcx>> {
if ty_is_local_constructor(ty, in_crate) {
if ty_is_local_constructor(tcx, ty, in_crate) {
vec![]
} else if fundamental_ty(ty) {
ty.walk_shallow()
Expand All @@ -451,7 +451,7 @@ fn is_possibly_remote_type(ty: Ty<'_>, _in_crate: InCrate) -> bool {
}

fn ty_is_local(tcx: TyCtxt<'_>, ty: Ty<'_>, in_crate: InCrate) -> bool {
ty_is_local_constructor(ty, in_crate) ||
ty_is_local_constructor(tcx, ty, in_crate) ||
fundamental_ty(ty) && ty.walk_shallow().any(|t| ty_is_local(tcx, t, in_crate))
}

Expand All @@ -472,7 +472,7 @@ fn def_id_is_local(def_id: DefId, in_crate: InCrate) -> bool {
}
}

fn ty_is_local_constructor(ty: Ty<'_>, in_crate: InCrate) -> bool {
fn ty_is_local_constructor(tcx: TyCtxt<'_>, ty: Ty<'_>, in_crate: InCrate) -> bool {
debug!("ty_is_local_constructor({:?})", ty);

match ty.sty {
Expand Down Expand Up @@ -504,6 +504,15 @@ fn ty_is_local_constructor(ty: Ty<'_>, in_crate: InCrate) -> bool {

ty::Adt(def, _) => def_id_is_local(def.did, in_crate),
ty::Foreign(did) => def_id_is_local(did, in_crate),
ty::Opaque(did, _) => {
// Check the underlying type that this opaque
// type resolves to.
// This recursion will eventually terminate,
// since we've already managed to successfully
// resolve all opaque types by this point
let real_ty = tcx.type_of(did);
ty_is_local_constructor(tcx, real_ty, in_crate)
}

ty::Dynamic(ref tt, ..) => {
if let Some(principal) = tt.principal() {
Expand All @@ -518,8 +527,7 @@ fn ty_is_local_constructor(ty: Ty<'_>, in_crate: InCrate) -> bool {
ty::UnnormalizedProjection(..) |
ty::Closure(..) |
ty::Generator(..) |
ty::GeneratorWitness(..) |
ty::Opaque(..) => {
ty::GeneratorWitness(..) => {
bug!("ty_is_local invoked on unexpected type: {:?}", ty)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/specialize/specialization_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ impl<'tcx> Graph {
/// The parent of a given impl, which is the `DefId` of the trait when the
/// impl is a "specialization root".
pub fn parent(&self, child: DefId) -> DefId {
*self.parent.get(&child).unwrap()
*self.parent.get(&child).unwrap_or_else(|| panic!("Failed to get parent for {:?}", child))
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/librustc_ast_borrowck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ doctest = false

[dependencies]
log = "0.4"
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
# for "clarity", rename the graphviz crate to dot; graphviz within `borrowck`
# refers to the borrowck-specific graphviz adapter traits.
dot = { path = "../libgraphviz", package = "graphviz" }
rustc = { path = "../librustc" }
errors = { path = "../librustc_errors", package = "rustc_errors" }
rustc_data_structures = { path = "../librustc_data_structures" }
1 change: 0 additions & 1 deletion src/librustc_codegen_ssa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ memmap = "0.6"
log = "0.4.5"
libc = "0.2.44"
jobserver = "0.1.11"
parking_lot = "0.9"
tempfile = "3.1"

rustc_serialize = { path = "../libserialize", package = "serialize" }
Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ path = "lib.rs"
test = false

[dependencies]
flate2 = "1.0"
log = "0.4"
punycode = "0.4.0"
rustc-demangle = "0.1.16"
Expand Down
Loading