123615 Commits

Author SHA1 Message Date
Manish Goregaokar
ff1c53f811
Rollup merge of #74440 - Abendstolz:patch-1, r=hanna-kruppe
Fix Arc::as_ptr docs

As a non-native speaker I stumbled upon this, looked it up and couldn't find a phrase, so I made my own assumption that "in any way" was meant (which is the meaning I would've deduced anyway)
2020-07-17 14:09:31 -07:00
Manish Goregaokar
cdedae82cc
Rollup merge of #74438 - RalfJung:uninit-lint, r=davidtwco
warn about uninitialized multi-variant enums

Fixes https://github.com/rust-lang/rust/issues/73608
2020-07-17 14:09:29 -07:00
Manish Goregaokar
3b7e2862db
Rollup merge of #74428 - tshepang:better-filter-map-doc, r=jonas-schievink
docs: better demonstrate that None values are skipped as many times a…

…s needed
2020-07-17 14:09:28 -07:00
Manish Goregaokar
222d250837
Rollup merge of #74424 - sexxi-goose:move_hir_place, r=nikomatsakis
Move hir::Place to librustc_middle/hir

Needed to support https://github.com/rust-lang/project-rfc-2229/issues/7

Currently rustc_typeck depends on rustc_middle for definition TypeckTables, etc.
For supporting project-rfc-2229#7, rustc_middle would've to depend on
rustc_typeck for Place -- introducing a circular dependency.

This resembles the MIR equivalent of `Place` located in `lbrustc_middle/mir`.

Separate PR for this move will make the actual PR for using Places to represent captures cleaner/more focused.

r? @nikomatsakis  @matthewjasper
2020-07-17 14:09:26 -07:00
Manish Goregaokar
eef22dae7e
Rollup merge of #74416 - NieDzejkob:linker-locale-utf8, r=oli-obk
Use an UTF-8 locale for the linker.

Using a `C` locale breaks unicode filenames on Guix, where the linker is wrapped by a Guile program.
2020-07-17 14:09:24 -07:00
Manish Goregaokar
87d01d11e1
Rollup merge of #74411 - jonas-schievink:unbreak-mir, r=matthewjasper
Don't assign `()` to `!` MIR locals

Implements the fix described in https://github.com/rust-lang/rust/issues/73860#issuecomment-651731893.

Fixes https://github.com/rust-lang/rust/issues/73860

r? @matthewjasper
2020-07-17 14:09:22 -07:00
Manish Goregaokar
105cd4b21e
Rollup merge of #74394 - bjorn3:remove_emscripten_leftover, r=spastorino
Remove leftover from emscripten fastcomp support

This is no longer used since #63649
2020-07-17 14:09:20 -07:00
Manish Goregaokar
ef0540bb75
Rollup merge of #74368 - GuillaumeGomez:css-tidy-check, r=Mark-Simulacrum
Add CSS tidy check

r? @Mark-Simulacrum
2020-07-17 14:09:18 -07:00
Manish Goregaokar
344b5e06fa
Rollup merge of #74364 - lcnr:lazy-norm-tests, r=nikomatsakis
add lazy normalization regression tests

We previously didn't have simple tests which fail if we aren't careful around lazy normalization.

We now do.
2020-07-17 14:09:16 -07:00
Manish Goregaokar
c9010d6e85
Rollup merge of #74300 - lzutao:iterator-intra, r=jyn514
Use intra-doc links in core::iter module

This will make core::iter doc depend less on std doc.
2020-07-17 14:09:15 -07:00
Manish Goregaokar
6b2ccc7180
Rollup merge of #74288 - haraldh:test_aslr, r=petrochenkov
Fix src/test/run-make/static-pie/test-aslr.rs

Might be subject to the birthday paradox occasionally, causing spurious failures.

Addresses: https://github.com/rust-lang/rust/pull/70740#pullrequestreview-430981320
2020-07-17 14:09:13 -07:00
Manish Goregaokar
7d4e6c0aca
Rollup merge of #74251 - shepmaster:bootstrap-target-files, r=Mark-Simulacrum
Teach bootstrap about target files vs target triples

