]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #28873 - dotdash:28339, r=nikomatsakis
bors [Wed, 7 Oct 2015 16:41:55 +0000 (16:41 +0000)]
Auto merge of #28873 - dotdash:28339, r=nikomatsakis

Fixes #28839

8 years agoFix reborrows of &mut pointers
Björn Steinbrink [Tue, 6 Oct 2015 20:45:56 +0000 (22:45 +0200)]
Fix reborrows of &mut pointers

Fixes #28839

8 years agoAuto merge of #28868 - JIghtuse:str_doc, r=steveklabnik
bors [Wed, 7 Oct 2015 13:58:51 +0000 (13:58 +0000)]
Auto merge of #28868 - JIghtuse:str_doc, r=steveklabnik

8 years agoAuto merge of #28867 - panicbit:german-trpl, r=steveklabnik
bors [Wed, 7 Oct 2015 12:13:32 +0000 (12:13 +0000)]
Auto merge of #28867 - panicbit:german-trpl, r=steveklabnik

8 years agoAuto merge of #28865 - GuillaumeGomez:patch-1, r=Manishearth
bors [Wed, 7 Oct 2015 10:27:31 +0000 (10:27 +0000)]
Auto merge of #28865 - GuillaumeGomez:patch-1, r=Manishearth

r? @Manishearth

8 years agoAuto merge of #28877 - sourcefrog:doc-fuse, r=alexcrichton
bors [Wed, 7 Oct 2015 07:41:36 +0000 (07:41 +0000)]
Auto merge of #28877 - sourcefrog:doc-fuse, r=alexcrichton

8 years agoAuto merge of #28866 - nikomatsakis:remove-hair-trait, r=nrc
bors [Wed, 7 Oct 2015 05:11:44 +0000 (05:11 +0000)]
Auto merge of #28866 - nikomatsakis:remove-hair-trait, r=nrc

As the subject says. This PR also removes the `Hair` trait, which was impeding the ability to build such a map, as described in this thread on internals:

https://internals.rust-lang.org/t/removing-the-hair-trait-from-mir-construction/2732

r? @nrc

8 years agoLink from Fuse type docstring to iter.fuse that creates them
Martin Pool [Wed, 7 Oct 2015 02:29:27 +0000 (19:29 -0700)]
Link from Fuse type docstring to iter.fuse that creates them

8 years agoAuto merge of #28841 - jld:const-slice-ice, r=Aatch
bors [Wed, 7 Oct 2015 01:59:31 +0000 (01:59 +0000)]
Auto merge of #28841 - jld:const-slice-ice, r=Aatch

This turned up as part of #3170.  When constructing an `undef` value to
return in the error case, we were trying to get the element type of the
Rust-level value being indexed instead of the underlying array; when
indexing a slice, that's not an array and the LLVM assertion failure
reflects this.

The regression test is a lightly altered copy of `const-array-oob.rs`.

8 years agoremove now unnecessary trait impls
Niko Matsakis [Tue, 6 Oct 2015 20:49:02 +0000 (16:49 -0400)]
remove now unnecessary trait impls

8 years agoAuto merge of #28864 - aarzee:master, r=steveklabnik
bors [Tue, 6 Oct 2015 20:21:34 +0000 (20:21 +0000)]
Auto merge of #28864 - aarzee:master, r=steveklabnik

Remove leading newlines in files and replace lines containing only whitespace with blank lines

8 years agofix some tidy complaints
Niko Matsakis [Tue, 6 Oct 2015 18:58:15 +0000 (14:58 -0400)]
fix some tidy complaints

8 years agodoc: Mention split_whitespace in split doc
Boris Egorov [Tue, 6 Oct 2015 17:05:05 +0000 (23:05 +0600)]
doc: Mention split_whitespace in split doc

8 years agoAuto merge of #28842 - chrisccerami:patch-1, r=steveklabnik
bors [Tue, 6 Oct 2015 17:57:00 +0000 (17:57 +0000)]
Auto merge of #28842 - chrisccerami:patch-1, r=steveklabnik

8 years agoAdd link to the german trpl translation
panicbit [Tue, 6 Oct 2015 10:31:57 +0000 (12:31 +0200)]
Add link to the german trpl translation

8 years agoReplace multiple trailing newlines with a single trailing newline
Carlos Liam [Tue, 6 Oct 2015 17:06:39 +0000 (13:06 -0400)]
Replace multiple trailing newlines with a single trailing newline

