]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agomk: Fix building compiler-rt on MSVC
Alex Crichton [Mon, 11 May 2015 21:09:25 +0000 (14:09 -0700)]
mk: Fix building compiler-rt on MSVC

It looks like compiler-rt has a cmake build sytem inside its source, but I have
been unable to figure out how to use it and actually build the right library.
For now this commit hard-wires MSVC-targeting builds of libcompiler-rt to
continue using `make` as the primary bulid system, but some frobbing of the
flags are necessary to ensure that the right compiler is used.

9 years agomk: Don't add cross prefixes for MSVC
Alex Crichton [Mon, 11 May 2015 21:08:46 +0000 (14:08 -0700)]
mk: Don't add cross prefixes for MSVC

Currently the MSVC compilers don't have any cross prefixes and we're only able
to make an MSVC compiler with a cross compile, so just avoid this logic on msvc
for now.

9 years agomk: Add build system support for cl.exe
Alex Crichton [Mon, 11 May 2015 21:07:42 +0000 (14:07 -0700)]
mk: Add build system support for cl.exe

We have a number of support C/C++ files in Rust that we link into the standard
library and other various locations, and these all need to be built with cl.exe
instead of gcc.exe when targeting MSVC. This commit adds helper macros for this
functionality to use different sets of programs/flags/invocations on MSVC than
on GNU-like platforms.

9 years agomk: Enable building LLVM targeting MSVC
Alex Crichton [Mon, 11 May 2015 21:03:45 +0000 (14:03 -0700)]
mk: Enable building LLVM targeting MSVC

This commit modifies the makefiles to enable building LLVM with cmake and Visual
Studio to generate an LLVM that targets MSVC. Rust's configure script requires
cmake to be installed when targeting MSVC and will configure LLVM with cmake
instead of the normal `./configure` script LLVM provides. The build will then
run cmake to execute the build instead of the normal `make`.

Currently `make clean-llvm` isn't supported on MSVC as I can't figure out how to
run a "clean" target for the Visual Studio files.

9 years agoconfigure: Start adding MSVC support
Alex Crichton [Mon, 11 May 2015 20:59:51 +0000 (13:59 -0700)]
configure: Start adding MSVC support

This commit starts to add MSVC support to the ./configure script to enable the
build system to detect and build an MSVC target with the cl.exe compiler and
toolchain. The primary change here is a large sanity check when an MSVC target
is requested (and currently only `x86_64-pc-windows-msvc` is recognized).

When building an MSVC target, the configure script either requires the
`--msvc-root` argument or for `cl.exe` to be in `PATH`. It also requires that if
in the path `cl.exe` is the 64-bit version of the compiler.

Once detected the configure script will run the `vcvarsall.bat` script provided
by Visual Studio to learn about the `INCLUDE` and `LIB` variables needed by the
`cl.exe` compiler to run (the default include/lib paths for the
compiler/linker). These variables are then reexported when running `make` to
ensure that our own compiles are running the same toolchain.

The purpose of this detection and environment variable scraping is to avoid
requiring the build itself to be run inside of a `cmd.exe` shell but rather
allow it to run in the currently expected MinGW/MSYS shell.

9 years agomk: Fix native LLVM deps for cross-host builds
Alex Crichton [Mon, 11 May 2015 19:30:47 +0000 (12:30 -0700)]
mk: Fix native LLVM deps for cross-host builds

We use a script called `mklldeps.py` to run `llvm-config` to generate a list
of LLVM libraries and native dependencies needed by LLVM, but all cross-compiled
LLVM builds were using the *host triple's* `llvm-config` instead of the
*target's* `llvm-config`. This commit alters this to require the right
`llvmdeps.rs` to be generated which will run the correct `llvm-config`.

9 years agomk: Correct names of installed libs on windows
Alex Crichton [Mon, 11 May 2015 19:29:08 +0000 (12:29 -0700)]
mk: Correct names of installed libs on windows

Previously libmorestack.a and libcompiler-rt.a were installed, but link.exe
looks for morestack.lib and compiler-rt.lib by default, so we need to install
these with the correct name

9 years agomk: Remove generation of .d files
Alex Crichton [Mon, 11 May 2015 19:27:26 +0000 (12:27 -0700)]
mk: Remove generation of .d files

Looks like cl.exe doesn't support this and we're also barely using them anyway
as we have very few header files and C code in general.

9 years agort: Clean up to build with cl.exe
Alex Crichton [Mon, 11 May 2015 19:24:56 +0000 (12:24 -0700)]
rt: Clean up to build with cl.exe

