Commit Graph

68161 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
9988e798c0 Implement From<&str> for Symbol. 2017-08-31 23:23:52 +03:00
Andre Bogus
ba643fadfe add a lowercase suggestion to unknown_lints 2017-08-31 22:18:12 +02:00
Mark
e572d85e00 Merge branch 'master' into master 2017-08-31 12:49:48 -04:00
Corey Farwell
0a716fdce2 Expand docs of multi-address behavior of some UDP/TCP APIs.
Fixes https://github.com/rust-lang/rust/issues/22569.
2017-08-31 11:24:34 -04:00
Simon Sapin
de038b746e Add full git commit hash to release channel manifests
The full hash is necessary to build the download URL for "alternate"
compiler builds.
This is a first step for
https://github.com/rust-lang-nursery/rustup.rs/issues/1099
2017-08-31 16:37:14 +02:00
Alex Crichton
7a2a8d7d60 Update Cargo to 0.23.0 and our lockfile 2017-08-31 07:02:50 -07:00
Alex Crichton
9b9de27101 Bump to 1.22.0 2017-08-31 06:58:58 -07:00
Alex Crichton
2972687d10 Update bootstrap compiler
This commit updates the bootstrap compiler and clears out a number
of #[cfg(stage0)] annotations and related business
2017-08-31 06:58:58 -07:00
Oliver Schneider
74748b11bb
WIP: don't suggest placing use statements into expanded code 2017-08-31 15:45:16 +02:00
Oliver Schneider
f9a07bc11b
Add test for broken suggestion 2017-08-31 13:06:53 +02:00
bors
97b01abf3d Auto merge of #41991 - GuillaumeGomez:rustdoc-html-diff, r=nrc
Add warnings when rustdoc html rendering differs
2017-08-31 08:52:03 +00:00
Guillaume Gomez
b501d00090 downgrade libgit2 2017-08-31 09:49:38 +02:00
Alex Burka
da302846ac add fn to syntax of rustc::ty::maps::define_maps 2017-08-31 01:07:47 -04:00
Nick Cameron
5eb478a9e6 Set CFG_VERSION env var for tool builds 2017-08-31 15:24:23 +12:00
Nick Cameron
92867d22a8 Update rls 2017-08-31 15:24:23 +12:00
MarkMcCaskey
1d69c985be update unimplemented! docs 2017-08-30 22:26:54 -04:00
Corey Farwell
396fc111e1 Fix typo in doc ToSocketAddrs example. 2017-08-30 22:03:03 -04:00
Josh Stone
35f8a2065b rustbuild: update the rust-src filter for compiler-rt
We wanted `src/compiler-rt/test` filtered from the `rust-src` package,
but that path is now `src/libcompiler_builtins/compiler-rt/test`.  This
saves over half of the installed rust-src size. (50MB -> 22MB)
2017-08-30 18:20:59 -07:00
bors
890c87b643 Auto merge of #44186 - alexcrichton:rollup, r=alexcrichton
Rollup of 8 pull requests

- Successful merges: #44044, #44089, #44116, #44125, #44154, #44157, #44160, #44172
- Failed merges: #44162
2017-08-31 01:16:17 +00:00
Alex Crichton
b9fea42b7a Update libc to fix sparc compiles 2017-08-30 17:58:39 -07:00
Alex Crichton
41d3e83183 rustc: Fix reachability with cross-crate generators
Same solution as in f2df1857

Closes #44181
2017-08-30 17:32:21 -07:00
Jonathan A. Kollasch
0c2a9d6917 bootstrap: add openssl configuration mapping for i686-unknown-netbsd 2017-08-30 18:22:46 -05:00
Alex Crichton
058202e523 rustc: Remove the used_unsafe field on TyCtxt
Now that lint levels are available for the entire compilation, this can be an
entirely local lint in `effect.rs`
2017-08-30 16:09:02 -07:00
QuietMisdreavus
1615d3502c expand on using rustup custom toolchains in CONTRIBUTING.md
fixes #42484
2017-08-30 17:06:12 -05:00
Guillaume Gomez
bde0071d1d Fix invalid display of enum sub-fields docs 2017-08-30 23:16:25 +02:00
Alex Crichton
5c279a40ae Merge branch 'hide-trait-map' into rollup 2017-08-30 13:17:40 -07:00
Alex Crichton
16bbff0277 Rollup merge of #44172 - mattico:patch-2, r=frewsxcv
Fix link in unstable book entry for Generators
2017-08-30 13:17:05 -07:00
Alex Crichton
c0812c8458 Rollup merge of #44160 - AndyGauge:api-docs-macros, r=steveklabnik
API docs: macros.  Standard Documentation Checklist