Sorry I didn’t get this in the last PR (#28864), I hadn’t thought of it.

8 years agorename `dump` to `mir_map`, which seems more suitable
Niko Matsakis [Tue, 6 Oct 2015 16:37:43 +0000 (12:37 -0400)]
rename `dump` to `mir_map`, which seems more suitable

8 years agomake mir map available to later passes (currently unused)
Niko Matsakis [Tue, 6 Oct 2015 16:35:53 +0000 (12:35 -0400)]
make mir map available to later passes (currently unused)

8 years agoAdd error explanation for E0496
Guillaume Gomez [Tue, 6 Oct 2015 16:04:09 +0000 (18:04 +0200)]
Add error explanation for E0496

8 years agostore the mir into a map, restructure to avoid rebuilding so many times
Niko Matsakis [Tue, 6 Oct 2015 15:41:31 +0000 (11:41 -0400)]
store the mir into a map, restructure to avoid rebuilding so many times

8 years agoClean newlines
Carlos Liam [Tue, 6 Oct 2015 15:14:11 +0000 (11:14 -0400)]
Clean newlines

8 years agopurge `-Z always-build-mir`, which is no longer relevant
Niko Matsakis [Tue, 6 Oct 2015 14:48:11 +0000 (10:48 -0400)]
purge `-Z always-build-mir`, which is no longer relevant

8 years agoWrap words at 80 characters
Chris C Cerami [Tue, 6 Oct 2015 14:39:37 +0000 (10:39 -0400)]
Wrap words at 80 characters

8 years agostrip out the hair trait and use concrete types instead
Niko Matsakis [Mon, 5 Oct 2015 16:31:48 +0000 (12:31 -0400)]
strip out the hair trait and use concrete types instead

8 years agoAuto merge of #28858 - jryans:crate-doc-syntax, r=alexcrichton
bors [Tue, 6 Oct 2015 10:37:02 +0000 (10:37 +0000)]
Auto merge of #28858 - jryans:crate-doc-syntax, r=alexcrichton

Without the blank lines, the content is displayed inline, including the `rust,ignore` syntax hint.

r? @steveklabnik

8 years agoAuto merge of #28855 - jld:mathematial, r=alexcrichton
bors [Tue, 6 Oct 2015 08:48:37 +0000 (08:48 +0000)]
Auto merge of #28855 - jld:mathematial, r=alexcrichton

8 years agoAuto merge of #28823 - petrochenkov:identeq2, r=nrc
bors [Tue, 6 Oct 2015 07:00:25 +0000 (07:00 +0000)]
Auto merge of #28823 - petrochenkov:identeq2, r=nrc

Closes https://github.com/rust-lang/rust/issues/28658

8 years agoComplex import example needs blank lines
J. Ryan Stinnett [Tue, 6 Oct 2015 05:11:18 +0000 (00:11 -0500)]
Complex import example needs blank lines

8 years agoAuto merge of #28698 - nrc:fmt8, r=brson
bors [Tue, 6 Oct 2015 04:14:56 +0000 (04:14 +0000)]
Auto merge of #28698 - nrc:fmt8, r=brson

8 years agoAuto merge of #28779 - alexcrichton:ffi-isize-usize, r=nrc
bors [Tue, 6 Oct 2015 01:26:13 +0000 (01:26 +0000)]
Auto merge of #28779 - alexcrichton:ffi-isize-usize, r=nrc

This lint warning was originally intended to help against misuse of the old Rust
`int` and `uint` types in FFI bindings where the Rust `int` was not equal to the
C `int`. This confusion no longer exists (as Rust's types are now `isize` and
`usize`), and as a result the need for this lint has become much less over time.

Additionally, starting with [the RFC for libc][rfc] it's likely that `isize` and
`usize` will be quite common in FFI bindings (e.g. they're the definition of
`size_t` and `ssize_t` on many platforms).

[rfc]: https://github.com/rust-lang/rfcs/pull/1291

This commit disables these lints to instead consider `isize` and `usize` valid
types to have in FFI signatures.

8 years agorustfmt librustc_trans/save
Nick Cameron [Sun, 27 Sep 2015 20:20:49 +0000 (09:20 +1300)]
rustfmt librustc_trans/save

8 years agoFix doc typo in num::{f32,f64}.
Jed Davis [Mon, 5 Oct 2015 23:51:43 +0000 (16:51 -0700)]
Fix doc typo in num::{f32,f64}.

8 years agoAuto merge of #28697 - nrc:fmt7, r=brson
bors [Mon, 5 Oct 2015 23:34:07 +0000 (23:34 +0000)]
Auto merge of #28697 - nrc:fmt7, r=brson

8 years agoAdd comment for the use of Ident in hash map in mtwt
Vadim Petrochenkov [Mon, 5 Oct 2015 22:47:35 +0000 (01:47 +0300)]
Add comment for the use of Ident in hash map in mtwt

8 years agoSkip one method
Nick Cameron [Sun, 27 Sep 2015 20:20:30 +0000 (09:20 +1300)]
Skip one method

8 years agorustfmt librustc_front
Nick Cameron [Sun, 27 Sep 2015 19:23:31 +0000 (08:23 +1300)]
rustfmt librustc_front

8 years agoAuto merge of #28717 - nagisa:optional-no-landing-pads, r=alexcrichton
bors [Mon, 5 Oct 2015 21:47:47 +0000 (21:47 +0000)]
Auto merge of #28717 - nagisa:optional-no-landing-pads, r=alexcrichton

Part of #28710

Landing pads during stage0 are now enabled by defaullt. Since this has its downsides and upsides either way, I made it possible to change the option through configure.

8 years agoFix MSVC stage0 with landing pads enabled
Simonas Kazlauskas [Fri, 2 Oct 2015 19:19:51 +0000 (22:19 +0300)]
Fix MSVC stage0 with landing pads enabled

8 years agoAuto merge of #28847 - Ms2ger:typos, r=steveklabnik
bors [Mon, 5 Oct 2015 20:02:02 +0000 (20:02 +0000)]
Auto merge of #28847 - Ms2ger:typos, r=steveklabnik

8 years agoAuto merge of #28849 - semmaz:doc-anchor-fix, r=alexcrichton
bors [Mon, 5 Oct 2015 18:14:09 +0000 (18:14 +0000)]
Auto merge of #28849 - semmaz:doc-anchor-fix, r=alexcrichton

r? @steveklabnik

8 years agodocs: anchors fixes
Simon Mazur [Mon, 5 Oct 2015 16:25:54 +0000 (19:25 +0300)]
docs: anchors fixes

8 years agoLink to 'Lifetime Elision' section at first use of elide
Chris C Cerami [Mon, 5 Oct 2015 15:40:32 +0000 (11:40 -0400)]
Link to 'Lifetime Elision' section at first use of elide

8 years agoUse a more common word than "elide", e.g. omit
Chris C Cerami [Mon, 5 Oct 2015 02:48:07 +0000 (22:48 -0400)]
Use a more common word than "elide", e.g. omit

8 years agoFix some typos.
Ms2ger [Sun, 23 Aug 2015 09:52:13 +0000 (11:52 +0200)]
Fix some typos.

8 years agoAuto merge of #28748 - nikomatsakis:universal-mir, r=pnkfelix
bors [Mon, 5 Oct 2015 03:06:33 +0000 (03:06 +0000)]
Auto merge of #28748 - nikomatsakis:universal-mir, r=pnkfelix

I had to fix a few things. Notable changes:

1. I removed the MIR support for constants, instead falling back to the existing `ConstVal`. I still think we ought to reform how we handle constants, but it's not clear to me that the approach I was taking is correct, and anyway I think we ought to do it separately.
2. I adjusted how we handle bindings in matches: we now *declare* all the bindings up front, rather than doing it as we encounter them. This is not only simpler, since we don't have to check if a binding has already been declared, it avoids ICEs if any of the arms turn out to be unreachable.
3. I do MIR construction *after* `check_match`, because it detects various broken cases. I'd like for `check_match` to be subsumed by MIR construction, but we can do that as a separate PR (if indeed it makes sense).

I did a crater run and found no regressions in the wild: https://gist.github.com/nikomatsakis/0038f90e10c8ad00f2f8

8 years agochange PartialEq impl for ConstVal so that two constants are `==`
Niko Matsakis [Tue, 29 Sep 2015 21:08:05 +0000 (17:08 -0400)]
change PartialEq impl for ConstVal so that two constants are `==`
if they represent the same constant; otherwise the match algorithm
goes into infinite recursion when a pattern contains `NaN`

8 years agochange how we declare bindings so that unreachable arms don't
Niko Matsakis [Tue, 29 Sep 2015 20:17:40 +0000 (16:17 -0400)]
change how we declare bindings so that unreachable arms don't
cause panics

8 years agorather than just passing the block around, track the candidate's index,
Niko Matsakis [Tue, 29 Sep 2015 14:49:24 +0000 (10:49 -0400)]
rather than just passing the block around, track the candidate's index,
and track which arms are reached (though in fact we don't make use of
this right now -- we might later if we absorb the checking of patterns
into MIR, as I would like)

8 years agoAuto merge of #28840 - rust-lang:brson-patch-1, r=steveklabnik
bors [Mon, 5 Oct 2015 01:16:34 +0000 (01:16 +0000)]
Auto merge of #28840 - rust-lang:brson-patch-1, r=steveklabnik

Add the Tock paper.

8 years agoswitch to using constvals for constants, instead of having constant
Niko Matsakis [Thu, 10 Sep 2015 19:44:44 +0000 (15:44 -0400)]
switch to using constvals for constants, instead of having constant
trees in MIR

8 years agodo MIR construction after pattern evaluation for now to sidestep
Niko Matsakis [Tue, 29 Sep 2015 20:17:50 +0000 (16:17 -0400)]
do MIR construction after pattern evaluation for now to sidestep
various annoying edge cases

8 years agoalways build MIR
Niko Matsakis [Thu, 10 Sep 2015 19:44:34 +0000 (15:44 -0400)]
always build MIR

8 years agoFix LLVM assertion on out-of-bounds const slice index.
Jed Davis [Sun, 4 Oct 2015 20:32:49 +0000 (13:32 -0700)]
Fix LLVM assertion on out-of-bounds const slice index.

This turned up as part of #3170.  When constructing an `undef` value to
return in the error case, we were trying to get the element type of the
Rust-level value being indexed instead of the underlying array; when
indexing a slice, that's not an array and the LLVM assertion failure
reflects this.

The regression test is a lightly altered copy of `const-array-oob.rs`.

8 years agoAuto merge of #28573 - ruud-v-a:rustdoc-license, r=brson
bors [Sun, 4 Oct 2015 23:30:40 +0000 (23:30 +0000)]
Auto merge of #28573 - ruud-v-a:rustdoc-license, r=brson

The output of rustdoc includes resources licensed under the SIL Open
Font License, the MIT license, and the Apache License 2.0. All of these
licenses permit redistribution provided that the license text is also
redistributed. Previously this was not the case, making rustdoc output
unsuitable for distribution by default. This resolves that problem by
including the license texts in rustdoc output.

See also: https://users.rust-lang.org/t/licensing-rustdoc-output/2880

8 years agoUpdate bibliography.md
Brian Anderson [Sun, 4 Oct 2015 22:55:19 +0000 (15:55 -0700)]
Update bibliography.md

8 years agoAuto merge of #28825 - iwillspeak:master, r=alexcrichton
bors [Sun, 4 Oct 2015 21:43:36 +0000 (21:43 +0000)]
Auto merge of #28825 - iwillspeak:master, r=alexcrichton

`--explain` support for E0163 and E0164.

Part of rust-lang/rust#24407

8 years agoAuto merge of #28806 - wthrowe:bare-outfile-fix, r=alexcrichton
bors [Sun, 4 Oct 2015 19:50:50 +0000 (19:50 +0000)]
Auto merge of #28806 - wthrowe:bare-outfile-fix, r=alexcrichton

The reason this was not failing is fascinating.  The variable $(rustc)
is empty, so the make recipe was expanded as " -o foo foo.rs".  make
interpreted this as an instruction to run the command "o foo foo.rs"
and ignore any failure that occurred, because it uses a leading '-' on
a command to signal that behavior.

8 years agoAuto merge of #28831 - Seeker14491:patch-1, r=steveklabnik
bors [Sun, 4 Oct 2015 17:36:49 +0000 (17:36 +0000)]
Auto merge of #28831 - Seeker14491:patch-1, r=steveklabnik

8 years agoAuto merge of #28832 - sarcas:docs-uneeded-done-in-library-example, r=steveklabnik
bors [Sun, 4 Oct 2015 14:18:28 +0000 (14:18 +0000)]
Auto merge of #28832 - sarcas:docs-uneeded-done-in-library-example, r=steveklabnik

"Rust Inside Other Languages" in the Rust book includes a library example. The reference specifies printing "done!" when the code finishes running, and the language examples (Ruby, Python, JS) all do this in their code.

However, the Rust library example code *also* does this, so that the examples as written would output "done!" twice.

This commit removes the "done!" from the Rust example code to tidy up the output to match expectations.

8 years agoDocs: Removes duplicate output from FFI example
James Bell [Sun, 4 Oct 2015 09:44:00 +0000 (10:44 +0100)]
Docs: Removes duplicate output from FFI example

The "Rust Inside Other Languages" page includes a library example. The
reference specifies printing "done!" when the code finishes running, and
the language examples (Ruby, Python, JS) all do this in their code.
However, the Rust library example code *also* does this, so that the
examples as written would output "done!" twice.

This removes the "done!" from the Rust example code to clarify the docs.

8 years agofix another typo
Seeker14491 [Sun, 4 Oct 2015 05:34:21 +0000 (00:34 -0500)]
fix another typo

8 years agofix a few typos
Seeker14491 [Sat, 3 Oct 2015 23:01:42 +0000 (18:01 -0500)]
fix a few typos

8 years agoAuto merge of #28669 - arielb1:well-formed-methods, r=nikomatsakis
bors [Sat, 3 Oct 2015 22:07:37 +0000 (22:07 +0000)]
Auto merge of #28669 - arielb1:well-formed-methods, r=nikomatsakis

By RFC1214:
>    Before calling a fn, we check that its argument and return types are WF.

The previous code only checked the trait-ref, which was not enough
in several cases.

As this is a soundness fix, it is a [breaking-change]. Some new annotations are needed, which I think are because of #18653 and the imperfection of `projection_must_outlive` (that can probably be worked around by moving the wf obligation later).

Fixes #28609

r? @nikomatsakis

8 years agoFix run-make/bare-outfile test
William Throwe [Fri, 2 Oct 2015 03:05:25 +0000 (23:05 -0400)]
Fix run-make/bare-outfile test

The reason this was not failing is fascinating.  The variable $(rustc)
is empty, so the make recipe was expanded as " -o foo foo.rs".  make
interpreted this as an instruction to run the command "o foo foo.rs"
and ignore any failure that occurred, because it uses a leading '-' on
a command to signal that behavior.

8 years agoAuto merge of #28829 - GuillaumeGomez:patch-1, r=steveklabnik
bors [Sat, 3 Oct 2015 20:18:38 +0000 (20:18 +0000)]
Auto merge of #28829 - GuillaumeGomez:patch-1, r=steveklabnik

r? @steveklabnik

8 years agoAdd missing dot
Guillaume Gomez [Sat, 3 Oct 2015 18:21:39 +0000 (20:21 +0200)]
Add missing dot

8 years agoAuto merge of #28521 - arielb1:metadiet, r=eddyb
bors [Sat, 3 Oct 2015 17:33:10 +0000 (17:33 +0000)]
Auto merge of #28521 - arielb1:metadiet, r=eddyb

libcore.rlib reduced from 19121 kiB to 15934 kiB - 20% win.

The librustc encoded AST is 9013500 bytes long - for the record, librustc consists of about 2254126 characters. Might be worth looking at.

r? @eddyb

8 years agoAdd Error Explanations for E0163 & E0164
Will Speak [Sat, 3 Oct 2015 14:42:38 +0000 (15:42 +0100)]
Add Error Explanations for E0163 & E0164

Addds `--explain` support for E0163 and E0164.

8 years agolibsyntax: Do not derive Hash for Ident
Vadim Petrochenkov [Sat, 3 Oct 2015 09:44:47 +0000 (12:44 +0300)]
libsyntax: Do not derive Hash for Ident

8 years agoAuto merge of #28821 - dagnir:formatting-fix, r=steveklabnik
bors [Sat, 3 Oct 2015 09:37:49 +0000 (09:37 +0000)]
Auto merge of #28821 - dagnir:formatting-fix, r=steveklabnik

8 years agouse the correct subtyping order in a test
Ariel Ben-Yehuda [Fri, 2 Oct 2015 20:52:18 +0000 (23:52 +0300)]
use the correct subtyping order in a test

also, ensure that callers are checked.

8 years agoAuto merge of #28815 - matklad:contrib-doc, r=steveklabnik
bors [Sat, 3 Oct 2015 07:50:47 +0000 (07:50 +0000)]
Auto merge of #28815 - matklad:contrib-doc, r=steveklabnik

This adds a paragraph on how to generate documentation without sloooow `make doc`. I'm not a native English speaker, so there might be some language related bugs (I wish English was as hard to get wrong, as Rust)

This also includes whitespace cleanup of contributing.md in a separate commit. Whiltespace is not significant in github flavored markdown, and my Emacs just cleans ws automatically :)

