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 21 pull requests #33486

Closed
wants to merge 44 commits into from
Closed
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f7e1421
Add `TAGS.rustc.emacs`/`TAGS.rustc.vi` make targets, (re-)including r…
pnkfelix Apr 28, 2016
27c01cb
Add process types documentation
GuillaumeGomez Apr 28, 2016
47d9f49
Remove rust flags from doc block
GuillaumeGomez May 1, 2016
e3f1312
dep_graph: avoid panicking in thread when channel closed
birkenfeld May 1, 2016
eba43fb
std::thread docs: spawn() returns not a Thread anymore
birkenfeld May 1, 2016
b75f81c
parser: do not try to continue with `unsafe` on foreign fns
birkenfeld May 2, 2016
a11ddb3
Replace copy-pasted variable name with relevant one
shepmaster May 4, 2016
2ca3120
errors in the doc
kindlychung May 4, 2016
16219de
Update iterator.rs
kindlychung May 4, 2016
8facc97
Add detailed error explanation for E0506
cramertj May 3, 2016
3371b8a
Add detailed error explanation for E0504
cramertj May 3, 2016
d1c487e
Add an example to Wrapping's documentation.
fiveop May 5, 2016
a22ca28
[Doc] Default cpu is "generic" (and not "default")
phil-opp May 5, 2016
39eec80
mk: Fix building with --enable-ccache
alexcrichton May 1, 2016
2912bfb
doc: Update reference with better description of target_env
brson May 5, 2016
26eb2be
Fix some some duplicate words.
birkenfeld May 5, 2016
10599e4
doc: make RFC references consistent
birkenfeld May 5, 2016
89aa042
rustdoc: add "src" links to individual impls
birkenfeld May 3, 2016
32edf1d
Fix Typo in Barrier::wait documentation
CryZe May 6, 2016
40025e8
Indicate struct names are code-like in doc-comment.
frewsxcv May 6, 2016
f25cbe6
Add detailed error explanation for E0389
cramertj May 4, 2016
8e9008d
doc: mut not needed
tshepang May 5, 2016
9f935c8
doc: binding not needed
tshepang May 5, 2016
e4b424b
Rollup merge of #33256 - pnkfelix:add-rustc-specific-tags-files, r=ni…
steveklabnik May 7, 2016
ba6678c
Rollup merge of #33283 - GuillaumeGomez:process_doc, r=steveklabnik
steveklabnik May 7, 2016
1d0a607
Rollup merge of #33313 - birkenfeld:depgraph-panic, r=nikomatsakis
steveklabnik May 7, 2016
6a3f601
Rollup merge of #33314 - alexcrichton:fix-enable-ccache, r=pnkfelix
steveklabnik May 7, 2016
3e3b8ba
Rollup merge of #33326 - birkenfeld:issue-33321, r=GuillaumeGomez
steveklabnik May 7, 2016
031d722
Rollup merge of #33336 - birkenfeld:issue-27361, r=sfackler
steveklabnik May 7, 2016
6a92ac7
Rollup merge of #33382 - birkenfeld:issue-30416, r=alexcrichton
steveklabnik May 7, 2016
2926fe4
Rollup merge of #33384 - cramertj:E0506, r=arielb1
steveklabnik May 7, 2016
054a3b7
Rollup merge of #33386 - cramertj:E0504, r=steveklabnik
steveklabnik May 7, 2016
d23afd9
Rollup merge of #33402 - shepmaster:copied-variable-name, r=Manishearth
steveklabnik May 7, 2016
2d26c01
Rollup merge of #33409 - kindlychung:patch-2, r=steveklabnik
steveklabnik May 7, 2016
00e3092
Rollup merge of #33410 - GuillaumeGomez:explain, r=Manishearth
steveklabnik May 7, 2016
6ae1ac8
Rollup merge of #33412 - cramertj:E0389, r=Manishearth
steveklabnik May 7, 2016
067d4fe
Rollup merge of #33428 - fiveop:wrapping_example, r=steveklabnik
steveklabnik May 7, 2016
443a55e
Rollup merge of #33430 - phil-opp:patch-1, r=alexcrichton
steveklabnik May 7, 2016
13fbb05
Rollup merge of #33437 - brson:trips, r=Manishearth
steveklabnik May 7, 2016
fd92cba
Rollup merge of #33438 - birkenfeld:dup-words, r=steveklabnik
steveklabnik May 7, 2016
8ed1e7c
Rollup merge of #33439 - birkenfeld:ip-rfc-refs, r=steveklabnik
steveklabnik May 7, 2016
f092a13
Rollup merge of #33442 - tshepang:trim, r=steveklabnik
steveklabnik May 7, 2016
1a8ec46
Rollup merge of #33456 - CryZe:barrier-wait-docs, r=GuillaumeGomez
steveklabnik May 7, 2016
1d044c5
Rollup merge of #33459 - frewsxcv:patch-29, r=guillaumegomez
steveklabnik May 7, 2016
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
15 changes: 11 additions & 4 deletions mk/ctags.mk
Original file line number Diff line number Diff line change
@@ -15,14 +15,21 @@