Fixes #29381
r? @steveklabnik
2017-08-30 13:17:05 -07:00
Alex Crichton
8962393299 Rollup merge of #44157 - alexcrichton:no-specializes-cache, r=eddyb
rustc: Remove `specialization_cache` in favor of a query

This commit removes the `specialization_cache` field of `TyCtxt` by moving it to
a dedicated query, which it turned out was already quite easily structured to do
so!

cc #44137
2017-08-30 13:17:05 -07:00
bors
7eeac1b814 Auto merge of #43932 - eddyb:const-scoping, r=nikomatsakis
Forward-compatibly deny drops in constants if they *could* actually run.

This is part of #40036, specifically the checks for user-defined destructor invocations on locals which *may not* have been moved away, the motivating example being:
```rust
const FOO: i32 = (HasDrop {...}, 0).1;
```
The evaluation of constant MIR will continue to create `'static` slots for more locals than is necessary (if `Storage{Live,Dead}` statements are ignored), but it shouldn't be misusable.

r? @nikomatsakis
2017-08-30 20:12:25 +00:00
Guillaume Gomez
76e32210d1 Add license exceptions 2017-08-30 20:07:58 +02:00
Chris Stankus
e15a07ad64 Remove Borrow bound from SliceExt::binary_search 2017-08-30 12:02:25 -05:00
Alex Crichton
fd4f362b30 Rollup merge of #44125 - SergioBenitez:master, r=nrc
Initial diagnostic API for proc-macros.

This commit introduces the ability to create and emit `Diagnostic` structures from proc-macros, allowing for proc-macro authors to emit warning, error, note, and help messages just like the compiler does.

The API is somewhat based on the diagnostic API already present in `rustc` with several changes that improve usability. The entry point into the diagnostic API is a new `Diagnostic` type which is primarily created through new `error`, `warning`, `help`, and `note` methods on `Span`. The `Diagnostic` type records the diagnostic level, message, and optional `Span` for the top-level diagnostic and contains a `Vec` of all of the child diagnostics. Child diagnostics can be added through builder methods on `Diagnostic`.

A typical use of the API may look like:

```rust
let token = parse_token();
let val = parse_val();

val.span
    .error(format!("expected A but found {}", val))
    .span_note(token.span, "because of this token")
    .help("consider using a different token")
    .emit();
```

cc @jseyfried @nrc @dtolnay @alexcrichton
2017-08-30 11:11:12 -05:00
Alex Crichton
bc6981ba55 Rollup merge of #44116 - alexcrichton:update-libc, r=Mark-Simulacrum
Update the libc submodule

Brings in a few fixes for wasm/asmjs
2017-08-30 11:11:11 -05:00
Alex Crichton
63cc2dda63 Rollup merge of #44089 - alexcrichton:trait-proc-macro, r=nrc
rustc: Fix proc_macro expansions on trait methods

This commit fixes procedural macro attributes being attached to trait methods,
ensuring that they get resolved and expanded as other procedural macro
attributes. The bug here was that `current_module` on the resolver was
accidentally set to be a trait when it's otherwise only ever expecting a
`mod`/block module. The actual fix here came from @jseyfried, I'm just helping
to land it in the compiler!

Closes #42493
2017-08-30 11:11:10 -05:00
Alex Crichton
581dc93293 Rollup merge of #44044 - mattico:string-splice-return, r=dtolnay
Remove Splice struct return value from String::splice

The implementation is now almost identical to the one in the RFC.

Fixes #44038
cc #32310
2017-08-30 11:11:09 -05:00
bors
51a54b6dc0 Auto merge of #43895 - JeremySorensen:master, r=alexcrichton
make ignore-git true by default when channel is dev

