Commit Graph

80890 Commits

Author SHA1 Message Date
kennytm
02357079a6
Rollup merge of #52521 - ehuss:rustdoc-passes-doc, r=kennytm
Fix links in rustdoc book.

Due to a change in how mdbook generates section anchors, headers
with non-alphabetic characters now start with "a".
2018-07-22 22:10:14 +08:00
kennytm
519651acca
Rollup merge of #52508 - joshtriplett:dangling-not-sentinel, r=Mark-Simulacrum
Document that Unique::empty() and NonNull::dangling() aren't sentinel values

The documentation of Unique::empty() and NonNull::dangling() could
potentially suggest that they work as sentinel values indicating a
not-yet-initialized pointer. However, they both declare a non-null
pointer equal to the alignment of the type, which could potentially
reference a valid value of that type (specifically, the first such valid
value in memory). Explicitly document that the return value of these
functions does not work as a sentinel value.
2018-07-22 22:10:13 +08:00
kennytm
82cdbf1d3a
Rollup merge of #52507 - estebank:infer-type, r=nikomatsakis
Reword when `_` couldn't be inferred

r? @nikomatsakis
2018-07-22 22:10:11 +08:00
kennytm
180ad53576
Rollup merge of #52465 - sekineh:add-ci-thumb, r=alexcrichton
Add CI test harness for `thumb*` targets. [IRR-2018-embedded]

This pull request will do the following (rather trivial) changes:
- Fix #52163. In other words, we enabled `./x.py test src/test/run-make` for `no_std` targets.
- Modify `dist-various-1` Dockerfile.
  - CI now performs `run-make` test run on the targets below:
    - `thumbv6m-none-eabi`
    - `thumbv7m-none-eabi`
    - `thumbv7em-none-eabi`
    - `thumbv7em-none-eabihf`.
- ~~Add `thumb-none` Dockerfile.~~
  - ~~Initially, `thumbv7m-none-eabi`, `thumbv7em-none-eabi` and `thumbv7em-none-eabihf` are included as the tested target. `thumbv6m-none-eabi` is disabled for now because LLVM support is not certain.~~
- ~~Add `thumb-none` to .travis.yml~~

Note:
- `run-make` tests are not implemented yet. This PR is test harness only.

The amount of change is very small, but I'd like to open the pull request while the change is trivial.
Because I'm not very used to pull request process, I want to make a small progress first.  This PR will be a foundation for later additions.

CC @kennytm @jamesmunns @nerdyvaishali
2018-07-22 22:10:10 +08:00
kennytm
67cf3ba528
Rollup merge of #51807 - newpavlov:deprecate_str_slice, r=alexcrichton
Deprecation of str::slice_unchecked(_mut)

Closes #51715

I am not sure if 1.28.0 or 1.29.0 should be used for deprecation version, for now it's 1.28.0.

Additionally I've replaced `slice_unchecked` uses with `get_unchecked`. The only places where this method is still used are `src/liballoc/tests/str.rs` and `src/liballoc/tests/str.rs`.
2018-07-22 22:10:09 +08:00
bors
d3b3bc5767 Auto merge of #52368 - GuillaumeGomez:intra_doc_link_resolution_failure-documented, r=QuietMisdreavus
Add "self" intra-link support

Fixes #49583.

r? @QuietMisdreavus
2018-07-22 10:48:15 +00:00
bors
aeca042f84 Auto merge of #52359 - matthewjasper:combine-move-error-reporting, r=pnkfelix
[NLL] Small move error reporting improvements

* Use a MirBorrowckContext when reporting errors to be more uniform with other error reporting
* Add a special message for the case of trying to move from capture variables in `Fn` and `FnMut` closures.

part of #51028
2018-07-22 08:52:05 +00:00
bors
3d51086303 Auto merge of #52394 - estebank:println, r=oli-obk
Improve suggestion for missing fmt str in println

Avoid using `concat!(fmt, "\n")` to improve the diagnostics being
emitted when the first `println!()` argument isn't a formatting string
literal.

Fix #52347.
2018-07-22 06:52:48 +00:00
Esteban Küber
dc563d9500 fix test 2018-07-21 20:48:15 -07:00
bors
a57d5d7b25 Auto merge of #52250 - nnethercote:no-SparseBitMatrix, r=nikomatsakis
Speed up `SparseBitMatrix` use in `RegionValues`.