.PHONY: TAGS.emacs TAGS.vi

CTAGS_LOCATIONS=$(wildcard ${CFG_SRC_DIR}src/lib*)
CTAGS_RUSTC_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/lib%test,, \
$(wildcard ${CFG_SRC_DIR}src/lib*)) ${CFG_SRC_DIR}src/libtest
CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/librust%,, \
$(patsubst ${CFG_SRC_DIR}src/lib%test,, \
$(wildcard ${CFG_SRC_DIR}src/lib*))) ${CFG_SRC_DIR}src/libtest
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=Rust --recurse ${CTAGS_LOCATIONS}
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=Rust --recurse

TAGS.rustc.emacs:
ctags -e -f $@ ${CTAGS_OPTS} ${CTAGS_RUSTC_LOCATIONS}

TAGS.emacs:
ctags -e -f $@ ${CTAGS_OPTS}
ctags -e -f $@ ${CTAGS_OPTS} ${CTAGS_LOCATIONS}

TAGS.rustc.vi:
ctags -f $@ ${CTAGS_OPTS} ${CTAGS_RUSTC_LOCATIONS}

TAGS.vi:
ctags -f $@ ${CTAGS_OPTS}
ctags -f $@ ${CTAGS_OPTS} ${CTAGS_LOCATIONS}
6 changes: 3 additions & 3 deletions mk/platform.mk
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ ifdef CFG_CCACHE_BASEDIR
export CCACHE_BASEDIR
endif

FIND_COMPILER = $(word 1,$(1:ccache=))
FIND_COMPILER = $(strip $(1:ccache=))

define CFG_MAKE_TOOLCHAIN
# Prepend the tools with their prefix if cross compiling
@@ -187,7 +187,7 @@ define CFG_MAKE_TOOLCHAIN
endif
endif