r? @steveklabnik

8 years agoAuto merge of #28818 - Stebalien:fix-iter-chain-order, r=alexcrichton
bors [Sat, 3 Oct 2015 06:03:50 +0000 (06:03 +0000)]
Auto merge of #28818 - Stebalien:fix-iter-chain-order, r=alexcrichton

part of #28810

8 years agoAuto merge of #28813 - arielb1:well-formed-variables, r=nikomatsakis
bors [Sat, 3 Oct 2015 04:16:52 +0000 (04:16 +0000)]
Auto merge of #28813 - arielb1:well-formed-variables, r=nikomatsakis

it doesn't seem to be necessary and is potentially harmful.

r? @nikomatsakis

8 years agoAuto merge of #28820 - steveklabnik:rollup, r=steveklabnik
bors [Sat, 3 Oct 2015 02:23:03 +0000 (02:23 +0000)]
Auto merge of #28820 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28736, #28805, #28812, #28814, #28819
- Failed merges:

8 years agodocs: add rustdoc example to CONTRIBUTING.md
Aleksey Kladov [Fri, 2 Oct 2015 21:09:27 +0000 (00:09 +0300)]
docs: add rustdoc example to CONTRIBUTING.md

8 years agoRollup merge of #28819 - steveklabnik:doc_hr, r=brson
Steve Klabnik [Sat, 3 Oct 2015 00:38:23 +0000 (20:38 -0400)]
Rollup merge of #28819 - steveklabnik:doc_hr, r=brson

