Commit Graph

74495 Commits

Author SHA1 Message Date
oberien
6caec2c049 Document TrustedLen guarantees more explicitly 2018-02-04 16:09:32 +01:00
oberien
75474ff132 TrustedLen for Repeat / RangeFrom test cases 2018-02-04 16:09:32 +01:00
oberien
a1809d5784 Implement TrustedLen for Take<Repeat> and Take<RangeFrom> 2018-02-04 16:09:32 +01:00
bors
0c6091fbd0 Auto merge of #47834 - Mark-Simulacrum:no-cgu-release, r=alexcrichton
Do not enable ThinLTO on stable, beta, or nightly builds.

Fixes #45444
2018-02-04 15:06:06 +00:00
John Kåre Alsaker
32d5fbe8b2 Run the run-make tests last, so more tests run on Windows when make is unavailable 2018-02-04 14:52:31 +01:00
Guillaume Gomez
8a587e67af Improve big sidebar elements display 2018-02-04 13:47:35 +01:00
Guillaume Gomez
c26abe75bc Fix not selectable search input 2018-02-04 13:38:39 +01:00
bors
3986539df6 Auto merge of #47991 - nrc:update, r=alexcrichton
Update RLS and Rustfmt

r? @alexcrichton
2018-02-04 12:26:09 +00:00
Seiichi Uchida
3d114c7f61 Remove delay_span_bug() in check_aliasability
This path was considered to be unreachable. However,
`&mut` could potentially live inside `static`.
For example, `static TAB: [&mut [u8]; 0] = [];`.
2018-02-04 19:15:34 +09:00
Gilad Naaman
61ff3ba536 libtest: Replace panics with error messages 2018-02-04 06:10:54 +02:00
bors
9af374abf9 Auto merge of #47915 - eddyb:layout-of, r=nikomatsakis
rustc: prefer ParamEnvAnd and LayoutCx over tuples for LayoutOf.

This PR provides `tcx.layout_of(param_env.and(ty))` as the idiomatic replacement for the existing `(tcx, param_env).layout_of(ty)` and removes fragile (coherence-wise) layout-related tuple impls.

r? @nikomatsakis
2018-02-04 03:33:44 +00:00
Nick Cameron
cec82c1bfe Update RLS and Rustfmt 2018-02-04 15:08:54 +13:00
Mark Simulacrum
e1f04c04df Disable ThinLTO for dist builds.
Dist builds should always be as fast as we can make them, and since
those run on CI we don't care quite as much for the build being somewhat
slower. As such, we don't automatically enable ThinLTO on builds for the
dist builders.
2018-02-03 18:38:17 -07:00
bors
3d292b793a Auto merge of #47845 - Zoxc:gen-fixes, r=nikomatsakis
Generator bugfixes

r? @nikomatsakis
2018-02-03 17:28:08 +00:00
Corey Farwell
d597da3267 Clarify shared file handler behavior of File::try_clone.
Fixes https://github.com/rust-lang/rust/issues/46578.
2018-02-03 11:50:48 -05:00
bors
aa0a5a86a1 Auto merge of #46254 - Dylan-DPC:ellided-lifetime, r=nikomatsakis
elided lifetime

Closes #45992

Hey
Having a problem with my config so decided to make a WIP PR nevertheless. Will add some more tests.
2018-02-03 14:38:52 +00:00
Guillaume Gomez
dde3611281 Fix rendering issues on mobile 2018-02-03 13:13:29 +01:00
bors
8d04b8fda7 Auto merge of #47962 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #46156, #47829, #47842, #47898, #47914, #47916, #47919, #47942, #47951, #47973
- Failed merges: #47753
2018-02-03 12:02:33 +00:00
Guillaume Gomez
6b35d81382 Fix const evaluation ICE in rustdoc 2018-02-03 12:30:37 +01:00
kennytm
3a0a423d61
Rollup merge of #47973 - perlun:patch-1, r=dtolnay
copy_nonoverlapping example: Fixed typo