* Detect the #define _MSC_VER in addition to __WIN32__
* Don't include valgrind.h for windows
* Remove unused `rust_valgrind_stack_{un,}register` functions
* Add stub definition for `rust_running_on_valgrind` for windows
* Conditionally define `rust_dbg_extern_empty_struct` as empty structures are
  not allowed by cl.exe apparently.

9 years agorustc_llvm: Expose setting more DLL storage classes
Alex Crichton [Mon, 11 May 2015 19:24:12 +0000 (12:24 -0700)]
rustc_llvm: Expose setting more DLL storage classes

Currently only `dllexport` is used, but more integration will require using
`dllimport` as well.

9 years agorustc_trans: Abstract linker support behind a trait
Alex Crichton [Fri, 8 May 2015 22:31:23 +0000 (15:31 -0700)]
rustc_trans: Abstract linker support behind a trait

This trait will be used to correctly build a command line for link.exe with MSVC
and may perhaps one day be used to generate a command line for `lld`, but this
commit currently just refactors the bindings used to call `ld`.

9 years agoScale back changes made
Alex Crichton [Fri, 8 May 2015 21:44:17 +0000 (14:44 -0700)]
Scale back changes made

9 years agoVery hacky MSVC hacks.
Ricky Taylor [Wed, 4 Mar 2015 22:58:59 +0000 (22:58 +0000)]
Very hacky MSVC hacks.

Conflicts:
mk/platform.mk
src/librustc/session/config.rs
src/librustc_back/target/aarch64_apple_ios.rs
src/librustc_back/target/aarch64_linux_android.rs
src/librustc_back/target/arm_linux_androideabi.rs
src/librustc_back/target/arm_unknown_linux_gnueabi.rs
src/librustc_back/target/arm_unknown_linux_gnueabihf.rs
src/librustc_back/target/armv7_apple_ios.rs
src/librustc_back/target/armv7s_apple_ios.rs
src/librustc_back/target/i386_apple_ios.rs
src/librustc_back/target/i686_apple_darwin.rs
src/librustc_back/target/i686_pc_windows_gnu.rs
src/librustc_back/target/i686_unknown_dragonfly.rs
src/librustc_back/target/i686_unknown_linux_gnu.rs
src/librustc_back/target/mips_unknown_linux_gnu.rs
src/librustc_back/target/mipsel_unknown_linux_gnu.rs
src/librustc_back/target/mod.rs
src/librustc_back/target/powerpc_unknown_linux_gnu.rs
src/librustc_back/target/x86_64_apple_darwin.rs
src/librustc_back/target/x86_64_apple_ios.rs
src/librustc_back/target/x86_64_pc_windows_gnu.rs
src/librustc_back/target/x86_64_unknown_dragonfly.rs
src/librustc_back/target/x86_64_unknown_freebsd.rs
src/librustc_back/target/x86_64_unknown_linux_gnu.rs
src/librustc_back/target/x86_64_unknown_openbsd.rs
src/librustc_llvm/lib.rs
src/librustc_trans/back/link.rs
src/librustc_trans/trans/base.rs
src/libstd/os.rs
src/rustllvm/RustWrapper.cpp

9 years agoAuto merge of #25316 - brson:installer, r=alexcrichton
bors [Tue, 12 May 2015 17:27:11 +0000 (17:27 +0000)]
Auto merge of #25316 - brson:installer, r=alexcrichton

Revert an accidental revert.

9 years agoAuto merge of #25300 - kballard:core-slice-overflow, r=Gankro
bors [Tue, 12 May 2015 14:39:31 +0000 (14:39 +0000)]
Auto merge of #25300 - kballard:core-slice-overflow, r=Gankro

core::slice was originally written to tolerate overflow (notably, with
slices of zero-sized elements), but it was never updated to use wrapping
arithmetic when overflow traps were added.

Also correctly handle the case of calling .nth() on an Iter with a
zero-sized element type. The iterator was assuming that the pointer
value of the returned reference was meaningful, but that's not true for
zero-sized elements.

Fixes #25016.

9 years agoAuto merge of #25171 - quantheory:associated_time_long_paths, r=nikomatsakis
bors [Tue, 12 May 2015 13:04:14 +0000 (13:04 +0000)]
Auto merge of #25171 - quantheory:associated_time_long_paths, r=nikomatsakis

It is currently broken to use syntax such as `<T as Foo>::U::static_method()` where `<T as Foo>::U` is an associated type. I was able to fix this and simplify the parser a bit at the same time.