It's not really clear here, since the example is rendered, where it
starts and ends. So let's use <hr>s to split it up.

8 years agoRollup merge of #28814 - matklad:fix-md, r=alexcrichton
Steve Klabnik [Sat, 3 Oct 2015 00:38:23 +0000 (20:38 -0400)]
Rollup merge of #28814 - matklad:fix-md, r=alexcrichton

The list was grabled.

r? @steveklabnik

8 years agoRollup merge of #28812 - steveklabnik:improve_str_from_utf8_docs, r=brson
Steve Klabnik [Sat, 3 Oct 2015 00:38:23 +0000 (20:38 -0400)]
Rollup merge of #28812 - steveklabnik:improve_str_from_utf8_docs, r=brson

Our docs were very basic for the various versions of from_utf8, so
this commit beefs them up.

It also improves docs for the &str variant's error, Utf8Error.

8 years agoRollup merge of #28805 - wthrowe:compile-stdin, r=alexcrichton
Steve Klabnik [Sat, 3 Oct 2015 00:38:22 +0000 (20:38 -0400)]
Rollup merge of #28805 - wthrowe:compile-stdin, r=alexcrichton

8 years agoRollup merge of #28736 - nagisa:rustdocjsfix, r=alexcrichton
Steve Klabnik [Sat, 3 Oct 2015 00:38:22 +0000 (20:38 -0400)]
Rollup merge of #28736 - nagisa:rustdocjsfix, r=alexcrichton