The comment referred to a variable using an incorrect name. (it has probably been renamed since the comment was written, or the comment was copied elsewhere - I noted the example in libcore has the `tmp` name for the temporary variable.)
2018-02-03 16:08:27 +08:00
Peter Atashian
c42d76d3c8
Somehow this function got flipped around
Unflip it
2018-02-03 01:52:04 -05:00
Peter Atashian
f4c83693f9
Go back to files directories and symlinks being mutually exclusive
Be smarter about what a symlink is however
2018-02-03 01:45:58 -05:00
bors
6c15dffc43 Auto merge of #47791 - estebank:mismatched-trait-impl, r=nikomatsakis
Tweak presentation on lifetime trait mismatch

 - On trait/impl method discrepancy, add label pointing at trait signature.
 - Point only at method definition when referring to named lifetimes on lifetime mismatch.
 - When the sub and sup expectations are the same, tweak the output to avoid repeated spans.

Fix #30790, CC #18759.
2018-02-03 01:26:56 +00:00
Eduard-Mihai Burtescu
cc68afb384 ui tests: diff from old (expected) to new (actual) instead of backwards. 2018-02-03 02:51:16 +02:00
Per Lundberg
321e429b9f
copy_nonoverlapping example: Fixed typo
The comment referred to a variable using an incorrect name. (it has probably been renamed since the comment was written, or the comment was copied elsewhere - I noted the example in libcore has the `tmp` name for the temporary variable.)
2018-02-02 22:44:14 +02:00
Aaron Hill
a7646df923
Remove commented-out code 2018-02-02 14:59:27 -05:00
kennytm
8d1586df51
Rollup merge of #47951 - GuillaumeGomez:sidebar-hover, r=QuietMisdreavus Fix ugly hover in sidebar In the sidebar, the elements under Structs, Enums... have an ugly hover if they're not selected. This fixes it. r? @QuietMisdreavus 2018-02-02 22:48:51 +08:00
kennytm
9d995d2832
Rollup merge of #47942 - estebank:macro-spans, r=nikomatsakis Minimize weird spans involving macro context Sometimes the parser attempts to synthesize spans from within a macro context with the span for the captured argument, leading to non-sensical spans with very bad output. Given that an incorrect span is worse than a partially incomplete span, when detecting this situation return only one of the spans without merging them. Fix #32072, #47778. CC #23480. 2018-02-02 22:48:50 +08:00
kennytm
7c6380cdcf
Rollup merge of #47919 - varkor:to_degrees-precision, r=rkruppe Use constant for 180/π in to_degrees The current f32|f64.to_degrees implementation uses a division to calculate 180/π, which causes a loss of precision. Using a constant is still not perfect (implementing a maximally-precise algorithm would come with a high performance cost), but improves precision with a minimal change. As per the discussion in #29944, this fixes #29944 (the costs of improving the precision further would not outweigh the gains). 2018-02-02 22:48:49 +08:00
kennytm
5edeff3130
Rollup merge of #47916 - vmx:patch-2, r=kennytm Fix lang items box example code The exchange_free lang item is gone in favour of box_free [1]. Some warnings are also fixed by this commit. [1]: https://github.com/rust-lang/rust/commit/ca115dd083a1fe1d2b4892c5e50e49eb83ff1f3 2018-02-02 22:48:47 +08:00
kennytm
b4b73a1d95
Rollup merge of #47914 - etaoins:improve-char-escape-in-lexer-msg, r=petrochenkov Improve char escaping in lexer messages Currently ', " and \ are escaped as \', \" and \\ respectively. This leads to confusing messages such as error: unknown start of token: \\ when encountering a single backslash. Fix by emitting printable ASCII characters directly. This will still escape \r, \n, \t and Unicode characters. Fixes #47902 2018-02-02 22:48:46 +08:00
kennytm
2e3a8f5159
Rollup merge of #47898 - Aaron1011:static-ref-nll, r=nikomatsakis Fix ICE when assigning references to a static mut with NLL is_unsafe_place only filters out statics in the rhs, not the lhs. Since it's possible to reach that 'Place::Static', we handle statics the same way as we do locals. Fixes #47789 2018-02-02 22:48:45 +08:00
kennytm
a6719446c0
Rollup merge of #47842 - Manishearth:dead-code, r=nagisa Remove dead code The Clone impl makes the lint ignore the type. 2018-02-02 22:48:43 +08:00
kennytm
0f36b2cf2e
Rollup merge of #47829 - estebank:break-in-for, r=cramertj Suggest removing value from break when invalid When attempting to use break with a value in a type of loop where it'd be invalid (any non-loop), suggest using break on its own. Close #34359. 2018-02-02 22:48:41 +08:00
kennytm
3600bfb3f0
Rollup merge of #46156 - SimonSapin:patch-14, r=withoutboats
Document the size of bool
2018-02-02 16:29:11 +08:00
Manish Goregaokar
ee737c73a2 Add regression test 2018-02-02 13:36:26 +05:30
Manish Goregaokar
c22d6e2fda Fix rustdoc ICE on macros defined within functions
fixes #47639
2018-02-02 12:13:12 +05:30
bors
616b66dca2 Auto merge of #47465 - estebank:include-space-after-mut, r=nikomatsakis
Include space in suggestion `mut` in bindings