Fixes #43771
(Handle git info in rustbuild differently)
2017-08-30 15:43:09 +00:00
Jimmy Cuadra
414ee9a254 Remove test case that assumes FromStr provides TryFrom<&'a str>.
See https://travis-ci.org/rust-lang/rust/jobs/269861252
2017-08-30 04:43:09 -07:00
Jimmy Cuadra
b0edfce950 Implement TryFrom explicitly for infallible numeric conversions.
See https://github.com/rust-lang/rust/pull/44174#discussion_r135982787
2017-08-30 04:42:25 -07:00
bors
ca9cf3594a Auto merge of #43968 - petrochenkov:span2, r=michaelwoerister
Make fields of `Span` private

I actually tried to intern spans and benchmark the result<sup>*</sup>, and this was a prerequisite.
This kind of encapsulation will be a prerequisite for any other attempt to compress span's representation, so I decided to submit this change alone.

The issue https://github.com/rust-lang/rust/issues/43088 seems relevant, but it looks like `SpanId` won't be able to reuse this interface, unless the tables are global (like interner that I tried) and are not a part of HIR.
r? @michaelwoerister anyway

<sup>*</sup> Interning means 2-3 times more space is required for a single span, but duplicates are free. In practice it turned out that duplicates are not *that* common, so more memory was wasted by interning rather than saved.
2017-08-30 11:08:26 +00:00
Guillaume Gomez
9b26f3ad25 Remove some false positive issues 2017-08-30 11:46:58 +02:00
bors
c66e7fa8de Auto merge of #43903 - oli-obk:alignto, r=aturon
Add align_offset intrinsic

see https://github.com/rust-lang/rfcs/pull/2043 for details and the plan towards stabilization (reexport in `core::mem` via various convenience functions)

as per @scottmcm 's [comment](https://github.com/rust-lang/rfcs/pull/2043#issuecomment-316818169), this is just the intrinsic (which is obviously unstable).
2017-08-30 08:06:42 +00:00
Guillaume Gomez
bba7fd9dd5 Temporary fix for a test (will require another update when this is fully merged) 2017-08-30 09:40:43 +02:00
Guillaume Gomez
f2774b7ac3 Print warning whatever the rendering mode 2017-08-30 09:40:43 +02:00
Guillaume Gomez
33d99e526e Set python binary name to python 2.7 2017-08-30 09:40:43 +02:00
Guillaume Gomez
e1367ef1b1 Update unstable-crate test 2017-08-30 09:40:43 +02:00
Guillaume Gomez
274543b9ca Add warnings when rustdoc html rendering differs 2017-08-30 09:40:43 +02:00
bors
b58e31ac03 Auto merge of #43880 - arielb1:noninvasive-probe, r=nikomatsakis
Remove the trait selection impl in method::probe

This removes the hacky trait selection reimplementation in `method::probe`, which occasionally comes and causes problems.

There are 2 issues I've found with this approach:
1. The older implementation sometimes had a "guess" type from an impl, which allowed subtyping to work. This is why I needed to make a change in `libtest`: there's an `impl<A> Clone for fn(A)` and we're calling `<for<'a> fn(&'a T) as Clone>::clone`. The older implementation would do a subtyping between the impl type and the trait type, so it would do the check for `<fn(A) as Clone>::clone`, and confirmation would continue with the subtyping. The newer implementation directly passes `<for<'a> fn(&'a T) as Clone>::clone` to selection, which fails. I'm not sure how big of a problem that would be in reality, especially after #43690 would remove the `Clone` problem, but I still want a crater run to avoid breaking the world.
2. The older implementation "looked into" impls to display error messages. I'm not sure that's an advantage - it looked exactly 1 level deep.

r? @eddyb
2017-08-30 05:30:28 +00:00
Jimmy Cuadra
80e3f8941d Add blanket TryFrom impl when From is implemented.
Adds `impl<T, U> TryFrom<T> for U where U: From<T>`.

Removes `impl<'a, T> TryFrom<&'a str> for T where T: FromStr` due to
overlapping impls caused by the new blanket impl. This removal is to
be discussed further on the tracking issue for TryFrom.

Refs #33417.
2017-08-29 22:13:21 -07:00
Jeremy Sorensen
4f591a47d5 fix option for RUST_CONFIGURE_ARGS to be rust.ignore-git=false 2017-08-29 22:01:51 -07:00