8 years agoAuto merge of #28672 - sanxiyn:const-eval-span, r=alexcrichton
bors [Sat, 3 Oct 2015 00:36:50 +0000 (00:36 +0000)]
Auto merge of #28672 - sanxiyn:const-eval-span, r=alexcrichton

Fix #28402.

8 years agoImprove documentation for the from_utf8 family
Steve Klabnik [Fri, 2 Oct 2015 18:36:02 +0000 (14:36 -0400)]
Improve documentation for the from_utf8 family

Our docs were very basic for the various versions of from_utf8, so
this commit beefs them up.

It also improves docs for the &str variant's error, Utf8Error.

8 years agoAdd in some <hr>s for emphasis
Steve Klabnik [Fri, 2 Oct 2015 22:54:07 +0000 (18:54 -0400)]
Add in some <hr>s for emphasis

It's not really clear here, since the example is rendered, where it
starts and ends. So let's use <hr>s to split it up.

8 years agoAuto merge of #28662 - semmaz:fmt-debug, r=alexcrichton
bors [Fri, 2 Oct 2015 22:49:37 +0000 (22:49 +0000)]
Auto merge of #28662 - semmaz:fmt-debug, r=alexcrichton

fixes #26920

8 years agolibcore: Chain must exhaust a before b.
Steven Allen [Fri, 2 Oct 2015 22:41:06 +0000 (18:41 -0400)]
libcore: Chain must exhaust a before b.