`rustc` allows passing in predefined target triples as well as JSON
target specification files. This change allows bootstrap to have the
first inkling about those differences. This allows building a
cross-compiler for an out-of-tree architecture (even though that
compiler won't work for other reasons).

Even if no one ever uses this functionality, I think the newtype
around the `Interned<String>` improves the readability of the code.
2020-07-17 14:09:11 -07:00
Manish Goregaokar
10b7eecbdd
Rollup merge of #74169 - ecstatic-morse:dataflow-unreachable, r=pnkfelix
Stop processing unreachable blocks when solving dataflow

...instead we `debug_assert` that the user is not checking the dataflow state for an unreachable block. This resolves a FIXME in the dataflow engine. The old behavior was an artifact of the previous dataflow framework. Things should run a tiny bit faster now, but I suspect not enough to show up in benchmarks. AFAIK, only the generator transform runs dataflow on MIR with unreachable basic blocks.

This PR also adds some utility methods to `mir::traversal`.

r? @pnkfelix
2020-07-17 14:09:08 -07:00
Manish Goregaokar
9c84c6b836
Rollup merge of #74056 - fusion-engineering-forks:fmt-arguments-as-str, r=Amanieu
Add Arguments::as_str().

There exist quite a few macros in the Rust ecosystem which use `format_args!()` for formatting, but special case the one-argument case for optimization:

```rust
#[macro_export]
macro_rules! some_macro {
    ($s:expr) => { /* print &str directly, no formatting, no buffers */ };
    ($s:expr, $($tt:tt)*) => { /* use format_args to write to a buffer first */ }
}
```

E.g. [here](7a961f0fbe/src/macros.rs (L48-L58)), [here](20f9a9e223/src/macros.rs (L9-L17)), and [here](7b679cd6da/px4/src/logging.rs (L45-L52)).

The problem with these is that a forgotten argument such as in `some_macro!("{}")` will not be diagnosed, but just prints `"{}"`.

With this PR, it is possible to handle the no-arguments case separately *after* `format_args!()`, while simplifying the macro. Then these macros can give the proper error about a missing argument, just like `print!("{}")` does, while still using the same optimized implementation as before.

This is even more important with [RFC 2795](https://github.com/rust-lang/rfcs/pull/2795), to make sure `some_macro!("{some_variable}")` works as expected.
2020-07-17 14:09:06 -07:00
Manish Goregaokar
be3b972820
Rollup merge of #74009 - mati865:mingw-tests-implib, r=nikomatsakis
Fix MinGW `run-make-fulldeps` tests

`compiler-rt-works-on-mingw` and `libs-search-path` were not ran because `only-mingw` doesn't match any target.
Enabled and verified few ignored tests with `windows-gnu` toolchain. They are still ignored on MSVC since I'm not experienced with this target.
2020-07-17 14:09:04 -07:00
Manish Goregaokar
f6cd31c3b7
Rollup merge of #73930 - a1phyr:feature_const_option, r=dtolnay
Make some Option methods const

Tracking issue: #67441

Constantify the following methods of `Option`:
- `as_ref`
- `is_some`
- `is_none`
- `iter` (not sure about this one, but it is possible, and will be useful when const traits are a thing)

cc @rust-lang/wg-const-eval @rust-lang/libs
2020-07-17 14:09:02 -07:00
Manish Goregaokar
3006ea3560
Rollup merge of #71670 - GuillaumeGomez:enforce-codeblocks-attribute-check, r=Mark-Simulacrum
Enforce even more the code blocks attributes check through rustdoc

`rustdoc` now has a lint which allows it to warn if a code block attribute is malformated (which can end up in bad situations, even more in case of testing examples!). Now it'll fail if such a situation is encountered when testing markdown code blocks examples.

r? @Mark-Simulacrum
2020-07-17 14:08:55 -07:00
Mateusz Mikuła
af1d01ebb3 Fix various tests to run on windows-gnu 2020-07-17 20:45:29 +02:00
bors
39d5a61f2e Auto merge of #72983 - Lezzz:rename-typeck, r=nikomatsakis
Rename TypeckTables to TypeckResults.

Originally suggested by @eddyb.
2020-07-17 17:25:09 +00:00
Mateusz Mikuła
933a06d8a3 Remove invalid test
When ran on Windows `cp` will follow symlink: `checkout/build/<target>/<stage>/lib/rustlib/src/rust`.
It points to `checkout` which means the test will get stuck in copying loop until there is no space left.
2020-07-17 18:07:53 +02:00
Mateusz Mikuła
2a9b51dcc4 Allow matching test by target and env 2020-07-17 18:07:51 +02:00
Mateusz Mikuła
48fe5fcbb8 Create implib for dlls when testing MinGW targets 2020-07-17 18:07:50 +02:00
Mara Bos
9c3353b97c Add tracking issue number for fmt_as_str. 2020-07-17 17:56:55 +02:00
Mara Bos
0c51f53edf Make fmt::Arguments::as_str() return a 'static str. 2020-07-17 17:56:55 +02:00
Ralf Jung
87b49764bc warn about uninit multi-variant enums 2020-07-17 16:39:59 +02:00
Jake Goulding
e2b337dc57 Teach bootstrap about target files vs target triples
`rustc` allows passing in predefined target triples as well as JSON
target specification files. This change allows bootstrap to have the
first inkling about those differences. This allows building a
cross-compiler for an out-of-tree architecture (even though that
compiler won't work for other reasons).

Even if no one ever uses this functionality, I think the newtype
around the `Interned<String>` improves the readability of the code.
2020-07-17 10:08:04 -04:00
bors
3014f23ddd Auto merge of #74439 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/74345
2020-07-17 13:54:21 +00:00
Mara Bos
e17c17a1af Make Arguments::as_str() work for empty format strings. 2020-07-17 15:35:59 +02:00
Mara Bos
bc4e33e6c1 Add #[inline] to Arguments::as_str(). 2020-07-17 15:35:59 +02:00
Mara Bos
e73a23fa96 Add Arguments::as_str(). 2020-07-17 15:35:58 +02:00
Lzu Tao
5ffdd7c565 Deny intra_doc_link_resolution_failure in libcore 2020-07-17 13:25:06 +00:00
Abendstolz
8aeecc63f8
Fix Arc::as_ptr docs
As a none-native speaker I stumbled upon this, looked it up and couldn't find a phrase, so I made my own assumption that "in any way" was meant (which is the meaning I would've deduced anyway)
2020-07-17 15:21:57 +02:00
Ralf Jung
8a917f9873 update Miri 2020-07-17 15:07:15 +02:00
Lzu Tao
67c1e89657 Remove code span for impl
Because the old one is harder to read and confuse typing checkers.
2020-07-17 13:00:50 +00:00
Lzu Tao
1a90ba73fb Link Some(item) 2020-07-17 13:00:50 +00:00
Lzu Tao
3fb3c0c0bd Remove unneeded link for Option 2020-07-17 13:00:50 +00:00
Lzu Tao
a7f067a2a4 Intra-doc for iter Sum and Product traits 2020-07-17 13:00:50 +00:00
Lzu Tao
69f43ddbbe Intra-doc for DoubleEndIterator 2020-07-17 13:00:50 +00:00
Lzu Tao
53a1d6f12f Intra doc for iter marker traits 2020-07-17 13:00:50 +00:00
Lzu Tao
91738d804a Use intra-doc link on Iterator page 2020-07-17 13:00:50 +00:00
Valentin Lazureanu
1e6adad33f Rename TypeckTables to TypeckResults. 2020-07-17 08:47:04 +00:00
Guillaume Gomez
83ffd5c18d Fix tidy issues 2020-07-17 10:22:09 +02:00
Guillaume Gomez
3429dedf13 Add tidy checks for rustdoc css files 2020-07-17 10:14:58 +02:00
Guillaume Gomez
6969b30996 Convert whitespaces to tabs 2020-07-17 10:14:58 +02:00
bors
c2dbebd3d4 Auto merge of #73365 - Manishearth:rustdoc-vis, r=GuillaumeGomez
Record visibility of reexports for all items, not just type items

This fixes https://github.com/rust-lang/rust/issues/73363

Unfortunately I can't add a test for this since this bug is obscured by the cross-crate bug, being fixed in https://github.com/rust-lang/rust/issues/73363 . Tests will be added later.

cc @jyn514

r? @GuillaumeGomez
2020-07-17 07:22:32 +00:00
Manish Goregaokar
90c678cb03 Update src/test/rustdoc/intra-doc-crate/auxiliary/hidden.rs
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-07-16 22:22:48 -07:00
Manish Goregaokar
50d350b67c Add test for doc(hidden) intra-doc cross-crate reexports 2020-07-16 22:22:40 -07:00
Manish Goregaokar
d5b1b74f47 Record visibility of reexports for all items, not just type items 2020-07-16 22:22:40 -07:00
Tshepang Lekhonkhobe
08b4b54417 docs: better demonstrate that None values are skipped as many times as needed 2020-07-17 07:00:20 +02:00
bors
86c0b85da9 Auto merge of #74395 - Mark-Simulacrum:stage0-next, r=pietroalbini
Bump version to 1.47

This also bumps to a more recent rustfmt version, just to keep us relatively up to date (though almost nothing has changed in rustfmt we use beyond bumps to the parser infra). No formatting changes as a result of this.

r? @pietroalbini
2020-07-17 03:51:35 +00:00