In practice, these matrices range from 10% to 90%+ full once they are
filled in, so the dense representation is better.

This reduces the runtime of Check Nll builds of `inflate` by 32%, and
several other benchmarks by 1--5%.

It also increases max-rss of `clap-rs` by 30% and a couple of others by
up to 5%, while decreasing max-rss of `coercions` by 14%. I think the
speed-ups justify the max-rss increases.

r? @nikomatsakis
2018-07-22 02:43:57 +00:00
Esteban Küber
3c817259e3 fix tidy ~ again 2018-07-21 19:19:56 -07:00
Esteban Küber
6aa17a3c68 Don't use the new eprintln for stage0 and stage1
I'm not entirely sure why (or if) this is needed.
2018-07-21 17:59:17 -07:00
Esteban Küber
118b0f9a02 Fix tidy by adding new feature gate test 2018-07-21 17:58:05 -07:00
Esteban Küber
915ff0b969 fix logic bug 2018-07-21 17:17:49 -07:00
bors
0ad6179d3b Auto merge of #51485 - estebank:dehighlight-secondary-msgs, r=GuillaumeGomez
Remove highlighting from secondary messages

Deemphasize the secondary messages so that all other highlights stand
out more.

<img width="684" alt="" src="https://user-images.githubusercontent.com/1606434/41261199-7b4fe96e-6d8f-11e8-8619-04d170617df2.png">
2018-07-21 23:50:28 +00:00
Esteban Küber
93b2bb01a9 Remove dependency on libsyntax 2018-07-21 16:18:06 -07:00
Esteban Küber
a7a68370a7 Change eprintln!()
Address #30143 as well. `writeln!()` hasn't been changed.
2018-07-21 15:56:37 -07:00
Esteban Küber
00d500052c Gate format_args_nll behind feature flag 2018-07-21 15:50:46 -07:00
Guillaume Gomez
88f2643679 Add "self" intra-link support 2018-07-22 00:22:30 +02:00
bors
874dec25ed Auto merge of #52115 - Dylan-DPC:feature/nll-liveness-regions, r=nikomatsakis
only compute liveness for variables whose types include regions

Closes #52034

r? @nikomatsakis
2018-07-21 21:01:17 +00:00
Esteban Küber
83a8af50bb Suggest space separated format str literal 2018-07-21 12:16:06 -07:00
bors
d9416587a4 Auto merge of #51959 - tmandry:make-implied-outlives-query, r=nikomatsakis
Turn implied_outlives_bounds into a query

Right now all this does is remove the error reporting in `implied_outlives_bounds`, which seems to work. Farming out full tests to Travis.

For #51649. That issue is deferred so not sure what's next.

r? @nikomatsakis
2018-07-21 18:51:13 +00:00
Matthew Jasper
d34924d824 update tests 2018-07-21 18:40:46 +01:00
Matthew Jasper
086c2d0b13 Fix #52416 - ice for move errors in unsafe blocks 2018-07-21 18:40:46 +01:00
Matthew Jasper
12412749ab Add specific message when moving from upvars in a non-FnOnce closure 2018-07-21 18:40:46 +01:00
Matthew Jasper
341e5e3a61 Use MirBorrowckCtxt while reporting move errors 2018-07-21 18:40:46 +01:00
bors
942b384d61 Auto merge of #52405 - matthewjasper:mutability-errors, r=pnkfelix
[NLL] Mutability errors

cc #51028
cc #51170
cc #46559
Closes #46629

* Better explain why the place is immutable ("immutable item" is gone)
* Distinguish &T and *const T
* Use better spans when a mutable borrow is for a closure capture

r? @pnkfelix
2018-07-21 14:37:45 +00:00
dylan_DPC
0770ff0500 delete tests 2018-07-21 19:46:41 +05:30
Hideki Sekine
3f00b1c07b Treat no_std(target) == None case correctly. 2018-07-21 22:39:35 +09:00
Niko Matsakis
0d8f3b3628 we now get 2 extra mismatched type errors
These new errors actually seem a *tad* clearer than the old one, so
that's good, but now there are 3. Maybe call it a wash?
2018-07-21 15:56:49 +03:00
Niko Matsakis
0e47a4a9d3 use proper body-id and span when solving obligations 2018-07-21 15:56:48 +03:00
Niko Matsakis
596ff12432 add regression test for #52078
Fixes #52078
2018-07-21 15:56:47 +03:00
Niko Matsakis
0b88103985 skip no-op obligations and add a little debug output 2018-07-21 15:56:47 +03:00
Tyler Mandry
e5286d9fa6 Convert implied_outlives_bounds to a query 2018-07-21 15:56:44 +03:00
bors
606713f37a Auto merge of #52562 - Manishearth:clippyup, r=RalfJung
Update clippy

