Commit Graph

121405 Commits

Author SHA1 Message Date
Alexis Bourget
00a7b56bab Added the documentation about length to CString::from_raw 2020-06-03 23:32:26 +02:00
bors
f3fadf6abd Auto merge of #72754 - lcnr:predicate-fold, r=nikomatsakis
remove trivial `mk_predicate`s

r? @nikomatsakis
2020-06-03 20:12:40 +00:00
Mark Rousskov
7139342249 Bump to 1.46 2020-06-03 15:27:51 -04:00
Kyle J Strand
d3bd2c354d
Add Camelid
Email from @camelid:

> HI there,
>
> I’m a new contributor and I just looked at Rust Thanks and noticed that my contributions are listed under two different capitalizations of my name: “Camelid" and “camelid". Could you make them both “Camelid"?
> 
> Thanks!
> 
> Camelid
2020-06-03 11:44:41 -06:00
Bastian Kauschke
86f8105389 fix AdtDef docs 2020-06-03 19:24:58 +02:00
Vadim Petrochenkov
b628358e9a rustc_target: Remove pre_link_args_crt 2020-06-03 19:51:42 +03:00
bors
56daaf669e Auto merge of #72948 - Dylan-DPC:rollup-fazhw00, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72586 (split select into submodules)
 - #72900 (Don't count pathless --extern for unused-crate-dependencies warnings)
 - #72924 (Stabilize `std::io::Buf{Reader, Writer}::capacity`)
 - #72942 (clean up E0641 explanation)
 - #72945 (Updated documentation for Control Flow Guard)

Failed merges:

r? @ghost
2020-06-03 16:06:30 +00:00
Dylan DPC
b61f3bb66b
Rollup merge of #72945 - ajpaverd:cfguard-docs, r=Mark-Simulacrum
Updated documentation for Control Flow Guard

Update user-facing documentation for the Control Flow Guard (CFG) exploit mitigation in the unstable book, as requested in #68793.
2020-06-03 18:05:44 +02:00
Dylan DPC
77a74ec878
Rollup merge of #72942 - GuillaumeGomez:cleanup-e0641, r=Dylan-DPC
clean up E0641 explanation

r? @Dylan-DPC
2020-06-03 18:05:42 +02:00
Dylan DPC
ec2826cc2e
Rollup merge of #72924 - JohnTitor:stabilize-buf-capacity, r=shepmaster
Stabilize `std::io::Buf{Reader, Writer}::capacity`

Closes #68833
FCP is done here: https://github.com/rust-lang/rust/issues/68833#issuecomment-637596083
2020-06-03 18:05:41 +02:00
Dylan DPC
7973d9381f
Rollup merge of #72900 - jsgf:no-unused-pathless, r=petrochenkov
Don't count pathless --extern for unused-crate-dependencies warnings

`--extern proc_macro` is used to add the proc_macro crate to the extern
prelude for all procmacros. In general pathless `--extern` only references
sysroot/standard libraries and so should be exempt from
unused-crate-dependencies warnings.

r? @petrochenkov
2020-06-03 18:05:39 +02:00
Dylan DPC
f94c0df037
Rollup merge of #72586 - lcnr:winner-winnowing, r=nikomatsakis
split select into submodules

a0f06d11ae/src/librustc_trait_selection/traits/select.rs (L1)

I extracted two submodules:

- confirmation: apart from `pub(super) fn confirm_candidate`, everything else is private
- candidate_assembly: exports `pub(super) fn candidate_from_obligation` and `pub(super) fn assemble_candidates`

I tried to change as little as possible while doing this and hopefully split this into well reviewable commits.
2020-06-03 18:05:37 +02:00
Bastian Kauschke
f3eab4b124 remove outdated fixme 2020-06-03 15:59:10 +02:00
Andrew Paverd
d282fb000b Updated documentation for Control Flow Guard 2020-06-03 14:31:08 +01:00
Bastian Kauschke
b28026447a remove ignore-tidy-filelength 2020-06-03 14:49:35 +02:00
Bastian Kauschke
bf5c62da9e move confirmation into submodule 2020-06-03 14:49:35 +02:00
Bastian Kauschke
b8172ec405 move candidate assembly into a submodule 2020-06-03 14:49:35 +02:00
Bastian Kauschke
634977f8f2 move select into subfolder 2020-06-03 14:49:35 +02:00
bors
6f48888456 Auto merge of #72746 - petrhosek:libunwind-hermetic, r=tmandry
Make libunwind build hermetic