Fix #46614.
2018-02-02 04:19:12 +00:00
Manish Goregaokar
c785013951 Remove dead code 2018-02-02 09:18:49 +05:30
Peter Atashian
259b0329d4
This internal only method is no longer needed. 2018-02-01 20:42:31 -05:00
Peter Atashian
dcf53c1590
Rewrite remove_dir_all to be correct
The fact that this had to be rewritten does not bode well
2018-02-01 20:35:50 -05:00
Peter Atashian
b1b9edf5ae
This is what FileType on Windows should ideally be. 2018-02-01 20:29:19 -05:00
bors
6741e416fe Auto merge of #47102 - Diggsey:wasm-syscall, r=alexcrichton
Implement extensible syscall interface for wasm

Currently it's possible to run tests with the native wasm target, but it's not possible to tell whether they pass or to capture the output, because libstd throws away stdout, stderr and the exit code. While advanced libstd features should probably require more specific targets (eg. wasm-unknown-web) I think even the unknown target should at least support basic I/O.

Any solution is constrained by these factors:
- It must not be javascript specific
- There must not be too strong coupling between libstd and the host environment (because it's an "unknown" target)
- WebAssembly does not allow "optional" imports - all imports *must* be resolved.
- WebAssembly does not support calling the host environment through any channel *other* than imports.

The best solution I could find to these constraints was to give libstd a single required import, and implement a syscall-style interface through that import. Each syscall is designed such that a no-op implementation gives the most reasonable fallback behaviour. This means that the following import table would be perfectly valid:
```javascript
imports.env = { rust_wasm_syscall: function(index, data) {} }
```

Currently I have implemented these system calls:
- Read from stdin
- Write to stdout/stderr
- Set the exit code
- Get command line arguments
- Get environment variable
- Set environment variable
- Get time

It need not be extended beyond this set if being able to run tests for this target is the only goal.

edit:
As part of this PR I had to make a further change. Previously, the rust entry point would be automatically called when the webassembly module was instantiated. This was problematic because from the javascript side it was impossible to call exported functions, access program memory or get a reference to the instance.

To solve this, ~I changed the default behaviour to not automatically call the entry point, and added a crate-level attribute to regain the old behaviour. (`#![wasm_auto_run]`)~ I disabled this behaviour when building tests.
2018-02-02 01:27:14 +00:00
Esteban Küber
fd3f2312a7 Fix test after rebase 2018-02-01 15:16:02 -08:00
Esteban Küber
378e73e6db Remove support for Self in attributes 2018-02-01 15:06:23 -08:00
Esteban Küber
f7c61783e4 Fix tests 2018-02-01 15:06:22 -08:00
Esteban Küber
27a23db660 Rework parse_ident_attr 2018-02-01 15:06:22 -08:00
Esteban Küber
2dee07b12a Remove cast suggestions 2018-02-01 15:06:22 -08:00
Esteban Küber
621e61bff9 Add filter to detect local crates for rustc_on_unimplemented 2018-02-01 15:06:21 -08:00
Esteban Küber
4c92a02b64 Change rustc_on_unimplemented for Iterator and binops 2018-02-01 15:06:21 -08:00