CFG_COMPILE_C_$(1) = '$$(CC_$(1))' \
CFG_COMPILE_C_$(1) = '$$(call FIND_COMPILER,$$(CC_$(1)))' \
$$(CFLAGS) \
$$(CFG_GCCISH_CFLAGS) \
$$(CFG_GCCISH_CFLAGS_$(1)) \
@@ -198,7 +198,7 @@ define CFG_MAKE_TOOLCHAIN
$$(CFG_GCCISH_LINK_FLAGS_$(1)) \
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
$$(call CFG_INSTALL_NAME_$(1),$$(4))
CFG_COMPILE_CXX_$(1) = '$$(CXX_$(1))' \
CFG_COMPILE_CXX_$(1) = '$$(call FIND_COMPILER,$$(CXX_$(1)))' \
$$(CXXFLAGS) \
$$(CFG_GCCISH_CFLAGS) \
$$(CFG_GCCISH_CXXFLAGS) \
4 changes: 2 additions & 2 deletions mk/tests.mk
Original file line number Diff line number Diff line change
@@ -635,8 +635,8 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) = \
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \
--lldb-python-dir=$(CFG_LLDB_PYTHON_DIR) \
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
--cc '$$(CC_$(2))' \
--cxx '$$(CXX_$(2))' \
--cc '$$(call FIND_COMPILER,$$(CC_$(2)))' \
--cxx '$$(call FIND_COMPILER,$$(CXX_$(2)))' \
--cflags "$$(CFG_GCCISH_CFLAGS_$(2))" \
--llvm-components "$$(LLVM_ALL_COMPONENTS_$(2))" \
--llvm-cxxflags "$$(LLVM_CXXFLAGS_$(2))" \
2 changes: 1 addition & 1 deletion src/bootstrap/build/job.rs
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ pub unsafe fn setup() {

// Indicate that when all handles to the job object are gone that all
// process in the object should be killed. Note that this includes our
// entire process tree by default because we've added ourselves and and our
// entire process tree by default because we've added ourselves and our
// children will reside in the job by default.
let mut info = mem::zeroed::<JOBOBJECT_EXTENDED_LIMIT_INFORMATION>();
info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
44 changes: 26 additions & 18 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
@@ -2063,33 +2063,41 @@ arbitrarily complex configurations through nesting.

The following configurations must be defined by the implementation:

* `debug_assertions` - Enabled by default when compiling without optimizations.
This can be used to enable extra debugging code in development but not in
production. For example, it controls the behavior of the standard library's
`debug_assert!` macro.
* `target_arch = "..."` - Target CPU architecture, such as `"x86"`, `"x86_64"`
`"mips"`, `"powerpc"`, `"powerpc64"`, `"arm"`, or `"aarch64"`.
* `target_endian = "..."` - Endianness of the target CPU, either `"little"` or
`"big"`.
* `target_env = ".."` - An option provided by the compiler by default
describing the runtime environment of the target platform. Some examples of
this are `musl` for builds targeting the MUSL libc implementation, `msvc` for
Windows builds targeting MSVC, and `gnu` frequently the rest of the time. This
option may also be blank on some platforms.
* `target_arch = "..."` - Target CPU architecture, such as `"x86"`,
`"x86_64"` `"mips"`, `"powerpc"`, `"powerpc64"`, `"arm"`, or
`"aarch64"`. This value is closely related to the first element of
the platform target triple, though it is not identical.
* `target_os = "..."` - Operating system of the target, examples
include `"windows"`, `"macos"`, `"ios"`, `"linux"`, `"android"`,
`"freebsd"`, `"dragonfly"`, `"bitrig"` , `"openbsd"` or
`"netbsd"`. This value is closely related to the second and third
element of the platform target triple, though it is not identical.
* `target_family = "..."` - Operating system family of the target, e. g.
`"unix"` or `"windows"`. The value of this configuration option is defined
as a configuration itself, like `unix` or `windows`.
* `target_os = "..."` - Operating system of the target, examples include
`"windows"`, `"macos"`, `"ios"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"`,
`"bitrig"` , `"openbsd"` or `"netbsd"`.
* `unix` - See `target_family`.
* `windows` - See `target_family`.
* `target_env = ".."` - Further disambiguates the target platform with
information about the ABI/libc. Presently this value is either
`"gnu"`, `"msvc"`, `"musl"`, or the empty string. For historical
reasons this value has only been defined as non-empty when needed
for disambiguation. Thus on many GNU platforms this value will be
empty. This value is closely related to the fourth element of the
platform target triple, though it is not identical. For example,
embedded ABIs such as `gnueabihf` will simply define `target_env` as
`"gnu"`.
* `target_endian = "..."` - Endianness of the target CPU, either `"little"` or
`"big"`.
* `target_pointer_width = "..."` - Target pointer width in bits. This is set
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
64-bit pointers.
* `target_vendor = "..."` - Vendor of the target, for example `apple`, `pc`, or
simply `"unknown"`.
* `test` - Enabled when compiling the test harness (using the `--test` flag).
* `unix` - See `target_family`.
* `windows` - See `target_family`.
* `debug_assertions` - Enabled by default when compiling without optimizations.
This can be used to enable extra debugging code in development but not in
production. For example, it controls the behavior of the standard library's
`debug_assert!` macro.

You can also set another attribute based on a `cfg` variable with `cfg_attr`:

4 changes: 2 additions & 2 deletions src/libcollections/slice.rs
Original file line number Diff line number Diff line change
@@ -419,8 +419,8 @@ impl<T> [T] {
///
/// ```rust
/// let v = &[1, 2, 3, 4, 5];
/// for win in v.chunks(2) {
/// println!("{:?}", win);
/// for chunk in v.chunks(2) {
/// println!("{:?}", chunk);
/// }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
4 changes: 2 additions & 2 deletions src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
@@ -214,7 +214,7 @@ pub trait Iterator {
/// Like most indexing operations, the count starts from zero, so `nth(0)`
/// returns the first value, `nth(1)` the second, and so on.
///
/// `nth()` will return `None` if `n` is larger than the length of the
/// `nth()` will return `None` if `n` is greater than or equal to the length of the
/// iterator.
///
/// # Examples
@@ -237,7 +237,7 @@ pub trait Iterator {
/// assert_eq!(iter.nth(1), None);
/// ```
///
/// Returning `None` if there are less than `n` elements:
/// Returning `None` if there are less than `n + 1` elements:
///
/// ```
/// let a = [1, 2, 3];
11 changes: 11 additions & 0 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
@@ -37,6 +37,17 @@ use slice::SliceExt;
/// `wrapping_add`, or through the `Wrapping<T>` type, which says that
/// all standard arithmetic operations on the underlying value are
/// intended to have wrapping semantics.
///
/// # Examples
///
/// ```
/// use std::num::Wrapping;
///
/// let zero = Wrapping(0u32);
/// let one = Wrapping(1u32);
///
/// assert_eq!(std::u32::MAX, (zero - one).0);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]
pub struct Wrapping<T>(#[stable(feature = "rust1", since = "1.0.0")] pub T);
5 changes: 4 additions & 1 deletion src/librustc/dep_graph/thread.rs
Original file line number Diff line number Diff line change
@@ -176,6 +176,9 @@ pub fn main(swap_in: Receiver<Vec<DepMessage>>,
DepMessage::Query => query_out.send(edges.query()).unwrap(),
}
}
swap_out.send(messages).unwrap();
if let Err(_) = swap_out.send(messages) {
// the receiver must have been dropped already
break;
}
}
}
2 changes: 1 addition & 1 deletion src/librustc/session/config.rs
Original file line number Diff line number Diff line change
@@ -1355,7 +1355,7 @@ pub mod nightly_options {
early_error(ErrorOutputType::default(), &msg);
}
OptionStability::UnstableButNotReally => {
let msg = format!("the option `{}` is is unstable and should \
let msg = format!("the option `{}` is unstable and should \
only be used on the nightly compiler, but \
it is currently accepted for backwards \
compatibility; this will soon change, \
2 changes: 1 addition & 1 deletion src/librustc/traits/project.rs
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ use std::rc::Rc;
pub enum ProjectionMode {
/// FIXME (#32205)
/// At coherence-checking time, we're still constructing the
/// specialization graph, and thus we only project project
/// specialization graph, and thus we only project
/// non-`default` associated types that are defined directly in
/// the applicable impl. (This behavior should be improved over
/// time, to allow for successful projections modulo cycles
2 changes: 1 addition & 1 deletion src/librustc/ty/trait_def.rs
Original file line number Diff line number Diff line change
@@ -176,7 +176,7 @@ impl<'tcx> TraitDef<'tcx> {
/// Records a trait-to-implementation mapping for a non-local impl.
///
/// The `parent_impl` is the immediately-less-specialized impl, or the
/// trait's def ID if the impl is is not a specialization -- information that
/// trait's def ID if the impl is not a specialization -- information that
/// should be pulled from the metadata.
pub fn record_remote_impl(&self,
tcx: &TyCtxt<'tcx>,
2 changes: 1 addition & 1 deletion src/librustc/ty/wf.rs
Original file line number Diff line number Diff line change
@@ -272,7 +272,7 @@ impl<'a,'tcx> WfPredicates<'a,'tcx> {
/// into `self.out`.
fn compute_projection(&mut self, data: ty::ProjectionTy<'tcx>) {
// A projection is well-formed if (a) the trait ref itself is
// WF WF and (b) the trait-ref holds. (It may also be
// WF and (b) the trait-ref holds. (It may also be
// normalizable and be WF that way.)

self.compute_trait_ref(&data.trait_ref);
2 changes: 1 addition & 1 deletion src/librustc_back/target/mod.rs
Original file line number Diff line number Diff line change
@@ -202,7 +202,7 @@ pub struct TargetOptions {
pub post_link_args: Vec<String>,

/// Default CPU to pass to LLVM. Corresponds to `llc -mcpu=$cpu`. Defaults
/// to "default".
/// to "generic".
pub cpu: String,
/// Default target features to pass to LLVM. These features will *always* be
/// passed, and cannot be disabled even via `-C`. Corresponds to `llc
Loading