This also fixes the corresponding issue with associated types (#22139), but that's somewhat irrelevant because #22519 is still open, so this syntax still causes an error in type checking.

Similarly, although this fix applies to associated consts, #25046 forbids associated constants from using type parameters or `Self`, while #19559 means that associated types have to always have one of those two. Therefore, I think that you can't use an associated const from an associated type anyway.

9 years agoAuto merge of #25323 - eddyb:coherent-coherence, r=pnkfelix
bors [Tue, 12 May 2015 10:46:14 +0000 (10:46 +0000)]
Auto merge of #25323 - eddyb:coherent-coherence, r=pnkfelix

The loop to load all the known impls from external crates seems to have been used because `ty::populate_implementations_for_trait_if_necessary` wasn't doing its job, and solely relying on it resulted in loading only impls in the same crate as the trait.

Coherence for `librustc` was reduced from 18.310s to 0.610s, from stage1 to stage2.
Interestingly, type checking also went from 46.232s to 42.003s, though that could be noise or unrelated improvements.

On a smaller scale, `fn main() {}` now spends 0.003s in coherence instead of 0.368s, which fixes #22068.
It also peaks at only 1.2MB, instead of 16MB of heap usage.

9 years agoAuto merge of #24818 - tbelaire:double-import, r=nrc
bors [Tue, 12 May 2015 08:54:40 +0000 (08:54 +0000)]
Auto merge of #24818 - tbelaire:double-import, r=nrc

This isn't quite right, but it's interesting.

9 years agoAuto merge of #23424 - arielb1:ambiguous-project, r=nikomatsakis
bors [Tue, 12 May 2015 07:02:40 +0000 (07:02 +0000)]
Auto merge of #23424 - arielb1:ambiguous-project, r=nikomatsakis

r? @nikomatsakis

9 years agorustc_typeck: remove the "preload all impls ever" workaround in coherence.
Eduard Burtescu [Tue, 12 May 2015 04:58:01 +0000 (07:58 +0300)]
rustc_typeck: remove the "preload all impls ever" workaround in coherence.

9 years agoFix ty::populate_implementations_for_trait_if_necessary to load the trait's impls...
Eduard Burtescu [Tue, 12 May 2015 04:56:37 +0000 (07:56 +0300)]
Fix ty::populate_implementations_for_trait_if_necessary to load the trait's impls from all the crates.

9 years agorustc: rename ty::populate_implementations_for_type_if_necessary to make it clear...
Eduard Burtescu [Tue, 12 May 2015 04:51:15 +0000 (07:51 +0300)]
rustc: rename ty::populate_implementations_for_type_if_necessary to make it clear that it only populates inherent impls.

9 years agorustc::metadata: use u64 for DefId's instead of strings.
Eduard Burtescu [Tue, 12 May 2015 04:49:15 +0000 (07:49 +0300)]
rustc::metadata: use u64 for DefId's instead of strings.

9 years agoAuto merge of #25320 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 12 May 2015 04:17:30 +0000 (04:17 +0000)]
Auto merge of #25320 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #25254, #25272, #25278, #25282, #25283, #25288, #25292, #25302, #25304, #25314
- Failed merges:

9 years agoRollup merge of #25314 - steveklabnik:static_to_associated, r=alexcrichton
Steve Klabnik [Tue, 12 May 2015 03:24:20 +0000 (23:24 -0400)]
Rollup merge of #25314 - steveklabnik:static_to_associated, r=alexcrichton

9 years agoRollup merge of #25304 - oli-obk:patch-2, r=steveklabnik
Steve Klabnik [Tue, 12 May 2015 03:24:20 +0000 (23:24 -0400)]
Rollup merge of #25304 - oli-obk:patch-2, r=steveklabnik

9 years agoRollup merge of #25302 - michaelsproul:error-markdown, r=pnkfelix
Steve Klabnik [Tue, 12 May 2015 03:24:19 +0000 (23:24 -0400)]
Rollup merge of #25302 - michaelsproul:error-markdown, r=pnkfelix

A few errors slipped through my filter. Markdown formatting is especially important now that http://doc.rust-lang.org/error-index.html is live!

Speaking of, the error index should probably be linked to from somewhere. It doesn't quite fit under any of the sections in the index, but I could create a new one for it? Or add it under "tools" despite it not exactly being an executable tool.

9 years agoRollup merge of #25292 - steveklabnik:stack_and_heap, r=nikomatsakis
Steve Klabnik [Tue, 12 May 2015 03:24:19 +0000 (23:24 -0400)]
Rollup merge of #25292 - steveklabnik:stack_and_heap, r=nikomatsakis

I think someday I'd like to make these drawings rather than text, but for now, this will have to be good enough.

9 years agoRollup merge of #25288 - DrKwint:master, r=alexcrichton
Steve Klabnik [Tue, 12 May 2015 03:24:19 +0000 (23:24 -0400)]
Rollup merge of #25288 - DrKwint:master, r=alexcrichton

The functions BitSet::{iter,union,symmetric_difference} each had docs that claimed u32s were output when their actual output each end up being usizes.

r? @steveklabnik

9 years agoRollup merge of #25283 - steveklabnik:gh24999, r=alexcrichton
Steve Klabnik [Tue, 12 May 2015 03:24:19 +0000 (23:24 -0400)]
Rollup merge of #25283 - steveklabnik:gh24999, r=alexcrichton

and remove references to the unit type, which no longer exists

Fixes #24999

9 years agoRollup merge of #25282 - badboy:reference-macro-1, r=alexcrichton
Steve Klabnik [Tue, 12 May 2015 03:24:18 +0000 (23:24 -0400)]
Rollup merge of #25282 - badboy:reference-macro-1, r=alexcrichton

As mentioned in https://github.com/rust-lang/rust/issues/16676#issuecomment-100676326 this makes it a little bit more correct.

I'm a bit unsure whether or not it should be explained that the transcriber can be wrapped in parentheses or curly braces if necessary.

9 years agoRollup merge of #25278 - cpjreynolds:path-doc, r=alexcrichton
Steve Klabnik [Tue, 12 May 2015 03:24:18 +0000 (23:24 -0400)]
Rollup merge of #25278 - cpjreynolds:path-doc, r=alexcrichton

Change from "must be used with behind a pointer" to "must be used behind a pointer"

9 years agoRollup merge of #25272 - nham:copy_long_diag, r=alexcrichton
Steve Klabnik [Tue, 12 May 2015 03:24:18 +0000 (23:24 -0400)]
Rollup merge of #25272 - nham:copy_long_diag, r=alexcrichton

Adds long diagnostic messages for:

 - E0184
 - E0204
 - E0205
 - E0206
 - E0243
 - E0244
 - E0249
 - E0250

This PR also adds some comments to the error codes in `librustc_typeck/diagnostics.rs`.

cc #24407

9 years agoRollup merge of #25254 - cgaebel:check-sizes-on-allocate, r=Gankro
Steve Klabnik [Tue, 12 May 2015 03:24:18 +0000 (23:24 -0400)]
Rollup merge of #25254 - cgaebel:check-sizes-on-allocate, r=Gankro

They're only enabled in debug builds, but a panic is usually more
welcome than UB in debug builds.

Previous review at https://github.com/rust-lang/rust/pull/22069

r? @Gankro
cc @huon

9 years agostatic method -> associated function
Steve Klabnik [Mon, 11 May 2015 22:22:49 +0000 (18:22 -0400)]
static method -> associated function

9 years agoUpdate rust-installer
Brian Anderson [Mon, 11 May 2015 22:05:57 +0000 (15:05 -0700)]
Update rust-installer

9 years agoTRPL: the stack and the heap
Steve Klabnik [Mon, 11 May 2015 00:22:06 +0000 (20:22 -0400)]
TRPL: the stack and the heap

9 years agoAuto merge of #25225 - bluss:doc-search-assoc-items, r=alexcrichton
bors [Mon, 11 May 2015 20:02:18 +0000 (20:02 +0000)]
Auto merge of #25225 - bluss:doc-search-assoc-items, r=alexcrichton

Rustdoc fixes for associated items

This is related to isssue #22442 and solves it partly.

This solves the search index links of associated types and constants,
so that they link to the trait page.

Also add an Associated Constants section if constants are present.

9 years agoAvoid returning a slice with a null pointer from Iter.as_slice()
Kevin Ballard [Mon, 11 May 2015 19:37:31 +0000 (12:37 -0700)]
Avoid returning a slice with a null pointer from Iter.as_slice()

core::slice::Iter.ptr can be null when iterating a slice of zero-sized
elements, but the pointer value used for the slice itself cannot. Handle
this case by always returning a dummy pointer for slices of zero-sized
elements.

9 years agoReintroduce non-null assumptions in core::slice iterators
Kevin Ballard [Mon, 11 May 2015 16:34:59 +0000 (09:34 -0700)]
Reintroduce non-null assumptions in core::slice iterators

The previous assumptions were not valid for slices of zero-sized
elements.

9 years agoAuto merge of #25196 - brson:relnotes, r=alexcrichton
bors [Mon, 11 May 2015 18:13:11 +0000 (18:13 +0000)]
Auto merge of #25196 - brson:relnotes, r=alexcrichton

cc @aturon

9 years agoMore authors updates
Brian Anderson [Mon, 11 May 2015 17:59:23 +0000 (10:59 -0700)]
More authors updates

9 years agoFix links in the referece
Steve Klabnik [Sun, 10 May 2015 22:11:51 +0000 (18:11 -0400)]
Fix links in the referece

and remove references to the unit type, which no longer exists

Fixes #24999

9 years agoAuto merge of #25301 - jooert:vec_map_fix_split_off, r=Gankro
bors [Mon, 11 May 2015 16:20:49 +0000 (16:20 +0000)]
Auto merge of #25301 - jooert:vec_map_fix_split_off, r=Gankro

We don't need to copy any elements if `at` is behind the last element
in the map. The last element is at index `self.v.len() - 1`, so we
should not copy if `at` is greater **or equals** `self.v.len()`.

r? @Gankro

9 years agotrpl: item macros must be followed by a semicolon
Oliver Schneider [Mon, 11 May 2015 14:46:24 +0000 (16:46 +0200)]
trpl: item macros must be followed by a semicolon

9 years agoAuto merge of #25303 - Manishearth:rollup, r=Manishearth
bors [Mon, 11 May 2015 14:30:08 +0000 (14:30 +0000)]
Auto merge of #25303 - Manishearth:rollup, r=Manishearth

- Successful merges: #25280, #25284, #25286, #25287, #25290, #25291, #25297
- Failed merges:

9 years agoRollup merge of #25297 - carols10cents:grammar-todos, r=steveklabnik
Manish Goregaokar [Mon, 11 May 2015 14:28:58 +0000 (19:58 +0530)]
Rollup merge of #25297 - carols10cents:grammar-todos, r=steveklabnik

Hiiii, I've got another chunk of updates to the grammar documentation! :star: :star2: :stars:

Chipping away at #22445, still have some more to go. I'm learning so much!!!

9 years agoRollup merge of #25291 - johannhof:let-expressions-example, r=steveklabnik
Manish Goregaokar [Mon, 11 May 2015 14:28:57 +0000 (19:58 +0530)]
Rollup merge of #25291 - johannhof:let-expressions-example, r=steveklabnik

Maybe it's me, but I really needed an example to understand if let and refutable statements.
Playpen: http://is.gd/mjX3Gf

Let me know if the variable names are too, uh, culinary.

9 years agoRollup merge of #25290 - bluss:docfixes, r=steveklabnik
Manish Goregaokar [Mon, 11 May 2015 14:28:57 +0000 (19:58 +0530)]
Rollup merge of #25290 - bluss:docfixes, r=steveklabnik

Several Minor API / Reference Documentation Fixes

- Fix a few small errors in the reference.
- Fix paper cuts in the API docs.

Fixes #24882
Fixes #25233
Fixes #25250

9 years agoRollup merge of #25287 - petehunt:patch-2, r=steveklabnik
Manish Goregaokar [Mon, 11 May 2015 14:28:57 +0000 (19:58 +0530)]
Rollup merge of #25287 - petehunt:patch-2, r=steveklabnik

9 years agoRollup merge of #25286 - johannhof:patch-1, r=steveklabnik
Manish Goregaokar [Mon, 11 May 2015 14:28:57 +0000 (19:58 +0530)]
Rollup merge of #25286 - johannhof:patch-1, r=steveklabnik

The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time.

For the changed example see http://is.gd/28ak9E

Also fixed a minor grammar issue.

9 years agoRollup merge of #25284 - petehunt:patch-1, r=steveklabnik
Manish Goregaokar [Mon, 11 May 2015 14:28:56 +0000 (19:58 +0530)]
Rollup merge of #25284 - petehunt:patch-1, r=steveklabnik

Noticed this while perusing the docs

9 years agoRollup merge of #25280 - frewsxcv:patch-22, r=steveklabnik
Manish Goregaokar [Mon, 11 May 2015 14:28:56 +0000 (19:58 +0530)]
Rollup merge of #25280 - frewsxcv:patch-22, r=steveklabnik

9 years agoMarkdown formatting for error explanations.
Michael Sproul [Mon, 11 May 2015 13:04:31 +0000 (23:04 +1000)]
Markdown formatting for error explanations.

9 years agoAuto merge of #25277 - polachok:docfix, r=steveklabnik
bors [Mon, 11 May 2015 12:07:39 +0000 (12:07 +0000)]
Auto merge of #25277 - polachok:docfix, r=steveklabnik

r? @steveklabnik

9 years agoMinor optimization for `VecMap::split_off`
Johannes Oertel [Mon, 11 May 2015 10:54:59 +0000 (12:54 +0200)]
Minor optimization for `VecMap::split_off`

We don't need to copy any elements if `at` is behind the last element
in the map. The last element is at index `self.v.len() - 1`, so we
should not copy if `at` is greater or equals `self.v.len()`.

9 years agoAuto merge of #25271 - tshepang:doc-deunwrap, r=steveklabnik
bors [Mon, 11 May 2015 09:50:36 +0000 (09:50 +0000)]
Auto merge of #25271 - tshepang:doc-deunwrap, r=steveklabnik

9 years agoHandle overflow properly in core::slice
Kevin Ballard [Mon, 11 May 2015 07:55:21 +0000 (00:55 -0700)]
Handle overflow properly in core::slice

core::slice was originally written to tolerate overflow (notably, with
slices of zero-sized elements), but it was never updated to use wrapping
arithmetic when overflow traps were added.

Also correctly handle the case of calling .nth() on an Iter with a
zero-sized element type. The iterator was assuming that the pointer
value of the returned reference was meaningful, but that's not true for
zero-sized elements.

Fixes #25016.

9 years agoAuto merge of #25266 - richo:windows-resource-sancheck, r=steveklabnik
bors [Mon, 11 May 2015 06:42:25 +0000 (06:42 +0000)]
Auto merge of #25266 - richo:windows-resource-sancheck, r=steveklabnik

This avoids a crash on windows

Closes #25265

9 years agoAuto merge of #25085 - carols10cents:remove-old-tilde, r=steveklabnik
bors [Mon, 11 May 2015 04:46:41 +0000 (04:46 +0000)]
Auto merge of #25085 - carols10cents:remove-old-tilde, r=steveklabnik

There were still some mentions of `~[T]` and `~T`, mostly in comments and debugging statements. I tried to do my best to preserve meaning, but I might have gotten some wrong-- I'm happy to fix anything :)

9 years agoOverwrite grammar sections with what was removed from the reference
Carol Nichols [Mon, 11 May 2015 02:17:33 +0000 (22:17 -0400)]
Overwrite grammar sections with what was removed from the reference

Between ffc5f1c, when grammar.md was created by copying parts of the
reference, and 8cf2552, when all EBNF was removed from reference.md,
there were parts of the grammar that were updated in reference.md but
not grammar.md, and then they weren't copied over because they existed
already, but they were slightly out of date.

Example: the `path_item : ident | "self" ;` rule in Use declarations was
changed from "mod" to "self" in the reference in 195fd9a but wasn't
updated in the grammar.

9 years agoAdd literal semicolon to the grammar of view_item
Carol Nichols [Mon, 11 May 2015 00:48:02 +0000 (20:48 -0400)]
Add literal semicolon to the grammar of view_item

Both external crate declarations and use declarations need to end with a
semicolon.

9 years agoRemove operator precedence section covered in the reference
Carol Nichols [Wed, 6 May 2015 02:32:38 +0000 (22:32 -0400)]
Remove operator precedence section covered in the reference

9 years agoFill in more parts of the grammar for Expressions
Carol Nichols [Wed, 6 May 2015 02:32:20 +0000 (22:32 -0400)]
Fill in more parts of the grammar for Expressions

9 years agoFill in grammar for Statements
Carol Nichols [Wed, 6 May 2015 01:52:21 +0000 (21:52 -0400)]
Fill in grammar for Statements

Some of this text is duplicated in the reference (and belongs there) so
remove it. It says item grammar is the same, so point to that grammar
section.

9 years agoPoint to the use declaration section from the re-exporting section
Carol Nichols [Wed, 6 May 2015 01:06:17 +0000 (21:06 -0400)]
Point to the use declaration section from the re-exporting section

The syntax for re-exporting privacy is covered in the use declaration
item.

9 years agoAdd visibility section of the grammar
Carol Nichols [Wed, 6 May 2015 00:52:34 +0000 (20:52 -0400)]
Add visibility section of the grammar

Namely an optional "pub" before any item. The "pub" in the Use
declaration section should use this too.

9 years agoUpdate AUTHORS.txt and RELEASES.md for 1.0
Brian Anderson [Wed, 6 May 2015 20:23:33 +0000 (13:23 -0700)]
Update AUTHORS.txt and RELEASES.md for 1.0

9 years agodocs: Update SliceConcatExt docs for assoc types
Ulrik Sverdrup [Mon, 11 May 2015 00:01:27 +0000 (02:01 +0200)]
docs: Update SliceConcatExt docs for assoc types

9 years agodocs: Fixes in Reference Chapter 6.1
Ulrik Sverdrup [Sun, 10 May 2015 23:25:10 +0000 (01:25 +0200)]
docs: Fixes in Reference Chapter 6.1

9 years agodocs: Link from tls macros to relevant docs
Ulrik Sverdrup [Sun, 10 May 2015 22:38:47 +0000 (00:38 +0200)]
docs: Link from tls macros to relevant docs

Fixes #25233

9 years agodocs: Clarify Path::starts_with (and ends_with)
Ulrik Sverdrup [Sun, 10 May 2015 22:29:50 +0000 (00:29 +0200)]
docs: Clarify Path::starts_with (and ends_with)

Fixes #24882

9 years agodocs: Update FromStr documentation
Ulrik Sverdrup [Sun, 10 May 2015 22:22:04 +0000 (00:22 +0200)]
docs: Update FromStr documentation

Fixes #25250

9 years agoAdd long diagnostics for E0249 and E0250
Nick Hamann [Sun, 10 May 2015 23:58:21 +0000 (18:58 -0500)]
Add long diagnostics for E0249 and E0250

9 years agoAuto merge of #24934 - jooert:bitset-append-split_off, r=Gankro
bors [Mon, 11 May 2015 00:58:33 +0000 (00:58 +0000)]
Auto merge of #24934 - jooert:bitset-append-split_off, r=Gankro

cc #19986

9 years agoFour spaces indent, rephrasing
Johann [Mon, 11 May 2015 00:40:02 +0000 (02:40 +0200)]
Four spaces indent, rephrasing

9 years agoUpdate BitSet docs to correct types
Paul Quint [Sun, 10 May 2015 23:08:44 +0000 (18:08 -0500)]
Update BitSet docs to correct types

Update BitSet docs to correct type in one more spot

removed accidental file

9 years agoAdd if let expressions example
Johann Hofmann [Mon, 11 May 2015 00:03:37 +0000 (02:03 +0200)]
Add if let expressions example

9 years agoDocs: Compile-time bounds check in index expression
Johann Hofmann [Sun, 10 May 2015 22:53:24 +0000 (00:53 +0200)]
Docs: Compile-time bounds check in index expression

The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time.

For the changed example see http://is.gd/28ak9E

9 years agoFix typo in references-and-borrowing docs
Pete Hunt [Sun, 10 May 2015 23:10:02 +0000 (16:10 -0700)]
Fix typo in references-and-borrowing docs

9 years agoAdd a link to the E0184 long diagnostic message.
Nick Hamann [Sun, 10 May 2015 18:17:12 +0000 (13:17 -0500)]
Add a link to the E0184 long diagnostic message.

9 years agoRevise the E0206 long diagnostics message.
Nick Hamann [Sun, 10 May 2015 18:01:40 +0000 (13:01 -0500)]
Revise the E0206 long diagnostics message.

9 years agoImprove wording for E0204 and E0205 long diagnostic messages.
Nick Hamann [Sun, 10 May 2015 17:55:12 +0000 (12:55 -0500)]
Improve wording for E0204 and E0205 long diagnostic messages.

9 years agoAdd long diagnostics for E0184, E0204, E0205, E0206, E0243, E0244.
Nick Hamann [Sun, 10 May 2015 08:48:15 +0000 (03:48 -0500)]
Add long diagnostics for E0184, E0204, E0205, E0206, E0243, E0244.

9 years agoAdd some comments for error codes in librustc_typeck/diagnostics
Nick Hamann [Sun, 10 May 2015 01:38:10 +0000 (20:38 -0500)]
Add some comments for error codes in librustc_typeck/diagnostics

9 years agoFix typo in guessing-game docs
Pete Hunt [Sun, 10 May 2015 22:11:40 +0000 (15:11 -0700)]
Fix typo in guessing-game docs

9 years agodoc: unwrap is discouraged, so use Some
Tshepang Lekhonkhobe [Sun, 10 May 2015 11:32:31 +0000 (13:32 +0200)]
doc: unwrap is discouraged, so use Some

9 years agoRemove extra parentheses
Jan-Erik Rediger [Sun, 10 May 2015 21:12:45 +0000 (23:12 +0200)]
Remove extra parentheses

9 years agoAuto merge of #25281 - steveklabnik:rollup, r=steveklabnik
bors [Sun, 10 May 2015 20:44:45 +0000 (20:44 +0000)]
Auto merge of #25281 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #24948, #25158, #25188, #25222, #25239, #25240, #25241, #25255, #25257, #25263
- Failed merges:

9 years agoRollup merge of #25263 - fhinkel:master, r=steveklabnik
Steve Klabnik [Sun, 10 May 2015 20:44:24 +0000 (16:44 -0400)]
Rollup merge of #25263 - fhinkel:master, r=steveklabnik

9 years agoRollup merge of #25257 - dpetersen:mutability-docfix, r=steveklabnik
Steve Klabnik [Sun, 10 May 2015 20:44:23 +0000 (16:44 -0400)]
Rollup merge of #25257 - dpetersen:mutability-docfix, r=steveklabnik

I think there's a trivial missing word in the Mutability document. I reformatted the resulting paragraph in vim, which seems to match what the rest of the document is doing as far as word wrapping.

Edit: I found another minor thing as I continued reading.

P.S. I'm re-reading the docs, since so much has changed since my first read, and they've gotten even better! Nice job!

r? @steveklabnik

9 years agoRollup merge of #25255 - caipre:diagnostic-messages, r=alexcrichton
Steve Klabnik [Sun, 10 May 2015 20:44:23 +0000 (16:44 -0400)]
Rollup merge of #25255 - caipre:diagnostic-messages, r=alexcrichton

Add a few diagnostic messages; part of  #24407.

9 years agoRollup merge of #25241 - sindreij:patch-2, r=steveklabnik
Steve Klabnik [Sun, 10 May 2015 20:44:23 +0000 (16:44 -0400)]
Rollup merge of #25241 - sindreij:patch-2, r=steveklabnik

The start of the last text block in references was missing, I added it.

r? @steveklabnik

9 years agoRollup merge of #25240 - bluss:doc-hashmap-entry, r=steveklabnik
Steve Klabnik [Sun, 10 May 2015 20:44:23 +0000 (16:44 -0400)]
Rollup merge of #25240 - bluss:doc-hashmap-entry, r=steveklabnik

Add example for HashMap::entry()

9 years agoRollup merge of #25239 - sindreij:patch-1, r=alexcrichton
Steve Klabnik [Sun, 10 May 2015 20:44:22 +0000 (16:44 -0400)]
Rollup merge of #25239 - sindreij:patch-1, r=alexcrichton

9 years agoRollup merge of #25222 - GuillaumeGomez:doc-ref, r=steveklabnik
Steve Klabnik [Sun, 10 May 2015 20:44:22 +0000 (16:44 -0400)]
Rollup merge of #25222 - GuillaumeGomez:doc-ref, r=steveklabnik

r? @steveklabnik

9 years agoRollup merge of #25188 - tincann:patch-1, r=steveklabnik
Steve Klabnik [Sun, 10 May 2015 20:44:22 +0000 (16:44 -0400)]
Rollup merge of #25188 - tincann:patch-1, r=steveklabnik

9 years agoRollup merge of #25158 - koute:master, r=alexcrichton
Steve Klabnik [Sun, 10 May 2015 20:44:22 +0000 (16:44 -0400)]
Rollup merge of #25158 - koute:master, r=alexcrichton

I was profiling my code again and this time AsRef<str> for String
was eating up a considerable chunk of my runtime; adding the inline
annotation made the program run almost twice as fast!

While I was at it I also added the annotation to other implementations
of AsRef as well as AsMut.

9 years agoRollup merge of #24948 - derhuerst:patch-1, r=steveklabnik
Steve Klabnik [Sun, 10 May 2015 20:44:22 +0000 (16:44 -0400)]
Rollup merge of #24948 - derhuerst:patch-1, r=steveklabnik

I've written a small [EditorConfig](http://editorconfig.org) file for Rust development.

9 years agoUpdate docs to stop referencing `BufReadExt`
Corey Farwell [Sun, 10 May 2015 20:32:18 +0000 (16:32 -0400)]
Update docs to stop referencing `BufReadExt`