Commit Graph

102084 Commits

Author SHA1 Message Date
Pietro Albini
a4e91c2986
Rollup merge of #65136 - ehuss:update-codegen-options, r=Dylan-DPC
Update codegen option documentation.

Some documentation updates:

- Add more detail to codegen options.
- Add missing options:
    - `force-frame-pointers`
    - `default-linker-libraries`
    - `linker-plugin-lto`
- Add fragment anchors for all command-line-arguments.
- Add some cross links between options.
2019-11-05 09:49:47 +01:00
Ralf Jung
82dc3aa5fb link from raw slice creation methods to safety requirements 2019-11-05 09:32:47 +01:00
Paul Dicker
4c66658f2c Don't mutate node.next 2019-11-05 07:15:35 +01:00
bors
2e4da3caad Auto merge of #65938 - eddyb:fn-abi-rename, r=oli-obk
rustc_target: rename {Fn,Arg}Type to {Fn,Arg}Abi.

I was trying to tweak the API of `FnType` (now `FnAbi`) and the name kept bothering me.

`FnAbi` is to a function signature a bit like a layout is to a type, so the name still isn't perfect yet, but at least it doesn't have the misleading `Type` in it anymore.

If this can't land I think I can continue my original refactor without it, so I'm not strongly attached to it.

r? @nagisa cc @oli-obk
2019-11-05 05:47:31 +00:00
Youngsuk Kim
f28126ee1b
Fix typo in explanation of E0080
Handling issue #66105 in Rust repo.
`evaluate an constant expression` to `evaluate a constant expression`
2019-11-05 00:35:18 -05:00
Samuel Holland
d01ebbb34b Add target thumbv7neon-unknown-linux-musleabihf
This is a copy of thumbv7neon-unknown-linux-gnueabihf with musl changes
merged from armv7-unknown-linux-musleabihf.
2019-11-04 22:28:50 -06:00
bors
d2185f6752 Auto merge of #65911 - mati865:static-libstdcxx-mingw, r=alexcrichton
Statically link libstdc++ on windows-gnu

Fixes https://github.com/rust-lang/rust/issues/61561 by not shipping `libstdc++-6.dll` which can conflict with the GCC.
2019-11-05 00:30:58 +00:00
Esteban Küber
3bbfc7320b Detect :: -> : typo when involving turbofish 2019-11-04 16:19:55 -08:00
Dylan MacKenzie
c8ae2819c5 Add tests for loop constructs in consts
These errors are suboptimal, but they will be fixed by the new
`check_consts` pass.
2019-11-04 14:19:51 -08:00
bors
881ebeb776 Auto merge of #65874 - Nadrieril:clarify-usefulness, r=varkor
Clarify pattern-matching usefulness algorithm

This PR clarifies a bit the usefulness algorithm by emphasizing that each row of the matrix can be seen as a sort of stack from which we pop constructors. It also moves code around to increase separation of concerns.

This is part of my splitting of https://github.com/rust-lang/rust/pull/65160 into smaller PRs.
2019-11-04 21:06:50 +00:00
Daniel Henry-Mantilla
67f2200f4a Minor style improvements
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-11-04 19:47:31 +01:00
nia
b4f92eaea2 Use any() in code shared between FreeBSD and NetBSD 2019-11-04 17:34:29 +00:00
nia
23d221153f Use KERN_ARND syscall for random numbers on NetBSD, same as FreeBSD.
This system call is present on all supported NetBSD versions and
provides an endless stream of non-blocking random data from the
kernel's ChaCha20-based CSPRNG. It doesn't require a file descriptor
to be opened.

The system call is documented here (under kern.arandom):
https://netbsd.gw.com/cgi-bin/man-cgi?sysctl+7+NetBSD-7.0

And defined here:
https://nxr.netbsd.org/xref/src/sys/sys/sysctl.h#273

The semantics are the same as FreeBSD so reading 256 bytes per call
is fine.

Similar change for getrandom crate: rust-random/getrandom#115
2019-11-04 17:16:11 +00:00
Umesh Kalappa
5083adeaad Implemented the home_dir for VxWorks 2019-11-04 09:15:28 -08:00
Tomasz Miąsko
e8733f7845 Add warning annotations for issue-47094 test 2019-11-04 16:03:46 +01:00
Tomasz Miąsko
0501d8ab0d Use check-pass in ui tests where appropriate 2019-11-04 16:03:46 +01:00
Tomasz Miąsko
045fdd9fa9 Use build-pass in ui tests where appropriate 2019-11-04 16:03:46 +01:00
Ralf Jung
90b8d34c9f bump smallvec to 1.0 2019-11-04 15:59:09 +01:00
Vadim Petrochenkov
d22a65995a Do not require extra LLVM backends for x.py test to pass 2019-11-04 16:54:34 +03:00
Tomasz Miąsko
a03474bc54 Use run-pass for ui tests where appropriate 2019-11-04 13:57:42 +01:00
Tomasz Miąsko
a99fba5bc5 Remove no longer useful ui test 2019-11-04 13:57:42 +01:00
Ralf Jung
21d284b6f0 also test different integers 2019-11-04 13:32:38 +01:00
Ralf Jung
3c944feb65 test offset_from with two integers 2019-11-04 13:32:38 +01:00
Ralf Jung
047e702c66 Miri: ptr_offset_from: support offset_from with twice the same non-null integer 2019-11-04 13:32:38 +01:00
Ralf Jung
da0c7c664b Miri: offset_from: do int-to-ptr casts when needed 2019-11-04 13:32:38 +01:00
Guillaume Gomez
1c78af7de2 clean highlightSourceLines code 2019-11-04 13:28:50 +01:00
bors
2477e2493e Auto merge of #66078 - petrochenkov:gateout, r=Centril
expand: Feature gate out-of-line modules in proc macro input