We want to avoid exporting any symbols from Rust's version of libunwind,
and to do so we need to disable visibility annotations to make sure that
the -fvisibility=hidden has effect, and also hide global new/delete.

This matches the CMake build of libunwind.
2020-06-03 12:20:45 +00:00
Guillaume Gomez
64b5520757 clean up E0641 explanation 2020-06-03 13:52:09 +02:00
Jonathan Schwender
7bf026eed6
Doc: unstable book - profile.md: improve wording
- mention `--target` flag excludes RUSTFLAGS passing to build scripts and proc macros
2020-06-03 11:05:56 +02:00
bors
ff4aff6ce0 Auto merge of #70107 - lcnr:issue68977, r=eddyb
WF-check all ty::Const's, not just array lengths.

fixes #68977

This PR removes the special case for array length in `wf::compute` and
checks the well formedness of all consts.

Changes `PredicateKind::WellFormed` to take a `GenericArg` and updates `wf::obligations`.
2020-06-03 08:43:11 +00:00
Patryk Wychowaniec
c55d55e850
Fix a typo in late.rs
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
2020-06-03 08:38:10 +02:00
bors
680a4b2fbd Auto merge of #72935 - Dylan-DPC:rollup-60g3ab6, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72704 (Remote testing fixes)
 - #72820 (InstCombine: Don't optimize `&mut *x` into `x`)
 - #72848 (Correct generic parameter ordering in error note for E0747)
 - #72902 (Add a test to ensure Fuse stays covariant)
 - #72921 (Add assert to Vec with_capacity docs)

Failed merges:

r? @ghost
2020-06-03 01:00:39 +00:00
Dylan DPC
ba3d98250f
Rollup merge of #72921 - pickfire:vec-assert, r=Mark-Simulacrum
Add assert to Vec with_capacity docs
2020-06-03 02:39:09 +02:00
Dylan DPC
0050b8817b
Rollup merge of #72902 - cuviper:fuse-covariant, r=nikomatsakis
Add a test to ensure Fuse stays covariant

When #70502 attempted to specialize the data types in `Fuse`, one of the problems we found was that it broke variance. This was also realized when `Fuse` was first added, https://github.com/rust-lang/rust/pull/35656#discussion-diff-74995079, but now this PR adds a test so we don't forget again.
2020-06-03 02:39:07 +02:00
Dylan DPC
69a1ac3891
Rollup merge of #72848 - camelid:fix-72815, r=varkor
Correct generic parameter ordering in error note for E0747

Fixes #72815.

r? @varkor
2020-06-03 02:39:05 +02:00
Dylan DPC
9c3ac0c9bb
Rollup merge of #72820 - jonas-schievink:instcombine-uninit, r=oli-obk
InstCombine: Don't optimize `&mut *x` into `x`

Fixes https://github.com/rust-lang/rust/issues/72797
2020-06-03 02:39:03 +02:00
Dylan DPC
b47896492c
Rollup merge of #72704 - tblah:remote-testing-fixes, r=Mark-Simulacrum
Remote testing fixes

Improvements for remote testing

- Create a `RUST_TEST_TMPDIR` directory on the remote testing host
- Verbose mode for remote-test-server
- Skip tests which don't support remote testing using `// ignore-remote`

To test:
- Build `remote-test-server` for the target machine and copy it over
- On the target:
``` sh
remote-test-server remote
```
- On the build machine
``` sh
export TEST_DEVICE_ADDR="1.2.3.4:12345"
./x.py test
```
2020-06-03 02:38:59 +02:00
Vadim Petrochenkov
e793b46e49 Update fulldeps tests and clippy 2020-06-03 00:18:57 +03:00
Yuki Okushi
7d27c63114
Stabilize std::io::Buf{Reader, Writer}::capacity 2020-06-03 04:32:22 +09:00
Patryk Wychowaniec
d31d215c56
Improve E0433, so that it suggests missing imports 2020-06-02 20:41:25 +02:00
Vadim Petrochenkov
283e5b4106 Rename the crates in source code 2020-06-02 20:42:54 +03:00
Vadim Petrochenkov
11d951492c Make things build again 2020-06-02 20:38:24 +03:00
Ivan Tham
596b0c88cc Add assert to Vec with_capacity docs 2020-06-03 01:29:02 +08:00
Vadim Petrochenkov
47197d69ab Rename directories for some compiler crates from libx to librustc_x
libarena -> librustc_arena
libfmt_macros -> librustc_parse_format
libgraphviz -> librustc_graphviz
libserialize -> librustc_serialize
2020-06-02 19:53:33 +03:00
bors
fe10f1a49f Auto merge of #72918 - Dylan-DPC:rollup-pnvj62b, r=Dylan-DPC
Rollup of 4 pull requests

