Commit Graph

47376 Commits

Author SHA1 Message Date
Brian Anderson
12c68c977f Update bibliography.md 2015-10-04 15:55:19 -07:00
bors
380d767244 Auto merge of #28825 - iwillspeak:master, r=alexcrichton
`--explain` support for E0163 and E0164.

Part of rust-lang/rust#24407
2015-10-04 21:43:36 +00:00
bors
7f4665c3e6 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.
2015-10-04 19:50:50 +00:00
bors
5ff4442a3f Auto merge of #28831 - Seeker14491:patch-1, r=steveklabnik 2015-10-04 17:36:49 +00:00
bors
1dcbd35710 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.
2015-10-04 14:18:28 +00:00
James Bell
2b535a1622 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.
2015-10-04 10:44:00 +01:00
Seeker14491
a0284f4181 fix another typo 2015-10-04 00:34:21 -05:00
Seeker14491
f66170258f fix a few typos 2015-10-03 18:01:42 -05:00
bors
130851e030 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
2015-10-03 22:07:37 +00:00
William Throwe
e3df519225 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.
2015-10-03 17:20:45 -04:00
bors
6d11a81c71 Auto merge of #28829 - GuillaumeGomez:patch-1, r=steveklabnik
r? @steveklabnik
2015-10-03 20:18:38 +00:00
Guillaume Gomez
aeb94a1948 Add missing dot 2015-10-03 20:21:39 +02:00
bors
3e06daac83 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
2015-10-03 17:33:10 +00:00
arthurprs
123a83326f integer parsing should accept leading plus 2015-10-03 12:56:38 -03:00
John Hodge
4c88bf2885 Implement original version of RFC#1245 2015-10-03 23:42:22 +08:00
Will Speak
799656311c Add Error Explanations for E0163 & E0164
Addds `--explain` support for E0163 and E0164.
2015-10-03 15:51:40 +01:00
Vadim Petrochenkov
f37d6fc6f3 libsyntax: Do not derive Hash for Ident 2015-10-03 12:44:47 +03:00
bors
0369304feb Auto merge of #28821 - dagnir:formatting-fix, r=steveklabnik 2015-10-03 09:37:49 +00:00
Ariel Ben-Yehuda
2f23e171cb use the correct subtyping order in a test
also, ensure that callers are checked.
2015-10-03 12:03:48 +03:00
bors
4665aaebfd 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
2015-10-03 07:50:47 +00:00
bors
f492ec4bf4 Auto merge of #28818 - Stebalien:fix-iter-chain-order, r=alexcrichton
part of #28810
2015-10-03 06:03:50 +00:00
bors
d2047bc97d Auto merge of #28813 - arielb1:well-formed-variables, r=nikomatsakis
it doesn't seem to be necessary and is potentially harmful.

r? @nikomatsakis
2015-10-03 04:16:52 +00:00
bors
16331f1a42 Auto merge of #28820 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #28736, #28805, #28812, #28814, #28819
- Failed merges:
2015-10-03 02:23:03 +00:00
Aleksey Kladov
c3753ce074 docs: add rustdoc example to CONTRIBUTING.md 2015-10-03 03:42:28 +03:00
Steve Klabnik
92cff9f0d9 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.
2015-10-02 20:38:23 -04:00
Steve Klabnik
323037d7e7 Rollup merge of #28814 - matklad:fix-md, r=alexcrichton
The list was grabled.

r? @steveklabnik
2015-10-02 20:38:23 -04:00
Steve Klabnik
c3c5de1b98 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.
2015-10-02 20:38:23 -04:00
Steve Klabnik
9c5837e0ce Rollup merge of #28805 - wthrowe:compile-stdin, r=alexcrichton 2015-10-02 20:38:22 -04:00
Steve Klabnik
f368a18059 Rollup merge of #28736 - nagisa:rustdocjsfix, r=alexcrichton 2015-10-02 20:38:22 -04:00
bors
98df45830a Auto merge of #28672 - sanxiyn:const-eval-span, r=alexcrichton
Fix #28402.
2015-10-03 00:36:50 +00:00
Steve Klabnik
4d73da92f0 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.
2015-10-02 19:42:25 -04:00
Steve Klabnik
f528c47c4b 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.
2015-10-02 18:54:15 -04:00
bors
bfb26033af Auto merge of #28662 - semmaz:fmt-debug, r=alexcrichton
fixes #26920
2015-10-02 22:49:37 +00:00
Steven Allen
6999c421ef libcore: Chain must exhaust a before b.
part of #28810
2015-10-02 18:41:06 -04:00
Aleksey Kladov
e3596e34ce docs: whitespace cleanup 2015-10-03 00:08:14 +03:00
bors
669fc7f7d1 Auto merge of #28626 - arielb1:closure-needs-infer, r=nikomatsakis
Fixes #28550
2015-10-02 21:02:49 +00:00
Aleksey Kladov
eac9d71d8e reference: fix markdown formatting 2015-10-02 23:53:20 +03:00
Ariel Ben-Yehuda
ce70207250 fix fallout
looks like some mix of #18653 and `projection_must_outlive`, but
that needs to be investigated further (crater run?)
2015-10-02 23:40:10 +03:00
Ariel Ben-Yehuda
603a75c8ea 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
2015-10-02 23:40:10 +03:00
Ariel Ben-Yehuda
c379f604f1 remove the "don't add _ WF obligation" hack
it doesn't seem to be necessary and is potentially harmful.
2015-10-02 23:36:07 +03:00
bors
ef07d7dd40 Auto merge of #28650 - sanxiyn:attr-usage, r=nrc
This is technically a [breaking-change].

Fix #2809.
Fix #22746.
2015-10-02 19:16:39 +00:00
nwin
ea1f886e50 Use generic trait implementations for Cursor when possible. 2015-10-02 21:07:48 +02:00
bors
e650491f20 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.
2015-10-02 16:33:26 +00:00
Alex Crichton
1741962271 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
2015-10-02 09:33:06 -07:00
Alex Crichton
db76ac7330 std: Add AsRef/AsMut impls to Box/Rc/Arc
These common traits were left off originally by accident from these smart
pointers, and a past attempt (#26008) to add them was later reverted (#26160)
due to unexpected breakge (#26096) occurring. The specific breakage in worry is
the meaning of this return value changed:

    let a: Box<Option<T>> = ...;
    a.as_ref()

Currently this returns `Option<&T>` but after this change it will return
`&Option<T>` because the `AsRef::as_ref` method shares the same name as
`Option::as_ref`. A [crater report][crater] of this change, however, has shown
that the fallout of this change is quite minimal. These trait implementations
are "the right impls to add" to these smart pointers and would enable various
generalizations such as those in #27197.

[crater]: https://gist.github.com/anonymous/0ba4c3512b07641c0f99

This commit is a breaking change for the above reasons mentioned, and the
mitigation strategies look like any of:

    Option::as_ref(&a)
    a.as_ref().as_ref()
    (*a).as_ref()
2015-10-02 08:57:48 -07:00
Seo Sanghyeon
4fb789b86e Provide the context for error in constant evaluation of enum discriminant 2015-10-03 00:36:20 +09:00
Seo Sanghyeon
f3211b1578 Add a method to test span containment 2015-10-03 00:36:20 +09:00
Seo Sanghyeon
61f5b2b0ca Check attribute usage 2015-10-03 00:01:49 +09:00
Seo Sanghyeon
20cccfa67f Change tests per RFC 246 (const vs static) 2015-10-03 00:01:49 +09:00
Simonas Kazlauskas
f38bc2c457 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.
2015-10-02 17:02:02 +03:00