Extracted from https://github.com/rust-lang/rust/pull/64273.

We are currently gating attributes applied directly to `mod` items because there are unresolved questions about out-of-line modules and their behavior is very likely to change.

However, you can sneak an out-of-line module into an attribute macro input using modules nested into other items like
```rust
#[my_attr]
fn m() {
    #[path = "zzz.rs"]
    mod n; // what tokens does the `my_attr` macro see?
}
```
This PR prevents that and emits a feature gate error for this case as well.

r? @Centril
It would be great to land this before beta.
2019-11-04 12:16:00 +00:00
Vadim Petrochenkov
e7cedc9972 expand: Feature gate out-of-line modules in proc macro input 2019-11-04 14:56:07 +03:00
Ralf Jung
b4dde36344 let caller of check_ptr_access_align control the error message 2019-11-04 12:28:13 +01:00
Guillaume Gomez
8784b074e7 Change sub-setting CSS class to sub-settings 2019-11-04 11:39:00 +01:00
Ralf Jung
151e9890f4 also explain how to resolve MethodCall 2019-11-04 10:16:16 +01:00
Ralf Jung
bb37d00787 more robust method checking through DefId and diagnostic_item 2019-11-04 10:11:58 +01:00
Ralf Jung
224378cc6a more correct error msg 2019-11-04 10:10:49 +01:00
Ralf Jung
2cf7c29675 avoid using nightly features 2019-11-04 10:08:58 +01:00
bors
ab6e47851b Auto merge of #65835 - Mark-Simulacrum:lockless-lintbuffer, r=nikomatsakis
Remove LintBuffer from Session

This moves the `LintBuffer` from `Session` into the `Resolver`, where it is used until lowering is done and then consumed by early lint passes. This also happily removes the failure mode of buffering lints too late where it would have previously lead to ICEs; it is statically no longer possible to do so.

I suspect that with a bit more work a similar move could be done for the lint buffer inside `ParseSess`, but this PR doesn't touch it (in part to keep itself small).

The last commit is the "interesting" commit -- the ones before it don't work (though they compile) as they sort of prepare the various crates for the lint buffer to be passed in rather than accessed through Session.
2019-11-04 09:00:39 +00:00
Ralf Jung
65153710e1 QPath docs: mention how to resolve them 2019-11-04 09:50:59 +01:00
bors
cba9368537 Auto merge of #64878 - XAMPPRocky:relnotes-1.39.0, r=XAMPPRocky
Updated RELEASES.md for 1.39.0

### [Rendered](https://github.com/XAMPPRocky/rust/blob/relnotes-1.39.0/RELEASES.md)

r? @Mark-Simulacrum
cc @rust-lang/release
2019-11-04 05:42:40 +00:00
Igor Aleksanov
31735b02c9 librustc_lexer: Make nth_char method private 2019-11-04 06:27:25 +03:00
Igor Aleksanov
e8b8d2a725 librustc_lexer: Reorder imports in lib.rs 2019-11-04 06:27:25 +03:00
Igor Aleksanov
ecd26739d4 librustc_lexer: Simplify "lifetime_or_char" method 2019-11-04 06:27:18 +03:00
Andy Russell
d06a4ded13
use silent emitter for rustdoc highlighting pass 2019-11-03 22:19:34 -05:00
Mark Rousskov
c68df7c503 Delete lint buffer from Session 2019-11-03 21:52:42 -05:00
Mark Rousskov
c0fdddcb60 Move crate type checking later
This allows us to directly pass in a lint buffer
2019-11-03 21:52:42 -05:00
Mark Rousskov
ea1ff8c07c Utilize Resolver lint buffer during HIR lowering 2019-11-03 21:52:42 -05:00
Mark Rousskov
bb0c930f82 Migrate resolver over to internal lint buffer 2019-11-03 21:52:42 -05:00
Mark Rousskov
1bd6b48914 Only permit taking buffered lints inside lint internals 2019-11-03 21:51:06 -05:00
Mark Rousskov
f530156ef5 Remove unused get_any method 2019-11-03 21:51:05 -05:00
bors
f49f388713 Auto merge of #65838 - estebank:resilient-recovery, r=Centril
Reduce amount of errors given unclosed delimiter

When in a file with a non-terminated item, catch the error and consume
the block instead of trying to recover it on a more granular way in order to
reduce the amount of unrelated errors that would be fixed after adding
the missing closing brace. Also point out the possible location of the
missing closing brace.

Fix #63690.
2019-11-04 02:30:45 +00:00
bors
0d5264a03c Auto merge of #65780 - GuillaumeGomez:move-help-popup-generation-code, r=Mark-Simulacrum
Move help popup generation code

The first commit is just a small cleanup.

The idea behind this PR is to reduce a bit more the generated HTML files by moving the duplicated code into one place instead.

r? @kinnison
2019-11-03 21:55:48 +00:00
Mark Rousskov
417c09ab27 Do not needlessly write-lock 2019-11-03 16:52:27 -05:00