r? @kennytm @oli-obk
2018-07-21 12:32:17 +00:00
dylan_DPC
a4c0d369b6 add docs 2018-07-21 17:21:04 +05:30
Oliver Schneider
2f7edccb03 Don't invent new magic keywords 2018-07-21 12:36:18 +02:00
bors
ef9781358d Auto merge of #52555 - petrochenkov:mresfact, r=alexcrichton
resolve: Some renaming, refactoring and comments

Commits are self-descriptive.
The only functional change is 34bf2f572e that tightens shadowing rules for macro paths (makes the second and third cases in `test/ui/imports/glob-shadowing.rs` an error).
2018-07-21 10:30:11 +00:00
bors
bd455ef165 Auto merge of #52552 - eddyb:proc-macro-prep, r=alexcrichton
Prepare proc_macro for decoupling it from the rest of the compiler.

This is #49219 up to the point where the bridge is introduced. Aside from moving some code around, the largest change is the rewrite of `proc_macro::quote` to be simpler and do less introspection.

I'd like to also extend `quote!` with `${stmt;...;expr}` instead of just `$variable` (and maybe even `$(... $iter ...)*`), which seems pretty straight-forward now, but I don't know if/when I should.

r? @alexcrichton or @dtolnay cc @jseyfried @petrochenkov
2018-07-21 08:31:32 +00:00
bors
17eb392cef Auto merge of #52535 - alexcrichton:update-stdsimd, r=Mark-Simulacrum
Update stdsimd to undo an accidental stabilization

Closes #52403
2018-07-21 06:26:18 +00:00
dylan_DPC
7db3324340 remove unwanted tests and a reference to it in comments 2018-07-21 11:42:44 +05:30
Alex Crichton
d77defcca1 Update stdsimd to undo an accidental stabilization
Closes #52403
2018-07-20 22:34:09 -07:00
bors
f8f6e7c04d Auto merge of #52536 - alexcrichton:attr-spans, r=nikomatsakis
proc_macro: Preserve spans of attributes on functions

This commit updates the tokenization of items which are subsequently passed to
`proc_macro` to ensure that span information is preserved on attributes as much
as possible. Previously this area of the code suffered from #43081 where we
haven't actually implemented converting an attribute to to a token tree yet, but
a local fix was possible here.

Closes #47941
2018-07-21 04:19:15 +00:00
bors
bf7afee52a Auto merge of #52438 - ljedrz:rustc_vec_capacity, r=eddyb
Calculate Vec capacities in librustc

Calculate the required capacity of a few vectors in rustc based on the number of elements they are populated with.
2018-07-21 00:55:46 +00:00
bors
ee8d23d544 Auto merge of #52574 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests

Successful merges:

 - #52502 (fix unsafety: don't call ptr_rotate for ZST)
 - #52505 (rustc: Remove a workaround in ThinLTO fixed upstream)
 - #52526 (Enable run-pass/sepcomp-lib-lto.rs on Android)
 - #52527 (Remove duplicate E0396 tests)
 - #52539 (rustc: Fix two custom attributes with custom derive)
 - #52540 (Fix docker/run.sh script when run locally)
 - #52573 (Cleanups)

Failed merges:

r? @ghost
2018-07-20 22:52:11 +00:00
Esteban Küber
8b59fbc951 fix grep test looking for newline 2018-07-20 15:37:49 -07:00
Oliver Schneider
d3c1e2fb7c Clippy opts out of in_external_macro 2018-07-20 22:50:32 +02:00
Oliver Schneider
b6e0547680 Allow individual lints to opt into being reported in external macros 2018-07-20 22:45:52 +02:00
kennytm
7bf3578a39
Rollup merge of #52573 - oli-obk:cleanups, r=RalfJung
Cleanups

r? @RalfJung
2018-07-21 04:08:12 +08:00
kennytm
a9a4f06254
Rollup merge of #52540 - alexcrichton:tweak-script, r=kennytm
Fix docker/run.sh script when run locally

Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is
being run locally and has previously executed.
2018-07-21 04:08:11 +08:00