part of #28810

8 years agodocs: whitespace cleanup
Aleksey Kladov [Fri, 2 Oct 2015 21:08:14 +0000 (00:08 +0300)]
docs: whitespace cleanup

8 years agoAuto merge of #28626 - arielb1:closure-needs-infer, r=nikomatsakis
bors [Fri, 2 Oct 2015 21:02:49 +0000 (21:02 +0000)]
Auto merge of #28626 - arielb1:closure-needs-infer, r=nikomatsakis

Fixes #28550

8 years agoreference: fix markdown formatting
Aleksey Kladov [Fri, 2 Oct 2015 20:53:20 +0000 (23:53 +0300)]
reference: fix markdown formatting

8 years agofix fallout
Ariel Ben-Yehuda [Fri, 25 Sep 2015 23:52:46 +0000 (02:52 +0300)]
fix fallout

looks like some mix of #18653 and `projection_must_outlive`, but
that needs to be investigated further (crater run?)

8 years agoensure that the types of methods are well-formed
Ariel Ben-Yehuda [Fri, 25 Sep 2015 22:27:39 +0000 (01:27 +0300)]
ensure that the types of methods are well-formed

By RFC1214:
Before calling a fn, we check that its argument and return types are WF. This check takes place after all higher-ranked lifetimes have been instantiated. Checking the argument types ensures that the implied bounds due to argument types are correct. Checking the return type ensures that the resulting type of the call is WF.