Successful merges:

 - #72884 (RawString error reporting cleanup )
 - #72888 (Add a warning about infinite reading in read_(until|line))
 - #72914 (Minor: off-by-one error in RELEASES.md)
 - #72916 (Update README.md)

Failed merges:

r? @ghost
2020-06-02 16:30:44 +00:00
Dylan DPC
bed597a220
Rollup merge of #72916 - DutchGhost:patch-1, r=jonas-schievink
Update README.md

https://github.com/rust-lang/rust/pull/72827 changed it from `*.nix` to `Unix-like system`, but actually it should be `a Unix-like system`
2020-06-02 18:30:05 +02:00
Dylan DPC
de1a767481
Rollup merge of #72914 - petertodd:2020-minor-at-most-32, r=jonas-schievink
Minor: off-by-one error in RELEASES.md
2020-06-02 18:30:03 +02:00
Dylan DPC
9763e0c089
Rollup merge of #72888 - poliorcetics:improve-read_line-read_until-doc, r=Dylan-DPC
Add a warning about infinite reading in read_(until|line)

Fix for #48788.

This PR adds a warning to [`BufRead::read_line`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_line) and [`BufRead::read_until`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_until) about the possibility of an attack using the behaviour of these functions.

I did not mention a possible fix (using [`Read::take`](https://doc.rust-lang.org/stable/std/io/trait.Read.html#method.take), should I ?
2020-06-02 18:29:59 +02:00
Dylan DPC
466d3e702a
Rollup merge of #72884 - Julian-Wollersberger:raw_str_error_cleanup, r=petrochenkov
RawString error reporting cleanup

I simplified how errors with raw string are represented in the lexer and reportet in the parser, by using one enum instead of two structs with impls. This makes 70 code lines obsolete.

I also noticed some other things (2nd commit) and added a missing test for the `too many '#' symbols' error.

My original intent was to improve performance, but the only thing I found was to inline some functions in `cursor.rs`. It's effect is barely measurable, though.

There is one open question. Before, the compiler aborts when encountering the `too many '#' symbols` error. Now the lexer says in this case that there are 0 hashes, and then later the parser aborts on the error.
I'm worrying that the parser may be changed to recover and continue, and then later stages will see the wrong numer of hashes and act strange. (eg. the `format!` macro expansion).
Is that possibility important enough today to worry about it?
2020-06-02 18:29:57 +02:00
DutchGhost
503048c4d9
Update README.md
https://github.com/rust-lang/rust/pull/72827 changed it from `*.nix` to `Unix-like system`, but actually it should be `a Unix-like system`
2020-06-02 16:12:36 +02:00
Peter Todd
786ad87d40
Minor: off-by-one error in RELEASES.md 2020-06-02 09:47:33 -04:00
Bastian Kauschke
631ac9c472 update tests 2020-06-02 15:02:36 +02:00
Bastian Kauschke
ef4d2c1043 change WellFormed predicate to GenericArg 2020-06-02 15:02:36 +02:00
Bastian Kauschke
81831e124e add WellFormedConst predicate 2020-06-02 15:02:36 +02:00
Bastian Kauschke
cb2308de54 implement wf checking for constants 2020-06-02 15:02:36 +02:00
Tom Eccles
81df5ac241 compiletest: Add name directive for remote runners
Allow tests to use
// ignore-remote
to ignore the test when using remote-test-{client,server}. In most
situations this would be covered by
// ignore-cross-compile
but I see no reason that a non-cross compiled remote test runner
shouldn't work.
2020-06-02 14:00:18 +01:00
Tom Eccles
9e137bb8b6 tools/remote-test-server: make use of verbose option
There was an unused verbose command line argument. Add some prints if
verbose is set.
2020-06-02 14:00:18 +01:00
Tom Eccles
1b7ec76c16 tools/remote-test-{server,client}: support RUST_TEST_TMPDIR
Some tests (e.g. ui-fulldeps/create-dir-all-bare.rs) assume that
RUST_TEST_TMPDIR exists on the system running the test. Expand
remote-test-{server,client} such that a tmp directory is created on the
remote runner and this environment variable will point at it.
2020-06-02 14:00:18 +01:00