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 23 pull requests #58189

Merged
merged 53 commits into from
Feb 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
1a18336
proc_macro: make `TokenStream::from_streams` pre-allocate its vector.
pnkfelix Jan 30, 2019
f832a80
Transition remote-test-client to 2018 edition
h-michael Feb 3, 2019
d17b2ec
Transition remote-test-server to 2018 edition
h-michael Feb 3, 2019
3a133f2
Transition linkchecker to 2018 edition
h-michael Feb 3, 2019
39394c8
libfmt_macros => 2018
Centril Feb 2, 2019
7f41ed6
libgraphviz => 2018
Centril Feb 2, 2019
46c2c27
Add NVPTX target into `build-manifest`
denzp Feb 3, 2019
09275b5
libpanic_abort => 2018
Centril Feb 2, 2019
582bbcc
librustc_privacy => 2018
Centril Feb 3, 2019
b5ca255
Transition tidy and unstable-book-gento 2018 edition
h-michael Feb 3, 2019
9851a29
Add the span of attributes of the lhs to the span of the assignment e…
topecongiro Feb 3, 2019
d11d1af
Transition rustdoc-theme to 2018 edition
h-michael Feb 3, 2019
5440149
libunwind => 2018
taiki-e Feb 3, 2019
526a398
Fix #58101
ishitatsuyuki Feb 4, 2019
e3bbd67
Remove weasel word in docs for iter's take_while()
lukaslueg Feb 4, 2019
652f2c7
Add test
ishitatsuyuki Feb 4, 2019
82df9d7
Remove stray FIXME
Feb 4, 2019
4847c09
Add #[must_use] to core::task::Poll
taiki-e Feb 4, 2019
927614f
hir: more HirId methods
ljedrz Feb 4, 2019
59ea75b
add more debugging code to track down appveyor 259 exit code
pietroalbini Feb 4, 2019
57c4c28
Update contributor name in .mailmap
boringcactus Feb 4, 2019
75b1957
update split docs
garyemerson Feb 4, 2019
5d9eed4
Transition build-manifest to 2018 edition
h-michael Feb 3, 2019
212533a
Remove macro_use
h-michael Feb 4, 2019
6904fac
Use derive feature of serde
h-michael Feb 5, 2019
47a587f
Remove unncessary return statement
h-michael Feb 5, 2019
2bfb4b3
add even more debugging code to track down appveyor 259 exit code
pietroalbini Feb 5, 2019
4c8c0fc
SGX target: handle empty user buffers correctly
Feb 5, 2019
d89ebdd
Expose correct items in `os::fortanix_sgx::usercalls::alloc`
Feb 5, 2019
014ffa3
Add Rustlings to the doc index
Feb 5, 2019
a1ec22f
Rollup merge of #58001 - pnkfelix:issue-57735-proc-macro-with-large-t…
kennytm Feb 5, 2019
da3a2fb
Rollup merge of #58096 - h-michael:linkchecker-2018, r=Centril
kennytm Feb 5, 2019
e1f4833
Rollup merge of #58097 - h-michael:remote-test-2018, r=alexcrichton
kennytm Feb 5, 2019
06c9fe9
Rollup merge of #58106 - Centril:libfmt_macros-2018, r=oli-obk
kennytm Feb 5, 2019
ff7ab33
Rollup merge of #58107 - Centril:libgraphviz-2018, r=oli-obk
kennytm Feb 5, 2019
18e5c7a
Rollup merge of #58108 - denzp:nvptx-manifest, r=alexcrichton
kennytm Feb 5, 2019
49509a5
Rollup merge of #58109 - Centril:librustc_privacy-2018, r=oli-obk
kennytm Feb 5, 2019
c4af395
Rollup merge of #58112 - Centril:libpanic_abort-2018, r=oli-obk
kennytm Feb 5, 2019
b9def8e
Rollup merge of #58113 - h-michael:build-manifest-2018, r=alexcrichton
kennytm Feb 5, 2019
3f731d5
Rollup merge of #58114 - h-michael:tidy-unstable-book-gen-2018, r=Cen…
kennytm Feb 5, 2019
757c440
Rollup merge of #58116 - topecongiro:wrong-span-assignment, r=petroch…
kennytm Feb 5, 2019
3dbdd69
Rollup merge of #58117 - h-michael:rustdoc-theme-2018, r=Centril
kennytm Feb 5, 2019
a35dac2
Rollup merge of #58128 - taiki-e:libunwind-2018, r=Centril
kennytm Feb 5, 2019
3abb03f
Rollup merge of #58138 - ishitatsuyuki:stability-delay, r=estebank
kennytm Feb 5, 2019
3fc7373
Rollup merge of #58139 - ljedrz:HirIdification_phase_2.5, r=Zoxc
kennytm Feb 5, 2019
f107710
Rollup merge of #58141 - lukaslueg:patch-1, r=steveklabnik
kennytm Feb 5, 2019
ff097ca
Rollup merge of #58142 - jethrogb:jb/sgx-rwlock, r=joshtriplett
kennytm Feb 5, 2019
64f0032
Rollup merge of #58145 - taiki-e:poll, r=cramertj
kennytm Feb 5, 2019
4c243e2
Rollup merge of #58162 - pietroalbini:track-259, r=alexcrichton
kennytm Feb 5, 2019
5f17ce2
Rollup merge of #58169 - boringcactus:patch-1, r=alexcrichton
kennytm Feb 5, 2019
7e72d06
Rollup merge of #58172 - garyemerson:patch-1, r=steveklabnik
kennytm Feb 5, 2019
b3f814f
Rollup merge of #58182 - jethrogb:jb/sgx-bytebuffer-len-0, r=joshtrip…
kennytm Feb 5, 2019
c23871a
Rollup merge of #58186 - komaeda:docs/integrate-rustlings, r=stevekla…
kennytm Feb 5, 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
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Matt Brubeck <mbrubeck@limpet.net> <mbrubeck@cs.hmc.edu>
Matthew Auld <matthew.auld@intel.com>
Matthew McPherrin <matthew@mcpherrin.ca> <matt@mcpherrin.ca>
Matthijs Hofstra <thiezz@gmail.com>
Melody Horn <melody@boringcactus.com> <mathphreak@gmail.com>
Michael Williams <m.t.williams@live.com>
Michael Woerister <michaelwoerister@posteo> <michaelwoerister@gmail>
Mickaël Raybaud-Roig <raybaudroigm@gmail.com> m-r-r <raybaudroigm@gmail.com>
Expand Down
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ test_script:
- sh src/ci/init_repo.sh . /c/cache/rustsrc
- set SRC=.
- set NO_CCACHE=1
- sh src/ci/run.sh
# Added this debugging code to try tracking down https://github.com/rust-lang/rust/issues/58160
# Replace it with the commented line below after the issue with AppVeyor is fixed
- "sh src/ci/run.sh & set ret=%errorlevel% & echo exit code in appveyor.yml: %ret% & exit %ret%"
# - sh src/ci/run.sh