The previous code only checked the trait-ref, which was not enough
in several cases.

As this is a soundness fix, it is a [breaking-change].

Fixes #28609

8 years agoremove the "don't add `_ WF` obligation" hack
Ariel Ben-Yehuda [Fri, 2 Oct 2015 20:36:07 +0000 (23:36 +0300)]
remove the "don't add `_ WF` obligation" hack

it doesn't seem to be necessary and is potentially harmful.

8 years agoAuto merge of #28650 - sanxiyn:attr-usage, r=nrc
bors [Fri, 2 Oct 2015 19:16:39 +0000 (19:16 +0000)]
Auto merge of #28650 - sanxiyn:attr-usage, r=nrc

This is technically a [breaking-change].

Fix #2809.
Fix #22746.

8 years agoAuto merge of #28768 - alexcrichton:dep-info++, r=brson
bors [Fri, 2 Oct 2015 16:33:26 +0000 (16:33 +0000)]
Auto merge of #28768 - alexcrichton:dep-info++, r=brson

This PR closes out #28716 and #28735 by making two changes to the compiler:

1. The `--emit` flag to the compiler now supports the ability to specify the output file name of a partuclar emit type. For example `--emit dep-info=bar.d,asm=foo.s,link` is now accepted.
2. The dep-info emission now emits a dummy target for all input file names to protect against deleted files.

8 years agorustc: Emit phony targets for inputs in dep-info
Alex Crichton [Wed, 30 Sep 2015 17:17:07 +0000 (10:17 -0700)]
rustc: Emit phony targets for inputs in dep-info

This helps protect against files being deleted to ensure that `make` won't emit
errors.

Closes #28735

8 years agoProvide the context for error in constant evaluation of enum discriminant
Seo Sanghyeon [Sat, 26 Sep 2015 02:52:34 +0000 (11:52 +0900)]
Provide the context for error in constant evaluation of enum discriminant

8 years agoAdd a method to test span containment
Seo Sanghyeon [Sat, 26 Sep 2015 01:44:37 +0000 (10:44 +0900)]
Add a method to test span containment

8 years agoCheck attribute usage
Seo Sanghyeon [Fri, 25 Sep 2015 06:25:59 +0000 (15:25 +0900)]
Check attribute usage

8 years agoChange tests per RFC 246 (const vs static)
Seo Sanghyeon [Fri, 25 Sep 2015 09:44:36 +0000 (18:44 +0900)]
Change tests per RFC 246 (const vs static)

8 years agoFix librustdoc search events
Simonas Kazlauskas [Tue, 29 Sep 2015 20:47:01 +0000 (23:47 +0300)]
Fix librustdoc search events

Previously only keyup event was looked at, which meant that pasting, cutting and
otherwise changing the input without typing would not catch any updates to the
search query.