Hameer Abbasi
091433d699
Rename stderr->64bit.stderr where needed.
2021-03-31 08:23:11 +00:00
Hameer Abbasi
c3ec0add8b
Add allocation information to undefined behaviour errors.
2021-03-31 07:21:08 +00:00
bjorn3
5773e51678
Inline a few methods
2021-03-31 09:19:29 +02:00
bors
2a32abbcde
Auto merge of #83681 - jyn514:blanket-impls-tweaks, r=Aaron1011
...
rustdoc: Only look at blanket impls in `get_blanket_impls`
The idea here is that all the work in 16156fb278/compiler/rustc_middle/src/ty/trait_def.rs (L172-L186)
doesn't matter for `get_blanket_impls` - Rustdoc will already pick up on those blocks when it documents the item.
2021-03-31 05:47:22 +00:00
Michael Wright
8abab5561c
Fix hidden variant suggestion on single variant
...
Fixes #6984
2021-03-31 07:36:09 +02:00
bors
0b76719638
Auto merge of #7007 - Y-Nak:result_unit_err, r=giraffate
...
result_unit_err: Fix typo
changelog: result_unit_err: fix typo in a diagnostic message
r? `@giraffate`
fixes https://github.com/rust-lang/rust-clippy/pull/6990#discussion_r603292920 .
2021-03-31 04:01:15 +00:00
bors
6ff482bde5
Auto merge of #83666 - Amanieu:instrprof-order, r=tmandry
...
Run LLVM coverage instrumentation passes before optimization passes
This matches the behavior of Clang and allows us to remove several
hacks which were needed to ensure functions weren't optimized away
before reaching the instrumentation pass.
Fixes #83429
cc `@richkadel`
r? `@tmandry`
2021-03-31 03:20:33 +00:00
Yoshitomo Nakanishi
45164de59f
result_unit_err: Fix typo
2021-03-31 11:18:48 +09:00
hi-rustin
8f77356249
give full path of constraint in suggest_constraining_type_param
...
revert file
bless with nll mode
2021-03-31 09:47:31 +08:00
bors
65b44b0320
Auto merge of #83692 - Dylan-DPC:rollup-2a2m3jy, r=Dylan-DPC
...
Rollup of 6 pull requests
Successful merges:
- #80720 (Make documentation of which items the prelude exports more readable.)
- #83654 (Do not emit a suggestion that causes the E0632 error)
- #83671 (Add a regression test for issue-75801)
- #83678 (Fix Self keyword doc URL conflict on case insensitive file systems (until definitely fixed on rustdoc))
- #83680 (Update for loop desugaring docs)
- #83683 (bootstrap: don't complain about linkcheck if it is excluded)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2021-03-30 23:47:51 +00:00
bors
4be72b0936
Auto merge of #7001 - ebobrow:non-octal-file-permissions, r=Manishearth
...
Add non_octal_unix_permissions lint
fixes #6934
changelog: add new lint that checks for non-octal values used to set unix file permissions
2021-03-30 23:23:50 +00:00
Dylan DPC
7a587f0d06
Rollup merge of #83683 - tblah:riscv64linux_links, r=Mark-Simulacrum
...
bootstrap: don't complain about linkcheck if it is excluded
We don't need to complain to the user about linkcheck having different
hosts and targets when it is already excluded.
Resolves #83661
2021-03-31 01:14:50 +02:00
Dylan DPC
2aa1bf8984
Rollup merge of #83680 - ibraheemdev:patch-2, r=Dylan-DPC
...
Update for loop desugaring docs
It looks like the documentation for `for` loops was not updated to match the new de-sugaring process.
2021-03-31 01:14:49 +02:00
Dylan DPC
d51fc973e4
Rollup merge of #83678 - GuillaumeGomez:hack-Self-keyword-conflict, r=jyn514
...
Fix Self keyword doc URL conflict on case insensitive file systems (until definitely fixed on rustdoc)
This is just a hack to allow rustup to work on macOS and windows again to distribute std documentation (hopefully once https://github.com/rust-lang/rfcs/pull/3097 or an equivalent is merged).
Fixes https://github.com/rust-lang/rust/issues/80504 . Prevents https://github.com/rust-lang/rust/issues/83154 and https://github.com/rust-lang/rustup/issues/2694 in future releases.
cc ``@kinnison``
r? ``@jyn514``
2021-03-31 01:14:48 +02:00
Dylan DPC
f1ad4bd97c
Rollup merge of #83671 - JohnTitor:issue-75801-test, r=Dylan-DPC
...
Add a regression test for issue-75801
Closes #75801
r? ``@Aaron1011``
2021-03-31 01:14:47 +02:00
Dylan DPC
7d888d100f
Rollup merge of #83654 - JohnTitor:issue-83606, r=estebank
...
Do not emit a suggestion that causes the E0632 error
Fixes #83606
2021-03-31 01:14:46 +02:00
Dylan DPC
7391124154
Rollup merge of #80720 - steffahn:prettify_prelude_imports, r=camelid,jyn514
...
Make documentation of which items the prelude exports more readable.
I recently figured out that rustdoc allows link inside of inline code blocks as long as they’re delimited with `<code> </code>` instead of `` ` ` ``. I think this applies nicely in the listing of prelude exports [in the docs](https://doc.rust-lang.org/std/prelude/index.html ). There, currently unformatted `::` and `{ , }` is used in order to mimick import syntax while attatching links to individual identifiers.
## Rendered Comparison
### Currently (light)
![Screenshot_20210105_155801](https://user-images.githubusercontent.com/3986214/103661510-1a87be80-4f6f-11eb-8360-1dfb23f732e8.png )
### After this PR (light)
![Screenshot_20210105_155811](https://user-images.githubusercontent.com/3986214/103661533-1f4c7280-4f6f-11eb-89d4-874793937824.png )
### Currently (dark)
![Screenshot_20210105_155824](https://user-images.githubusercontent.com/3986214/103661571-2a9f9e00-4f6f-11eb-95f9-e291b5570b41.png )
### After this PR (dark)
![Screenshot_20210105_155836](https://user-images.githubusercontent.com/3986214/103661592-2ffce880-4f6f-11eb-977a-82afcb07d331.png )
### Currently (ayu)
![Screenshot_20210105_155917](https://user-images.githubusercontent.com/3986214/103661619-39865080-4f6f-11eb-9ca1-9045a107cddd.png )
### After this PR (ayu)
![Screenshot_20210105_155923](https://user-images.githubusercontent.com/3986214/103661652-3db26e00-4f6f-11eb-82b7-378e38f0c41f.png )
_Edit:_ I just noticed, the “current” screenshots are from stable, so there are a few more differences in the pictures than the ones from just this PR.
2021-03-31 01:14:40 +02:00
Elliot Bobrow
7fcd155712
Add non_octal_unix_permissions lint
2021-03-30 16:04:16 -07:00
Camille GILLOT
fbfef40e32
Fix fulldeps tests.
2021-03-30 23:51:15 +02:00
bors
74874a690b
Auto merge of #83652 - xu-cheng:ipv4-octal, r=sfackler
...
Disallow octal format in Ipv4 string
In its original specification, leading zero in Ipv4 string is interpreted
as octal literals. So a IP address 0127.0.0.1 actually means 87.0.0.1.
This confusion can lead to many security vulnerabilities. Therefore, in
[IETF RFC 6943], it suggests to disallow octal/hexadecimal format in Ipv4
string all together.
Existing implementation already disallows hexadecimal numbers. This commit
makes Parser reject octal numbers.
Fixes #83648 .
[IETF RFC 6943]: https://tools.ietf.org/html/rfc6943#section-3.1.1
2021-03-30 19:34:23 +00:00
Camille GILLOT
d121b34e99
Remove hir::CrateItem.
2021-03-30 20:31:06 +02:00
Camille GILLOT
9d8f833e05
Remove hir::CrateItem.
2021-03-30 20:31:06 +02:00
Tom Eccles
8f97b948e3
bootstrap: don't complain about linkcheck if it is excluded
...
We don't need to complain to the user about linkcheck having different
hosts and targets when it is already excluded. This can be achieved by
moving the check to when the step is run instead of in should_run.
2021-03-30 18:47:34 +01:00
bors
926ec1cb8b
Auto merge of #83639 - osa1:issue83638, r=estebank
...
Replace tabs in err messages before rendering
This is done in other call sites, but was missing in one place.
Fixes #83638
2021-03-30 17:07:19 +00:00
bjorn3
8331dbe6d0
Add an Mmap wrapper to rustc_data_structures
...
This wrapper implements StableAddress and falls back to directly reading
the file on wasm32
2021-03-30 18:57:03 +02:00
Joshua Nelson
6f06b761b9
Only look at blanket impls in get_blanket_impls
2021-03-30 12:28:33 -04:00
Camille GILLOT
8ee9322c10
Also profile finishing the encoding.
2021-03-30 18:10:08 +02:00
Camille GILLOT
df24315ddf
Adjust profiling.
2021-03-30 18:10:08 +02:00
Camille GILLOT
fe89f3236c
Address review.
2021-03-30 18:10:08 +02:00
Camille GILLOT
65a8681a17
Add documentation.
2021-03-30 18:10:07 +02:00
Camille GILLOT
c5c935af92
Simplify tracking the encoder state.
2021-03-30 18:10:07 +02:00
Camille GILLOT
e1c99e5fcc
Remove the parallel version.
2021-03-30 18:10:06 +02:00
Camille GILLOT
8208872fa2
Fix parallel compiler.
2021-03-30 18:10:06 +02:00
Camille GILLOT
cfe786e5e0
Fix tests.
...
Avoid invoking queries inside `check_paths`, since we are holding a lock
to the reconstructed graph.
2021-03-30 18:10:06 +02:00
Camille GILLOT
39b306a53d
Do not allocate in decoder.
2021-03-30 18:10:05 +02:00
Camille GILLOT
6bfaf3a9cb
Stream the dep-graph to a file.
2021-03-30 18:09:59 +02:00
Ibraheem Ahmed
29fe5930a3
update for loop desugaring docs
2021-03-30 12:03:58 -04:00
Jason Newcomb
cc7f1daab2
Don't lint manual_map
in const functions
2021-03-30 10:56:08 -04:00
Guillaume Gomez
f35e587db4
Fix Self keyword doc URL conflict on case insensitive file systems
2021-03-30 16:37:13 +02:00
bors
7b6fc5a3dd
Auto merge of #83170 - joshtriplett:spawn-cleanup, r=kennytm
...
Simplify Command::spawn (no semantic change)
This minimizes the size of an unsafe block, and allows outdenting some
complex code.
2021-03-30 14:26:01 +00:00
bors
44bf60f62d
Auto merge of #7004 - Jarcho:manual_map_if_then_else, r=camsteffen
...
Fix `manual_map` at the end of an if chain
changelog: Fix `manual_map` suggestion at the end of an if chain
2021-03-30 14:03:54 +00:00
Jason Newcomb
fa689f865e
Fix manual_map
at the end of an if chain
2021-03-30 09:58:23 -04:00
bors
16156fb278
Auto merge of #83674 - Dylan-DPC:rollup-bcuc1hl, r=Dylan-DPC
...
Rollup of 7 pull requests
Successful merges:
- #83568 (update comment at MaybeUninit::uninit_array)
- #83571 (Constantify some slice methods)
- #83579 (Improve pointer arithmetic docs)
- #83645 (Wrap non-pre code blocks)
- #83656 (Add a regression test for issue-82865)
- #83662 (Update books)
- #83667 (Suggest box/pin/arc ing receiver on method calls)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2021-03-30 11:44:36 +00:00
Dylan DPC
5b467787b6
Rollup merge of #83667 - estebank:cool-bears-hot-tip, r=lcnr
...
Suggest box/pin/arc ing receiver on method calls
_Extracted from https://fasterthanli.me/articles/pin-and-suffering_
2021-03-30 11:34:30 +02:00
Dylan DPC
36eee62c08
Rollup merge of #83662 - ehuss:update-books, r=ehuss
...
Update books
## reference
4 commits in d10a0af8dca25d9d548ca6a369fd66ad06acb3c9..fd97729e2d82f8b08d68a31c9bfdf0c37a7fd542
2021-03-21 11:14:06 -0700 to 2021-03-28 14:29:19 -0700
- Editorial cleanup on expressions (part 1) (rust-lang-nursery/reference#967 )
- Update type casts section (rust-lang-nursery/reference#961 )
- Add missing "?" notion (rust-lang-nursery/reference#989 )
- Fix typo (rust-lang-nursery/reference#988 )
## book
8 commits in fc2f690fc16592abbead2360cfc0a42f5df78052..b54090a99ec7c4b46a5203a9c927fdbc311bb1f5
2021-03-05 14:03:22 -0500 to 2021-03-24 11:21:46 -0500
- correct the signature of the `deref` method (rust-lang/book#2658 )
- Clarify the immutability of a reference (rust-lang/book#2646 )
- Tweak wording around Windows representation of enter
- Ch. 02 note - Enter results in CRLF on Windows (rust-lang/book#2648 )
- Added an example of slicing result (rust-lang/book#2649 )
- Fix word wrapping, mention dictionary.txt is also in the ci dir
- README: note that spellcheck.sh is in ci directory (rust-lang/book#2652 )
- Change someurl.com to example.org (rust-lang/book#2655 )
## rust-by-example
12 commits in eead22c6c030fa4f3a167d1798658c341199e2ae..29d91f591c90dd18fdca6d23f1a9caf9c139d0d7
2021-03-04 16:26:43 -0300 to 2021-03-23 09:03:39 -0300
- Unwrap some drinks. (rust-lang/rust-by-example#1431 )
- doc(testcase_linked_list): add a little extra note about pattern (rust-lang/rust-by-example#1408 )
- Update function name in comment (rust-lang/rust-by-example#1413 )
- Fixes minor typo in src/types/cast.md (rust-lang/rust-by-example#1414 )
- Add destructuring example to generics new type (rust-lang/rust-by-example#1416 )
- update struct.md (rust-lang/rust-by-example#1419 )
- fix name from rectangle to Rectangle (rust-lang/rust-by-example#1420 )
- Typo "incures" in code comment (rust-lang/rust-by-example#1422 )
- Changed impl to use Self::Item (rust-lang/rust-by-example#1425 )
- Fix code highlighting in some places (rust-lang/rust-by-example#1427 )
- Update multi_bounds.md (rust-lang/rust-by-example#1428 )
- Reformulated text for redability (rust-lang/rust-by-example#1429 )
## rustc-dev-guide
3 commits in 67ebd4b55dba44edfc351621cef6e5e758169c55..0687daac28939c476df51778f5a1d1aff1a3fddf
2021-03-11 13:36:25 -0800 to 2021-03-28 13:33:56 -0400
- Add notes about nightly rustc version for the rustc-driver examples
- Update rustc-driver-*.rs examples (rust-lang/rustc-dev-guide#1095 )
- Fix rust compiler meeting info (rust-lang/rustc-dev-guide#1087 )
## embedded-book
1 commits in f61685755fad7d3b88b4645adfbf461d500563a2..d3f2ace94d51610cf3e3c265705bb8416d37f8e4
2021-03-08 01:06:44 +0000 to 2021-03-17 07:53:09 +0000
- Add binary attribute to .jpeg files, closes rust-embedded/book#287 (rust-embedded/book#288 )
2021-03-30 11:34:29 +02:00
Dylan DPC
55171e425c
Rollup merge of #83656 - JohnTitor:resolve-test, r=petrochenkov
...
Add a regression test for issue-82865
Closes #82865
r? `@petrochenkov`
2021-03-30 11:34:28 +02:00
Dylan DPC
9f9577c1aa
Rollup merge of #83645 - pickfire:patch-3, r=GuillaumeGomez
...
Wrap non-pre code blocks
Fix #83550 regression
```
$ cargo new --lib whitespace && cd whitespace && echo '//! `" foo "`' > src/lib.rs && cargo doc --open
```
Before
![](https://user-images.githubusercontent.com/89623/112713498-c0dfc200-8ed5-11eb-8c57-efdf26372e74.png )
After
![](https://user-images.githubusercontent.com/89623/112713538-f08eca00-8ed5-11eb-8a98-675179f60ae2.png )
r? ``@GuillaumeGomez``
cc ``@mgeisler``
2021-03-30 11:34:27 +02:00
Dylan DPC
5b67543c98
Rollup merge of #83579 - RalfJung:ptr-arithmetic, r=dtolnay
...
Improve pointer arithmetic docs
* Add slightly more detailed definition of "allocated object" to the module docs, and link it from everywhere.
* Clarify the "remains attached" wording a bit (at least I hope this is clearer).
* Remove the sentence about using integer arithmetic; this seems to confuse people even if it is technically correct.
As usual, the edit needs to be done in a dozen places to remain consistent, I hope I got them all.
2021-03-30 11:34:26 +02:00
Dylan DPC
ad2a80e412
Rollup merge of #83571 - a1phyr:feature_const_slice_first_last, r=dtolnay
...
Constantify some slice methods
Tracking issue: #83570
This PR constantifies the following functions under feature `const_slice_first_last`:
- `slice::first`
- `slice::split_first`
- `slice::last`
- `slice::split_last`
Blocking on `#![feature(const_mut_refs)]`:
- `slice::first_mut`
- `slice::split_first_mut`
- `slice::last_mut`
- `slice::split_last_mut`
2021-03-30 11:34:25 +02:00
Dylan DPC
9ab5f7db30
Rollup merge of #83568 - RalfJung:uninit_array, r=dtolnay
...
update comment at MaybeUninit::uninit_array
https://github.com/rust-lang/rust/issues/49147 is closed; this now instead needs inline const expressions (#76001 ).
2021-03-30 11:34:23 +02:00