on_failure:
# Dump crash log
Expand Down
8 changes: 7 additions & 1 deletion src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ if [ ! -z "$SCRIPT" ]; then
set +e
sh -x -c "$SCRIPT"
ret=$?
echo "script exited with $ret"
echo "exit code in src/ci/run.sh: $ret"

echo "tasklist:"
tasklist
echo -n "location of sh: "
where sh

exit $ret
else
do_make() {
Expand Down
6 changes: 6 additions & 0 deletions src/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ If reading multiple hundreds of pages about a language isn't your style, then
a lot of words, RBE shows off a bunch of code, and keeps the talking to a
minimum. It also includes exercises!

## Rustlings

[Rustlings](https://github.com/rust-lang/rustlings) guides you through downloading and setting up the Rust toolchain,
and teaches you the basics of reading and writing Rust syntax. It's an
alternative to Rust by Example that works with your own environment.

# Use Rust

Once you've gotten familiar with the language, these resources can help you
Expand Down
3 changes: 1 addition & 2 deletions src/libcore/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,7 @@ pub trait Iterator {
/// ```
///
/// The `3` is no longer there, because it was consumed in order to see if
/// the iteration should stop, but wasn't placed back into the iterator or
/// some similar thing.
/// the iteration should stop, but wasn't placed back into the iterator.
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where
Expand Down
28 changes: 14 additions & 14 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2961,8 +2961,8 @@ impl str {
/// An iterator over substrings of this string slice, separated by
/// characters matched by a pattern.
///
/// The pattern can be a `&str`, [`char`], or a closure that determines the
/// split.
/// The pattern can be any type that implements the Pattern trait. Notable
/// examples are `&str`, [`char`], and closures that determines the split.
///
/// # Iterator behavior
///
Expand Down Expand Up @@ -3078,8 +3078,8 @@ impl str {
/// An iterator over substrings of the given string slice, separated by
/// characters matched by a pattern and yielded in reverse order.
///
/// The pattern can be a `&str`, [`char`], or a closure that determines the
/// split.
/// The pattern can be any type that implements the Pattern trait. Notable
/// examples are `&str`, [`char`], and closures that determines the split.
///
/// # Iterator behavior
///
Expand Down Expand Up @@ -3128,8 +3128,8 @@ impl str {
/// An iterator over substrings of the given string slice, separated by
/// characters matched by a pattern.
///
/// The pattern can be a `&str`, [`char`], or a closure that determines the
/// split.
/// The pattern can be any type that implements the Pattern trait. Notable
/// examples are `&str`, [`char`], and closures that determines the split.
///
/// Equivalent to [`split`], except that the trailing substring
/// is skipped if empty.
Expand Down Expand Up @@ -3175,8 +3175,8 @@ impl str {
/// An iterator over substrings of `self`, separated by characters
/// matched by a pattern and yielded in reverse order.
///
/// The pattern can be a simple `&str`, [`char`], or a closure that
/// determines the split.
/// The pattern can be any type that implements the Pattern trait. Notable
/// examples are `&str`, [`char`], and closures that determines the split.
/// Additional libraries might provide more complex patterns like
/// regular expressions.
///
Expand Down Expand Up @@ -3222,8 +3222,8 @@ impl str {
/// If `n` substrings are returned, the last substring (the `n`th substring)
/// will contain the remainder of the string.
///
/// The pattern can be a `&str`, [`char`], or a closure that determines the
/// split.
/// The pattern can be any type that implements the Pattern trait. Notable
/// examples are `&str`, [`char`], and closures that determines the split.
///
/// # Iterator behavior
///
Expand Down Expand Up @@ -3275,8 +3275,8 @@ impl str {
/// If `n` substrings are returned, the last substring (the `n`th substring)
/// will contain the remainder of the string.
///
/// The pattern can be a `&str`, [`char`], or a closure that
/// determines the split.
/// The pattern can be any type that implements the Pattern trait. Notable
/// examples are `&str`, [`char`], and closures that determines the split.
///
/// # Iterator behavior
///
Expand Down Expand Up @@ -3319,8 +3319,8 @@ impl str {
/// An iterator over the disjoint matches of a pattern within the given string
/// slice.
///
/// The pattern can be a `&str`, [`char`], or a closure that
/// determines if a character matches.
/// The pattern can be any type that implements the Pattern trait. Notable
/// examples are `&str`, [`char`], and closures that determines the split.
///
/// # Iterator behavior
///
Expand Down
1 change: 1 addition & 0 deletions src/libcore/task/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use result::Result;

/// Indicates whether a value is available or if the current task has been
/// scheduled to receive a wakeup instead.
#[must_use = "this `Poll` may be a `Pending` variant, which should be handled"]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum Poll<T> {
/// Represents that a value is immediately ready.
Expand Down
1 change: 1 addition & 0 deletions src/libfmt_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "fmt_macros"
version = "0.0.0"
edition = "2018"

[lib]
name = "fmt_macros"
Expand Down
13 changes: 7 additions & 6 deletions src/libfmt_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
html_playground_url = "https://play.rust-lang.org/",
test(attr(deny(warnings))))]

#![feature(nll)]
#![deny(rust_2018_idioms)]

#![feature(rustc_private)]

pub use self::Piece::*;
pub use self::Position::*;
pub use self::Alignment::*;
pub use self::Flag::*;
pub use self::Count::*;
pub use Piece::*;
pub use Position::*;
pub use Alignment::*;
pub use Flag::*;
pub use Count::*;

use std::str;
use std::string;
Expand Down
1 change: 1 addition & 0 deletions src/libgraphviz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "graphviz"
version = "0.0.0"
edition = "2018"

[lib]
name = "graphviz"
Expand Down
11 changes: 6 additions & 5 deletions src/libgraphviz/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,11 @@
html_root_url = "https://doc.rust-lang.org/nightly/",
test(attr(allow(unused_variables), deny(warnings))))]

#![feature(nll)]
#![deny(rust_2018_idioms)]

#![feature(str_escape)]

use self::LabelText::*;
use LabelText::*;

use std::borrow::Cow;
use std::io::prelude::*;
Expand Down Expand Up @@ -548,12 +549,12 @@ impl<'a> LabelText<'a> {
}

/// Puts `prefix` on a line above this label, with a blank line separator.
pub fn prefix_line(self, prefix: LabelText) -> LabelText<'static> {
pub fn prefix_line(self, prefix: LabelText<'_>) -> LabelText<'static> {
prefix.suffix_line(self)
}

/// Puts `suffix` on a line below this label, with a blank line separator.
pub fn suffix_line(self, suffix: LabelText) -> LabelText<'static> {
pub fn suffix_line(self, suffix: LabelText<'_>) -> LabelText<'static> {
let mut prefix = self.pre_escaped_content().into_owned();
let suffix = suffix.pre_escaped_content();
prefix.push_str(r"\n\n");
Expand Down Expand Up @@ -686,7 +687,7 @@ pub fn render_opts<'a, N, E, G, W>(g: &'a G,

#[cfg(test)]
mod tests {
use self::NodeLabels::*;
use NodeLabels::*;
use super::{Id, Labeller, Nodes, Edges, GraphWalk, render, Style};
use super::LabelText::{self, LabelStr, EscStr, HtmlStr};
use std::io;
Expand Down
1 change: 1 addition & 0 deletions src/libpanic_abort/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "panic_abort"
version = "0.0.0"
edition = "2018"

[lib]
path = "lib.rs"
Expand Down
4 changes: 2 additions & 2 deletions src/libpanic_abort/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
html_root_url = "https://doc.rust-lang.org/nightly/",
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")]
#![panic_runtime]

#![allow(unused_features)]
#![deny(rust_2018_idioms)]

#![feature(core_intrinsics)]
#![feature(libc)]
#![feature(nll)]
#![feature(panic_runtime)]
#![feature(staged_api)]
#![feature(rustc_attrs)]
Expand Down Expand Up @@ -46,7 +47,6 @@ pub unsafe extern fn __rust_start_panic(_payload: usize) -> u32 {

#[cfg(any(unix, target_os = "cloudabi"))]
unsafe fn abort() -> ! {
extern crate libc;
libc::abort();
}

Expand Down
60 changes: 60 additions & 0 deletions src/librustc/hir/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,12 @@ impl<'hir> Map<'hir> {
}
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn describe_def_by_hir_id(&self, hir_id: HirId) -> Option<Def> {
let node_id = self.hir_to_node_id(hir_id);
self.describe_def(node_id)
}

fn entry_count(&self) -> usize {
self.map.len()
}
Expand Down Expand Up @@ -445,6 +451,12 @@ impl<'hir> Map<'hir> {
}
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn fn_decl_by_hir_id(&self, hir_id: HirId) -> Option<FnDecl> {
let node_id = self.hir_to_node_id(hir_id);
self.fn_decl(node_id)
}

/// Returns the `NodeId` that corresponds to the definition of
/// which this is the body of, i.e., a `fn`, `const` or `static`
/// item (possibly associated), a closure, or a `hir::AnonConst`.
Expand Down Expand Up @@ -855,6 +867,12 @@ impl<'hir> Map<'hir> {
self.local_def_id(self.get_parent(id))
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn get_parent_did_by_hir_id(&self, id: HirId) -> DefId {
let node_id = self.hir_to_node_id(id);
self.get_parent_did(node_id)
}

pub fn get_foreign_abi(&self, id: NodeId) -> Abi {
let parent = self.get_parent(id);
if let Some(entry) = self.find_entry(parent) {
Expand All @@ -868,6 +886,12 @@ impl<'hir> Map<'hir> {
bug!("expected foreign mod or inlined parent, found {}", self.node_to_string(parent))
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn get_foreign_abi_by_hir_id(&self, id: HirId) -> Abi {
let node_id = self.hir_to_node_id(id);
self.get_foreign_abi(node_id)
}

pub fn expect_item(&self, id: NodeId) -> &'hir Item {
match self.find(id) { // read recorded by `find`
Some(Node::Item(item)) => item,
Expand All @@ -888,6 +912,18 @@ impl<'hir> Map<'hir> {
}
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn expect_impl_item_by_hir_id(&self, id: HirId) -> &'hir ImplItem {
let node_id = self.hir_to_node_id(id);
self.expect_impl_item(node_id)
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn expect_trait_item_by_hir_id(&self, id: HirId) -> &'hir TraitItem {
let node_id = self.hir_to_node_id(id);
self.expect_trait_item(node_id)
}

pub fn expect_trait_item(&self, id: NodeId) -> &'hir TraitItem {
match self.find(id) {
Some(Node::TraitItem(item)) => item,
Expand Down Expand Up @@ -931,6 +967,12 @@ impl<'hir> Map<'hir> {
}
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn expect_expr_by_hir_id(&self, id: HirId) -> &'hir Expr {
let node_id = self.hir_to_node_id(id);
self.expect_expr(node_id)
}

/// Returns the name associated with the given NodeId's AST.
pub fn name(&self, id: NodeId) -> Name {
match self.get(id) {
Expand All @@ -948,6 +990,12 @@ impl<'hir> Map<'hir> {
}
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn name_by_hir_id(&self, id: HirId) -> Name {
let node_id = self.hir_to_node_id(id);
self.name(node_id)
}

/// Given a node ID, get a list of attributes associated with the AST
/// corresponding to the Node ID
pub fn attrs(&self, id: NodeId) -> &'hir [ast::Attribute] {
Expand All @@ -970,6 +1018,12 @@ impl<'hir> Map<'hir> {
attrs.unwrap_or(&[])
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn attrs_by_hir_id(&self, id: HirId) -> &'hir [ast::Attribute] {
let node_id = self.hir_to_node_id(id);
self.attrs(node_id)
}

/// Returns an iterator that yields the node id's with paths that
/// match `parts`. (Requires `parts` is non-empty.)
///
Expand Down Expand Up @@ -1019,6 +1073,12 @@ impl<'hir> Map<'hir> {
}
}

// FIXME(@ljedrz): replace the NodeId variant
pub fn span_by_hir_id(&self, id: HirId) -> Span {
let node_id = self.hir_to_node_id(id);
self.span(node_id)
}

pub fn span_if_local(&self, id: DefId) -> Option<Span> {
self.as_local_node_id(id).map(|id| self.span(id))
}
Expand Down
4 changes: 3 additions & 1 deletion src/librustc/middle/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,9 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
}
}
EvalResult::Unmarked => {
span_bug!(span, "encountered unmarked API: {:?}", def_id);
// The API could be uncallable for other reasons, for example when a private module
// was referenced.
self.sess.delay_span_bug(span, &format!("encountered unmarked API: {:?}", def_id));
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/librustc_privacy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "rustc_privacy"
version = "0.0.0"
edition = "2018"

[lib]
name = "rustc_privacy"
Expand Down
Loading