Commit Graph

88351 Commits

Author SHA1 Message Date
bors
ec194646fe Auto merge of #57243 - dingelish:master, r=sfackler
Bound sgx target_env with fortanix as target_vendor

This PR adds `target_vendor` check, as discussed in issue [57231](https://github.com/rust-lang/rust/issues/57231)

Signed-off-by: Yu Ding <dingelish@gmail.com>
2019-01-02 15:09:41 +00:00
Simon Sapin
0fd5003b38
src/jemalloc is gone, remove its mention from COPYRIGHT 2019-01-02 16:07:42 +01:00
bors
a36b960df6 Auto merge of #57250 - codeworm96:tyerr_msg, r=varkor
Improve type mismatch error messages

Closes #56115.

Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing.

TODO the book and clippy needs to be changed accordingly later.

r? @varkor
2019-01-02 11:59:15 +00:00
bors
d3704932bd Auto merge of #57251 - petrochenkov:reregr, r=varkor
syntax: Fix regression in diagnostics for patterns in trait method parameters

Fixes https://github.com/rust-lang/rust/issues/55036
2019-01-02 09:24:10 +00:00
bors
96530344ef Auto merge of #56827 - faern:eliminate-recv-timeout-panic, r=KodrAus
Eliminate Receiver::recv_timeout panic

Fixes #54552.

This panic is because `recv_timeout` uses `Instant::now() + timeout` internally. This possible panic is not mentioned in the documentation for this method.

Very recently we merged (still unstable) support for checked addition (#56490) of `Instant + Duration`, so it's now finally possible to add these together without risking a panic.
2019-01-02 02:03:15 +00:00
bors
443ae75eaf Auto merge of #57209 - estebank:suggest-raw-ident, r=petrochenkov
Suggest using raw identifiers in 2018 edition when using keywords
2019-01-01 23:30:34 +00:00
Yu Ding
20e0395e66 Merge remote-tracking branch 'upstream/master' 2019-01-01 14:55:33 -08:00
Vadim Petrochenkov
3df500db29 syntax: Fix regression in diagnostics for patterns in trait method parameters 2019-01-01 23:59:32 +03:00
bors
b2b7a063af Auto merge of #57125 - doitian:inconsistent-clone-doc, r=bluss
Fix inconsistent Clone documentation.

Now, arrays of any size Clone if the element type is Clone. So remove the
the document that uses this as an example.

refs #57123
2019-01-01 20:50:13 +00:00
Yu Ding
a3128116d2 Remove min_const_unsafe_fn since it is stable
Signed-off-by: Yu Ding <dingelish@gmail.com>
2019-01-01 11:49:54 -08:00
Oliver Scherer
03b892860d Check the correct arena 2019-01-01 20:06:50 +01:00
Oliver Scherer
9654ae9c99 Remove unused function 2019-01-01 20:06:50 +01:00
Oliver Scherer
72bcf92e12 Macrofy more Lift impls 2019-01-01 20:06:50 +01:00
Oliver Scherer
e42b21b522 Properly lift Allocations 2019-01-01 20:05:48 +01:00
Oliver Scherer
48aa81911c what is going on? 2019-01-01 20:05:03 +01:00
Oliver Scherer
3d924a6252 Git is drunk 2019-01-01 20:05:03 +01:00
Oliver Scherer
cb933eff35 rebase fallout 2019-01-01 20:05:02 +01:00
Oliver Scherer
089c4039c6 Pacify tidy 2019-01-01 20:05:02 +01:00
Oliver Scherer
d96c4a9046 Undo a few - now unnecessary - changes 2019-01-01 20:05:02 +01:00
Oliver Scherer
17db209d4b Simplify bit inspection of a constant 2019-01-01 20:05:02 +01:00
Oliver Scherer
37a0df3e9d <&'tcx ty::Const as Deref>::deref 2019-01-01 20:05:02 +01:00
Oliver Scherer
bb9f717a80 const_to_op is now lazy_const_to_op 2019-01-01 20:05:02 +01:00
Oliver Scherer
f36c6559ea Add unwrap_usize to LazyConst, too 2019-01-01 20:05:02 +01:00
Oliver Scherer
135132891d Simplify and fix some diagnostics around arrays 2019-01-01 20:05:02 +01:00
Oliver Scherer
88df3a2c97 Mingw is special wrt type sizes 2019-01-01 20:05:02 +01:00
Oliver Scherer
b903cb9d60 Move the Unevaluated constant arm upwards in the type structure 2019-01-01 20:05:02 +01:00
Corey Farwell
d2c91a1a6d Fix broken links to second edition TRPL.
Fixes https://github.com/rust-lang/rust/issues/57104.
2019-01-01 12:53:07 -05:00
bors
cae164753f Auto merge of #55937 - davidtwco:issue-54943, r=pnkfelix
NLL: User type annotations refactor, associated constant patterns and ref bindings.

Fixes #55511 and Fixes #55401. Contributes to #54943.

This PR performs a large refactoring on user type annotations, checks user type annotations for associated constants in patterns and that user type annotations for `ref` bindings are respected.

r? @nikomatsakis
2019-01-01 15:26:12 +00:00
bors
36500deb1a Auto merge of #57203 - nagisa:readme, r=Mark-Simulacrum
Remove mention of required memory to build

Because it, obviously, changes all the time and 600MiB is way out-of-date now.
2019-01-01 11:47:58 +00:00
bors
7a2779a462 Auto merge of #57210 - estebank:str-err, r=zackmdavis
Tweak unicode escape diagnostics
2019-01-01 09:10:23 +00:00
bors
0432798fdb Auto merge of #57194 - matthiaskrgr:copyright_headers, r=Centril
remove more copyright headers

r? @Mark-Simulacrum
2019-01-01 06:34:11 +00:00
bors
d8371c61e6 Auto merge of #57199 - petrochenkov:ambig, r=estebank
resolve: Simplify treatment of ambiguity errors

If we have a glob conflict like this
```rust
mod m1 { struct S; }
mod m2 { struct S; }

use m1::*;
use m2::*;
```
we treat it as a special "ambiguity item" that's not an error by itself, but produces an error when actually used.
```rust
use m1::*; // primary
use m2::*; // secondary

=>

ambiguity S(m1::S, m2::S);
```

Ambiguity items were *sometimes* treated as their primary items for error recovery, but pretty irregularly.

After this PR they are always treated as their primary items, except that
- If an ambiguity item is marked as used, then it still produces an error.
- Ambiguity items are still filtered away when exported to other crates (which is also a use in some sense).
2019-01-01 02:08:39 +00:00
Yuning Zhang
710dcbd381 Improve type mismatch error messages
Replace "integral variable" with "integer" and replace
"floating-point variable" with "floating-point number" to make the
message less confusing.
2018-12-31 20:43:08 -05:00
Yu Ding
d04f5208ba Bound sgx target_env with fortanix as target_vendor
Signed-off-by: Yu Ding <dingelish@gmail.com>
2018-12-31 16:32:56 -08:00
bors
fe6a54d220 Auto merge of #56878 - petrochenkov:privdyn, r=arielb1
privacy: Use common `DefId` visiting infrastructure for all privacy visitors

One repeating pattern in privacy checking is going through a type, visiting all `DefId`s inside it and doing something with them.
This is the case because visibilities and reachabilities are attached to `DefId`s.

Previously various privacy visitors visited types slightly differently using their own methods, with most recently written `TypePrivacyVisitor` being the "gold standard".
This mostly worked okay, but differences could manifest in overly conservative reachability analysis, some errors being reported twice, some private-in-public lints (not errors) being wrongly reported or not reported.

This PR does something that I wanted to do since https://github.com/rust-lang/rust/pull/32674#discussion_r58291608 - factoring out the common visiting logic!
Now all the common logic is contained in `struct DefIdVisitorSkeleton`, with specific privacy visitors deciding only what to do with visited `DefId`s (via `trait DefIdVisitor`).

A bunch of cleanups is also applied in the process.
This area is somewhat tricky due to lots of easily miss-able details, but thankfully it's was well covered by tests in https://github.com/rust-lang/rust/pull/46083 and previous PRs, so I'm relatively sure in the refactoring correctness.

Fixes https://github.com/rust-lang/rust/pull/56837#discussion_r241962239 in particular.
Also this will help with implementing https://github.com/rust-lang/rust/issues/48054.
2018-12-31 23:30:57 +00:00
Vadim Petrochenkov
60d1fa70bb Address review comments
Say "trait" instead of "type" in diagnostics for `dyn Trait`
2019-01-01 01:39:55 +03:00
Vadim Petrochenkov
8b1c424b6d privacy: Use common DefId visiting infra for all privacy visitors 2019-01-01 01:39:55 +03:00
John Kåre Alsaker
f4826abf6d Fix backtraces on Windows 2018-12-31 22:07:28 +01:00
bors
9eac386342 Auto merge of #57047 - euclio:field-structured-suggestions, r=estebank
use structured suggestions for nonexistent fields

r? @estebank
2018-12-31 20:56:19 +00:00
Esteban Küber
30961c958d Do not use unicode character in diagnostic help 2018-12-31 10:00:08 -08:00
Andy Russell
dfc326d0e2
use structured suggestions for nonexistent fields 2018-12-31 12:52:30 -05:00
Esteban Küber
b416f1398f Use structured suggestion for braceless unicode escape squence 2018-12-31 09:44:58 -08:00
Esteban Küber
7edc434b72 Account for \xFF and \u{FF} sequences in string format errors 2018-12-31 09:44:58 -08:00
Esteban Küber
18e0bdae54 Update tests after rebase 2018-12-31 08:41:05 -08:00
Esteban Küber
2cd0d14eb1 Address review comments
- Suggest raw ident escaping in all editions
- Keep primary label in all cases
2018-12-31 08:24:00 -08:00
Esteban Küber
833f12ebd7 Suggest using raw identifiers in 2018 edition when using keywords 2018-12-31 08:24:00 -08:00
Mazdak Farrokhzad
14be8a7f14 const-stabilize Ipv4Addr::new 2018-12-31 16:36:39 +01:00
John Kåre Alsaker
584a52096e Clean up and optimize OpenTask / read_index 2018-12-31 16:24:22 +01:00
Mazdak Farrokhzad
2760f87e3a const-stabilize const_int_ops + reverse_bits 2018-12-31 16:11:03 +01:00
bors
6efaef6189 Auto merge of #57220 - quark-zju:mcount, r=estebank
Add `-Z instrument-mcount`

This flag inserts `mcount` function call to the beginning of every function
after inline processing. So tracing tools like uftrace [1] (or ftrace for
Linux kernel modules) have a chance to examine function calls.

It is similar to the `-pg` flag provided by gcc or clang, but without
generating a `__gmon_start__` function for executables. If a program
runs without being traced, no `gmon.out` will be written to disk.

Under the hood, it simply adds `"instrument-function-entry-inlined"="mcount"`
attribute to every function. The `post-inline-ee-instrument` LLVM pass does
the actual job.

[1]: https://github.com/namhyung/uftrace
2018-12-31 14:30:17 +00:00